Struct aws_sdk_s3::model::object_version::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ObjectVersion
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn e_tag(self, input: impl Into<String>) -> Self
pub fn e_tag(self, input: impl Into<String>) -> Self
The entity tag is an MD5 hash of that version of the object.
sourcepub fn set_e_tag(self, input: Option<String>) -> Self
pub fn set_e_tag(self, input: Option<String>) -> Self
The entity tag is an MD5 hash of that version of the object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
pub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
Appends an item to checksum_algorithm
.
To override the contents of this collection use set_checksum_algorithm
.
The algorithm that was used to create a checksum of the object.
sourcepub fn set_checksum_algorithm(
self,
input: Option<Vec<ChecksumAlgorithm>>
) -> Self
pub fn set_checksum_algorithm(
self,
input: Option<Vec<ChecksumAlgorithm>>
) -> Self
The algorithm that was used to create a checksum of the object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_size(self, input: Option<i64>) -> Self
pub fn set_size(self, input: Option<i64>) -> Self
Size in bytes of the object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn storage_class(self, input: ObjectVersionStorageClass) -> Self
pub fn storage_class(self, input: ObjectVersionStorageClass) -> Self
The class of storage used to store the object.
sourcepub fn set_storage_class(self, input: Option<ObjectVersionStorageClass>) -> Self
pub fn set_storage_class(self, input: Option<ObjectVersionStorageClass>) -> Self
The class of storage used to store the object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_key(self, input: Option<String>) -> Self
pub fn set_key(self, input: Option<String>) -> Self
The object key.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn version_id(self, input: impl Into<String>) -> Self
pub fn version_id(self, input: impl Into<String>) -> Self
Version ID of an object.
sourcepub fn set_version_id(self, input: Option<String>) -> Self
pub fn set_version_id(self, input: Option<String>) -> Self
Version ID of an object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn is_latest(self, input: bool) -> Self
pub fn is_latest(self, input: bool) -> Self
Specifies whether the object is (true) or is not (false) the latest version of an object.
sourcepub fn set_is_latest(self, input: Option<bool>) -> Self
pub fn set_is_latest(self, input: Option<bool>) -> Self
Specifies whether the object is (true) or is not (false) the latest version of an object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn last_modified(self, input: DateTime) -> Self
pub fn last_modified(self, input: DateTime) -> Self
Date and time the object was last modified.
sourcepub fn set_last_modified(self, input: Option<DateTime>) -> Self
pub fn set_last_modified(self, input: Option<DateTime>) -> Self
Date and time the object was last modified.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_owner(self, input: Option<Owner>) -> Self
pub fn set_owner(self, input: Option<Owner>) -> Self
Specifies the owner of the object.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ObjectVersion
pub fn build(self) -> ObjectVersion
Consumes the builder and constructs a ObjectVersion
.
Examples found in repository?
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
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") /* ETag com.amazonaws.s3#ObjectVersion$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") /* ChecksumAlgorithm com.amazonaws.s3#ObjectVersion$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") /* Size com.amazonaws.s3#ObjectVersion$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") /* StorageClass com.amazonaws.s3#ObjectVersion$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") /* Key com.amazonaws.s3#ObjectVersion$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") /* VersionId com.amazonaws.s3#ObjectVersion$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") /* IsLatest com.amazonaws.s3#ObjectVersion$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") /* LastModified com.amazonaws.s3#ObjectVersion$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") /* Owner com.amazonaws.s3#ObjectVersion$Owner */ => {
let var_256 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_256);
}
,
_ => {}
}
}
Ok(builder.build())
}