All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.macie2.model.BucketMetadata Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Macie 2 module holds the client classes that are used for communicating with Amazon Macie 2 Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2018-2023 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 statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your * account. By default, object count and storage size values include data for object parts that are the result of * incomplete multipart uploads. For more information, see How Macie monitors Amazon S3 * data security in the Amazon Macie User Guide. *

*

* If an error occurs when Macie attempts to retrieve and process metadata from Amazon S3 for the bucket or the bucket's * objects, the value for the versioning property is false and the value for most other properties is null. Key * exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of * the error, refer to the errorCode and errorMessage values. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BucketMetadata implements Serializable, Cloneable, StructuredPojo { /** *

* The unique identifier for the Amazon Web Services account that owns the bucket. *

*/ private String accountId; /** *

* Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are * added to the bucket. Possible values are: *

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid * server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256. *

*/ private String allowsUnencryptedObjectUploads; /** *

* 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. This value can also indicate * when changes such as edits to the bucket's policy were most recently made to the bucket. *

*/ 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 storage * class and have a file name extension for a supported file or storage format. *

*/ 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 storage class and have a file name extension for a supported file or storage format. *

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of * each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each * applicable object in the bucket. *

*/ private Long classifiableSizeInBytes; /** *

* The error code for an error that prevented Amazon Macie from retrieving and processing information about the * bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the * information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this * value is null, Macie was able to retrieve and process the information. *

*/ private String errorCode; /** *

* A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and * process the information. *

*/ private String errorMessage; /** *

* Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, * and, if so, the details of the job that ran most recently. *

*/ private JobDetails jobDetails; /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in the * bucket while performing automated sensitive data discovery for your account. This value is null if automated * sensitive data discovery is currently disabled for your account. *

*/ private java.util.Date lastAutomatedDiscoveryTime; /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved bucket or * object metadata from Amazon S3 for the bucket. *

