Class BucketInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Bucket
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.static final classConfiguration for the Autoclass settings of a bucket.static classBuilder forBucketInfo.static classDeprecated.Use aLifecycleRulewith an actionDeleteLifecycleActionand a conditionLifecycleCondition.Builder.setCreatedBeforeinstead.static classThe bucket's custom placement configuration for Custom Dual Regions.static classDeprecated.Use aLifecycleRulewith aDeleteLifecycleActionand aLifecycleConditionwhich is equivalent to a subclass of DeleteRule instead.static final classThe bucket's hierarchical namespace (Folders) configuration.static classThe Bucket's IAM Configuration.static classDeprecated.Use aLifecycleRulewith aDeleteLifecycleActionand a conditionLifecycleCondition.Builder.setIsLiveinstead.static classLifecycle rule for a bucket.static classThe bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.static classDeprecated.Use aLifecycleRulewith aDeleteLifecycleActionand a conditionLifecycleCondition.Builder.setNumberOfNewerVersionsinstead.static final classstatic enumPublic Access Prevention enum with expected values.static classThe bucket's soft delete policy. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAcl()Returns the bucket's access control configuration.Returns the Autoclass configurationgetCors()Returns the bucket's Cross-Origin Resource Sharing (CORS) configuration.Deprecated.Returns the Custom Placement ConfigurationReturns the default access control configuration for this bucket's blobs.Returns aBooleanwith eithertrue,nulland in certain casesfalse.Returns the default Cloud KMS key to be applied to newly inserted objects in this bucket.List<? extends BucketInfo.DeleteRule>Deprecated.getEtag()Returns HTTP 1.1 Entity tag for the bucket.Returns the service-generated id for the bucket.Returns the Hierarchical Namespace (Folders) ConfigurationReturns the IAM configurationReturns bucket's website index page.Returns the labels for this bucket.@NonNull List<? extends BucketInfo.LifecycleRule>Returns the bucket's location.Returns the bucket's locationType.Returns the LoggingReturns the metadata generation of this bucket.getName()Returns the bucket's name.Returns the custom object to return when a requested resource is not found.returns the Object Retention configurationgetOwner()Returns the bucket's owner.The project number of the project the bucket belongs toDeprecated.Returns the retention effective time a policy took effect if a retention policy is defined.Deprecated.Returns the retention policy retention period.getRpo()Returns the bucket's recovery point objective (RPO).Returns the URI of this bucket as a string.returns the Soft Delete policyReturns the bucket's storage class.Deprecated.inthashCode()static BucketInfo.BuildernewBuilder(String name) Returns aBucketInfobuilder where the bucket's name is set to the provided name.static BucketInfoCreates aBucketInfoobject for the provided bucket name.Returns aBooleanwith eithertrue,false, and in a specific casenull.Returns aBooleanwith eithertrueornull.Returns a builder for the current bucket.toString()Returns aBooleanwith eithertrue,nulland in certain casesfalse.
-
Method Details
-
getProject
The project number of the project the bucket belongs to -
getGeneratedId
Returns the service-generated id for the bucket. -
getName
Returns the bucket's name. -
getOwner
Returns the bucket's owner. This is always the project team's owner group. -
getSelfLink
Returns the URI of this bucket as a string. -
versioningEnabled
Returns aBooleanwith eithertrue,nulland in certain casesfalse.Case 1:
truethe fieldStorage.BucketField.VERSIONINGis selected in aStorage.get(String, Storage.BucketGetOption...)and versions for the bucket is enabled.Case 2.1:
nullthe fieldStorage.BucketField.VERSIONINGis selected in aStorage.get(String, Storage.BucketGetOption...), but versions for the bucket is not enabled. This case can be considered implicitlyfalse.Case 2.2:
nullthe fieldStorage.BucketField.VERSIONINGis not selected in aStorage.get(String, Storage.BucketGetOption...), and the state for this field is unknown.Case 3:
falseversions is explicitly set to false client side for a follow-up request for exampleStorage.update(BucketInfo, Storage.BucketTargetOption...)in which case the value of versions will remainfalsefor for the given instance. -
requesterPays
Returns aBooleanwith eithertrue,false, and in a specific casenull.Case 1:
truethe fieldStorage.BucketField.BILLINGis selected in aStorage.get(String, Storage.BucketGetOption...)and requester pays for the bucket is enabled.Case 2:
falsethe fieldStorage.BucketField.BILLINGin aStorage.get(String, Storage.BucketGetOption...)is selected and requester pays for the bucket is disable.Case 3:
nullthe fieldStorage.BucketField.BILLINGin aStorage.get(String, Storage.BucketGetOption...)is not selected, the value is unknown. -
getIndexPage
Returns bucket's website index page. Behaves as the bucket's directory index where missing blobs are treated as potential directories. -
getNotFoundPage
Returns the custom object to return when a requested resource is not found. -
getDeleteRules
Deprecated.Returns bucket's lifecycle configuration as a number of delete rules.- See Also:
-
getLifecycleRules
-
getEtag
Returns HTTP 1.1 Entity tag for the bucket.- See Also:
-
getCreateTime
Deprecated.Returns the time at which the bucket was created. -
getCreateTimeOffsetDateTime
-
getUpdateTime
Deprecated.Returns the last modification time of the bucket's metadata expressed as the number of milliseconds since the Unix epoch. -
getUpdateTimeOffsetDateTime
-
getMetageneration
Returns the metadata generation of this bucket. -
getLocation
Returns the bucket's location. Data for blobs in the bucket resides in physical storage within this region or regions. If specifying more than one region `customPlacementConfig` should be set in conjunction.- See Also:
-
getLocationType
Returns the bucket's locationType.- See Also:
-
getRpo
Returns the bucket's recovery point objective (RPO). This defines how quickly data is replicated between regions in a dual-region bucket. Not defined for single-region buckets.- See Also:
-
getStorageClass
Returns the bucket's storage class. This defines how blobs in the bucket are stored and determines the SLA and the cost of storage.- See Also:
-
getCors
Returns the bucket's Cross-Origin Resource Sharing (CORS) configuration.- See Also:
-
getAcl
Returns the bucket's access control configuration.- See Also:
-
getDefaultAcl
Returns the default access control configuration for this bucket's blobs.- See Also:
-
getLabels
Returns the labels for this bucket. -
getDefaultKmsKeyName
Returns the default Cloud KMS key to be applied to newly inserted objects in this bucket. -
getDefaultEventBasedHold
Returns aBooleanwith eithertrue,nulland in certain casesfalse.Case 1:
truethe fieldStorage.BucketField.DEFAULT_EVENT_BASED_HOLDis selected in aStorage.get(String, Storage.BucketGetOption...)and default event-based hold for the bucket is enabled.Case 2.1:
nullthe fieldStorage.BucketField.DEFAULT_EVENT_BASED_HOLDis selected in aStorage.get(String, Storage.BucketGetOption...), but default event-based hold for the bucket is not enabled. This case can be considered implicitlyfalse.Case 2.2:
nullthe fieldStorage.BucketField.DEFAULT_EVENT_BASED_HOLDis not selected in aStorage.get(String, Storage.BucketGetOption...), and the state for this field is unknown.Case 3:
falsedefault event-based hold is explicitly set to false using in aBucketInfo.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 remainfalsefor the given instance. -
getRetentionEffectiveTime
Deprecated.Returns the retention effective time a policy took effect if a retention policy is defined as aLong. -
getRetentionEffectiveTimeOffsetDateTime
Returns the retention effective time a policy took effect if a retention policy is defined. -
retentionPolicyIsLocked
Returns aBooleanwith eithertrueornull.Case 1:
truethe fieldStorage.BucketField.RETENTION_POLICYis selected in aStorage.get(String, Storage.BucketGetOption...)and retention policy for the bucket is locked.Case 2.1:
nullthe fieldStorage.BucketField.RETENTION_POLICYis selected in aStorage.get(String, Storage.BucketGetOption...), but retention policy for the bucket is not locked. This case can be considered implicitlyfalse.Case 2.2:
nullthe fieldStorage.BucketField.RETENTION_POLICYis not selected in aStorage.get(String, Storage.BucketGetOption...), and the state for this field is unknown. -
getRetentionPeriod
Deprecated.Returns the retention policy retention period. -
getRetentionPeriodDuration
Returns the retention policy retention period. -
getIamConfiguration
Returns the IAM configuration -
getAutoclass
Returns the Autoclass configuration -
getLogging
Returns the Logging -
getCustomPlacementConfig
Returns the Custom Placement Configuration -
getObjectRetention
returns the Object Retention configuration -
getSoftDeletePolicy
returns the Soft Delete policy -
getHierarchicalNamespace
Returns the Hierarchical Namespace (Folders) Configuration -
toBuilder
Returns a builder for the current bucket. -
hashCode
public int hashCode() -
equals
-
toString
-
of
Creates aBucketInfoobject for the provided bucket name. -
newBuilder
Returns aBucketInfobuilder where the bucket's name is set to the provided name.
-
LifecycleRulewith aDeleteLifecycleActionand useLifecycleCondition.Builder.setAgeinstead.