
com.amazonaws.services.macie2.model.BucketMetadata Maven / Gradle / Ivy
/*
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.macie2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides information about an S3 bucket that Amazon Macie monitors and analyzes.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BucketMetadata implements Serializable, Cloneable, StructuredPojo {
/**
*
* The unique identifier for the AWS account that owns the bucket.
*
*/
private String accountId;
/**
*
* The Amazon Resource Name (ARN) of the bucket.
*
*/
private String bucketArn;
/**
*
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*
*/
private java.util.Date bucketCreatedAt;
/**
*
* The name of the bucket.
*
*/
private String bucketName;
/**
*
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported file or
* storage format and storage class.
*
*/
private Long classifiableObjectCount;
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These objects use a
* supported file or storage format and storage class.
*
*/
private Long classifiableSizeInBytes;
/**
*
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data about the
* bucket from Amazon S3.
*
*/
private java.util.Date lastUpdated;
/**
*
* The total number of objects in the bucket.
*
*/
private Long objectCount;
/**
*
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes a
* grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*
*/
private ObjectCountByEncryptionType objectCountByEncryptionType;
/**
*
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL), bucket
* policy, or block public access settings allow the bucket to be accessed by the general public.
*
*/
private BucketPublicAccess publicAccess;
/**
*
* The AWS Region that hosts the bucket.
*
*/
private String region;
/**
*
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS accounts
* and, if so, which accounts.
*
*/
private ReplicationDetails replicationDetails;
/**
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
*/
private String sharedAccess;
/**
*
* The total storage size, in bytes, of the bucket.
*
*/
private Long sizeInBytes;
/**
*
* The total compressed storage size, in bytes, of the bucket.
*
*/
private Long sizeInBytesCompressed;
/**
*
* An array that specifies the tags (keys and values) that are associated with the bucket.
*
*/
private java.util.List tags;
/**
*
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an unsupported file
* or storage format or storage class.
*
*/
private ObjectLevelStatistics unclassifiableObjectCount;
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects use
* an unsupported file or storage format or storage class.
*
*/
private ObjectLevelStatistics unclassifiableObjectSizeInBytes;
/**
*
* Specifies whether versioning is enabled for the bucket.
*
*/
private Boolean versioning;
/**
*
* The unique identifier for the AWS account that owns the bucket.
*
*
* @param accountId
* The unique identifier for the AWS account that owns the bucket.
*/
public void setAccountId(String accountId) {
this.accountId = accountId;
}
/**
*
* The unique identifier for the AWS account that owns the bucket.
*
*
* @return The unique identifier for the AWS account that owns the bucket.
*/
public String getAccountId() {
return this.accountId;
}
/**
*
* The unique identifier for the AWS account that owns the bucket.
*
*
* @param accountId
* The unique identifier for the AWS account that owns the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withAccountId(String accountId) {
setAccountId(accountId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the bucket.
*
*
* @param bucketArn
* The Amazon Resource Name (ARN) of the bucket.
*/
public void setBucketArn(String bucketArn) {
this.bucketArn = bucketArn;
}
/**
*
* The Amazon Resource Name (ARN) of the bucket.
*
*
* @return The Amazon Resource Name (ARN) of the bucket.
*/
public String getBucketArn() {
return this.bucketArn;
}
/**
*
* The Amazon Resource Name (ARN) of the bucket.
*
*
* @param bucketArn
* The Amazon Resource Name (ARN) of the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withBucketArn(String bucketArn) {
setBucketArn(bucketArn);
return this;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*
*
* @param bucketCreatedAt
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*/
public void setBucketCreatedAt(java.util.Date bucketCreatedAt) {
this.bucketCreatedAt = bucketCreatedAt;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*
*
* @return The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*/
public java.util.Date getBucketCreatedAt() {
return this.bucketCreatedAt;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
*
*
* @param bucketCreatedAt
* The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withBucketCreatedAt(java.util.Date bucketCreatedAt) {
setBucketCreatedAt(bucketCreatedAt);
return this;
}
/**
*
* The name of the bucket.
*
*
* @param bucketName
* The name of the bucket.
*/
public void setBucketName(String bucketName) {
this.bucketName = bucketName;
}
/**
*
* The name of the bucket.
*
*
* @return The name of the bucket.
*/
public String getBucketName() {
return this.bucketName;
}
/**
*
* The name of the bucket.
*
*
* @param bucketName
* The name of the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withBucketName(String bucketName) {
setBucketName(bucketName);
return this;
}
/**
*
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported file or
* storage format and storage class.
*
*
* @param classifiableObjectCount
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported
* file or storage format and storage class.
*/
public void setClassifiableObjectCount(Long classifiableObjectCount) {
this.classifiableObjectCount = classifiableObjectCount;
}
/**
*
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported file or
* storage format and storage class.
*
*
* @return The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported
* file or storage format and storage class.
*/
public Long getClassifiableObjectCount() {
return this.classifiableObjectCount;
}
/**
*
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported file or
* storage format and storage class.
*
*
* @param classifiableObjectCount
* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported
* file or storage format and storage class.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withClassifiableObjectCount(Long classifiableObjectCount) {
setClassifiableObjectCount(classifiableObjectCount);
return this;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These objects use a
* supported file or storage format and storage class.
*
*
* @param classifiableSizeInBytes
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These
* objects use a supported file or storage format and storage class.
*/
public void setClassifiableSizeInBytes(Long classifiableSizeInBytes) {
this.classifiableSizeInBytes = classifiableSizeInBytes;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These objects use a
* supported file or storage format and storage class.
*
*
* @return The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These
* objects use a supported file or storage format and storage class.
*/
public Long getClassifiableSizeInBytes() {
return this.classifiableSizeInBytes;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These objects use a
* supported file or storage format and storage class.
*
*
* @param classifiableSizeInBytes
* The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These
* objects use a supported file or storage format and storage class.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withClassifiableSizeInBytes(Long classifiableSizeInBytes) {
setClassifiableSizeInBytes(classifiableSizeInBytes);
return this;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data about the
* bucket from Amazon S3.
*
*
* @param lastUpdated
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data
* about the bucket from Amazon S3.
*/
public void setLastUpdated(java.util.Date lastUpdated) {
this.lastUpdated = lastUpdated;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data about the
* bucket from Amazon S3.
*
*
* @return The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data
* about the bucket from Amazon S3.
*/
public java.util.Date getLastUpdated() {
return this.lastUpdated;
}
/**
*
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data about the
* bucket from Amazon S3.
*
*
* @param lastUpdated
* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data
* about the bucket from Amazon S3.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withLastUpdated(java.util.Date lastUpdated) {
setLastUpdated(lastUpdated);
return this;
}
/**
*
* The total number of objects in the bucket.
*
*
* @param objectCount
* The total number of objects in the bucket.
*/
public void setObjectCount(Long objectCount) {
this.objectCount = objectCount;
}
/**
*
* The total number of objects in the bucket.
*
*
* @return The total number of objects in the bucket.
*/
public Long getObjectCount() {
return this.objectCount;
}
/**
*
* The total number of objects in the bucket.
*
*
* @param objectCount
* The total number of objects in the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withObjectCount(Long objectCount) {
setObjectCount(objectCount);
return this;
}
/**
*
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes a
* grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*
*
* @param objectCountByEncryptionType
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes
* a grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*/
public void setObjectCountByEncryptionType(ObjectCountByEncryptionType objectCountByEncryptionType) {
this.objectCountByEncryptionType = objectCountByEncryptionType;
}
/**
*
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes a
* grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*
*
* @return The total number of objects that are in the bucket, grouped by server-side encryption type. This includes
* a grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*/
public ObjectCountByEncryptionType getObjectCountByEncryptionType() {
return this.objectCountByEncryptionType;
}
/**
*
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes a
* grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
*
*
* @param objectCountByEncryptionType
* The total number of objects that are in the bucket, grouped by server-side encryption type. This includes
* a grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withObjectCountByEncryptionType(ObjectCountByEncryptionType objectCountByEncryptionType) {
setObjectCountByEncryptionType(objectCountByEncryptionType);
return this;
}
/**
*
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL), bucket
* policy, or block public access settings allow the bucket to be accessed by the general public.
*
*
* @param publicAccess
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL),
* bucket policy, or block public access settings allow the bucket to be accessed by the general public.
*/
public void setPublicAccess(BucketPublicAccess publicAccess) {
this.publicAccess = publicAccess;
}
/**
*
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL), bucket
* policy, or block public access settings allow the bucket to be accessed by the general public.
*
*
* @return Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL),
* bucket policy, or block public access settings allow the bucket to be accessed by the general public.
*/
public BucketPublicAccess getPublicAccess() {
return this.publicAccess;
}
/**
*
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL), bucket
* policy, or block public access settings allow the bucket to be accessed by the general public.
*
*
* @param publicAccess
* Specifies whether the bucket is publicly accessible. If this value is true, an access control list (ACL),
* bucket policy, or block public access settings allow the bucket to be accessed by the general public.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withPublicAccess(BucketPublicAccess publicAccess) {
setPublicAccess(publicAccess);
return this;
}
/**
*
* The AWS Region that hosts the bucket.
*
*
* @param region
* The AWS Region that hosts the bucket.
*/
public void setRegion(String region) {
this.region = region;
}
/**
*
* The AWS Region that hosts the bucket.
*
*
* @return The AWS Region that hosts the bucket.
*/
public String getRegion() {
return this.region;
}
/**
*
* The AWS Region that hosts the bucket.
*
*
* @param region
* The AWS Region that hosts the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withRegion(String region) {
setRegion(region);
return this;
}
/**
*
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS accounts
* and, if so, which accounts.
*
*
* @param replicationDetails
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS
* accounts and, if so, which accounts.
*/
public void setReplicationDetails(ReplicationDetails replicationDetails) {
this.replicationDetails = replicationDetails;
}
/**
*
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS accounts
* and, if so, which accounts.
*
*
* @return Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS
* accounts and, if so, which accounts.
*/
public ReplicationDetails getReplicationDetails() {
return this.replicationDetails;
}
/**
*
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS accounts
* and, if so, which accounts.
*
*
* @param replicationDetails
* Specifies whether the bucket is configured to replicate one or more objects to buckets for other AWS
* accounts and, if so, which accounts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withReplicationDetails(ReplicationDetails replicationDetails) {
setReplicationDetails(replicationDetails);
return this;
}
/**
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
*
* @param sharedAccess
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
* @see SharedAccess
*/
public void setSharedAccess(String sharedAccess) {
this.sharedAccess = sharedAccess;
}
/**
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
*
* @return
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie
* organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
* @see SharedAccess
*/
public String getSharedAccess() {
return this.sharedAccess;
}
/**
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
*
* @param sharedAccess
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see SharedAccess
*/
public BucketMetadata withSharedAccess(String sharedAccess) {
setSharedAccess(sharedAccess);
return this;
}
/**
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
*
* @param sharedAccess
*
* Specifies whether the bucket is shared with another AWS account. Possible values are:
*
*
* -
*
* EXTERNAL - The bucket is shared with an AWS account that isn’t part of the same Amazon Macie organization.
*
*
* -
*
* INTERNAL - The bucket is shared with an AWS account that's part of the same Amazon Macie organization.
*
*
* -
*
* NOT_SHARED - The bucket isn't shared with other AWS accounts.
*
*
* -
*
* UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see SharedAccess
*/
public BucketMetadata withSharedAccess(SharedAccess sharedAccess) {
this.sharedAccess = sharedAccess.toString();
return this;
}
/**
*
* The total storage size, in bytes, of the bucket.
*
*
* @param sizeInBytes
* The total storage size, in bytes, of the bucket.
*/
public void setSizeInBytes(Long sizeInBytes) {
this.sizeInBytes = sizeInBytes;
}
/**
*
* The total storage size, in bytes, of the bucket.
*
*
* @return The total storage size, in bytes, of the bucket.
*/
public Long getSizeInBytes() {
return this.sizeInBytes;
}
/**
*
* The total storage size, in bytes, of the bucket.
*
*
* @param sizeInBytes
* The total storage size, in bytes, of the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withSizeInBytes(Long sizeInBytes) {
setSizeInBytes(sizeInBytes);
return this;
}
/**
*
* The total compressed storage size, in bytes, of the bucket.
*
*
* @param sizeInBytesCompressed
* The total compressed storage size, in bytes, of the bucket.
*/
public void setSizeInBytesCompressed(Long sizeInBytesCompressed) {
this.sizeInBytesCompressed = sizeInBytesCompressed;
}
/**
*
* The total compressed storage size, in bytes, of the bucket.
*
*
* @return The total compressed storage size, in bytes, of the bucket.
*/
public Long getSizeInBytesCompressed() {
return this.sizeInBytesCompressed;
}
/**
*
* The total compressed storage size, in bytes, of the bucket.
*
*
* @param sizeInBytesCompressed
* The total compressed storage size, in bytes, of the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withSizeInBytesCompressed(Long sizeInBytesCompressed) {
setSizeInBytesCompressed(sizeInBytesCompressed);
return this;
}
/**
*
* An array that specifies the tags (keys and values) that are associated with the bucket.
*
*
* @return An array that specifies the tags (keys and values) that are associated with the bucket.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* An array that specifies the tags (keys and values) that are associated with the bucket.
*
*
* @param tags
* An array that specifies the tags (keys and values) that are associated with the bucket.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* An array that specifies the tags (keys and values) that are associated with the bucket.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* An array that specifies the tags (keys and values) that are associated with the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withTags(KeyValuePair... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (KeyValuePair ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* An array that specifies the tags (keys and values) that are associated with the bucket.
*
*
* @param tags
* An array that specifies the tags (keys and values) that are associated with the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an unsupported file
* or storage format or storage class.
*
*
* @param unclassifiableObjectCount
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an
* unsupported file or storage format or storage class.
*/
public void setUnclassifiableObjectCount(ObjectLevelStatistics unclassifiableObjectCount) {
this.unclassifiableObjectCount = unclassifiableObjectCount;
}
/**
*
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an unsupported file
* or storage format or storage class.
*
*
* @return The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an
* unsupported file or storage format or storage class.
*/
public ObjectLevelStatistics getUnclassifiableObjectCount() {
return this.unclassifiableObjectCount;
}
/**
*
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an unsupported file
* or storage format or storage class.
*
*
* @param unclassifiableObjectCount
* The total number of objects that Amazon Macie can't analyze in the bucket. These objects use an
* unsupported file or storage format or storage class.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withUnclassifiableObjectCount(ObjectLevelStatistics unclassifiableObjectCount) {
setUnclassifiableObjectCount(unclassifiableObjectCount);
return this;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects use
* an unsupported file or storage format or storage class.
*
*
* @param unclassifiableObjectSizeInBytes
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These
* objects use an unsupported file or storage format or storage class.
*/
public void setUnclassifiableObjectSizeInBytes(ObjectLevelStatistics unclassifiableObjectSizeInBytes) {
this.unclassifiableObjectSizeInBytes = unclassifiableObjectSizeInBytes;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects use
* an unsupported file or storage format or storage class.
*
*
* @return The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These
* objects use an unsupported file or storage format or storage class.
*/
public ObjectLevelStatistics getUnclassifiableObjectSizeInBytes() {
return this.unclassifiableObjectSizeInBytes;
}
/**
*
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects use
* an unsupported file or storage format or storage class.
*
*
* @param unclassifiableObjectSizeInBytes
* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These
* objects use an unsupported file or storage format or storage class.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withUnclassifiableObjectSizeInBytes(ObjectLevelStatistics unclassifiableObjectSizeInBytes) {
setUnclassifiableObjectSizeInBytes(unclassifiableObjectSizeInBytes);
return this;
}
/**
*
* Specifies whether versioning is enabled for the bucket.
*
*
* @param versioning
* Specifies whether versioning is enabled for the bucket.
*/
public void setVersioning(Boolean versioning) {
this.versioning = versioning;
}
/**
*
* Specifies whether versioning is enabled for the bucket.
*
*
* @return Specifies whether versioning is enabled for the bucket.
*/
public Boolean getVersioning() {
return this.versioning;
}
/**
*
* Specifies whether versioning is enabled for the bucket.
*
*
* @param versioning
* Specifies whether versioning is enabled for the bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketMetadata withVersioning(Boolean versioning) {
setVersioning(versioning);
return this;
}
/**
*
* Specifies whether versioning is enabled for the bucket.
*
*
* @return Specifies whether versioning is enabled for the bucket.
*/
public Boolean isVersioning() {
return this.versioning;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAccountId() != null)
sb.append("AccountId: ").append(getAccountId()).append(",");
if (getBucketArn() != null)
sb.append("BucketArn: ").append(getBucketArn()).append(",");
if (getBucketCreatedAt() != null)
sb.append("BucketCreatedAt: ").append(getBucketCreatedAt()).append(",");
if (getBucketName() != null)
sb.append("BucketName: ").append(getBucketName()).append(",");
if (getClassifiableObjectCount() != null)
sb.append("ClassifiableObjectCount: ").append(getClassifiableObjectCount()).append(",");
if (getClassifiableSizeInBytes() != null)
sb.append("ClassifiableSizeInBytes: ").append(getClassifiableSizeInBytes()).append(",");
if (getLastUpdated() != null)
sb.append("LastUpdated: ").append(getLastUpdated()).append(",");
if (getObjectCount() != null)
sb.append("ObjectCount: ").append(getObjectCount()).append(",");
if (getObjectCountByEncryptionType() != null)
sb.append("ObjectCountByEncryptionType: ").append(getObjectCountByEncryptionType()).append(",");
if (getPublicAccess() != null)
sb.append("PublicAccess: ").append(getPublicAccess()).append(",");
if (getRegion() != null)
sb.append("Region: ").append(getRegion()).append(",");
if (getReplicationDetails() != null)
sb.append("ReplicationDetails: ").append(getReplicationDetails()).append(",");
if (getSharedAccess() != null)
sb.append("SharedAccess: ").append(getSharedAccess()).append(",");
if (getSizeInBytes() != null)
sb.append("SizeInBytes: ").append(getSizeInBytes()).append(",");
if (getSizeInBytesCompressed() != null)
sb.append("SizeInBytesCompressed: ").append(getSizeInBytesCompressed()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getUnclassifiableObjectCount() != null)
sb.append("UnclassifiableObjectCount: ").append(getUnclassifiableObjectCount()).append(",");
if (getUnclassifiableObjectSizeInBytes() != null)
sb.append("UnclassifiableObjectSizeInBytes: ").append(getUnclassifiableObjectSizeInBytes()).append(",");
if (getVersioning() != null)
sb.append("Versioning: ").append(getVersioning());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BucketMetadata == false)
return false;
BucketMetadata other = (BucketMetadata) obj;
if (other.getAccountId() == null ^ this.getAccountId() == null)
return false;
if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false)
return false;
if (other.getBucketArn() == null ^ this.getBucketArn() == null)
return false;
if (other.getBucketArn() != null && other.getBucketArn().equals(this.getBucketArn()) == false)
return false;
if (other.getBucketCreatedAt() == null ^ this.getBucketCreatedAt() == null)
return false;
if (other.getBucketCreatedAt() != null && other.getBucketCreatedAt().equals(this.getBucketCreatedAt()) == false)
return false;
if (other.getBucketName() == null ^ this.getBucketName() == null)
return false;
if (other.getBucketName() != null && other.getBucketName().equals(this.getBucketName()) == false)
return false;
if (other.getClassifiableObjectCount() == null ^ this.getClassifiableObjectCount() == null)
return false;
if (other.getClassifiableObjectCount() != null && other.getClassifiableObjectCount().equals(this.getClassifiableObjectCount()) == false)
return false;
if (other.getClassifiableSizeInBytes() == null ^ this.getClassifiableSizeInBytes() == null)
return false;
if (other.getClassifiableSizeInBytes() != null && other.getClassifiableSizeInBytes().equals(this.getClassifiableSizeInBytes()) == false)
return false;
if (other.getLastUpdated() == null ^ this.getLastUpdated() == null)
return false;
if (other.getLastUpdated() != null && other.getLastUpdated().equals(this.getLastUpdated()) == false)
return false;
if (other.getObjectCount() == null ^ this.getObjectCount() == null)
return false;
if (other.getObjectCount() != null && other.getObjectCount().equals(this.getObjectCount()) == false)
return false;
if (other.getObjectCountByEncryptionType() == null ^ this.getObjectCountByEncryptionType() == null)
return false;
if (other.getObjectCountByEncryptionType() != null && other.getObjectCountByEncryptionType().equals(this.getObjectCountByEncryptionType()) == false)
return false;
if (other.getPublicAccess() == null ^ this.getPublicAccess() == null)
return false;
if (other.getPublicAccess() != null && other.getPublicAccess().equals(this.getPublicAccess()) == false)
return false;
if (other.getRegion() == null ^ this.getRegion() == null)
return false;
if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false)
return false;
if (other.getReplicationDetails() == null ^ this.getReplicationDetails() == null)
return false;
if (other.getReplicationDetails() != null && other.getReplicationDetails().equals(this.getReplicationDetails()) == false)
return false;
if (other.getSharedAccess() == null ^ this.getSharedAccess() == null)
return false;
if (other.getSharedAccess() != null && other.getSharedAccess().equals(this.getSharedAccess()) == false)
return false;
if (other.getSizeInBytes() == null ^ this.getSizeInBytes() == null)
return false;
if (other.getSizeInBytes() != null && other.getSizeInBytes().equals(this.getSizeInBytes()) == false)
return false;
if (other.getSizeInBytesCompressed() == null ^ this.getSizeInBytesCompressed() == null)
return false;
if (other.getSizeInBytesCompressed() != null && other.getSizeInBytesCompressed().equals(this.getSizeInBytesCompressed()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getUnclassifiableObjectCount() == null ^ this.getUnclassifiableObjectCount() == null)
return false;
if (other.getUnclassifiableObjectCount() != null && other.getUnclassifiableObjectCount().equals(this.getUnclassifiableObjectCount()) == false)
return false;
if (other.getUnclassifiableObjectSizeInBytes() == null ^ this.getUnclassifiableObjectSizeInBytes() == null)
return false;
if (other.getUnclassifiableObjectSizeInBytes() != null
&& other.getUnclassifiableObjectSizeInBytes().equals(this.getUnclassifiableObjectSizeInBytes()) == false)
return false;
if (other.getVersioning() == null ^ this.getVersioning() == null)
return false;
if (other.getVersioning() != null && other.getVersioning().equals(this.getVersioning()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
hashCode = prime * hashCode + ((getBucketArn() == null) ? 0 : getBucketArn().hashCode());
hashCode = prime * hashCode + ((getBucketCreatedAt() == null) ? 0 : getBucketCreatedAt().hashCode());
hashCode = prime * hashCode + ((getBucketName() == null) ? 0 : getBucketName().hashCode());
hashCode = prime * hashCode + ((getClassifiableObjectCount() == null) ? 0 : getClassifiableObjectCount().hashCode());
hashCode = prime * hashCode + ((getClassifiableSizeInBytes() == null) ? 0 : getClassifiableSizeInBytes().hashCode());
hashCode = prime * hashCode + ((getLastUpdated() == null) ? 0 : getLastUpdated().hashCode());
hashCode = prime * hashCode + ((getObjectCount() == null) ? 0 : getObjectCount().hashCode());
hashCode = prime * hashCode + ((getObjectCountByEncryptionType() == null) ? 0 : getObjectCountByEncryptionType().hashCode());
hashCode = prime * hashCode + ((getPublicAccess() == null) ? 0 : getPublicAccess().hashCode());
hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode());
hashCode = prime * hashCode + ((getReplicationDetails() == null) ? 0 : getReplicationDetails().hashCode());
hashCode = prime * hashCode + ((getSharedAccess() == null) ? 0 : getSharedAccess().hashCode());
hashCode = prime * hashCode + ((getSizeInBytes() == null) ? 0 : getSizeInBytes().hashCode());
hashCode = prime * hashCode + ((getSizeInBytesCompressed() == null) ? 0 : getSizeInBytesCompressed().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getUnclassifiableObjectCount() == null) ? 0 : getUnclassifiableObjectCount().hashCode());
hashCode = prime * hashCode + ((getUnclassifiableObjectSizeInBytes() == null) ? 0 : getUnclassifiableObjectSizeInBytes().hashCode());
hashCode = prime * hashCode + ((getVersioning() == null) ? 0 : getVersioning().hashCode());
return hashCode;
}
@Override
public BucketMetadata clone() {
try {
return (BucketMetadata) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.macie2.model.transform.BucketMetadataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}