pub fn parse_http_generic_error(
response: &http::Response<bytes::Bytes>,
) -> Result<aws_smithy_types::Error, aws_smithy_xml::decode::XmlDecodeError> {
if response.body().is_empty() {
let mut err = aws_smithy_types::Error::builder();
if response.status().as_u16() == 404 {
err.code("NotFound");
}
Ok(err.build())
} else {
let base_err =
crate::rest_xml_unwrapped_errors::parse_generic_error(response.body().as_ref())?;
Ok(crate::s3_errors::parse_extended_error(
base_err,
response.headers(),
))
}
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_no_such_upload_xml_err(
inp: &[u8],
mut builder: crate::error::no_such_upload::Builder,
) -> Result<crate::error::no_such_upload::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_1 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_complete_multipart_upload(
inp: &[u8],
mut builder: crate::output::complete_multipart_upload_output::Builder,
) -> Result<
crate::output::complete_multipart_upload_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("CompleteMultipartUploadResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected CompleteMultipartUploadResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ChecksumSHA1") => {
let var_2 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_2);
}
,
s if s.matches("ChecksumSHA256") => {
let var_3 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_3);
}
,
s if s.matches("Bucket") => {
let var_4 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_4);
}
,
s if s.matches("ETag") => {
let var_5 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_5);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_6 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_6);
}
,
s if s.matches("ChecksumCRC32") => {
let var_7 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_7);
}
,
s if s.matches("Key") => {
let var_8 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_8);
}
,
s if s.matches("Location") => {
let var_9 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_location(var_9);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_object_not_in_active_tier_error_xml_err(
inp: &[u8],
mut builder: crate::error::object_not_in_active_tier_error::Builder,
) -> Result<
crate::error::object_not_in_active_tier_error::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_10 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_10);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_bucket_already_exists_xml_err(
inp: &[u8],
mut builder: crate::error::bucket_already_exists::Builder,
) -> Result<crate::error::bucket_already_exists::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_11 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_11);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_bucket_already_owned_by_you_xml_err(
inp: &[u8],
mut builder: crate::error::bucket_already_owned_by_you::Builder,
) -> Result<
crate::error::bucket_already_owned_by_you::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_12 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_12);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_create_multipart_upload(
inp: &[u8],
mut builder: crate::output::create_multipart_upload_output::Builder,
) -> Result<
crate::output::create_multipart_upload_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("InitiateMultipartUploadResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected InitiateMultipartUploadResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("UploadId") => {
let var_13 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_id(var_13);
}
,
s if s.matches("Bucket") => {
let var_14 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_14);
}
,
s if s.matches("Key") => {
let var_15 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_15);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_delete_objects(
inp: &[u8],
mut builder: crate::output::delete_objects_output::Builder,
) -> Result<crate::output::delete_objects_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("DeleteResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected DeleteResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Error") => {
let var_16 =
Some(
Result::<std::vec::Vec<crate::model::Error>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_17 = builder.errors.take().unwrap_or_default();
list_17.push(
crate::xml_deser::deser_structure_crate_model_error(&mut tag)
?
);
list_17
})
?
)
;
builder = builder.set_errors(var_16);
}
,
s if s.matches("Deleted") => {
let var_18 =
Some(
Result::<std::vec::Vec<crate::model::DeletedObject>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_19 = builder.deleted.take().unwrap_or_default();
list_19.push(
crate::xml_deser::deser_structure_crate_model_deleted_object(&mut tag)
?
);
list_19
})
?
)
;
builder = builder.set_deleted(var_18);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_accelerate_configuration(
inp: &[u8],
mut builder: crate::output::get_bucket_accelerate_configuration_output::Builder,
) -> Result<
crate::output::get_bucket_accelerate_configuration_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("AccelerateConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected AccelerateConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_20 =
Some(
Result::<crate::model::BucketAccelerateStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::BucketAccelerateStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_20);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_acl(
inp: &[u8],
mut builder: crate::output::get_bucket_acl_output::Builder,
) -> Result<crate::output::get_bucket_acl_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("AccessControlPolicy") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected AccessControlPolicy but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_21 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_21);
}
,
s if s.matches("AccessControlList") => {
let var_22 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_grants(&mut tag)
?
)
;
builder = builder.set_grants(var_22);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_cors(
inp: &[u8],
mut builder: crate::output::get_bucket_cors_output::Builder,
) -> Result<crate::output::get_bucket_cors_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("CORSConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected CORSConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CORSRule") => {
let var_23 =
Some(
Result::<std::vec::Vec<crate::model::CorsRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_24 = builder.cors_rules.take().unwrap_or_default();
list_24.push(
crate::xml_deser::deser_structure_crate_model_cors_rule(&mut tag)
?
);
list_24
})
?
)
;
builder = builder.set_cors_rules(var_23);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_lifecycle_configuration(
inp: &[u8],
mut builder: crate::output::get_bucket_lifecycle_configuration_output::Builder,
) -> Result<
crate::output::get_bucket_lifecycle_configuration_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("LifecycleConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected LifecycleConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Rule") => {
let var_25 =
Some(
Result::<std::vec::Vec<crate::model::LifecycleRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_26 = builder.rules.take().unwrap_or_default();
list_26.push(
crate::xml_deser::deser_structure_crate_model_lifecycle_rule(&mut tag)
?
);
list_26
})
?
)
;
builder = builder.set_rules(var_25);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_location(
inp: &[u8],
mut builder: crate::output::get_bucket_location_output::Builder,
) -> Result<
crate::output::get_bucket_location_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
match start_el {
s if s.matches("LocationConstraint") => {
let var_27 =
Some(
Result::<crate::model::BucketLocationConstraint, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::BucketLocationConstraint::from(
aws_smithy_xml::decode::try_data(&mut decoder)?.as_ref()
)
)
?
)
;
builder = builder.set_location_constraint(var_27);
}
,
_ => return Err(aws_smithy_xml::decode::XmlDecodeError::custom("expected LocationConstraint tag"))
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_logging(
inp: &[u8],
mut builder: crate::output::get_bucket_logging_output::Builder,
) -> Result<crate::output::get_bucket_logging_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("BucketLoggingStatus") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected BucketLoggingStatus but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LoggingEnabled") => {
let var_28 =
Some(
crate::xml_deser::deser_structure_crate_model_logging_enabled(&mut tag)
?
)
;
builder = builder.set_logging_enabled(var_28);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_notification_configuration(
inp: &[u8],
mut builder: crate::output::get_bucket_notification_configuration_output::Builder,
) -> Result<
crate::output::get_bucket_notification_configuration_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("NotificationConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected NotificationConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CloudFunctionConfiguration") => {
let var_29 =
Some(
Result::<std::vec::Vec<crate::model::LambdaFunctionConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_30 = builder.lambda_function_configurations.take().unwrap_or_default();
list_30.push(
crate::xml_deser::deser_structure_crate_model_lambda_function_configuration(&mut tag)
?
);
list_30
})
?
)
;
builder = builder.set_lambda_function_configurations(var_29);
}
,
s if s.matches("TopicConfiguration") => {
let var_31 =
Some(
Result::<std::vec::Vec<crate::model::TopicConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_32 = builder.topic_configurations.take().unwrap_or_default();
list_32.push(
crate::xml_deser::deser_structure_crate_model_topic_configuration(&mut tag)
?
);
list_32
})
?
)
;
builder = builder.set_topic_configurations(var_31);
}
,
s if s.matches("QueueConfiguration") => {
let var_33 =
Some(
Result::<std::vec::Vec<crate::model::QueueConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_34 = builder.queue_configurations.take().unwrap_or_default();
list_34.push(
crate::xml_deser::deser_structure_crate_model_queue_configuration(&mut tag)
?
);
list_34
})
?
)
;
builder = builder.set_queue_configurations(var_33);
}
,
s if s.matches("EventBridgeConfiguration") => {
let var_35 =
Some(
crate::xml_deser::deser_structure_crate_model_event_bridge_configuration(&mut tag)
?
)
;
builder = builder.set_event_bridge_configuration(var_35);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_request_payment(
inp: &[u8],
mut builder: crate::output::get_bucket_request_payment_output::Builder,
) -> Result<
crate::output::get_bucket_request_payment_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("RequestPaymentConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected RequestPaymentConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Payer") => {
let var_36 =
Some(
Result::<crate::model::Payer, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Payer::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_payer(var_36);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_tagging(
inp: &[u8],
mut builder: crate::output::get_bucket_tagging_output::Builder,
) -> Result<crate::output::get_bucket_tagging_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("Tagging") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected Tagging but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TagSet") => {
let var_37 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_tag_set(&mut tag)
?
)
;
builder = builder.set_tag_set(var_37);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_versioning(
inp: &[u8],
mut builder: crate::output::get_bucket_versioning_output::Builder,
) -> Result<
crate::output::get_bucket_versioning_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("VersioningConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected VersioningConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_38 =
Some(
Result::<crate::model::BucketVersioningStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::BucketVersioningStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_38);
}
,
s if s.matches("MfaDelete") => {
let var_39 =
Some(
Result::<crate::model::MfaDeleteStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::MfaDeleteStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_mfa_delete(var_39);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_bucket_website(
inp: &[u8],
mut builder: crate::output::get_bucket_website_output::Builder,
) -> Result<crate::output::get_bucket_website_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("WebsiteConfiguration") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected WebsiteConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IndexDocument") => {
let var_40 =
Some(
crate::xml_deser::deser_structure_crate_model_index_document(&mut tag)
?
)
;
builder = builder.set_index_document(var_40);
}
,
s if s.matches("RedirectAllRequestsTo") => {
let var_41 =
Some(
crate::xml_deser::deser_structure_crate_model_redirect_all_requests_to(&mut tag)
?
)
;
builder = builder.set_redirect_all_requests_to(var_41);
}
,
s if s.matches("RoutingRules") => {
let var_42 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_routing_rules(&mut tag)
?
)
;
builder = builder.set_routing_rules(var_42);
}
,
s if s.matches("ErrorDocument") => {
let var_43 =
Some(
crate::xml_deser::deser_structure_crate_model_error_document(&mut tag)
?
)
;
builder = builder.set_error_document(var_43);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_object_state_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_object_state::Builder,
) -> Result<crate::error::invalid_object_state::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("StorageClass") => {
let var_44 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_44);
}
,
s if s.matches("AccessTier") => {
let var_45 =
Some(
Result::<crate::model::IntelligentTieringAccessTier, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::IntelligentTieringAccessTier::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_access_tier(var_45);
}
,
s if s.matches("message") => {
let var_46 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_46);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_no_such_key_xml_err(
inp: &[u8],
mut builder: crate::error::no_such_key::Builder,
) -> Result<crate::error::no_such_key::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_47 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_47);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_object_acl(
inp: &[u8],
mut builder: crate::output::get_object_acl_output::Builder,
) -> Result<crate::output::get_object_acl_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("AccessControlPolicy") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected AccessControlPolicy but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_48 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_48);
}
,
s if s.matches("AccessControlList") => {
let var_49 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_grants(&mut tag)
?
)
;
builder = builder.set_grants(var_49);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") => {
let var_50 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_50);
}
,
s if s.matches("Checksum") => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") => {
let var_52 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_52);
}
,
s if s.matches("ObjectSize") => {
let var_53 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_get_object_tagging(
inp: &[u8],
mut builder: crate::output::get_object_tagging_output::Builder,
) -> Result<crate::output::get_object_tagging_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("Tagging") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected Tagging but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TagSet") => {
let var_55 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_tag_set(&mut tag)
?
)
;
builder = builder.set_tag_set(var_55);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_not_found_xml_err(
inp: &[u8],
mut builder: crate::error::not_found::Builder,
) -> Result<crate::error::not_found::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_56 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_56);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_bucket_analytics_configurations(
inp: &[u8],
mut builder: crate::output::list_bucket_analytics_configurations_output::Builder,
) -> Result<
crate::output::list_bucket_analytics_configurations_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListBucketAnalyticsConfigurationResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketAnalyticsConfigurationResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NextContinuationToken") => {
let var_57 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_continuation_token(var_57);
}
,
s if s.matches("ContinuationToken") => {
let var_58 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_continuation_token(var_58);
}
,
s if s.matches("IsTruncated") => {
let var_59 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_59);
}
,
s if s.matches("AnalyticsConfiguration") => {
let var_60 =
Some(
Result::<std::vec::Vec<crate::model::AnalyticsConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_61 = builder.analytics_configuration_list.take().unwrap_or_default();
list_61.push(
crate::xml_deser::deser_structure_crate_model_analytics_configuration(&mut tag)
?
);
list_61
})
?
)
;
builder = builder.set_analytics_configuration_list(var_60);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_bucket_intelligent_tiering_configurations(
inp: &[u8],
mut builder: crate::output::list_bucket_intelligent_tiering_configurations_output::Builder,
) -> Result<
crate::output::list_bucket_intelligent_tiering_configurations_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListBucketIntelligentTieringConfigurationsOutput") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketIntelligentTieringConfigurationsOutput but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IntelligentTieringConfiguration") => {
let var_62 =
Some(
Result::<std::vec::Vec<crate::model::IntelligentTieringConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_63 = builder.intelligent_tiering_configuration_list.take().unwrap_or_default();
list_63.push(
crate::xml_deser::deser_structure_crate_model_intelligent_tiering_configuration(&mut tag)
?
);
list_63
})
?
)
;
builder = builder.set_intelligent_tiering_configuration_list(var_62);
}
,
s if s.matches("NextContinuationToken") => {
let var_64 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_continuation_token(var_64);
}
,
s if s.matches("ContinuationToken") => {
let var_65 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_continuation_token(var_65);
}
,
s if s.matches("IsTruncated") => {
let var_66 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_66);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_bucket_inventory_configurations(
inp: &[u8],
mut builder: crate::output::list_bucket_inventory_configurations_output::Builder,
) -> Result<
crate::output::list_bucket_inventory_configurations_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListInventoryConfigurationsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListInventoryConfigurationsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NextContinuationToken") => {
let var_67 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_continuation_token(var_67);
}
,
s if s.matches("ContinuationToken") => {
let var_68 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_continuation_token(var_68);
}
,
s if s.matches("IsTruncated") => {
let var_69 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_69);
}
,
s if s.matches("InventoryConfiguration") => {
let var_70 =
Some(
Result::<std::vec::Vec<crate::model::InventoryConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_71 = builder.inventory_configuration_list.take().unwrap_or_default();
list_71.push(
crate::xml_deser::deser_structure_crate_model_inventory_configuration(&mut tag)
?
);
list_71
})
?
)
;
builder = builder.set_inventory_configuration_list(var_70);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_bucket_metrics_configurations(
inp: &[u8],
mut builder: crate::output::list_bucket_metrics_configurations_output::Builder,
) -> Result<
crate::output::list_bucket_metrics_configurations_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListMetricsConfigurationsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListMetricsConfigurationsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NextContinuationToken") => {
let var_72 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_continuation_token(var_72);
}
,
s if s.matches("ContinuationToken") => {
let var_73 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_continuation_token(var_73);
}
,
s if s.matches("MetricsConfiguration") => {
let var_74 =
Some(
Result::<std::vec::Vec<crate::model::MetricsConfiguration>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_75 = builder.metrics_configuration_list.take().unwrap_or_default();
list_75.push(
crate::xml_deser::deser_structure_crate_model_metrics_configuration(&mut tag)
?
);
list_75
})
?
)
;
builder = builder.set_metrics_configuration_list(var_74);
}
,
s if s.matches("IsTruncated") => {
let var_76 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_76);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_buckets(
inp: &[u8],
mut builder: crate::output::list_buckets_output::Builder,
) -> Result<crate::output::list_buckets_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListAllMyBucketsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListAllMyBucketsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_77 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_77);
}
,
s if s.matches("Buckets") => {
let var_78 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_buckets(&mut tag)
?
)
;
builder = builder.set_buckets(var_78);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_multipart_uploads(
inp: &[u8],
mut builder: crate::output::list_multipart_uploads_output::Builder,
) -> Result<
crate::output::list_multipart_uploads_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListMultipartUploadsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListMultipartUploadsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CommonPrefixes") => {
let var_79 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_80 = builder.common_prefixes.take().unwrap_or_default();
list_80.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_80
})
?
)
;
builder = builder.set_common_prefixes(var_79);
}
,
s if s.matches("UploadIdMarker") => {
let var_81 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_id_marker(var_81);
}
,
s if s.matches("NextKeyMarker") => {
let var_82 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_key_marker(var_82);
}
,
s if s.matches("NextUploadIdMarker") => {
let var_83 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_upload_id_marker(var_83);
}
,
s if s.matches("Delimiter") => {
let var_84 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_delimiter(var_84);
}
,
s if s.matches("Upload") => {
let var_85 =
Some(
Result::<std::vec::Vec<crate::model::MultipartUpload>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_86 = builder.uploads.take().unwrap_or_default();
list_86.push(
crate::xml_deser::deser_structure_crate_model_multipart_upload(&mut tag)
?
);
list_86
})
?
)
;
builder = builder.set_uploads(var_85);
}
,
s if s.matches("Bucket") => {
let var_87 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_87);
}
,
s if s.matches("MaxUploads") => {
let var_88 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxUploads`)"))
}
?
)
;
builder = builder.set_max_uploads(var_88);
}
,
s if s.matches("EncodingType") => {
let var_89 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_89);
}
,
s if s.matches("IsTruncated") => {
let var_90 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_90);
}
,
s if s.matches("Prefix") => {
let var_91 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_91);
}
,
s if s.matches("KeyMarker") => {
let var_92 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_marker(var_92);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_no_such_bucket_xml_err(
inp: &[u8],
mut builder: crate::error::no_such_bucket::Builder,
) -> Result<crate::error::no_such_bucket::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_93 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_93);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CommonPrefixes") => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") => {
let var_98 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_delimiter(var_98);
}
,
s if s.matches("EncodingType") => {
let var_99 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_99);
}
,
s if s.matches("IsTruncated") => {
let var_100 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_100);
}
,
s if s.matches("Marker") => {
let var_101 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_marker(var_101);
}
,
s if s.matches("Prefix") => {
let var_102 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_102);
}
,
s if s.matches("NextMarker") => {
let var_103 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_marker(var_103);
}
,
s if s.matches("MaxKeys") => {
let var_104 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_104);
}
,
s if s.matches("Name") => {
let var_105 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_105);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CommonPrefixes") => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") => {
let var_108 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_continuation_token(var_108);
}
,
s if s.matches("Contents") => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") => {
let var_111 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_continuation_token(var_111);
}
,
s if s.matches("Delimiter") => {
let var_112 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_delimiter(var_112);
}
,
s if s.matches("EncodingType") => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") => {
let var_114 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_114);
}
,
s if s.matches("StartAfter") => {
let var_115 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_start_after(var_115);
}
,
s if s.matches("Prefix") => {
let var_116 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_116);
}
,
s if s.matches("MaxKeys") => {
let var_117 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") => {
let var_118 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") => {
let var_119 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_object_versions(
inp: &[u8],
mut builder: crate::output::list_object_versions_output::Builder,
) -> Result<
crate::output::list_object_versions_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListVersionsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListVersionsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CommonPrefixes") => {
let var_120 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_121 = builder.common_prefixes.take().unwrap_or_default();
list_121.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_121
})
?
)
;
builder = builder.set_common_prefixes(var_120);
}
,
s if s.matches("NextKeyMarker") => {
let var_122 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_key_marker(var_122);
}
,
s if s.matches("Delimiter") => {
let var_123 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_delimiter(var_123);
}
,
s if s.matches("EncodingType") => {
let var_124 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_124);
}
,
s if s.matches("IsTruncated") => {
let var_125 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_125);
}
,
s if s.matches("NextVersionIdMarker") => {
let var_126 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_version_id_marker(var_126);
}
,
s if s.matches("Prefix") => {
let var_127 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_127);
}
,
s if s.matches("Name") => {
let var_128 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_128);
}
,
s if s.matches("VersionIdMarker") => {
let var_129 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_id_marker(var_129);
}
,
s if s.matches("Version") => {
let var_130 =
Some(
Result::<std::vec::Vec<crate::model::ObjectVersion>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_131 = builder.versions.take().unwrap_or_default();
list_131.push(
crate::xml_deser::deser_structure_crate_model_object_version(&mut tag)
?
);
list_131
})
?
)
;
builder = builder.set_versions(var_130);
}
,
s if s.matches("MaxKeys") => {
let var_132 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_132);
}
,
s if s.matches("DeleteMarker") => {
let var_133 =
Some(
Result::<std::vec::Vec<crate::model::DeleteMarkerEntry>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_134 = builder.delete_markers.take().unwrap_or_default();
list_134.push(
crate::xml_deser::deser_structure_crate_model_delete_marker_entry(&mut tag)
?
);
list_134
})
?
)
;
builder = builder.set_delete_markers(var_133);
}
,
s if s.matches("KeyMarker") => {
let var_135 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_marker(var_135);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !start_el.matches("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") => {
let var_137 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") => {
let var_142 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") => {
let var_143 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_part_number_marker(var_143);
}
,
s if s.matches("Bucket") => {
let var_144 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_144);
}
,
s if s.matches("Part") => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") => {
let var_148 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_object_already_in_active_tier_error_xml_err(
inp: &[u8],
mut builder: crate::error::object_already_in_active_tier_error::Builder,
) -> Result<
crate::error::object_already_in_active_tier_error::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") => {
let var_149 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_149);
}
,
_ => {}
}
}
Ok(builder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_copy_object_output_copy_object_result(
inp: &[u8],
) -> Result<crate::model::CopyObjectResult, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CopyObjectResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected CopyObjectResult got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_copy_object_result(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_analytics_configuration_output_analytics_configuration(
inp: &[u8],
) -> Result<crate::model::AnalyticsConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AnalyticsConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected AnalyticsConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_analytics_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_encryption_output_server_side_encryption_configuration(
inp: &[u8],
) -> Result<crate::model::ServerSideEncryptionConfiguration, aws_smithy_xml::decode::XmlDecodeError>
{
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ServerSideEncryptionConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ServerSideEncryptionConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_server_side_encryption_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_intelligent_tiering_configuration_output_intelligent_tiering_configuration(
inp: &[u8],
) -> Result<crate::model::IntelligentTieringConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("IntelligentTieringConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected IntelligentTieringConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_intelligent_tiering_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_inventory_configuration_output_inventory_configuration(
inp: &[u8],
) -> Result<crate::model::InventoryConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("InventoryConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected InventoryConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_inventory_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_metrics_configuration_output_metrics_configuration(
inp: &[u8],
) -> Result<crate::model::MetricsConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("MetricsConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected MetricsConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_metrics_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_ownership_controls_output_ownership_controls(
inp: &[u8],
) -> Result<crate::model::OwnershipControls, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("OwnershipControls")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected OwnershipControls got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_ownership_controls(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_policy_status_output_policy_status(
inp: &[u8],
) -> Result<crate::model::PolicyStatus, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("PolicyStatus")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected PolicyStatus got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_policy_status(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_bucket_replication_output_replication_configuration(
inp: &[u8],
) -> Result<crate::model::ReplicationConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReplicationConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ReplicationConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_replication_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_object_legal_hold_output_legal_hold(
inp: &[u8],
) -> Result<crate::model::ObjectLockLegalHold, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ObjectLockLegalHold")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ObjectLockLegalHold got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_object_lock_legal_hold(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_object_lock_configuration_output_object_lock_configuration(
inp: &[u8],
) -> Result<crate::model::ObjectLockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ObjectLockConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ObjectLockConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_object_lock_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_object_retention_output_retention(
inp: &[u8],
) -> Result<crate::model::ObjectLockRetention, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ObjectLockRetention")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ObjectLockRetention got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_object_lock_retention(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_get_public_access_block_output_public_access_block_configuration(
inp: &[u8],
) -> Result<crate::model::PublicAccessBlockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("PublicAccessBlockConfiguration")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected PublicAccessBlockConfiguration got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_public_access_block_configuration(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_synthetic_upload_part_copy_output_copy_part_result(
inp: &[u8],
) -> Result<crate::model::CopyPartResult, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CopyPartResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected CopyPartResult got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_copy_part_result(&mut decoder)
}
pub fn deser_structure_crate_model_error(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Error, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Error::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_150 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_150);
}
,
s if s.matches("VersionId") => {
let var_151 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_id(var_151);
}
,
s if s.matches("Code") => {
let var_152 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_152);
}
,
s if s.matches("Message") => {
let var_153 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_153);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_deleted_object(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeletedObject, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeletedObject::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_154 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_154);
}
,
s if s.matches("VersionId") => {
let var_155 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_id(var_155);
}
,
s if s.matches("DeleteMarker") => {
let var_156 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#DeleteMarker`)"))
}
?
)
;
builder = builder.set_delete_marker(var_156);
}
,
s if s.matches("DeleteMarkerVersionId") => {
let var_157 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_delete_marker_version_id(var_157);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_owner(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Owner, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Owner::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DisplayName") => {
let var_158 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_display_name(var_158);
}
,
s if s.matches("ID") => {
let var_159 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_159);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_grants(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Grant>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Grant") => {
out.push(
crate::xml_deser::deser_structure_crate_model_grant(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_cors_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CorsRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CorsRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ID") => {
let var_160 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_160);
}
,
s if s.matches("AllowedHeader") => {
let var_161 =
Some(
Result::<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_162 = builder.allowed_headers.take().unwrap_or_default();
list_162.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
list_162
})
?
)
;
builder = builder.set_allowed_headers(var_161);
}
,
s if s.matches("AllowedMethod") => {
let var_163 =
Some(
Result::<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_164 = builder.allowed_methods.take().unwrap_or_default();
list_164.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
list_164
})
?
)
;
builder = builder.set_allowed_methods(var_163);
}
,
s if s.matches("AllowedOrigin") => {
let var_165 =
Some(
Result::<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_166 = builder.allowed_origins.take().unwrap_or_default();
list_166.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
list_166
})
?
)
;
builder = builder.set_allowed_origins(var_165);
}
,
s if s.matches("ExposeHeader") => {
let var_167 =
Some(
Result::<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_168 = builder.expose_headers.take().unwrap_or_default();
list_168.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
list_168
})
?
)
;
builder = builder.set_expose_headers(var_167);
}
,
s if s.matches("MaxAgeSeconds") => {
let var_169 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxAgeSeconds`)"))
}
?
)
;
builder = builder.set_max_age_seconds(var_169);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_lifecycle_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LifecycleRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LifecycleRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Expiration") => {
let var_170 =
Some(
crate::xml_deser::deser_structure_crate_model_lifecycle_expiration(&mut tag)
?
)
;
builder = builder.set_expiration(var_170);
}
,
s if s.matches("ID") => {
let var_171 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_171);
}
,
s if s.matches("Prefix") => {
let var_172 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_172);
}
,
s if s.matches("Filter") => {
let var_173 =
Some(
crate::xml_deser::deser_union_crate_model_lifecycle_rule_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_173);
}
,
s if s.matches("Status") => {
let var_174 =
Some(
Result::<crate::model::ExpirationStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExpirationStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_174);
}
,
s if s.matches("Transition") => {
let var_175 =
Some(
Result::<std::vec::Vec<crate::model::Transition>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_176 = builder.transitions.take().unwrap_or_default();
list_176.push(
crate::xml_deser::deser_structure_crate_model_transition(&mut tag)
?
);
list_176
})
?
)
;
builder = builder.set_transitions(var_175);
}
,
s if s.matches("NoncurrentVersionTransition") => {
let var_177 =
Some(
Result::<std::vec::Vec<crate::model::NoncurrentVersionTransition>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_178 = builder.noncurrent_version_transitions.take().unwrap_or_default();
list_178.push(
crate::xml_deser::deser_structure_crate_model_noncurrent_version_transition(&mut tag)
?
);
list_178
})
?
)
;
builder = builder.set_noncurrent_version_transitions(var_177);
}
,
s if s.matches("NoncurrentVersionExpiration") => {
let var_179 =
Some(
crate::xml_deser::deser_structure_crate_model_noncurrent_version_expiration(&mut tag)
?
)
;
builder = builder.set_noncurrent_version_expiration(var_179);
}
,
s if s.matches("AbortIncompleteMultipartUpload") => {
let var_180 =
Some(
crate::xml_deser::deser_structure_crate_model_abort_incomplete_multipart_upload(&mut tag)
?
)
;
builder = builder.set_abort_incomplete_multipart_upload(var_180);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_logging_enabled(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingEnabled, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TargetBucket") => {
let var_181 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_target_bucket(var_181);
}
,
s if s.matches("TargetGrants") => {
let var_182 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_target_grants(&mut tag)
?
)
;
builder = builder.set_target_grants(var_182);
}
,
s if s.matches("TargetPrefix") => {
let var_183 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_target_prefix(var_183);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_lambda_function_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LambdaFunctionConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LambdaFunctionConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_184 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_184);
}
,
s if s.matches("CloudFunction") => {
let var_185 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_lambda_function_arn(var_185);
}
,
s if s.matches("Event") => {
let var_186 =
Some(
Result::<std::vec::Vec<crate::model::Event>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_187 = builder.events.take().unwrap_or_default();
list_187.push(
Result::<crate::model::Event, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Event::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
list_187
})
?
)
;
builder = builder.set_events(var_186);
}
,
s if s.matches("Filter") => {
let var_188 =
Some(
crate::xml_deser::deser_structure_crate_model_notification_configuration_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_188);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_topic_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TopicConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TopicConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_189 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_189);
}
,
s if s.matches("Topic") => {
let var_190 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_topic_arn(var_190);
}
,
s if s.matches("Event") => {
let var_191 =
Some(
Result::<std::vec::Vec<crate::model::Event>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_192 = builder.events.take().unwrap_or_default();
list_192.push(
Result::<crate::model::Event, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Event::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
list_192
})
?
)
;
builder = builder.set_events(var_191);
}
,
s if s.matches("Filter") => {
let var_193 =
Some(
crate::xml_deser::deser_structure_crate_model_notification_configuration_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_193);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_queue_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::QueueConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::QueueConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_194 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_194);
}
,
s if s.matches("Queue") => {
let var_195 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_queue_arn(var_195);
}
,
s if s.matches("Event") => {
let var_196 =
Some(
Result::<std::vec::Vec<crate::model::Event>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_197 = builder.events.take().unwrap_or_default();
list_197.push(
Result::<crate::model::Event, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Event::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
list_197
})
?
)
;
builder = builder.set_events(var_196);
}
,
s if s.matches("Filter") => {
let var_198 =
Some(
crate::xml_deser::deser_structure_crate_model_notification_configuration_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_198);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_event_bridge_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EventBridgeConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EventBridgeConfiguration::builder();
let _ = decoder;
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_tag_set(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Tag") => {
out.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_index_document(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IndexDocument, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IndexDocument::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Suffix") => {
let var_199 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_suffix(var_199);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_redirect_all_requests_to(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RedirectAllRequestsTo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::RedirectAllRequestsTo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("HostName") => {
let var_200 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_name(var_200);
}
,
s if s.matches("Protocol") => {
let var_201 =
Some(
Result::<crate::model::Protocol, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Protocol::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_protocol(var_201);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_routing_rules(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::RoutingRule>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("RoutingRule") => {
out.push(
crate::xml_deser::deser_structure_crate_model_routing_rule(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_error_document(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ErrorDocument, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ErrorDocument::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_202 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_202);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_checksum(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Checksum, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Checksum::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ChecksumCRC32") => {
let var_203 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_203);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_204 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_204);
}
,
s if s.matches("ChecksumSHA1") => {
let var_205 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_205);
}
,
s if s.matches("ChecksumSHA256") => {
let var_206 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_206);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_get_object_attributes_parts(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GetObjectAttributesParts, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GetObjectAttributesParts::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartsCount") => {
let var_207 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#PartsCount`)"))
}
?
)
;
builder = builder.set_total_parts_count(var_207);
}
,
s if s.matches("PartNumberMarker") => {
let var_208 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_part_number_marker(var_208);
}
,
s if s.matches("NextPartNumberMarker") => {
let var_209 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_part_number_marker(var_209);
}
,
s if s.matches("MaxParts") => {
let var_210 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_210);
}
,
s if s.matches("IsTruncated") => {
let var_211 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_211);
}
,
s if s.matches("Part") => {
let var_212 =
Some(
Result::<std::vec::Vec<crate::model::ObjectPart>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_213 = builder.parts.take().unwrap_or_default();
list_213.push(
crate::xml_deser::deser_structure_crate_model_object_part(&mut tag)
?
);
list_213
})
?
)
;
builder = builder.set_parts(var_212);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_analytics_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalyticsConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalyticsConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_214 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_214);
}
,
s if s.matches("Filter") => {
let var_215 =
Some(
crate::xml_deser::deser_union_crate_model_analytics_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_215);
}
,
s if s.matches("StorageClassAnalysis") => {
let var_216 =
Some(
crate::xml_deser::deser_structure_crate_model_storage_class_analysis(&mut tag)
?
)
;
builder = builder.set_storage_class_analysis(var_216);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_intelligent_tiering_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IntelligentTieringConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IntelligentTieringConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_217 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_217);
}
,
s if s.matches("Filter") => {
let var_218 =
Some(
crate::xml_deser::deser_structure_crate_model_intelligent_tiering_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_218);
}
,
s if s.matches("Status") => {
let var_219 =
Some(
Result::<crate::model::IntelligentTieringStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::IntelligentTieringStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_219);
}
,
s if s.matches("Tiering") => {
let var_220 =
Some(
Result::<std::vec::Vec<crate::model::Tiering>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_221 = builder.tierings.take().unwrap_or_default();
list_221.push(
crate::xml_deser::deser_structure_crate_model_tiering(&mut tag)
?
);
list_221
})
?
)
;
builder = builder.set_tierings(var_220);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_inventory_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventoryConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventoryConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Destination") => {
let var_222 =
Some(
crate::xml_deser::deser_structure_crate_model_inventory_destination(&mut tag)
?
)
;
builder = builder.set_destination(var_222);
}
,
s if s.matches("IsEnabled") => {
let var_223 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsEnabled`)"))
}
?
)
;
builder = builder.set_is_enabled(var_223);
}
,
s if s.matches("Filter") => {
let var_224 =
Some(
crate::xml_deser::deser_structure_crate_model_inventory_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_224);
}
,
s if s.matches("Id") => {
let var_225 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_225);
}
,
s if s.matches("IncludedObjectVersions") => {
let var_226 =
Some(
Result::<crate::model::InventoryIncludedObjectVersions, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InventoryIncludedObjectVersions::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_included_object_versions(var_226);
}
,
s if s.matches("OptionalFields") => {
let var_227 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_inventory_optional_fields(&mut tag)
?
)
;
builder = builder.set_optional_fields(var_227);
}
,
s if s.matches("Schedule") => {
let var_228 =
Some(
crate::xml_deser::deser_structure_crate_model_inventory_schedule(&mut tag)
?
)
;
builder = builder.set_schedule(var_228);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_metrics_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MetricsConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MetricsConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") => {
let var_229 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_229);
}
,
s if s.matches("Filter") => {
let var_230 =
Some(
crate::xml_deser::deser_union_crate_model_metrics_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_230);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_buckets(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Bucket>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Bucket") => {
out.push(
crate::xml_deser::deser_structure_crate_model_bucket(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_common_prefix(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CommonPrefix, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CommonPrefix::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_231 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_231);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_multipart_upload(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MultipartUpload, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MultipartUpload::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("UploadId") => {
let var_232 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_id(var_232);
}
,
s if s.matches("Key") => {
let var_233 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_233);
}
,
s if s.matches("Initiated") => {
let var_234 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#Initiated`)"))
?
)
;
builder = builder.set_initiated(var_234);
}
,
s if s.matches("StorageClass") => {
let var_235 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_235);
}
,
s if s.matches("Owner") => {
let var_236 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_236);
}
,
s if s.matches("Initiator") => {
let var_237 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_237);
}
,
s if s.matches("ChecksumAlgorithm") => {
let var_238 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_238);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Object, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Object::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_239 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_239);
}
,
s if s.matches("LastModified") => {
let var_240 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_240);
}
,
s if s.matches("ETag") => {
let var_241 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_241);
}
,
s if s.matches("ChecksumAlgorithm") => {
let var_242 =
Some(
Result::<std::vec::Vec<crate::model::ChecksumAlgorithm>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_243 = builder.checksum_algorithm.take().unwrap_or_default();
list_243.push(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
list_243
})
?
)
;
builder = builder.set_checksum_algorithm(var_242);
}
,
s if s.matches("Size") => {
let var_244 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_244);
}
,
s if s.matches("StorageClass") => {
let var_245 =
Some(
Result::<crate::model::ObjectStorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectStorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_245);
}
,
s if s.matches("Owner") => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_version(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectVersion, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectVersion::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") => {
let var_247 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_247);
}
,
s if s.matches("ChecksumAlgorithm") => {
let var_248 =
Some(
Result::<std::vec::Vec<crate::model::ChecksumAlgorithm>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_249 = builder.checksum_algorithm.take().unwrap_or_default();
list_249.push(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
list_249
})
?
)
;
builder = builder.set_checksum_algorithm(var_248);
}
,
s if s.matches("Size") => {
let var_250 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_250);
}
,
s if s.matches("StorageClass") => {
let var_251 =
Some(
Result::<crate::model::ObjectVersionStorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectVersionStorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_251);
}
,
s if s.matches("Key") => {
let var_252 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_252);
}
,
s if s.matches("VersionId") => {
let var_253 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_id(var_253);
}
,
s if s.matches("IsLatest") => {
let var_254 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsLatest`)"))
}
?
)
;
builder = builder.set_is_latest(var_254);
}
,
s if s.matches("LastModified") => {
let var_255 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_255);
}
,
s if s.matches("Owner") => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_delete_marker_entry(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteMarkerEntry, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteMarkerEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_257 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_257);
}
,
s if s.matches("Key") => {
let var_258 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_258);
}
,
s if s.matches("VersionId") => {
let var_259 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_id(var_259);
}
,
s if s.matches("IsLatest") => {
let var_260 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsLatest`)"))
}
?
)
;
builder = builder.set_is_latest(var_260);
}
,
s if s.matches("LastModified") => {
let var_261 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_261);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Part, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Part::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") => {
let var_262 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_262);
}
,
s if s.matches("LastModified") => {
let var_263 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_263);
}
,
s if s.matches("ETag") => {
let var_264 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_264);
}
,
s if s.matches("Size") => {
let var_265 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_265);
}
,
s if s.matches("ChecksumCRC32") => {
let var_266 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_266);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_267 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_267);
}
,
s if s.matches("ChecksumSHA1") => {
let var_268 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_268);
}
,
s if s.matches("ChecksumSHA256") => {
let var_269 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_269);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_initiator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Initiator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Initiator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ID") => {
let var_270 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_270);
}
,
s if s.matches("DisplayName") => {
let var_271 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_display_name(var_271);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_member_com_amazonaws_s3_stats_event_details(
inp: &[u8],
) -> Result<crate::model::Stats, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("Stats")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected Stats got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_stats(&mut decoder)
}
pub fn deser_member_com_amazonaws_s3_progress_event_details(
inp: &[u8],
) -> Result<crate::model::Progress, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("Progress")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected Progress got {:?}",
start_el
)));
}
crate::xml_deser::deser_structure_crate_model_progress(&mut decoder)
}
pub fn parse_event_stream_generic_error(
payload: &bytes::Bytes,
) -> Result<aws_smithy_types::Error, aws_smithy_xml::decode::XmlDecodeError> {
crate::rest_xml_unwrapped_errors::parse_generic_error(payload.as_ref())
}
pub fn deser_structure_crate_model_copy_object_result(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CopyObjectResult, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CopyObjectResult::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") => {
let var_272 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_272);
}
,
s if s.matches("LastModified") => {
let var_273 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_273);
}
,
s if s.matches("ChecksumCRC32") => {
let var_274 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_274);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_275 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_275);
}
,
s if s.matches("ChecksumSHA1") => {
let var_276 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_276);
}
,
s if s.matches("ChecksumSHA256") => {
let var_277 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_277);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_server_side_encryption_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServerSideEncryptionConfiguration, aws_smithy_xml::decode::XmlDecodeError>
{
#[allow(unused_mut)]
let mut builder = crate::model::ServerSideEncryptionConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Rule") => {
let var_278 =
Some(
Result::<std::vec::Vec<crate::model::ServerSideEncryptionRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_279 = builder.rules.take().unwrap_or_default();
list_279.push(
crate::xml_deser::deser_structure_crate_model_server_side_encryption_rule(&mut tag)
?
);
list_279
})
?
)
;
builder = builder.set_rules(var_278);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_ownership_controls(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OwnershipControls, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OwnershipControls::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Rule") => {
let var_280 =
Some(
Result::<std::vec::Vec<crate::model::OwnershipControlsRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_281 = builder.rules.take().unwrap_or_default();
list_281.push(
crate::xml_deser::deser_structure_crate_model_ownership_controls_rule(&mut tag)
?
);
list_281
})
?
)
;
builder = builder.set_rules(var_280);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_policy_status(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PolicyStatus, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PolicyStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IsPublic") => {
let var_282 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsPublic`)"))
}
?
)
;
builder = builder.set_is_public(var_282);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replication_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Role") => {
let var_283 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_role(var_283);
}
,
s if s.matches("Rule") => {
let var_284 =
Some(
Result::<std::vec::Vec<crate::model::ReplicationRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_285 = builder.rules.take().unwrap_or_default();
list_285.push(
crate::xml_deser::deser_structure_crate_model_replication_rule(&mut tag)
?
);
list_285
})
?
)
;
builder = builder.set_rules(var_284);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_lock_legal_hold(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockLegalHold, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockLegalHold::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_286 =
Some(
Result::<crate::model::ObjectLockLegalHoldStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockLegalHoldStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_286);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_lock_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ObjectLockEnabled") => {
let var_287 =
Some(
Result::<crate::model::ObjectLockEnabled, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockEnabled::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_object_lock_enabled(var_287);
}
,
s if s.matches("Rule") => {
let var_288 =
Some(
crate::xml_deser::deser_structure_crate_model_object_lock_rule(&mut tag)
?
)
;
builder = builder.set_rule(var_288);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_lock_retention(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockRetention, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockRetention::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Mode") => {
let var_289 =
Some(
Result::<crate::model::ObjectLockRetentionMode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockRetentionMode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_mode(var_289);
}
,
s if s.matches("RetainUntilDate") => {
let var_290 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#Date`)"))
?
)
;
builder = builder.set_retain_until_date(var_290);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_public_access_block_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicAccessBlockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicAccessBlockConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("BlockPublicAcls") => {
let var_291 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#Setting`)"))
}
?
)
;
builder = builder.set_block_public_acls(var_291);
}
,
s if s.matches("IgnorePublicAcls") => {
let var_292 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#Setting`)"))
}
?
)
;
builder = builder.set_ignore_public_acls(var_292);
}
,
s if s.matches("BlockPublicPolicy") => {
let var_293 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#Setting`)"))
}
?
)
;
builder = builder.set_block_public_policy(var_293);
}
,
s if s.matches("RestrictPublicBuckets") => {
let var_294 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#Setting`)"))
}
?
)
;
builder = builder.set_restrict_public_buckets(var_294);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_copy_part_result(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CopyPartResult, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CopyPartResult::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") => {
let var_295 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_e_tag(var_295);
}
,
s if s.matches("LastModified") => {
let var_296 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#LastModified`)"))
?
)
;
builder = builder.set_last_modified(var_296);
}
,
s if s.matches("ChecksumCRC32") => {
let var_297 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_297);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_298 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_298);
}
,
s if s.matches("ChecksumSHA1") => {
let var_299 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_299);
}
,
s if s.matches("ChecksumSHA256") => {
let var_300 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_300);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_grant(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Grant, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Grant::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Grantee") => {
let var_301 =
Some(
crate::xml_deser::deser_structure_crate_model_grantee(&mut tag)
?
)
;
builder = builder.set_grantee(var_301);
}
,
s if s.matches("Permission") => {
let var_302 =
Some(
Result::<crate::model::Permission, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Permission::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_permission(var_302);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_lifecycle_expiration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LifecycleExpiration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LifecycleExpiration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Date") => {
let var_303 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#Date`)"))
?
)
;
builder = builder.set_date(var_303);
}
,
s if s.matches("Days") => {
let var_304 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_days(var_304);
}
,
s if s.matches("ExpiredObjectDeleteMarker") => {
let var_305 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#ExpiredObjectDeleteMarker`)"))
}
?
)
;
builder = builder.set_expired_object_delete_marker(var_305);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_union_crate_model_lifecycle_rule_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LifecycleRuleFilter, aws_smithy_xml::decode::XmlDecodeError> {
let mut base: Option<crate::model::LifecycleRuleFilter> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let tmp =
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
;
base = Some(crate::model::LifecycleRuleFilter::Prefix(tmp));
}
,
s if s.matches("Tag") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
;
base = Some(crate::model::LifecycleRuleFilter::Tag(tmp));
}
,
s if s.matches("ObjectSizeGreaterThan") => {
let tmp =
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeGreaterThanBytes`)"))
}
?
;
base = Some(crate::model::LifecycleRuleFilter::ObjectSizeGreaterThan(tmp));
}
,
s if s.matches("ObjectSizeLessThan") => {
let tmp =
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeLessThanBytes`)"))
}
?
;
base = Some(crate::model::LifecycleRuleFilter::ObjectSizeLessThan(tmp));
}
,
s if s.matches("And") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_lifecycle_rule_and_operator(&mut tag)
?
;
base = Some(crate::model::LifecycleRuleFilter::And(tmp));
}
,
_unknown => base = Some(crate::model::LifecycleRuleFilter::Unknown),
}
}
base.ok_or_else(|| {
aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing")
})
}
pub fn deser_structure_crate_model_transition(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Transition, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Transition::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Date") => {
let var_306 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#Date`)"))
?
)
;
builder = builder.set_date(var_306);
}
,
s if s.matches("Days") => {
let var_307 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_days(var_307);
}
,
s if s.matches("StorageClass") => {
let var_308 =
Some(
Result::<crate::model::TransitionStorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TransitionStorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_308);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_noncurrent_version_transition(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NoncurrentVersionTransition, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NoncurrentVersionTransition::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NoncurrentDays") => {
let var_309 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_noncurrent_days(var_309);
}
,
s if s.matches("StorageClass") => {
let var_310 =
Some(
Result::<crate::model::TransitionStorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TransitionStorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_310);
}
,
s if s.matches("NewerNoncurrentVersions") => {
let var_311 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#VersionCount`)"))
}
?
)
;
builder = builder.set_newer_noncurrent_versions(var_311);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_noncurrent_version_expiration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NoncurrentVersionExpiration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NoncurrentVersionExpiration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("NoncurrentDays") => {
let var_312 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_noncurrent_days(var_312);
}
,
s if s.matches("NewerNoncurrentVersions") => {
let var_313 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#VersionCount`)"))
}
?
)
;
builder = builder.set_newer_noncurrent_versions(var_313);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_abort_incomplete_multipart_upload(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AbortIncompleteMultipartUpload, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AbortIncompleteMultipartUpload::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DaysAfterInitiation") => {
let var_314 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#DaysAfterInitiation`)"))
}
?
)
;
builder = builder.set_days_after_initiation(var_314);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_target_grants(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TargetGrant>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Grant") => {
out.push(
crate::xml_deser::deser_structure_crate_model_target_grant(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_notification_configuration_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NotificationConfigurationFilter, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NotificationConfigurationFilter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("S3Key") => {
let var_315 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_key_filter(&mut tag)
?
)
;
builder = builder.set_key(var_315);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_tag(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_316 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_316);
}
,
s if s.matches("Value") => {
let var_317 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_317);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_routing_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RoutingRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::RoutingRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Condition") => {
let var_318 =
Some(
crate::xml_deser::deser_structure_crate_model_condition(&mut tag)
?
)
;
builder = builder.set_condition(var_318);
}
,
s if s.matches("Redirect") => {
let var_319 =
Some(
crate::xml_deser::deser_structure_crate_model_redirect(&mut tag)
?
)
;
builder = builder.set_redirect(var_319);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") => {
let var_320 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") => {
let var_321 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") => {
let var_322 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") => {
let var_323 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") => {
let var_324 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") => {
let var_325 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_union_crate_model_analytics_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalyticsFilter, aws_smithy_xml::decode::XmlDecodeError> {
let mut base: Option<crate::model::AnalyticsFilter> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let tmp =
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
;
base = Some(crate::model::AnalyticsFilter::Prefix(tmp));
}
,
s if s.matches("Tag") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
;
base = Some(crate::model::AnalyticsFilter::Tag(tmp));
}
,
s if s.matches("And") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_analytics_and_operator(&mut tag)
?
;
base = Some(crate::model::AnalyticsFilter::And(tmp));
}
,
_unknown => base = Some(crate::model::AnalyticsFilter::Unknown),
}
}
base.ok_or_else(|| {
aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing")
})
}
pub fn deser_structure_crate_model_storage_class_analysis(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StorageClassAnalysis, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StorageClassAnalysis::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DataExport") => {
let var_326 =
Some(
crate::xml_deser::deser_structure_crate_model_storage_class_analysis_data_export(&mut tag)
?
)
;
builder = builder.set_data_export(var_326);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_intelligent_tiering_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IntelligentTieringFilter, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IntelligentTieringFilter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_327 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_327);
}
,
s if s.matches("Tag") => {
let var_328 =
Some(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
)
;
builder = builder.set_tag(var_328);
}
,
s if s.matches("And") => {
let var_329 =
Some(
crate::xml_deser::deser_structure_crate_model_intelligent_tiering_and_operator(&mut tag)
?
)
;
builder = builder.set_and(var_329);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_tiering(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tiering, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tiering::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Days") => {
let var_330 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#IntelligentTieringDays`)"))
}
?
)
;
builder = builder.set_days(var_330);
}
,
s if s.matches("AccessTier") => {
let var_331 =
Some(
Result::<crate::model::IntelligentTieringAccessTier, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::IntelligentTieringAccessTier::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_access_tier(var_331);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_inventory_destination(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventoryDestination, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventoryDestination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("S3BucketDestination") => {
let var_332 =
Some(
crate::xml_deser::deser_structure_crate_model_inventory_s3_bucket_destination(&mut tag)
?
)
;
builder = builder.set_s3_bucket_destination(var_332);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_inventory_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventoryFilter, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventoryFilter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_333 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_333);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_s3_inventory_optional_fields(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::InventoryOptionalField>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Field") => {
out.push(
Result::<crate::model::InventoryOptionalField, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InventoryOptionalField::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_inventory_schedule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventorySchedule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventorySchedule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Frequency") => {
let var_334 =
Some(
Result::<crate::model::InventoryFrequency, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InventoryFrequency::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_frequency(var_334);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_union_crate_model_metrics_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MetricsFilter, aws_smithy_xml::decode::XmlDecodeError> {
let mut base: Option<crate::model::MetricsFilter> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let tmp =
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
;
base = Some(crate::model::MetricsFilter::Prefix(tmp));
}
,
s if s.matches("Tag") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
;
base = Some(crate::model::MetricsFilter::Tag(tmp));
}
,
s if s.matches("AccessPointArn") => {
let tmp =
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
;
base = Some(crate::model::MetricsFilter::AccessPointArn(tmp));
}
,
s if s.matches("And") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_metrics_and_operator(&mut tag)
?
;
base = Some(crate::model::MetricsFilter::And(tmp));
}
,
_unknown => base = Some(crate::model::MetricsFilter::Unknown),
}
}
base.ok_or_else(|| {
aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing")
})
}
pub fn deser_structure_crate_model_bucket(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Bucket, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Bucket::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Name") => {
let var_335 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_335);
}
,
s if s.matches("CreationDate") => {
let var_336 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.s3#CreationDate`)"))
?
)
;
builder = builder.set_creation_date(var_336);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_stats(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Stats, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Stats::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("BytesScanned") => {
let var_337 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesScanned`)"))
}
?
)
;
builder = builder.set_bytes_scanned(var_337);
}
,
s if s.matches("BytesProcessed") => {
let var_338 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesProcessed`)"))
}
?
)
;
builder = builder.set_bytes_processed(var_338);
}
,
s if s.matches("BytesReturned") => {
let var_339 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesReturned`)"))
}
?
)
;
builder = builder.set_bytes_returned(var_339);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_progress(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Progress, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Progress::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("BytesScanned") => {
let var_340 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesScanned`)"))
}
?
)
;
builder = builder.set_bytes_scanned(var_340);
}
,
s if s.matches("BytesProcessed") => {
let var_341 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesProcessed`)"))
}
?
)
;
builder = builder.set_bytes_processed(var_341);
}
,
s if s.matches("BytesReturned") => {
let var_342 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#BytesReturned`)"))
}
?
)
;
builder = builder.set_bytes_returned(var_342);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_server_side_encryption_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServerSideEncryptionRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ServerSideEncryptionRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ApplyServerSideEncryptionByDefault") => {
let var_343 =
Some(
crate::xml_deser::deser_structure_crate_model_server_side_encryption_by_default(&mut tag)
?
)
;
builder = builder.set_apply_server_side_encryption_by_default(var_343);
}
,
s if s.matches("BucketKeyEnabled") => {
let var_344 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#BucketKeyEnabled`)"))
}
?
)
;
builder = builder.set_bucket_key_enabled(var_344);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_ownership_controls_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OwnershipControlsRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OwnershipControlsRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ObjectOwnership") => {
let var_345 =
Some(
Result::<crate::model::ObjectOwnership, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectOwnership::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_object_ownership(var_345);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replication_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ID") => {
let var_346 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_346);
}
,
s if s.matches("Priority") => {
let var_347 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Priority`)"))
}
?
)
;
builder = builder.set_priority(var_347);
}
,
s if s.matches("Prefix") => {
let var_348 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_348);
}
,
s if s.matches("Filter") => {
let var_349 =
Some(
crate::xml_deser::deser_union_crate_model_replication_rule_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_349);
}
,
s if s.matches("Status") => {
let var_350 =
Some(
Result::<crate::model::ReplicationRuleStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ReplicationRuleStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_350);
}
,
s if s.matches("SourceSelectionCriteria") => {
let var_351 =
Some(
crate::xml_deser::deser_structure_crate_model_source_selection_criteria(&mut tag)
?
)
;
builder = builder.set_source_selection_criteria(var_351);
}
,
s if s.matches("ExistingObjectReplication") => {
let var_352 =
Some(
crate::xml_deser::deser_structure_crate_model_existing_object_replication(&mut tag)
?
)
;
builder = builder.set_existing_object_replication(var_352);
}
,
s if s.matches("Destination") => {
let var_353 =
Some(
crate::xml_deser::deser_structure_crate_model_destination(&mut tag)
?
)
;
builder = builder.set_destination(var_353);
}
,
s if s.matches("DeleteMarkerReplication") => {
let var_354 =
Some(
crate::xml_deser::deser_structure_crate_model_delete_marker_replication(&mut tag)
?
)
;
builder = builder.set_delete_marker_replication(var_354);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_object_lock_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultRetention") => {
let var_355 =
Some(
crate::xml_deser::deser_structure_crate_model_default_retention(&mut tag)
?
)
;
builder = builder.set_default_retention(var_355);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_grantee(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Grantee, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Grantee::builder();
let attrib_356 = {
let s = decoder.start_el().attr("xsi:type");
match s {
None => None,
Some(s) => Some(Result::<
crate::model::Type,
aws_smithy_xml::decode::XmlDecodeError,
>::Ok(crate::model::Type::from(s))?),
}
};
builder.r#type = attrib_356;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DisplayName") => {
let var_357 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_display_name(var_357);
}
,
s if s.matches("EmailAddress") => {
let var_358 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_email_address(var_358);
}
,
s if s.matches("ID") => {
let var_359 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_359);
}
,
s if s.matches("URI") => {
let var_360 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_uri(var_360);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_lifecycle_rule_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LifecycleRuleAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LifecycleRuleAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_361 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_361);
}
,
s if s.matches("Tag") => {
let var_362 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_363 = builder.tags.take().unwrap_or_default();
list_363.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_363
})
?
)
;
builder = builder.set_tags(var_362);
}
,
s if s.matches("ObjectSizeGreaterThan") => {
let var_364 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeGreaterThanBytes`)"))
}
?
)
;
builder = builder.set_object_size_greater_than(var_364);
}
,
s if s.matches("ObjectSizeLessThan") => {
let var_365 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.s3#ObjectSizeLessThanBytes`)"))
}
?
)
;
builder = builder.set_object_size_less_than(var_365);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_target_grant(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetGrant, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetGrant::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Grantee") => {
let var_366 =
Some(
crate::xml_deser::deser_structure_crate_model_grantee(&mut tag)
?
)
;
builder = builder.set_grantee(var_366);
}
,
s if s.matches("Permission") => {
let var_367 =
Some(
Result::<crate::model::BucketLogsPermission, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::BucketLogsPermission::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_permission(var_367);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_s3_key_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3KeyFilter, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3KeyFilter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FilterRule") => {
let var_368 =
Some(
Result::<std::vec::Vec<crate::model::FilterRule>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_369 = builder.filter_rules.take().unwrap_or_default();
list_369.push(
crate::xml_deser::deser_structure_crate_model_filter_rule(&mut tag)
?
);
list_369
})
?
)
;
builder = builder.set_filter_rules(var_368);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_condition(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Condition, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Condition::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("HttpErrorCodeReturnedEquals") => {
let var_370 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_http_error_code_returned_equals(var_370);
}
,
s if s.matches("KeyPrefixEquals") => {
let var_371 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_prefix_equals(var_371);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_redirect(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Redirect, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Redirect::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("HostName") => {
let var_372 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_name(var_372);
}
,
s if s.matches("HttpRedirectCode") => {
let var_373 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_http_redirect_code(var_373);
}
,
s if s.matches("Protocol") => {
let var_374 =
Some(
Result::<crate::model::Protocol, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Protocol::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_protocol(var_374);
}
,
s if s.matches("ReplaceKeyPrefixWith") => {
let var_375 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_replace_key_prefix_with(var_375);
}
,
s if s.matches("ReplaceKeyWith") => {
let var_376 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_replace_key_with(var_376);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_analytics_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalyticsAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalyticsAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_377 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_377);
}
,
s if s.matches("Tag") => {
let var_378 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_379 = builder.tags.take().unwrap_or_default();
list_379.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_379
})
?
)
;
builder = builder.set_tags(var_378);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_storage_class_analysis_data_export(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StorageClassAnalysisDataExport, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StorageClassAnalysisDataExport::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("OutputSchemaVersion") => {
let var_380 =
Some(
Result::<crate::model::StorageClassAnalysisSchemaVersion, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClassAnalysisSchemaVersion::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_output_schema_version(var_380);
}
,
s if s.matches("Destination") => {
let var_381 =
Some(
crate::xml_deser::deser_structure_crate_model_analytics_export_destination(&mut tag)
?
)
;
builder = builder.set_destination(var_381);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_intelligent_tiering_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IntelligentTieringAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IntelligentTieringAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_382 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_382);
}
,
s if s.matches("Tag") => {
let var_383 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_384 = builder.tags.take().unwrap_or_default();
list_384.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_384
})
?
)
;
builder = builder.set_tags(var_383);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_inventory_s3_bucket_destination(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventoryS3BucketDestination, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventoryS3BucketDestination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AccountId") => {
let var_385 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_account_id(var_385);
}
,
s if s.matches("Bucket") => {
let var_386 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_386);
}
,
s if s.matches("Format") => {
let var_387 =
Some(
Result::<crate::model::InventoryFormat, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InventoryFormat::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_format(var_387);
}
,
s if s.matches("Prefix") => {
let var_388 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_388);
}
,
s if s.matches("Encryption") => {
let var_389 =
Some(
crate::xml_deser::deser_structure_crate_model_inventory_encryption(&mut tag)
?
)
;
builder = builder.set_encryption(var_389);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_metrics_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MetricsAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MetricsAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_390 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_390);
}
,
s if s.matches("Tag") => {
let var_391 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_392 = builder.tags.take().unwrap_or_default();
list_392.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_392
})
?
)
;
builder = builder.set_tags(var_391);
}
,
s if s.matches("AccessPointArn") => {
let var_393 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_access_point_arn(var_393);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_server_side_encryption_by_default(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServerSideEncryptionByDefault, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ServerSideEncryptionByDefault::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("SSEAlgorithm") => {
let var_394 =
Some(
Result::<crate::model::ServerSideEncryption, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ServerSideEncryption::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_sse_algorithm(var_394);
}
,
s if s.matches("KMSMasterKeyID") => {
let var_395 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_master_key_id(var_395);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_union_crate_model_replication_rule_filter(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationRuleFilter, aws_smithy_xml::decode::XmlDecodeError> {
let mut base: Option<crate::model::ReplicationRuleFilter> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let tmp =
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
;
base = Some(crate::model::ReplicationRuleFilter::Prefix(tmp));
}
,
s if s.matches("Tag") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
;
base = Some(crate::model::ReplicationRuleFilter::Tag(tmp));
}
,
s if s.matches("And") => {
let tmp =
crate::xml_deser::deser_structure_crate_model_replication_rule_and_operator(&mut tag)
?
;
base = Some(crate::model::ReplicationRuleFilter::And(tmp));
}
,
_unknown => base = Some(crate::model::ReplicationRuleFilter::Unknown),
}
}
base.ok_or_else(|| {
aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing")
})
}
pub fn deser_structure_crate_model_source_selection_criteria(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SourceSelectionCriteria, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SourceSelectionCriteria::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("SseKmsEncryptedObjects") => {
let var_396 =
Some(
crate::xml_deser::deser_structure_crate_model_sse_kms_encrypted_objects(&mut tag)
?
)
;
builder = builder.set_sse_kms_encrypted_objects(var_396);
}
,
s if s.matches("ReplicaModifications") => {
let var_397 =
Some(
crate::xml_deser::deser_structure_crate_model_replica_modifications(&mut tag)
?
)
;
builder = builder.set_replica_modifications(var_397);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_existing_object_replication(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ExistingObjectReplication, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ExistingObjectReplication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_398 =
Some(
Result::<crate::model::ExistingObjectReplicationStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExistingObjectReplicationStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_398);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_destination(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Destination, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Destination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Bucket") => {
let var_399 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_399);
}
,
s if s.matches("Account") => {
let var_400 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_account(var_400);
}
,
s if s.matches("StorageClass") => {
let var_401 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_401);
}
,
s if s.matches("AccessControlTranslation") => {
let var_402 =
Some(
crate::xml_deser::deser_structure_crate_model_access_control_translation(&mut tag)
?
)
;
builder = builder.set_access_control_translation(var_402);
}
,
s if s.matches("EncryptionConfiguration") => {
let var_403 =
Some(
crate::xml_deser::deser_structure_crate_model_encryption_configuration(&mut tag)
?
)
;
builder = builder.set_encryption_configuration(var_403);
}
,
s if s.matches("ReplicationTime") => {
let var_404 =
Some(
crate::xml_deser::deser_structure_crate_model_replication_time(&mut tag)
?
)
;
builder = builder.set_replication_time(var_404);
}
,
s if s.matches("Metrics") => {
let var_405 =
Some(
crate::xml_deser::deser_structure_crate_model_metrics(&mut tag)
?
)
;
builder = builder.set_metrics(var_405);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_delete_marker_replication(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteMarkerReplication, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteMarkerReplication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_406 =
Some(
Result::<crate::model::DeleteMarkerReplicationStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DeleteMarkerReplicationStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_406);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_default_retention(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DefaultRetention, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DefaultRetention::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Mode") => {
let var_407 =
Some(
Result::<crate::model::ObjectLockRetentionMode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockRetentionMode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_mode(var_407);
}
,
s if s.matches("Days") => {
let var_408 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Days`)"))
}
?
)
;
builder = builder.set_days(var_408);
}
,
s if s.matches("Years") => {
let var_409 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Years`)"))
}
?
)
;
builder = builder.set_years(var_409);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_filter_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FilterRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FilterRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Name") => {
let var_410 =
Some(
Result::<crate::model::FilterRuleName, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FilterRuleName::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_name(var_410);
}
,
s if s.matches("Value") => {
let var_411 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_411);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_analytics_export_destination(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalyticsExportDestination, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalyticsExportDestination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("S3BucketDestination") => {
let var_412 =
Some(
crate::xml_deser::deser_structure_crate_model_analytics_s3_bucket_destination(&mut tag)
?
)
;
builder = builder.set_s3_bucket_destination(var_412);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_inventory_encryption(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InventoryEncryption, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InventoryEncryption::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("SSE-S3") => {
let var_413 =
Some(
crate::xml_deser::deser_structure_crate_model_sses3(&mut tag)
?
)
;
builder = builder.set_sses3(var_413);
}
,
s if s.matches("SSE-KMS") => {
let var_414 =
Some(
crate::xml_deser::deser_structure_crate_model_ssekms(&mut tag)
?
)
;
builder = builder.set_ssekms(var_414);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replication_rule_and_operator(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationRuleAndOperator, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationRuleAndOperator::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Prefix") => {
let var_415 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_415);
}
,
s if s.matches("Tag") => {
let var_416 =
Some(
Result::<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_417 = builder.tags.take().unwrap_or_default();
list_417.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
list_417
})
?
)
;
builder = builder.set_tags(var_416);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_sse_kms_encrypted_objects(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SseKmsEncryptedObjects, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SseKmsEncryptedObjects::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_418 =
Some(
Result::<crate::model::SseKmsEncryptedObjectsStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::SseKmsEncryptedObjectsStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_418);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replica_modifications(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicaModifications, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicaModifications::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_419 =
Some(
Result::<crate::model::ReplicaModificationsStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ReplicaModificationsStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_419);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_access_control_translation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessControlTranslation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessControlTranslation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") => {
let var_420 =
Some(
Result::<crate::model::OwnerOverride, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::OwnerOverride::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_owner(var_420);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_encryption_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EncryptionConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EncryptionConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ReplicaKmsKeyID") => {
let var_421 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_replica_kms_key_id(var_421);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replication_time(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationTime, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationTime::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_422 =
Some(
Result::<crate::model::ReplicationTimeStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ReplicationTimeStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_422);
}
,
s if s.matches("Time") => {
let var_423 =
Some(
crate::xml_deser::deser_structure_crate_model_replication_time_value(&mut tag)
?
)
;
builder = builder.set_time(var_423);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_metrics(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Metrics, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Metrics::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_424 =
Some(
Result::<crate::model::MetricsStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::MetricsStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_424);
}
,
s if s.matches("EventThreshold") => {
let var_425 =
Some(
crate::xml_deser::deser_structure_crate_model_replication_time_value(&mut tag)
?
)
;
builder = builder.set_event_threshold(var_425);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_analytics_s3_bucket_destination(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalyticsS3BucketDestination, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalyticsS3BucketDestination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Format") => {
let var_426 =
Some(
Result::<crate::model::AnalyticsS3ExportFileFormat, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AnalyticsS3ExportFileFormat::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_format(var_426);
}
,
s if s.matches("BucketAccountId") => {
let var_427 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket_account_id(var_427);
}
,
s if s.matches("Bucket") => {
let var_428 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_428);
}
,
s if s.matches("Prefix") => {
let var_429 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_429);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_sses3(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Sses3, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Sses3::builder();
let _ = decoder;
Ok(builder.build())
}
pub fn deser_structure_crate_model_ssekms(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ssekms, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ssekms::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("KeyId") => {
let var_430 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_id(var_430);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_replication_time_value(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationTimeValue, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationTimeValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Minutes") => {
let var_431 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Minutes`)"))
}
?
)
;
builder = builder.set_minutes(var_431);
}
,
_ => {}
}
}
Ok(builder.build())
}