Struct google_api_proto::google::storage::v2::Bucket

source ·
pub struct Bucket {
Show 30 fields pub name: String, pub bucket_id: String, pub etag: String, pub project: String, pub metageneration: i64, pub location: String, pub location_type: String, pub storage_class: String, pub rpo: String, pub acl: Vec<BucketAccessControl>, pub default_object_acl: Vec<ObjectAccessControl>, pub lifecycle: Option<Lifecycle>, pub create_time: Option<Timestamp>, pub cors: Vec<Cors>, pub update_time: Option<Timestamp>, pub default_event_based_hold: bool, pub labels: BTreeMap<String, String>, pub website: Option<Website>, pub versioning: Option<Versioning>, pub logging: Option<Logging>, pub owner: Option<Owner>, pub encryption: Option<Encryption>, pub billing: Option<Billing>, pub retention_policy: Option<RetentionPolicy>, pub iam_config: Option<IamConfig>, pub satisfies_pzs: bool, pub custom_placement_config: Option<CustomPlacementConfig>, pub autoclass: Option<Autoclass>, pub hierarchical_namespace: Option<HierarchicalNamespace>, pub soft_delete_policy: Option<SoftDeletePolicy>,
}
Expand description

A bucket.

Fields§

§name: String

Immutable. The name of the bucket. Format: projects/{project}/buckets/{bucket}

§bucket_id: String

Output only. The user-chosen part of the bucket name. The {bucket} portion of the name field. For globally unique buckets, this is equal to the “bucket name” of other Cloud Storage APIs. Example: “pub”.

§etag: String

The etag of the bucket. If included in the metadata of an UpdateBucketRequest, the operation will only be performed if the etag matches that of the bucket.

§project: String

Immutable. The project which owns this bucket, in the format of “projects/{projectIdentifier}”. {projectIdentifier} can be the project ID or project number.

§metageneration: i64

Output only. The metadata generation of this bucket.

§location: String

Immutable. The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's guide] for the authoritative list. Attempting to update this field after the bucket is created will result in an error.

§location_type: String

Output only. The location type of the bucket (region, dual-region, multi-region, etc).

§storage_class: String

The bucket’s default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see https://developers.google.com/storage/docs/storage-classes.

§rpo: String

The recovery point objective for cross-region replication of the bucket. Applicable only for dual- and multi-region buckets. “DEFAULT” uses default replication. “ASYNC_TURBO” enables turbo replication, valid for dual-region buckets only. If rpo is not specified when the bucket is created, it defaults to “DEFAULT”. For more information, see https://cloud.google.com/storage/docs/availability-durability#turbo-replication.

§acl: Vec<BucketAccessControl>

Access controls on the bucket. If iam_config.uniform_bucket_level_access is enabled on this bucket, requests to set, read, or modify acl is an error.

§default_object_acl: Vec<ObjectAccessControl>

Default access controls to apply to new objects when no ACL is provided. If iam_config.uniform_bucket_level_access is enabled on this bucket, requests to set, read, or modify acl is an error.

§lifecycle: Option<Lifecycle>

The bucket’s lifecycle config. See [https://developers.google.com/storage/docs/lifecycle\]Lifecycle Management] for more information.

§create_time: Option<Timestamp>

Output only. The creation time of the bucket.

§cors: Vec<Cors>

The bucket’s [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing] (CORS) config.

§update_time: Option<Timestamp>

Output only. The modification time of the bucket.

§default_event_based_hold: bool

The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold’s release. After being released, 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 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. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.

§labels: BTreeMap<String, String>

User-provided labels, in key/value pairs.

§website: Option<Website>

The bucket’s website config, controlling how the service behaves when accessing bucket contents as a web site. See the [https://cloud.google.com/storage/docs/static-website][Static Website Examples] for more information.

§versioning: Option<Versioning>

The bucket’s versioning config.

§logging: Option<Logging>

The bucket’s logging config, which defines the destination bucket and name prefix (if any) for the current bucket’s logs.

§owner: Option<Owner>

Output only. The owner of the bucket. This is always the project team’s owner group.

§encryption: Option<Encryption>

Encryption config for a bucket.

§billing: Option<Billing>

The bucket’s billing config.

§retention_policy: Option<RetentionPolicy>

The bucket’s retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.

§iam_config: Option<IamConfig>

The bucket’s IAM config.

§satisfies_pzs: bool

Reserved for future use.

§custom_placement_config: Option<CustomPlacementConfig>

Configuration that, if present, specifies the data placement for a [https://cloud.google.com/storage/docs/use-dual-regions][Dual Region].

§autoclass: Option<Autoclass>

The bucket’s Autoclass configuration. If there is no configuration, the Autoclass feature will be disabled and have no effect on the bucket.

§hierarchical_namespace: Option<HierarchicalNamespace>

Optional. The bucket’s hierarchical namespace configuration. If there is no configuration, the hierarchical namespace feature will be disabled and have no effect on the bucket.

§soft_delete_policy: Option<SoftDeletePolicy>

Optional. The bucket’s soft delete policy. The soft delete policy prevents soft-deleted objects from being permanently deleted.

Trait Implementations§

source§

impl Clone for Bucket

source§

fn clone(&self) -> Bucket

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 Bucket

source§

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

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

impl Default for Bucket

source§

fn default() -> Self

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

impl Message for Bucket

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 Bucket

source§

fn eq(&self, other: &Bucket) -> 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 Bucket

Auto Trait Implementations§

§

impl Freeze for Bucket

§

impl RefUnwindSafe for Bucket

§

impl Send for Bucket

§

impl Sync for Bucket

§

impl Unpin for Bucket

§

impl UnwindSafe for Bucket

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