Struct aws_sdk_s3::model::Object

source ·
#[non_exhaustive]
pub struct Object { /* private fields */ }
Expand description

An object consists of data and its descriptive metadata.

Implementations§

The name that you assign to an object. You use the object key to retrieve the object.

Creation date of the object.

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.

The algorithm that was used to create a checksum of the object.

Size in bytes of the object

The class of storage used to store the object.

The owner of the object

Creates a new builder-style object to manufacture Object.

Examples found in repository?
src/xml_deser.rs (line 4299)
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())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more