public class BucketInfo extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
BucketInfo.AgeDeleteRule
Deprecated.
Use a
LifecycleRule with a DeleteLifecycleAction and use LifecycleCondition.Builder.setAge instead.
For example, |
static class |
BucketInfo.Builder
Builder for
BucketInfo . |
static class |
BucketInfo.CreatedBeforeDeleteRule
Deprecated.
Use a
LifecycleRule with an action DeleteLifecycleAction and a
condition LifecycleCondition.Builder.setCreatedBefore instead. |
static class |
BucketInfo.DeleteRule
Deprecated.
Use a
LifecycleRule with a DeleteLifecycleAction and a LifecycleCondition which is equivalent to a subclass of DeleteRule instead. |
static class |
BucketInfo.IamConfiguration
The Bucket's IAM Configuration.
|
static class |
BucketInfo.IsLiveDeleteRule
Deprecated.
Use a
LifecycleRule with a DeleteLifecycleAction and a condition
LifecycleCondition.Builder.setIsLive instead. |
static class |
BucketInfo.LifecycleRule
Lifecycle rule for a bucket.
|
static class |
BucketInfo.Logging
The bucket's logging configuration, which defines the destination bucket and optional name
prefix for the current bucket's logs.
|
static class |
BucketInfo.NumNewerVersionsDeleteRule
Deprecated.
Use a
LifecycleRule with a DeleteLifecycleAction and a condition
LifecycleCondition.Builder.setNumberOfNewerVersions instead. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<Acl> |
getAcl()
Returns the bucket's access control configuration.
|
List<Cors> |
getCors()
Returns the bucket's Cross-Origin Resource Sharing (CORS) configuration.
|
Long |
getCreateTime()
Returns the time at which the bucket was created.
|
List<Acl> |
getDefaultAcl()
Returns the default access control configuration for this bucket's blobs.
|
Boolean |
getDefaultEventBasedHold()
Returns a
Boolean with either true , null and in certain cases false . |
String |
getDefaultKmsKeyName()
Returns the default Cloud KMS key to be applied to newly inserted objects in this bucket.
|
List<? extends BucketInfo.DeleteRule> |
getDeleteRules()
Deprecated.
|
String |
getEtag()
Returns HTTP 1.1 Entity tag for the bucket.
|
String |
getGeneratedId()
Returns the service-generated id for the bucket.
|
BucketInfo.IamConfiguration |
getIamConfiguration()
Returns the IAM configuration
|
String |
getIndexPage()
Returns bucket's website index page.
|
Map<String,String> |
getLabels()
Returns the labels for this bucket.
|
List<? extends BucketInfo.LifecycleRule> |
getLifecycleRules() |
String |
getLocation()
Returns the bucket's location.
|
String |
getLocationType()
Returns the bucket's locationType.
|
BucketInfo.Logging |
getLogging()
Returns the Logging
|
Long |
getMetageneration()
Returns the metadata generation of this bucket.
|
String |
getName()
Returns the bucket's name.
|
String |
getNotFoundPage()
Returns the custom object to return when a requested resource is not found.
|
Acl.Entity |
getOwner()
Returns the bucket's owner.
|
Long |
getRetentionEffectiveTime()
Returns the retention effective time a policy took effect if a retention policy is defined as a
Long . |
Long |
getRetentionPeriod()
Returns the retention policy retention period.
|
String |
getSelfLink()
Returns the URI of this bucket as a string.
|
StorageClass |
getStorageClass()
Returns the bucket's storage class.
|
int |
hashCode() |
static BucketInfo.Builder |
newBuilder(String name)
Returns a
BucketInfo builder where the bucket's name is set to the provided name. |
static BucketInfo |
of(String name)
Creates a
BucketInfo object for the provided bucket name. |
Boolean |
requesterPays()
Returns a
Boolean with either true , false , and in a specific case
null . |
Boolean |
retentionPolicyIsLocked()
Returns a
Boolean with either true or null . |
BucketInfo.Builder |
toBuilder()
Returns a builder for the current bucket.
|
String |
toString() |
Boolean |
versioningEnabled()
Returns a
Boolean with either true , null and in certain cases false . |
public String getGeneratedId()
public String getName()
public Acl.Entity getOwner()
public String getSelfLink()
public Boolean versioningEnabled()
Boolean
with either true
, null
and in certain cases false
.
Case 1: true
the field Storage.BucketField.VERSIONING
is selected in a Storage.get(String, Storage.BucketGetOption...)
and versions for the bucket is enabled.
Case 2.1: null
the field Storage.BucketField.VERSIONING
is selected in a Storage.get(String, Storage.BucketGetOption...)
, but versions for the bucket is not enabled.
This case can be considered implicitly false
.
Case 2.2: null
the field Storage.BucketField.VERSIONING
is not selected in a Storage.get(String, Storage.BucketGetOption...)
, and the state for this field is unknown.
Case 3: false
versions is explicitly set to false client side for a follow-up
request for example Storage.update(BucketInfo, Storage.BucketTargetOption...)
in which
case the value of versions will remain false
for for the given instance.
public Boolean requesterPays()
Boolean
with either true
, false
, and in a specific case
null
.
Case 1: true
the field Storage.BucketField.BILLING
is selected in a Storage.get(String, Storage.BucketGetOption...)
and requester pays for
the bucket is enabled.
Case 2: false
the field Storage.BucketField.BILLING
in a Storage.get(String, Storage.BucketGetOption...)
is selected and requester pays for
the bucket is disable.
Case 3: null
the field Storage.BucketField.BILLING
in a Storage.get(String, Storage.BucketGetOption...)
is not selected, the value is
unknown.
public String getIndexPage()
public String getNotFoundPage()
@Deprecated public List<? extends BucketInfo.DeleteRule> getDeleteRules()
public List<? extends BucketInfo.LifecycleRule> getLifecycleRules()
public String getEtag()
public Long getCreateTime()
public Long getMetageneration()
public String getLocation()
public String getLocationType()
public StorageClass getStorageClass()
public List<Cors> getCors()
public List<Acl> getAcl()
public List<Acl> getDefaultAcl()
public String getDefaultKmsKeyName()
@BetaApi public Boolean getDefaultEventBasedHold()
Boolean
with either true
, null
and in certain cases false
.
Case 1: true
the field Storage.BucketField.DEFAULT_EVENT_BASED_HOLD
is selected in a Storage.get(String, Storage.BucketGetOption...)
and default event-based hold for the bucket is
enabled.
Case 2.1: null
the field Storage.BucketField.DEFAULT_EVENT_BASED_HOLD
is selected in a Storage.get(String, Storage.BucketGetOption...)
, but default event-based hold for the bucket
is not enabled. This case can be considered implicitly false
.
Case 2.2: null
the field Storage.BucketField.DEFAULT_EVENT_BASED_HOLD
is not selected in a
Storage.get(String, Storage.BucketGetOption...)
, and the state for this field is
unknown.
Case 3: false
default event-based hold is explicitly set to false using in a Builder#setDefaultEventBasedHold(Boolean)
client side for a follow-up request e.g. Storage.update(BucketInfo, Storage.BucketTargetOption...)
in which case the value of default
event-based hold will remain false
for the given instance.
@BetaApi public Long getRetentionEffectiveTime()
Long
.@BetaApi public Boolean retentionPolicyIsLocked()
Boolean
with either true
or null
.
Case 1: true
the field Storage.BucketField.RETENTION_POLICY
is selected in a Storage.get(String, Storage.BucketGetOption...)
and retention policy for the bucket is locked.
Case 2.1: null
the field Storage.BucketField.RETENTION_POLICY
is selected in a Storage.get(String, Storage.BucketGetOption...)
, but retention policy for the bucket is not
locked. This case can be considered implicitly false
.
Case 2.2: null
the field Storage.BucketField.RETENTION_POLICY
is not selected in a Storage.get(String, Storage.BucketGetOption...)
, and the state for this field is unknown.
@BetaApi public Long getRetentionPeriod()
@BetaApi public BucketInfo.IamConfiguration getIamConfiguration()
public BucketInfo.Logging getLogging()
public BucketInfo.Builder toBuilder()
public static BucketInfo of(String name)
BucketInfo
object for the provided bucket name.public static BucketInfo.Builder newBuilder(String name)
BucketInfo
builder where the bucket's name is set to the provided name.Copyright © 2019 Google LLC. All rights reserved.