*/ private java.util.Date lastUpdated; /** *

* The total number of objects in the bucket. *

*/ private Long objectCount; /** *

* The total number of objects 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 due to the combination of permissions settings that apply to * the bucket, and provides information about those settings. *

*/ private BucketPublicAccess publicAccess; /** *

* The Amazon Web Services Region that hosts the bucket. *

*/ private String region; /** *

* Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon Web * Services accounts and, if so, which accounts. *

*/ private ReplicationDetails replicationDetails; /** *

* The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This value is * null if automated sensitive data discovery is currently disabled for your account. *

*/ private Integer sensitivityScore; /** *

* The default server-side encryption settings for the bucket. *

*/ private BucketServerSideEncryption serverSideEncryption; /** *

* Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront origin * access identity (OAI), or a CloudFront origin access control (OAC). Possible values are: *

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie * organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront * OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of related * accounts through Organizations or by Macie invitation. *

*/ private String sharedAccess; /** *

* The total storage size, in bytes, of the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object * in the bucket. *

*/ private Long sizeInBytes; /** *

* The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of * each applicable object in 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 don't use a supported * storage class or don't have a file name extension for a supported file or storage format. *

*/ private ObjectLevelStatistics unclassifiableObjectCount; /** *

* The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects * don't use a supported storage class or don't have a file name extension for a supported file or storage format. *

*/ private ObjectLevelStatistics unclassifiableObjectSizeInBytes; /** *

* Specifies whether versioning is enabled for the bucket. *

*/ private Boolean versioning; /** *

* The unique identifier for the Amazon Web Services account that owns the bucket. *

* * @param accountId * The unique identifier for the Amazon Web Services account that owns the bucket. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** *

* The unique identifier for the Amazon Web Services account that owns the bucket. *

* * @return The unique identifier for the Amazon Web Services account that owns the bucket. */ public String getAccountId() { return this.accountId; } /** *

* The unique identifier for the Amazon Web Services account that owns the bucket. *

* * @param accountId * The unique identifier for the Amazon Web Services 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; } /** *

* Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are * added to the bucket. Possible values are: *

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid * server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256. *

* * @param allowsUnencryptedObjectUploads * Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects * are added to the bucket. Possible values are:

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include * a valid server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a * valid server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new * objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, * and x-amz-server-side-encryption-customer-algorithm with a value of AES256. * @see AllowsUnencryptedObjectUploads */ public void setAllowsUnencryptedObjectUploads(String allowsUnencryptedObjectUploads) { this.allowsUnencryptedObjectUploads = allowsUnencryptedObjectUploads; } /** *

* Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are * added to the bucket. Possible values are: *

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid * server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256. *

* * @return Specifies whether the bucket policy for the bucket requires server-side encryption of objects when * objects are added to the bucket. Possible values are:

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include * a valid server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a * valid server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new * objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, * and x-amz-server-side-encryption-customer-algorithm with a value of AES256. * @see AllowsUnencryptedObjectUploads */ public String getAllowsUnencryptedObjectUploads() { return this.allowsUnencryptedObjectUploads; } /** *

* Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are * added to the bucket. Possible values are: *

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid * server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256. *

* * @param allowsUnencryptedObjectUploads * Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects * are added to the bucket. Possible values are:

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include * a valid server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a * valid server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new * objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, * and x-amz-server-side-encryption-customer-algorithm with a value of AES256. * @return Returns a reference to this object so that method calls can be chained together. * @see AllowsUnencryptedObjectUploads */ public BucketMetadata withAllowsUnencryptedObjectUploads(String allowsUnencryptedObjectUploads) { setAllowsUnencryptedObjectUploads(allowsUnencryptedObjectUploads); return this; } /** *

* Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are * added to the bucket. Possible values are: *

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid * server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256. *

* * @param allowsUnencryptedObjectUploads * Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects * are added to the bucket. Possible values are:

*
    *
  • *

    * FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include * a valid server-side encryption header. *

    *
  • *
  • *

    * TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side * encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a * valid server-side encryption header. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new * objects. *

    *
  • *
*

* Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, * and x-amz-server-side-encryption-customer-algorithm with a value of AES256. * @return Returns a reference to this object so that method calls can be chained together. * @see AllowsUnencryptedObjectUploads */ public BucketMetadata withAllowsUnencryptedObjectUploads(AllowsUnencryptedObjectUploads allowsUnencryptedObjectUploads) { this.allowsUnencryptedObjectUploads = allowsUnencryptedObjectUploads.toString(); 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. This value can also indicate * when changes such as edits to the bucket's policy were most recently made to the bucket. *

* * @param bucketCreatedAt * The date and time, in UTC and extended ISO 8601 format, when the bucket was created. This value can also * indicate when changes such as edits to the bucket's policy were most recently made to the bucket. */ 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. This value can also indicate * when changes such as edits to the bucket's policy were most recently made to the bucket. *

* * @return The date and time, in UTC and extended ISO 8601 format, when the bucket was created. This value can also * indicate when changes such as edits to the bucket's policy were most recently made to the bucket. */ public java.util.Date getBucketCreatedAt() { return this.bucketCreatedAt; } /** *

* The date and time, in UTC and extended ISO 8601 format, when the bucket was created. This value can also indicate * when changes such as edits to the bucket's policy were most recently made to the bucket. *

* * @param bucketCreatedAt * The date and time, in UTC and extended ISO 8601 format, when the bucket was created. This value can also * indicate when changes such as edits to the bucket's policy were most recently made to the bucket. * @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 storage * class and have a file name extension for a supported file or storage format. *

* * @param classifiableObjectCount * The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported * storage class and have a file name extension for a supported file or storage format. */ 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 storage * class and have a file name extension for a supported file or storage format. *

* * @return The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported * storage class and have a file name extension for a supported file or storage format. */ public Long getClassifiableObjectCount() { return this.classifiableObjectCount; } /** *

* The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported storage * class and have a file name extension for a supported file or storage format. *

* * @param classifiableObjectCount * The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported * storage class and have a file name extension for a supported file or storage format. * @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 storage class and have a file name extension for a supported file or storage format. *

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of * each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each * applicable object in the bucket. *

* * @param classifiableSizeInBytes * The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These * objects use a supported storage class and have a file name extension for a supported file or storage * format.

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all * versions of each applicable object in the bucket. */ 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 storage class and have a file name extension for a supported file or storage format. *

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of * each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each * applicable object in the bucket. *

* * @return The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These * objects use a supported storage class and have a file name extension for a supported file or storage * format.

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all * versions of each applicable object in the bucket. */ 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 storage class and have a file name extension for a supported file or storage format. *

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of * each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each * applicable object in the bucket. *

* * @param classifiableSizeInBytes * The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These * objects use a supported storage class and have a file name extension for a supported file or storage * format.

*

* If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all * versions of each applicable object in the bucket. * @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 error code for an error that prevented Amazon Macie from retrieving and processing information about the * bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the * information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this * value is null, Macie was able to retrieve and process the information. *

* * @param errorCode * The error code for an error that prevented Amazon Macie from retrieving and processing information about * the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to * retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the * request. If this value is null, Macie was able to retrieve and process the information. * @see BucketMetadataErrorCode */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

* The error code for an error that prevented Amazon Macie from retrieving and processing information about the * bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the * information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this * value is null, Macie was able to retrieve and process the information. *

* * @return The error code for an error that prevented Amazon Macie from retrieving and processing information about * the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to * retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied * the request. If this value is null, Macie was able to retrieve and process the information. * @see BucketMetadataErrorCode */ public String getErrorCode() { return this.errorCode; } /** *

* The error code for an error that prevented Amazon Macie from retrieving and processing information about the * bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the * information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this * value is null, Macie was able to retrieve and process the information. *

* * @param errorCode * The error code for an error that prevented Amazon Macie from retrieving and processing information about * the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to * retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the * request. If this value is null, Macie was able to retrieve and process the information. * @return Returns a reference to this object so that method calls can be chained together. * @see BucketMetadataErrorCode */ public BucketMetadata withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** *

* The error code for an error that prevented Amazon Macie from retrieving and processing information about the * bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the * information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this * value is null, Macie was able to retrieve and process the information. *

* * @param errorCode * The error code for an error that prevented Amazon Macie from retrieving and processing information about * the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to * retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the * request. If this value is null, Macie was able to retrieve and process the information. * @return Returns a reference to this object so that method calls can be chained together. * @see BucketMetadataErrorCode */ public BucketMetadata withErrorCode(BucketMetadataErrorCode errorCode) { this.errorCode = errorCode.toString(); return this; } /** *

* A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and * process the information. *

* * @param errorMessage * A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve * and process the information. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** *

* A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and * process the information. *

* * @return A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve * and process the information. */ public String getErrorMessage() { return this.errorMessage; } /** *

* A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and * process the information. *

* * @param errorMessage * A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing * information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve * and process the information. * @return Returns a reference to this object so that method calls can be chained together. */ public BucketMetadata withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** *

* Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, * and, if so, the details of the job that ran most recently. *

* * @param jobDetails * Specifies whether any one-time or recurring classification jobs are configured to analyze data in the * bucket, and, if so, the details of the job that ran most recently. */ public void setJobDetails(JobDetails jobDetails) { this.jobDetails = jobDetails; } /** *

* Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, * and, if so, the details of the job that ran most recently. *

* * @return Specifies whether any one-time or recurring classification jobs are configured to analyze data in the * bucket, and, if so, the details of the job that ran most recently. */ public JobDetails getJobDetails() { return this.jobDetails; } /** *

* Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, * and, if so, the details of the job that ran most recently. *

* * @param jobDetails * Specifies whether any one-time or recurring classification jobs are configured to analyze data in the * bucket, and, if so, the details of the job that ran most recently. * @return Returns a reference to this object so that method calls can be chained together. */ public BucketMetadata withJobDetails(JobDetails jobDetails) { setJobDetails(jobDetails); return this; } /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in the * bucket while performing automated sensitive data discovery for your account. This value is null if automated * sensitive data discovery is currently disabled for your account. *

* * @param lastAutomatedDiscoveryTime * The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in * the bucket while performing automated sensitive data discovery for your account. This value is null if * automated sensitive data discovery is currently disabled for your account. */ public void setLastAutomatedDiscoveryTime(java.util.Date lastAutomatedDiscoveryTime) { this.lastAutomatedDiscoveryTime = lastAutomatedDiscoveryTime; } /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in the * bucket while performing automated sensitive data discovery for your account. This value is null if automated * sensitive data discovery is currently disabled for your account. *

* * @return The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in * the bucket while performing automated sensitive data discovery for your account. This value is null if * automated sensitive data discovery is currently disabled for your account. */ public java.util.Date getLastAutomatedDiscoveryTime() { return this.lastAutomatedDiscoveryTime; } /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in the * bucket while performing automated sensitive data discovery for your account. This value is null if automated * sensitive data discovery is currently disabled for your account. *

* * @param lastAutomatedDiscoveryTime * The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently analyzed data in * the bucket while performing automated sensitive data discovery for your account. This value is null if * automated sensitive data discovery is currently disabled for your account. * @return Returns a reference to this object so that method calls can be chained together. */ public BucketMetadata withLastAutomatedDiscoveryTime(java.util.Date lastAutomatedDiscoveryTime) { setLastAutomatedDiscoveryTime(lastAutomatedDiscoveryTime); return this; } /** *

* The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved bucket or * object metadata from Amazon S3 for the bucket. *

* * @param lastUpdated * The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved bucket * or object metadata from Amazon S3 for the bucket. */ 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 bucket or * object metadata from Amazon S3 for the bucket. *

* * @return The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved bucket * or object metadata from Amazon S3 for the bucket. */ 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 bucket or * object metadata from Amazon S3 for the bucket. *

* * @param lastUpdated * The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved bucket * or object metadata from Amazon S3 for the bucket. * @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 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 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 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 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 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 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 due to the combination of permissions settings that apply to * the bucket, and provides information about those settings. *

* * @param publicAccess * Specifies whether the bucket is publicly accessible due to the combination of permissions settings that * apply to the bucket, and provides information about those settings. */ public void setPublicAccess(BucketPublicAccess publicAccess) { this.publicAccess = publicAccess; } /** *

* Specifies whether the bucket is publicly accessible due to the combination of permissions settings that apply to * the bucket, and provides information about those settings. *

* * @return Specifies whether the bucket is publicly accessible due to the combination of permissions settings that * apply to the bucket, and provides information about those settings. */ public BucketPublicAccess getPublicAccess() { return this.publicAccess; } /** *

* Specifies whether the bucket is publicly accessible due to the combination of permissions settings that apply to * the bucket, and provides information about those settings. *

* * @param publicAccess * Specifies whether the bucket is publicly accessible due to the combination of permissions settings that * apply to the bucket, and provides information about those settings. * @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 Amazon Web Services Region that hosts the bucket. *

* * @param region * The Amazon Web Services Region that hosts the bucket. */ public void setRegion(String region) { this.region = region; } /** *

* The Amazon Web Services Region that hosts the bucket. *

* * @return The Amazon Web Services Region that hosts the bucket. */ public String getRegion() { return this.region; } /** *

* The Amazon Web Services Region that hosts the bucket. *

* * @param region * The Amazon Web Services 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 Amazon Web * Services accounts and, if so, which accounts. *

* * @param replicationDetails * Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon * Web Services 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 Amazon Web * Services accounts and, if so, which accounts. *

* * @return Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon * Web Services 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 Amazon Web * Services accounts and, if so, which accounts. *

* * @param replicationDetails * Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon * Web Services 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; } /** *

* The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This value is * null if automated sensitive data discovery is currently disabled for your account. *

* * @param sensitivityScore * The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This * value is null if automated sensitive data discovery is currently disabled for your account. */ public void setSensitivityScore(Integer sensitivityScore) { this.sensitivityScore = sensitivityScore; } /** *

* The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This value is * null if automated sensitive data discovery is currently disabled for your account. *

* * @return The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This * value is null if automated sensitive data discovery is currently disabled for your account. */ public Integer getSensitivityScore() { return this.sensitivityScore; } /** *

* The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This value is * null if automated sensitive data discovery is currently disabled for your account. *

* * @param sensitivityScore * The sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). This * value is null if automated sensitive data discovery is currently disabled for your account. * @return Returns a reference to this object so that method calls can be chained together. */ public BucketMetadata withSensitivityScore(Integer sensitivityScore) { setSensitivityScore(sensitivityScore); return this; } /** *

* The default server-side encryption settings for the bucket. *

* * @param serverSideEncryption * The default server-side encryption settings for the bucket. */ public void setServerSideEncryption(BucketServerSideEncryption serverSideEncryption) { this.serverSideEncryption = serverSideEncryption; } /** *

* The default server-side encryption settings for the bucket. *

* * @return The default server-side encryption settings for the bucket. */ public BucketServerSideEncryption getServerSideEncryption() { return this.serverSideEncryption; } /** *

* The default server-side encryption settings for the bucket. *

* * @param serverSideEncryption * The default server-side encryption settings for the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public BucketMetadata withServerSideEncryption(BucketServerSideEncryption serverSideEncryption) { setServerSideEncryption(serverSideEncryption); return this; } /** *

* Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront origin * access identity (OAI), or a CloudFront origin access control (OAC). Possible values are: *

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie * organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront * OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of related * accounts through Organizations or by Macie invitation. *

* * @param sharedAccess * Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront * origin access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon * Macie organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a * CloudFront OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of * related accounts through Organizations or by Macie invitation. * @see SharedAccess */ public void setSharedAccess(String sharedAccess) { this.sharedAccess = sharedAccess; } /** *

* Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront origin * access identity (OAI), or a CloudFront origin access control (OAC). Possible values are: *

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie * organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront * OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of related * accounts through Organizations or by Macie invitation. *

* * @return Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront * origin access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your * Amazon Macie organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a * CloudFront OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of * related accounts through Organizations or by Macie invitation. * @see SharedAccess */ public String getSharedAccess() { return this.sharedAccess; } /** *

* Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront origin * access identity (OAI), or a CloudFront origin access control (OAC). Possible values are: *

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie * organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront * OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of related * accounts through Organizations or by Macie invitation. *

* * @param sharedAccess * Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront * origin access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon * Macie organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a * CloudFront OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of * related accounts through Organizations or by Macie invitation. * @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 Amazon Web Services account, an Amazon CloudFront origin * access identity (OAI), or a CloudFront origin access control (OAC). Possible values are: *

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie * organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront * OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of related * accounts through Organizations or by Macie invitation. *

* * @param sharedAccess * Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront * origin access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:

*
    *
  • *

    * EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a * CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie * organization. *

    *
  • *
  • *

    * INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon * Macie organization. It isn't shared with a CloudFront OAI or OAC. *

    *
  • *
  • *

    * NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a * CloudFront OAC. *

    *
  • *
  • *

    * UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket. *

    *
  • *
*

* An Amazon Macie organization is a set of Macie accounts that are centrally managed as a group of * related accounts through Organizations or by Macie invitation. * @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. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object * in the bucket. *

* * @param sizeInBytes * The total storage size, in bytes, of the bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each object in the bucket. This value doesn't reflect the storage size of all versions * of each object in the bucket. */ public void setSizeInBytes(Long sizeInBytes) { this.sizeInBytes = sizeInBytes; } /** *

* The total storage size, in bytes, of the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object * in the bucket. *

* * @return The total storage size, in bytes, of the bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each object in the bucket. This value doesn't reflect the storage size of all versions * of each object in the bucket. */ public Long getSizeInBytes() { return this.sizeInBytes; } /** *

* The total storage size, in bytes, of the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object * in the bucket. *

* * @param sizeInBytes * The total storage size, in bytes, of the bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each object in the bucket. This value doesn't reflect the storage size of all versions * of each object in 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 storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of * each applicable object in the bucket. *

* * @param sizeInBytesCompressed * The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the * bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all * versions of each applicable object in the bucket. */ public void setSizeInBytesCompressed(Long sizeInBytesCompressed) { this.sizeInBytesCompressed = sizeInBytesCompressed; } /** *

* The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of * each applicable object in the bucket. *

* * @return The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the * bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each applicable object in the bucket. This value doesn't reflect the storage size of * all versions of each applicable object in the bucket. */ public Long getSizeInBytesCompressed() { return this.sizeInBytesCompressed; } /** *

* The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket. *

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest * version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of * each applicable object in the bucket. *

* * @param sizeInBytesCompressed * The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the * bucket.

*

* If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the * latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all * versions of each applicable object in 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 don't use a supported * storage class or don't have a file name extension for a supported file or storage format. *

* * @param unclassifiableObjectCount * The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a * supported storage class or don't have a file name extension for a supported file or storage format. */ public void setUnclassifiableObjectCount(ObjectLevelStatistics unclassifiableObjectCount) { this.unclassifiableObjectCount = unclassifiableObjectCount; } /** *

* The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a supported * storage class or don't have a file name extension for a supported file or storage format. *

* * @return The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a * supported storage class or don't have a file name extension for a supported file or storage format. */ public ObjectLevelStatistics getUnclassifiableObjectCount() { return this.unclassifiableObjectCount; } /** *

* The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a supported * storage class or don't have a file name extension for a supported file or storage format. *

* * @param unclassifiableObjectCount * The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a * supported storage class or don't have a file name extension for a supported file or storage format. * @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 * don't use a supported storage class or don't have a file name extension for a supported file or storage format. *

* * @param unclassifiableObjectSizeInBytes * The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These * objects don't use a supported storage class or don't have a file name extension for a supported file or * storage format. */ 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 * don't use a supported storage class or don't have a file name extension for a supported file or storage format. *

* * @return The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These * objects don't use a supported storage class or don't have a file name extension for a supported file or * storage format. */ 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 * don't use a supported storage class or don't have a file name extension for a supported file or storage format. *

* * @param unclassifiableObjectSizeInBytes * The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These * objects don't use a supported storage class or don't have a file name extension for a supported file or * storage format. * @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 (getAllowsUnencryptedObjectUploads() != null) sb.append("AllowsUnencryptedObjectUploads: ").append(getAllowsUnencryptedObjectUploads()).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 (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getJobDetails() != null) sb.append("JobDetails: ").append(getJobDetails()).append(","); if (getLastAutomatedDiscoveryTime() != null) sb.append("LastAutomatedDiscoveryTime: ").append(getLastAutomatedDiscoveryTime()).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 (getSensitivityScore() != null) sb.append("SensitivityScore: ").append(getSensitivityScore()).append(","); if (getServerSideEncryption() != null) sb.append("ServerSideEncryption: ").append(getServerSideEncryption()).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.getAllowsUnencryptedObjectUploads() == null ^ this.getAllowsUnencryptedObjectUploads() == null) return false; if (other.getAllowsUnencryptedObjectUploads() != null && other.getAllowsUnencryptedObjectUploads().equals(this.getAllowsUnencryptedObjectUploads()) == 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.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; if (other.getJobDetails() == null ^ this.getJobDetails() == null) return false; if (other.getJobDetails() != null && other.getJobDetails().equals(this.getJobDetails()) == false) return false; if (other.getLastAutomatedDiscoveryTime() == null ^ this.getLastAutomatedDiscoveryTime() == null) return false; if (other.getLastAutomatedDiscoveryTime() != null && other.getLastAutomatedDiscoveryTime().equals(this.getLastAutomatedDiscoveryTime()) == 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.getSensitivityScore() == null ^ this.getSensitivityScore() == null) return false; if (other.getSensitivityScore() != null && other.getSensitivityScore().equals(this.getSensitivityScore()) == false) return false; if (other.getServerSideEncryption() == null ^ this.getServerSideEncryption() == null) return false; if (other.getServerSideEncryption() != null && other.getServerSideEncryption().equals(this.getServerSideEncryption()) == 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 + ((getAllowsUnencryptedObjectUploads() == null) ? 0 : getAllowsUnencryptedObjectUploads().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 + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getJobDetails() == null) ? 0 : getJobDetails().hashCode()); hashCode = prime * hashCode + ((getLastAutomatedDiscoveryTime() == null) ? 0 : getLastAutomatedDiscoveryTime().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 + ((getSensitivityScore() == null) ? 0 : getSensitivityScore().hashCode()); hashCode = prime * hashCode + ((getServerSideEncryption() == null) ? 0 : getServerSideEncryption().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); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy