public static class Bucket.Builder extends BucketInfo.Builder
Bucket
.Modifier and Type | Method and Description |
---|---|
Bucket |
build()
Creates a
BucketInfo object. |
Bucket.Builder |
setAcl(Iterable<Acl> acl)
Sets the bucket's access control configuration.
|
Bucket.Builder |
setCors(Iterable<Cors> cors)
Sets the bucket's Cross-Origin Resource Sharing (CORS) configuration.
|
Bucket.Builder |
setDefaultAcl(Iterable<Acl> acl)
Sets the default access control configuration to apply to bucket's blobs when no other
configuration is specified.
|
Bucket.Builder |
setDefaultEventBasedHold(Boolean defaultEventBasedHold)
Sets the default event-based hold for this bucket.
|
Bucket.Builder |
setDefaultKmsKeyName(String defaultKmsKeyName)
Sets the default Cloud KMS key name for this bucket.
|
Bucket.Builder |
setDeleteRules(Iterable<? extends BucketInfo.DeleteRule> rules)
Deprecated.
|
Bucket.Builder |
setIamConfiguration(BucketInfo.IamConfiguration iamConfiguration)
Sets the IamConfiguration to specify whether IAM access should be enabled.
|
Bucket.Builder |
setIndexPage(String indexPage)
Sets the bucket's website index page.
|
Bucket.Builder |
setLabels(Map<String,String> labels)
Sets the label of this bucket.
|
Bucket.Builder |
setLifecycleRules(Iterable<? extends BucketInfo.LifecycleRule> rules)
Sets the bucket's lifecycle configuration as a number of lifecycle rules, consisting of an
action and a condition.
|
Bucket.Builder |
setLocation(String location)
Sets the bucket's location.
|
Bucket.Builder |
setLogging(BucketInfo.Logging logging) |
Bucket.Builder |
setName(String name)
Sets the bucket's name.
|
Bucket.Builder |
setNotFoundPage(String notFoundPage)
Sets the custom object to return when a requested resource is not found.
|
Bucket.Builder |
setRequesterPays(Boolean requesterPays)
Sets whether a user accessing the bucket or an object it contains should assume the transit
costs related to the access.
|
Bucket.Builder |
setRetentionPeriod(Long retentionPeriod)
If policy is not locked this value can be cleared, increased, and decreased.
|
Bucket.Builder |
setStorageClass(StorageClass storageClass)
Sets the bucket's storage class.
|
Bucket.Builder |
setVersioningEnabled(Boolean enable)
Sets whether versioning should be enabled for this bucket.
|
public Bucket.Builder setName(String name)
BucketInfo.Builder
setName
in class BucketInfo.Builder
public Bucket.Builder setVersioningEnabled(Boolean enable)
BucketInfo.Builder
setVersioningEnabled
in class BucketInfo.Builder
public Bucket.Builder setRequesterPays(Boolean requesterPays)
BucketInfo.Builder
setRequesterPays
in class BucketInfo.Builder
public Bucket.Builder setIndexPage(String indexPage)
BucketInfo.Builder
setIndexPage
in class BucketInfo.Builder
public Bucket.Builder setNotFoundPage(String notFoundPage)
BucketInfo.Builder
setNotFoundPage
in class BucketInfo.Builder
@Deprecated public Bucket.Builder setDeleteRules(Iterable<? extends BucketInfo.DeleteRule> rules)
BucketInfo.Builder
setDeleteRules
in class BucketInfo.Builder
public Bucket.Builder setLifecycleRules(Iterable<? extends BucketInfo.LifecycleRule> rules)
BucketInfo.Builder
setLifecycleRules
in class BucketInfo.Builder
public Bucket.Builder setStorageClass(StorageClass storageClass)
BucketInfo.Builder
setStorageClass
in class BucketInfo.Builder
public Bucket.Builder setLocation(String location)
BucketInfo.Builder
setLocation
in class BucketInfo.Builder
public Bucket.Builder setCors(Iterable<Cors> cors)
BucketInfo.Builder
setCors
in class BucketInfo.Builder
public Bucket.Builder setAcl(Iterable<Acl> acl)
BucketInfo.Builder
setAcl
in class BucketInfo.Builder
public Bucket.Builder setDefaultAcl(Iterable<Acl> acl)
BucketInfo.Builder
setDefaultAcl
in class BucketInfo.Builder
public Bucket.Builder setLabels(Map<String,String> labels)
BucketInfo.Builder
setLabels
in class BucketInfo.Builder
public Bucket.Builder setDefaultKmsKeyName(String defaultKmsKeyName)
BucketInfo.Builder
setDefaultKmsKeyName
in class BucketInfo.Builder
public Bucket.Builder setDefaultEventBasedHold(Boolean defaultEventBasedHold)
BucketInfo.Builder
setDefaultEventBasedHold
in class BucketInfo.Builder
public Bucket.Builder setRetentionPeriod(Long retentionPeriod)
BucketInfo.Builder
setRetentionPeriod
in class BucketInfo.Builder
public Bucket.Builder setIamConfiguration(BucketInfo.IamConfiguration iamConfiguration)
BucketInfo.Builder
setIamConfiguration
in class BucketInfo.Builder
public Bucket.Builder setLogging(BucketInfo.Logging logging)
setLogging
in class BucketInfo.Builder
public Bucket build()
BucketInfo.Builder
BucketInfo
object.build
in class BucketInfo.Builder
Copyright © 2019 Google LLC. All rights reserved.