Struct google_storage1::api::Object

source ·
pub struct Object {
Show 35 fields pub acl: Option<Vec<ObjectAccessControl>>, pub bucket: Option<String>, pub cache_control: Option<String>, pub component_count: Option<i32>, pub content_disposition: Option<String>, pub content_encoding: Option<String>, pub content_language: Option<String>, pub content_type: Option<String>, pub crc32c: Option<String>, pub custom_time: Option<DateTime<Utc>>, pub customer_encryption: Option<ObjectCustomerEncryption>, pub etag: Option<String>, pub event_based_hold: Option<bool>, pub generation: Option<i64>, pub hard_delete_time: Option<DateTime<Utc>>, pub id: Option<String>, pub kind: Option<String>, pub kms_key_name: Option<String>, pub md5_hash: Option<String>, pub media_link: Option<String>, pub metadata: Option<HashMap<String, String>>, pub metageneration: Option<i64>, pub name: Option<String>, pub owner: Option<ObjectOwner>, pub retention: Option<ObjectRetention>, pub retention_expiration_time: Option<DateTime<Utc>>, pub self_link: Option<String>, pub size: Option<u64>, pub soft_delete_time: Option<DateTime<Utc>>, pub storage_class: Option<String>, pub temporary_hold: Option<bool>, pub time_created: Option<DateTime<Utc>>, pub time_deleted: Option<DateTime<Utc>>, pub time_storage_class_updated: Option<DateTime<Utc>>, pub updated: Option<DateTime<Utc>>,
}
Expand description

An object.

§Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields§

§acl: Option<Vec<ObjectAccessControl>>

Access controls on the object.

§bucket: Option<String>

The name of the bucket containing this object.

§cache_control: Option<String>

Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.

§component_count: Option<i32>

Number of underlying components that make up this object. Components are accumulated by compose operations.

§content_disposition: Option<String>

Content-Disposition of the object data.

§content_encoding: Option<String>

Content-Encoding of the object data.

§content_language: Option<String>

Content-Language of the object data.

§content_type: Option<String>

Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.

§crc32c: Option<String>

CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.

§custom_time: Option<DateTime<Utc>>

A timestamp in RFC 3339 format specified by the user for an object.

§customer_encryption: Option<ObjectCustomerEncryption>

Metadata of customer-supplied encryption key, if the object is encrypted by such a key.

§etag: Option<String>

HTTP 1.1 Entity tag for the object.

§event_based_hold: Option<bool>

Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold’s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.

§generation: Option<i64>

The content generation of this object. Used for object versioning.

§hard_delete_time: Option<DateTime<Utc>>

This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.

§id: Option<String>

The ID of the object, including the bucket name, object name, and generation number.

§kind: Option<String>

The kind of item this is. For objects, this is always storage#object.

§kms_key_name: Option<String>

Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.

§md5_hash: Option<String>

MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.

§media_link: Option<String>

Media download link.

§metadata: Option<HashMap<String, String>>

User-provided metadata, in key/value pairs.

§metageneration: Option<i64>

The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.

§name: Option<String>

The name of the object. Required if not specified by URL parameter.

§owner: Option<ObjectOwner>

The owner of the object. This will always be the uploader of the object.

§retention: Option<ObjectRetention>

A collection of object level retention parameters.

§retention_expiration_time: Option<DateTime<Utc>>

A server-determined value that specifies the earliest time that the object’s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).

§self_link: Option<String>

The link to this object.

§size: Option<u64>

Content-Length of the data in bytes.

§soft_delete_time: Option<DateTime<Utc>>

The time at which the object became soft-deleted in RFC 3339 format.

§storage_class: Option<String>

Storage class of the object.

§temporary_hold: Option<bool>

Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.

§time_created: Option<DateTime<Utc>>

The creation time of the object in RFC 3339 format.

§time_deleted: Option<DateTime<Utc>>

The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.

§time_storage_class_updated: Option<DateTime<Utc>>

The time at which the object’s storage class was last changed. When the object is initially created, it will be set to timeCreated.

§updated: Option<DateTime<Utc>>

The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.

Trait Implementations§

source§

impl Clone for Object

source§

fn clone(&self) -> Object

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Object

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Object

source§

fn default() -> Object

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Object

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Object

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl RequestValue for Object

source§

impl Resource for Object

source§

impl ResponseResult for Object

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,