Class B2Bucket


  • public class B2Bucket
    extends java.lang.Object
    • Method Detail

      • getAccountId

        public java.lang.String getAccountId()
      • getBucketId

        public java.lang.String getBucketId()
      • getBucketName

        public java.lang.String getBucketName()
      • getBucketType

        public java.lang.String getBucketType()
      • getBucketInfo

        public java.util.Map<java.lang.String,​java.lang.String> getBucketInfo()
      • getCorsRules

        public java.util.List<B2CorsRule> getCorsRules()
      • getLifecycleRules

        public java.util.List<B2LifecycleRule> getLifecycleRules()
      • getOptions

        public java.util.Set<java.lang.String> getOptions()
      • getRevision

        public int getRevision()
      • isClientAuthorizedToReadFileLockConfiguration

        public boolean isClientAuthorizedToReadFileLockConfiguration()
        Indicates whether client is authorized to read file lock configuration settings for bucket
        Returns:
        true iff client is authorized to read value of fileLockConfiguration field in B2Bucket
      • getFileLockConfiguration

        public B2BucketFileLockConfiguration getFileLockConfiguration()
                                                               throws B2ForbiddenException
        Returns bucket file lock configuration. Throws B2ForbiddenException if client is not authorized to read bucket file lock configuration.
        Returns:
        file lock configuration
        Throws:
        B2ForbiddenException - if client is not authorized to read fileLockConfiguration
      • isClientAuthorizedToReadDefaultServerSideEncryption

        public boolean isClientAuthorizedToReadDefaultServerSideEncryption()
        Indicates whether client is authorized to read default bucket encryption settings for bucket
        Returns:
        true iff client is authorized to read value of defaultServerSideEncryption field in B2Bucket
      • getDefaultServerSideEncryption

        public B2BucketServerSideEncryption getDefaultServerSideEncryption()
                                                                    throws B2ForbiddenException
        Returns settings for default bucket encryption (i.e., mode and algorithm) or null if there are none. Throws B2ForbiddenException if client is not authorized to read bucket default encryption settings.
        Returns:
        default bucket encryption settings
        Throws:
        B2ForbiddenException - if client is not authorized to read defaultServerSideEncryption field
      • isClientAuthorizedToReadReplicationConfiguration

        public boolean isClientAuthorizedToReadReplicationConfiguration()
        Indicates whether client is authorized to read replication configuration settings for bucket
        Returns:
        true iff client is authorized to read value of replicationConfiguration field in B2Bucket
      • getReplicationConfiguration

        public B2BucketReplicationConfiguration getReplicationConfiguration()
                                                                     throws B2ForbiddenException
        Returns settings for bucket replication configuration or null if there are none. Throws B2ForbiddenException if client is not authorized to read bucket replication configuration settings.
        Returns:
        replication configuration settings
        Throws:
        B2ForbiddenException - if client is not authorized to read replicationConfiguration field
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object