Bucket

com.google.storage.v2.storage.Bucket
See theBucket companion object
final case class Bucket(name: String, bucketId: String, etag: String, project: String, metageneration: Long, location: String, locationType: String, storageClass: String, rpo: String, acl: Seq[BucketAccessControl], defaultObjectAcl: Seq[ObjectAccessControl], lifecycle: Option[Lifecycle], createTime: Option[Timestamp], cors: Seq[Cors], updateTime: Option[Timestamp], defaultEventBasedHold: Boolean, labels: Map[String, String], website: Option[Website], versioning: Option[Versioning], logging: Option[Logging], owner: Option[Owner], encryption: Option[Encryption], billing: Option[Billing], retentionPolicy: Option[RetentionPolicy], iamConfig: Option[IamConfig], satisfiesPzs: Boolean, customPlacementConfig: Option[CustomPlacementConfig], autoclass: Option[Autoclass], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Bucket]

A bucket.

Value parameters

acl

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.

autoclass

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

billing

The bucket's billing config.

bucketId

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

cors

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

createTime

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

customPlacementConfig

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

defaultEventBasedHold

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.

defaultObjectAcl

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.

encryption

Encryption config for a bucket.

etag

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.

iamConfig

The bucket's IAM config.

labels

User-provided labels, in key/value pairs.

lifecycle

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

location

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.

locationType

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

logging

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

metageneration

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

name

Immutable. The name of the bucket.

owner

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

project

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

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.

rpo

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.

satisfiesPzs

Reserved for future use.

storageClass

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.

updateTime

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

versioning

The bucket's versioning config.

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.

Attributes

Companion
object
Source
Bucket.scala
Graph
Supertypes
trait Updatable[Bucket]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Source
Bucket.scala
def addAllAcl(`__vs`: Iterable[BucketAccessControl]): Bucket

Attributes

Source
Bucket.scala
def addAllCors(`__vs`: Iterable[Cors]): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def addAllLabels(`__vs`: Iterable[(String, String)]): Bucket

Attributes

Source
Bucket.scala
def addCors(`__vs`: Cors*): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def addLabels(`__vs`: (String, String)*): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def companion: Bucket.type

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
Bucket.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
Bucket.scala
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
Bucket.scala
def withAcl(`__v`: Seq[BucketAccessControl]): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withBilling(`__v`: Billing): Bucket

Attributes

Source
Bucket.scala
def withBucketId(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withCors(`__v`: Seq[Cors]): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withDefaultEventBasedHold(`__v`: Boolean): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withEtag(`__v`: String): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withLabels(`__v`: Map[String, String]): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withLocation(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withLocationType(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withLogging(`__v`: Logging): Bucket

Attributes

Source
Bucket.scala
def withMetageneration(`__v`: Long): Bucket

Attributes

Source
Bucket.scala
def withName(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withOwner(`__v`: Owner): Bucket

Attributes

Source
Bucket.scala
def withProject(`__v`: String): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withRpo(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withSatisfiesPzs(`__v`: Boolean): Bucket

Attributes

Source
Bucket.scala
def withStorageClass(`__v`: String): Bucket

Attributes

Source
Bucket.scala
def withUnknownFields(`__v`: UnknownFieldSet): Bucket

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala

Attributes

Source
Bucket.scala
def withWebsite(`__v`: Website): Bucket

Attributes

Source
Bucket.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
Bucket.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
def update(ms: Lens[Bucket, Bucket] => () => Bucket*): A

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala