/* * 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 information about the S3 bucket that a finding applies to. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class S3Bucket implements Serializable, Cloneable, StructuredPojo { /** ** 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 arn; /** ** 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, relative to when the * finding was created or last updated. *
*/ private java.util.Date createdAt; /** ** The default server-side encryption settings for the bucket. *
*/ private ServerSideEncryption defaultServerSideEncryption; /** ** The name of the bucket. *
*/ private String name; /** ** The display name and canonical user ID for the Amazon Web Services account that owns the bucket. *
*/ private S3BucketOwner owner; /** ** The permissions settings that determine whether the bucket is publicly accessible. *
*/ private BucketPublicAccess publicAccess; /** ** The tags that are associated with the bucket. *
*/ private java.util.List* 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 S3Bucket 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 S3Bucket withAllowsUnencryptedObjectUploads(AllowsUnencryptedObjectUploads allowsUnencryptedObjectUploads) { this.allowsUnencryptedObjectUploads = allowsUnencryptedObjectUploads.toString(); return this; } /** *
* The Amazon Resource Name (ARN) of the bucket. *
* * @param arn * The Amazon Resource Name (ARN) of the bucket. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the bucket. *
* * @return The Amazon Resource Name (ARN) of the bucket. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the bucket. *
* * @param arn * The Amazon Resource Name (ARN) of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withArn(String arn) { setArn(arn); 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, relative to when the * finding was created or last updated. *
* * @param createdAt * 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, relative * to when the finding was created or last updated. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** 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, relative to when the * finding was created or last updated. *
* * @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, * relative to when the finding was created or last updated. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** 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, relative to when the * finding was created or last updated. *
* * @param createdAt * 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, relative * to when the finding was created or last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The default server-side encryption settings for the bucket. *
* * @param defaultServerSideEncryption * The default server-side encryption settings for the bucket. */ public void setDefaultServerSideEncryption(ServerSideEncryption defaultServerSideEncryption) { this.defaultServerSideEncryption = defaultServerSideEncryption; } /** ** The default server-side encryption settings for the bucket. *
* * @return The default server-side encryption settings for the bucket. */ public ServerSideEncryption getDefaultServerSideEncryption() { return this.defaultServerSideEncryption; } /** ** The default server-side encryption settings for the bucket. *
* * @param defaultServerSideEncryption * 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 S3Bucket withDefaultServerSideEncryption(ServerSideEncryption defaultServerSideEncryption) { setDefaultServerSideEncryption(defaultServerSideEncryption); return this; } /** ** The name of the bucket. *
* * @param name * The name of the bucket. */ public void setName(String name) { this.name = name; } /** ** The name of the bucket. *
* * @return The name of the bucket. */ public String getName() { return this.name; } /** ** The name of the bucket. *
* * @param name * The name of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withName(String name) { setName(name); return this; } /** ** The display name and canonical user ID for the Amazon Web Services account that owns the bucket. *
* * @param owner * The display name and canonical user ID for the Amazon Web Services account that owns the bucket. */ public void setOwner(S3BucketOwner owner) { this.owner = owner; } /** ** The display name and canonical user ID for the Amazon Web Services account that owns the bucket. *
* * @return The display name and canonical user ID for the Amazon Web Services account that owns the bucket. */ public S3BucketOwner getOwner() { return this.owner; } /** ** The display name and canonical user ID for the Amazon Web Services account that owns the bucket. *
* * @param owner * The display name and canonical user ID 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 S3Bucket withOwner(S3BucketOwner owner) { setOwner(owner); return this; } /** ** The permissions settings that determine whether the bucket is publicly accessible. *
* * @param publicAccess * The permissions settings that determine whether the bucket is publicly accessible. */ public void setPublicAccess(BucketPublicAccess publicAccess) { this.publicAccess = publicAccess; } /** ** The permissions settings that determine whether the bucket is publicly accessible. *
* * @return The permissions settings that determine whether the bucket is publicly accessible. */ public BucketPublicAccess getPublicAccess() { return this.publicAccess; } /** ** The permissions settings that determine whether the bucket is publicly accessible. *
* * @param publicAccess * The permissions settings that determine whether the bucket is publicly accessible. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withPublicAccess(BucketPublicAccess publicAccess) { setPublicAccess(publicAccess); return this; } /** ** The tags that are associated with the bucket. *
* * @return The tags that are associated with the bucket. */ public java.util.List* The tags that are associated with the bucket. *
* * @param tags * The tags that are associated with the bucket. */ public void setTags(java.util.Collection* The tags 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 * The tags that are associated with the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withTags(KeyValuePair... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tags that are associated with the bucket. *
* * @param tags * The tags that are associated with the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Bucket withTags(java.util.Collection