Class Bucket (2.19.0)

public final class Bucket extends GeneratedMessageV3 implements BucketOrBuilder

A bucket.

Protobuf type google.storage.v2.Bucket

Implements

BucketOrBuilder

Static Fields

ACL_FIELD_NUMBER

public static final int ACL_FIELD_NUMBER
Field Value
TypeDescription
int

AUTOCLASS_FIELD_NUMBER

public static final int AUTOCLASS_FIELD_NUMBER
Field Value
TypeDescription
int

BILLING_FIELD_NUMBER

public static final int BILLING_FIELD_NUMBER
Field Value
TypeDescription
int

BUCKET_ID_FIELD_NUMBER

public static final int BUCKET_ID_FIELD_NUMBER
Field Value
TypeDescription
int

CORS_FIELD_NUMBER

public static final int CORS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_PLACEMENT_CONFIG_FIELD_NUMBER

public static final int CUSTOM_PLACEMENT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

DEFAULT_EVENT_BASED_HOLD_FIELD_NUMBER

public static final int DEFAULT_EVENT_BASED_HOLD_FIELD_NUMBER
Field Value
TypeDescription
int

DEFAULT_OBJECT_ACL_FIELD_NUMBER

public static final int DEFAULT_OBJECT_ACL_FIELD_NUMBER
Field Value
TypeDescription
int

ENCRYPTION_FIELD_NUMBER

public static final int ENCRYPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

IAM_CONFIG_FIELD_NUMBER

public static final int IAM_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

LIFECYCLE_FIELD_NUMBER

public static final int LIFECYCLE_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATION_FIELD_NUMBER

public static final int LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATION_TYPE_FIELD_NUMBER

public static final int LOCATION_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

LOGGING_FIELD_NUMBER

public static final int LOGGING_FIELD_NUMBER
Field Value
TypeDescription
int

METAGENERATION_FIELD_NUMBER

public static final int METAGENERATION_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OWNER_FIELD_NUMBER

public static final int OWNER_FIELD_NUMBER
Field Value
TypeDescription
int

PROJECT_FIELD_NUMBER

public static final int PROJECT_FIELD_NUMBER
Field Value
TypeDescription
int

RETENTION_POLICY_FIELD_NUMBER

public static final int RETENTION_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

RPO_FIELD_NUMBER

public static final int RPO_FIELD_NUMBER
Field Value
TypeDescription
int

SATISFIES_PZS_FIELD_NUMBER

public static final int SATISFIES_PZS_FIELD_NUMBER
Field Value
TypeDescription
int

STORAGE_CLASS_FIELD_NUMBER

public static final int STORAGE_CLASS_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

VERSIONING_FIELD_NUMBER

public static final int VERSIONING_FIELD_NUMBER
Field Value
TypeDescription
int

WEBSITE_FIELD_NUMBER

public static final int WEBSITE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Bucket getDefaultInstance()
Returns
TypeDescription
Bucket

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Bucket.Builder newBuilder()
Returns
TypeDescription
Bucket.Builder

newBuilder(Bucket prototype)

public static Bucket.Builder newBuilder(Bucket prototype)
Parameter
NameDescription
prototypeBucket
Returns
TypeDescription
Bucket.Builder

parseDelimitedFrom(InputStream input)

public static Bucket parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Bucket parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Bucket parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Bucket parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Bucket parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Bucket parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Bucket parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Bucket parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Bucket parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Bucket> parser()
Returns
TypeDescription
Parser<Bucket>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

User-provided labels, in key/value pairs.

map<string, string> labels = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAcl(int index)

public BucketAccessControl getAcl(int index)

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.

repeated .google.storage.v2.BucketAccessControl acl = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
BucketAccessControl

getAclCount()

public int getAclCount()

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.

repeated .google.storage.v2.BucketAccessControl acl = 8;

Returns
TypeDescription
int

getAclList()

public List<BucketAccessControl> getAclList()

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.

repeated .google.storage.v2.BucketAccessControl acl = 8;

Returns
TypeDescription
List<BucketAccessControl>

getAclOrBuilder(int index)

public BucketAccessControlOrBuilder getAclOrBuilder(int index)

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.

repeated .google.storage.v2.BucketAccessControl acl = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
BucketAccessControlOrBuilder

getAclOrBuilderList()

public List<? extends BucketAccessControlOrBuilder> getAclOrBuilderList()

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.

repeated .google.storage.v2.BucketAccessControl acl = 8;

Returns
TypeDescription
List<? extends com.google.storage.v2.BucketAccessControlOrBuilder>

getAutoclass()

public Bucket.Autoclass getAutoclass()

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

.google.storage.v2.Bucket.Autoclass autoclass = 28;

Returns
TypeDescription
Bucket.Autoclass

The autoclass.

getAutoclassOrBuilder()

public Bucket.AutoclassOrBuilder getAutoclassOrBuilder()

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

.google.storage.v2.Bucket.Autoclass autoclass = 28;

Returns
TypeDescription
Bucket.AutoclassOrBuilder

getBilling()

public Bucket.Billing getBilling()

The bucket's billing config.

.google.storage.v2.Bucket.Billing billing = 21;

Returns
TypeDescription
Bucket.Billing

The billing.

getBillingOrBuilder()

public Bucket.BillingOrBuilder getBillingOrBuilder()

The bucket's billing config.

.google.storage.v2.Bucket.Billing billing = 21;

Returns
TypeDescription
Bucket.BillingOrBuilder

getBucketId()

public String getBucketId()

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

string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The bucketId.

getBucketIdBytes()

public ByteString getBucketIdBytes()

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

string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for bucketId.

getCors(int index)

public Bucket.Cors getCors(int index)

The bucket's https://www.w3.org/TR/cors/ (CORS) config.

repeated .google.storage.v2.Bucket.Cors cors = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
Bucket.Cors

getCorsCount()

public int getCorsCount()

The bucket's https://www.w3.org/TR/cors/ (CORS) config.

repeated .google.storage.v2.Bucket.Cors cors = 12;

Returns
TypeDescription
int

getCorsList()

public List<Bucket.Cors> getCorsList()

The bucket's https://www.w3.org/TR/cors/ (CORS) config.

repeated .google.storage.v2.Bucket.Cors cors = 12;

Returns
TypeDescription
List<Cors>

getCorsOrBuilder(int index)

public Bucket.CorsOrBuilder getCorsOrBuilder(int index)

The bucket's https://www.w3.org/TR/cors/ (CORS) config.

repeated .google.storage.v2.Bucket.Cors cors = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
Bucket.CorsOrBuilder

getCorsOrBuilderList()

public List<? extends Bucket.CorsOrBuilder> getCorsOrBuilderList()

The bucket's https://www.w3.org/TR/cors/ (CORS) config.

repeated .google.storage.v2.Bucket.Cors cors = 12;

Returns
TypeDescription
List<? extends com.google.storage.v2.Bucket.CorsOrBuilder>

getCreateTime()

public Timestamp getCreateTime()

Output only. The creation time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getCustomPlacementConfig()

public Bucket.CustomPlacementConfig getCustomPlacementConfig()

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

.google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26;

Returns
TypeDescription
Bucket.CustomPlacementConfig

The customPlacementConfig.

getCustomPlacementConfigOrBuilder()

public Bucket.CustomPlacementConfigOrBuilder getCustomPlacementConfigOrBuilder()

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

.google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26;

Returns
TypeDescription
Bucket.CustomPlacementConfigOrBuilder

getDefaultEventBasedHold()

public boolean getDefaultEventBasedHold()

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.

bool default_event_based_hold = 14;

Returns
TypeDescription
boolean

The defaultEventBasedHold.

getDefaultInstanceForType()

public Bucket getDefaultInstanceForType()
Returns
TypeDescription
Bucket

getDefaultObjectAcl(int index)

public ObjectAccessControl getDefaultObjectAcl(int index)

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.

repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
ObjectAccessControl

getDefaultObjectAclCount()

public int getDefaultObjectAclCount()

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.

repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9;

Returns
TypeDescription
int

getDefaultObjectAclList()

public List<ObjectAccessControl> getDefaultObjectAclList()

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.

repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9;

Returns
TypeDescription
List<ObjectAccessControl>

getDefaultObjectAclOrBuilder(int index)

public ObjectAccessControlOrBuilder getDefaultObjectAclOrBuilder(int index)

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.

repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
ObjectAccessControlOrBuilder

getDefaultObjectAclOrBuilderList()

public List<? extends ObjectAccessControlOrBuilder> getDefaultObjectAclOrBuilderList()

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.

repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9;

Returns
TypeDescription
List<? extends com.google.storage.v2.ObjectAccessControlOrBuilder>

getEncryption()

public Bucket.Encryption getEncryption()

Encryption config for a bucket.

.google.storage.v2.Bucket.Encryption encryption = 20;

Returns
TypeDescription
Bucket.Encryption

The encryption.

getEncryptionOrBuilder()

public Bucket.EncryptionOrBuilder getEncryptionOrBuilder()

Encryption config for a bucket.

.google.storage.v2.Bucket.Encryption encryption = 20;

Returns
TypeDescription
Bucket.EncryptionOrBuilder

getEtag()

public String getEtag()

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.

string etag = 29;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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.

string etag = 29;

Returns
TypeDescription
ByteString

The bytes for etag.

getIamConfig()

public Bucket.IamConfig getIamConfig()

The bucket's IAM config.

.google.storage.v2.Bucket.IamConfig iam_config = 23;

Returns
TypeDescription
Bucket.IamConfig

The iamConfig.

getIamConfigOrBuilder()

public Bucket.IamConfigOrBuilder getIamConfigOrBuilder()

The bucket's IAM config.

.google.storage.v2.Bucket.IamConfig iam_config = 23;

Returns
TypeDescription
Bucket.IamConfigOrBuilder

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

User-provided labels, in key/value pairs.

map<string, string> labels = 15;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

User-provided labels, in key/value pairs.

map<string, string> labels = 15;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

User-provided labels, in key/value pairs.

map<string, string> labels = 15;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

User-provided labels, in key/value pairs.

map<string, string> labels = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getLifecycle()

public Bucket.Lifecycle getLifecycle()

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

.google.storage.v2.Bucket.Lifecycle lifecycle = 10;

Returns
TypeDescription
Bucket.Lifecycle

The lifecycle.

getLifecycleOrBuilder()

public Bucket.LifecycleOrBuilder getLifecycleOrBuilder()

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

.google.storage.v2.Bucket.Lifecycle lifecycle = 10;

Returns
TypeDescription
Bucket.LifecycleOrBuilder

getLocation()

public String getLocation()

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" for the authoritative list. Attempting to update this field after the bucket is created will result in an error.

string location = 5 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The location.

getLocationBytes()

public ByteString getLocationBytes()

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" for the authoritative list. Attempting to update this field after the bucket is created will result in an error.

string location = 5 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for location.

getLocationType()

public String getLocationType()

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

string location_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The locationType.

getLocationTypeBytes()

public ByteString getLocationTypeBytes()

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

string location_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for locationType.

getLogging()

public Bucket.Logging getLogging()

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

.google.storage.v2.Bucket.Logging logging = 18;

Returns
TypeDescription
Bucket.Logging

The logging.

getLoggingOrBuilder()

public Bucket.LoggingOrBuilder getLoggingOrBuilder()

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

.google.storage.v2.Bucket.Logging logging = 18;

Returns
TypeDescription
Bucket.LoggingOrBuilder

getMetageneration()

public long getMetageneration()

Output only. The metadata generation of this bucket. Attempting to set or update this field will result in a FieldViolation.

int64 metageneration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The metageneration.

getName()

public String getName()

Immutable. The name of the bucket.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The name of the bucket.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for name.

getOwner()

public Owner getOwner()

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

.google.storage.v2.Owner owner = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Owner

The owner.

getOwnerOrBuilder()

public OwnerOrBuilder getOwnerOrBuilder()

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

.google.storage.v2.Owner owner = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OwnerOrBuilder

getParserForType()

public Parser<Bucket> getParserForType()
Returns
TypeDescription
Parser<Bucket>
Overrides

getProject()

public String getProject()

Immutable. The project which owns this bucket, in the format of "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or project number.

string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The project.

getProjectBytes()

public ByteString getProjectBytes()

Immutable. The project which owns this bucket, in the format of "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or project number.

string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for project.

getRetentionPolicy()

public Bucket.RetentionPolicy getRetentionPolicy()

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.

.google.storage.v2.Bucket.RetentionPolicy retention_policy = 22;

Returns
TypeDescription
Bucket.RetentionPolicy

The retentionPolicy.

getRetentionPolicyOrBuilder()

public Bucket.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder()

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.

.google.storage.v2.Bucket.RetentionPolicy retention_policy = 22;

Returns
TypeDescription
Bucket.RetentionPolicyOrBuilder

getRpo()

public String getRpo()

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/turbo-replication.

string rpo = 27;

Returns
TypeDescription
String

The rpo.

getRpoBytes()

public ByteString getRpoBytes()

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/turbo-replication.

string rpo = 27;

Returns
TypeDescription
ByteString

The bytes for rpo.

getSatisfiesPzs()

public boolean getSatisfiesPzs()

Reserved for future use.

bool satisfies_pzs = 25;

Returns
TypeDescription
boolean

The satisfiesPzs.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStorageClass()

public String getStorageClass()

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.

string storage_class = 7;

Returns
TypeDescription
String

The storageClass.

getStorageClassBytes()

public ByteString getStorageClassBytes()

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.

string storage_class = 7;

Returns
TypeDescription
ByteString

The bytes for storageClass.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The modification time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The modification time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getVersioning()

public Bucket.Versioning getVersioning()

The bucket's versioning config.

.google.storage.v2.Bucket.Versioning versioning = 17;

Returns
TypeDescription
Bucket.Versioning

The versioning.

getVersioningOrBuilder()

public Bucket.VersioningOrBuilder getVersioningOrBuilder()

The bucket's versioning config.

.google.storage.v2.Bucket.Versioning versioning = 17;

Returns
TypeDescription
Bucket.VersioningOrBuilder

getWebsite()

public Bucket.Website getWebsite()

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 for more information.

.google.storage.v2.Bucket.Website website = 16;

Returns
TypeDescription
Bucket.Website

The website.

getWebsiteOrBuilder()

public Bucket.WebsiteOrBuilder getWebsiteOrBuilder()

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 for more information.

.google.storage.v2.Bucket.Website website = 16;

Returns
TypeDescription
Bucket.WebsiteOrBuilder

hasAutoclass()

public boolean hasAutoclass()

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

.google.storage.v2.Bucket.Autoclass autoclass = 28;

Returns
TypeDescription
boolean

Whether the autoclass field is set.

hasBilling()

public boolean hasBilling()

The bucket's billing config.

.google.storage.v2.Bucket.Billing billing = 21;

Returns
TypeDescription
boolean

Whether the billing field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The creation time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasCustomPlacementConfig()

public boolean hasCustomPlacementConfig()

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

.google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26;

Returns
TypeDescription
boolean

Whether the customPlacementConfig field is set.

hasEncryption()

public boolean hasEncryption()

Encryption config for a bucket.

.google.storage.v2.Bucket.Encryption encryption = 20;

Returns
TypeDescription
boolean

Whether the encryption field is set.

hasIamConfig()

public boolean hasIamConfig()

The bucket's IAM config.

.google.storage.v2.Bucket.IamConfig iam_config = 23;

Returns
TypeDescription
boolean

Whether the iamConfig field is set.

hasLifecycle()

public boolean hasLifecycle()

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

.google.storage.v2.Bucket.Lifecycle lifecycle = 10;

Returns
TypeDescription
boolean

Whether the lifecycle field is set.

hasLogging()

public boolean hasLogging()

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

.google.storage.v2.Bucket.Logging logging = 18;

Returns
TypeDescription
boolean

Whether the logging field is set.

hasOwner()

public boolean hasOwner()

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

.google.storage.v2.Owner owner = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the owner field is set.

hasRetentionPolicy()

public boolean hasRetentionPolicy()

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.

.google.storage.v2.Bucket.RetentionPolicy retention_policy = 22;

Returns
TypeDescription
boolean

Whether the retentionPolicy field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The modification time of the bucket. Attempting to set or update this field will result in a FieldViolation.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hasVersioning()

public boolean hasVersioning()

The bucket's versioning config.

.google.storage.v2.Bucket.Versioning versioning = 17;

Returns
TypeDescription
boolean

Whether the versioning field is set.

hasWebsite()

public boolean hasWebsite()

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 for more information.

.google.storage.v2.Bucket.Website website = 16;

Returns
TypeDescription
boolean

Whether the website field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Bucket.Builder newBuilderForType()
Returns
TypeDescription
Bucket.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Bucket.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Bucket.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Bucket.Builder toBuilder()
Returns
TypeDescription
Bucket.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException