wasmio_aws_types/types/object.rs
1use derivative::Derivative;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use super::Owner;
6
7#[derive(Derivative, Default, Builder, Serialize, Deserialize)]
8#[derivative(Debug)]
9#[builder(pattern = "owned", setter(into), default)]
10#[serde(rename_all = "PascalCase")]
11/// An object consists of data and its descriptive metadata.
12pub struct Object {
13 /// The entity tag is a hash of the object. The ETag reflects changes only
14 /// to the contents of an object, not its metadata. The ETag may or may not
15 /// be an MD5 digest of the object data. Whether or not it is depends on
16 /// how the object was created and how it is encrypted as described below:
17 /// - Objects created by the PUT Object, POST Object, or Copy
18 /// operation, or through the AWS Management Console, and are encrypted by
19 /// SSE-S3 or plaintext, have ETags that are an MD5 digest of their object
20 /// data.
21 /// - Objects created by the PUT Object, POST Object, or
22 /// Copy operation, or through the AWS Management Console, and are
23 /// encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of
24 /// their object data.
25 /// - If an object is created by either the
26 /// Multipart Upload or Part Copy operation, the ETag is not an MD5 digest,
27 /// regardless of the method of encryption.
28 pub e_tag: Option<String>,
29 /// The name that you assign to an object. You use the object key to
30 /// retrieve the object.
31 pub key: Option<String>,
32 /// Creation date of the object.
33 pub last_modified: Option<String>,
34 /// The owner of the object
35 pub owner: Option<Owner>,
36 /// Size in bytes of the object
37 pub size: Option<i64>,
38 /// The class of storage used to store the object.
39 pub storage_class: Option<String>,
40}