Struct aws_sdk_s3::model::object::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Object
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn key(self, input: impl Into<String>) -> Self
pub fn key(self, input: impl Into<String>) -> Self
The name that you assign to an object. You use the object key to retrieve the object.
sourcepub fn set_key(self, input: Option<String>) -> Self
pub fn set_key(self, input: Option<String>) -> Self
The name that you assign to an object. You use the object key to retrieve the object.
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn last_modified(self, input: DateTime) -> Self
pub fn last_modified(self, input: DateTime) -> Self
Creation date of the object.
sourcepub fn set_last_modified(self, input: Option<DateTime>) -> Self
pub fn set_last_modified(self, input: Option<DateTime>) -> Self
Creation date of the object.
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn e_tag(self, input: impl Into<String>) -> Self
pub fn e_tag(self, input: impl Into<String>) -> Self
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
-
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
sourcepub fn set_e_tag(self, input: Option<String>) -> Self
pub fn set_e_tag(self, input: Option<String>) -> Self
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
-
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
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?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
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?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn storage_class(self, input: ObjectStorageClass) -> Self
pub fn storage_class(self, input: ObjectStorageClass) -> Self
The class of storage used to store the object.
sourcepub fn set_storage_class(self, input: Option<ObjectStorageClass>) -> Self
pub fn set_storage_class(self, input: Option<ObjectStorageClass>) -> Self
The class of storage used to store the object.
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_owner(self, input: Option<Owner>) -> Self
pub fn set_owner(self, input: Option<Owner>) -> Self
The owner of the object
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Object
pub fn build(self) -> Object
Consumes the builder and constructs a Object
.
Examples found in repository?
4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406
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") /* Key com.amazonaws.s3#Object$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") /* LastModified com.amazonaws.s3#Object$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") /* ETag com.amazonaws.s3#Object$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") /* ChecksumAlgorithm com.amazonaws.s3#Object$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") /* Size com.amazonaws.s3#Object$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") /* StorageClass com.amazonaws.s3#Object$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") /* Owner com.amazonaws.s3#Object$Owner */ => {
let var_246 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_246);
}
,
_ => {}
}
}
Ok(builder.build())
}