google_cloudevents::google::events::cloud::storage::v1

Struct StorageObjectData

Source
pub struct StorageObjectData {
Show 29 fields pub content_encoding: String, pub content_disposition: String, pub cache_control: String, 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: String, 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: HashMap<String, String>, pub event_based_hold: bool, pub name: String, pub id: String, pub bucket: String, pub generation: i64, pub customer_encryption: Option<CustomerEncryption>, pub media_link: String, pub self_link: String, pub kind: String,
}
Expand description

An object within Google Cloud Storage.

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

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

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

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

§time_created: Option<Timestamp>

The creation time of the object. Attempting to set this field will result in an error.

§crc32c: String

CRC32c checksum. For more information about using the CRC32c checksum, see [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and ETags: Best Practices].

§component_count: i32

Number of underlying components that make up this object. Components are accumulated by compose operations. Attempting to set this field will result in an error.

§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#_JSONAPI][Hashes and ETags: Best Practices].

§etag: String

HTTP 1.1 Entity tag for the object. See [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].

§updated: Option<Timestamp>

The modification time of the object metadata.

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

§temporary_hold: bool

Whether an object is under temporary hold.

§retention_expiration_time: Option<Timestamp>

A server-determined value that specifies the earliest time that the object’s retention period expires.

§metadata: HashMap<String, String>

User-provided metadata, in key/value pairs.

§event_based_hold: bool

Whether an object is under event-based hold.

§name: String

The name of the object.

§id: String

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

§bucket: String

The name of the bucket containing this object.

§generation: i64

The content generation of this object. Used for object versioning. Attempting to set this field will result in an error.

§customer_encryption: Option<CustomerEncryption>

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

§media_link: String

Media download link.

§self_link: String

The link to this object.

§kind: String

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

Trait Implementations§

Source§

impl Clone for StorageObjectData

Source§

fn clone(&self) -> StorageObjectData

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 StorageObjectData

Source§

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

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

impl Default for StorageObjectData

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for StorageObjectData

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 Message for StorageObjectData

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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where 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( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where 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(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

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

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

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

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

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

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

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

impl PartialEq for StorageObjectData

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StorageObjectData

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 StructuralPartialEq for StorageObjectData

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

Source§

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>,

Source§

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>,

Source§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,