pub struct Object {
Show 29 fields pub content_encoding: String, pub content_disposition: String, pub cache_control: String, pub acl: Vec<ObjectAccessControl>, pub content_language: String, pub metageneration: i64, pub time_deleted: Option<Timestamp>, pub content_type: String, pub size: i64, pub time_created: Option<Timestamp>, pub crc32c: Option<u32>, pub component_count: i32, pub md5_hash: String, pub etag: String, pub updated: Option<Timestamp>, pub storage_class: String, pub kms_key_name: String, pub time_storage_class_updated: Option<Timestamp>, pub temporary_hold: bool, pub retention_expiration_time: Option<Timestamp>, pub metadata: BTreeMap<String, String>, pub event_based_hold: Option<bool>, pub name: String, pub id: String, pub bucket: String, pub generation: i64, pub owner: Option<Owner>, pub customer_encryption: Option<CustomerEncryption>, pub custom_time: Option<Timestamp>,
}
Expand description

An object.

Fields§

§content_encoding: String

Content-Encoding of the object data, matching [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]

§content_disposition: String

Content-Disposition of the object data, matching [https://tools.ietf.org/html/rfc6266][RFC 6266].

§cache_control: String

Cache-Control directive for the object data, matching [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2]. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.

§acl: Vec<ObjectAccessControl>

Access controls on the object.

§content_language: String

Content-Language of the object data, matching [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].

§metageneration: 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. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§time_deleted: Option<Timestamp>

The deletion time of the object. Will be returned if and only if this version of the object has been deleted. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§content_type: String

Content-Type of the object data, matching [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5]. If an object is stored without a Content-Type, it is served as application/octet-stream.

§size: i64

Content-Length of the object data in bytes, matching [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2]. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§time_created: Option<Timestamp>

The creation time of the object. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§crc32c: Option<u32>

CRC32c checksum. For more information about using the CRC32c checksum, see [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and ETags: Best Practices]. This is a server determined value and should not be supplied by the user when sending an Object. The server will ignore any value provided. Users should instead use the object_checksums field on the InsertObjectRequest when uploading an object.

§component_count: i32

Number of underlying components that make up this object. Components are accumulated by compose operations. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§md5_hash: String

MD5 hash of the data; encoded using base64 as per [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more information about using the MD5 hash, see [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and ETags: Best Practices]. This is a server determined value and should not be supplied by the user when sending an Object. The server will ignore any value provided. Users should instead use the object_checksums field on the InsertObjectRequest when uploading an object.

§etag: String

HTTP 1.1 Entity tag for the object. See [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3]. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§updated: Option<Timestamp>

The modification time of the object metadata. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§storage_class: String

Storage class of the object.

§kms_key_name: String

Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key.

§time_storage_class_updated: Option<Timestamp>

The time at which the object’s storage class was last changed. When the object is initially created, it will be set to time_created. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§temporary_hold: 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.

§retention_expiration_time: Option<Timestamp>

A server-determined value that specifies the earliest time that the object’s retention period expires. This value is in [https://tools.ietf.org/html/rfc3339][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).

§metadata: BTreeMap<String, String>

User-provided metadata, in key/value pairs.

§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.

§name: String

The name of the object. Attempting to update this field after the object is created will result in an error.

§id: String

The ID of the object, including the bucket name, object name, and generation number. Attempting to update this field after the object is created will result in an error.

§bucket: String

The name of the bucket containing this object. Attempting to update this field after the object is created will result in an error.

§generation: i64

The content generation of this object. Used for object versioning. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§owner: Option<Owner>

The owner of the object. This will always be the uploader of the object. Attempting to set or update this field will result in a [FieldViolation][google.rpc.BadRequest.FieldViolation].

§customer_encryption: Option<CustomerEncryption>

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

§custom_time: Option<Timestamp>

A user-specified timestamp set on an object.

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() -> Self

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

impl Message for Object

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Object

source§

fn eq(&self, other: &Object) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Object

Auto Trait Implementations§

§

impl Freeze for Object

§

impl RefUnwindSafe for Object

§

impl Send for Object

§

impl Sync for Object

§

impl Unpin for Object

§

impl UnwindSafe for Object

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.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

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

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

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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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