com.amazonaws.services.securityhub.model.AwsS3BucketDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2016-2021 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The details of an Amazon S3 bucket.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsS3BucketDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The canonical user ID of the owner of the S3 bucket.
*
*/
private String ownerId;
/**
*
* The display name of the owner of the S3 bucket.
*
*/
private String ownerName;
/**
*
* Indicates when the S3 bucket was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*/
private String createdAt;
/**
*
* The encryption rules that are applied to the S3 bucket.
*
*/
private AwsS3BucketServerSideEncryptionConfiguration serverSideEncryptionConfiguration;
/**
*
* The lifecycle configuration for objects in the S3 bucket.
*
*/
private AwsS3BucketBucketLifecycleConfigurationDetails bucketLifecycleConfiguration;
/**
*
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*
*/
private AwsS3AccountPublicAccessBlockDetails publicAccessBlockConfiguration;
/**
*
* The access control list for the S3 bucket.
*
*/
private String accessControlList;
/**
*
* The logging configuration for the S3 bucket.
*
*/
private AwsS3BucketLoggingConfiguration bucketLoggingConfiguration;
/**
*
* The website configuration parameters for the S3 bucket.
*
*/
private AwsS3BucketWebsiteConfiguration bucketWebsiteConfiguration;
/**
*
* The notification configuration for the S3 bucket.
*
*/
private AwsS3BucketNotificationConfiguration bucketNotificationConfiguration;
/**
*
* The canonical user ID of the owner of the S3 bucket.
*
*
* @param ownerId
* The canonical user ID of the owner of the S3 bucket.
*/
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
/**
*
* The canonical user ID of the owner of the S3 bucket.
*
*
* @return The canonical user ID of the owner of the S3 bucket.
*/
public String getOwnerId() {
return this.ownerId;
}
/**
*
* The canonical user ID of the owner of the S3 bucket.
*
*
* @param ownerId
* The canonical user ID of the owner of the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withOwnerId(String ownerId) {
setOwnerId(ownerId);
return this;
}
/**
*
* The display name of the owner of the S3 bucket.
*
*
* @param ownerName
* The display name of the owner of the S3 bucket.
*/
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
/**
*
* The display name of the owner of the S3 bucket.
*
*
* @return The display name of the owner of the S3 bucket.
*/
public String getOwnerName() {
return this.ownerName;
}
/**
*
* The display name of the owner of the S3 bucket.
*
*
* @param ownerName
* The display name of the owner of the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withOwnerName(String ownerName) {
setOwnerName(ownerName);
return this;
}
/**
*
* Indicates when the S3 bucket was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @param createdAt
* Indicates when the S3 bucket was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
*/
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
/**
*
* Indicates when the S3 bucket was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @return Indicates when the S3 bucket was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
*/
public String getCreatedAt() {
return this.createdAt;
}
/**
*
* Indicates when the S3 bucket was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @param createdAt
* Indicates when the S3 bucket was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withCreatedAt(String createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The encryption rules that are applied to the S3 bucket.
*
*
* @param serverSideEncryptionConfiguration
* The encryption rules that are applied to the S3 bucket.
*/
public void setServerSideEncryptionConfiguration(AwsS3BucketServerSideEncryptionConfiguration serverSideEncryptionConfiguration) {
this.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration;
}
/**
*
* The encryption rules that are applied to the S3 bucket.
*
*
* @return The encryption rules that are applied to the S3 bucket.
*/
public AwsS3BucketServerSideEncryptionConfiguration getServerSideEncryptionConfiguration() {
return this.serverSideEncryptionConfiguration;
}
/**
*
* The encryption rules that are applied to the S3 bucket.
*
*
* @param serverSideEncryptionConfiguration
* The encryption rules that are applied to the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withServerSideEncryptionConfiguration(AwsS3BucketServerSideEncryptionConfiguration serverSideEncryptionConfiguration) {
setServerSideEncryptionConfiguration(serverSideEncryptionConfiguration);
return this;
}
/**
*
* The lifecycle configuration for objects in the S3 bucket.
*
*
* @param bucketLifecycleConfiguration
* The lifecycle configuration for objects in the S3 bucket.
*/
public void setBucketLifecycleConfiguration(AwsS3BucketBucketLifecycleConfigurationDetails bucketLifecycleConfiguration) {
this.bucketLifecycleConfiguration = bucketLifecycleConfiguration;
}
/**
*
* The lifecycle configuration for objects in the S3 bucket.
*
*
* @return The lifecycle configuration for objects in the S3 bucket.
*/
public AwsS3BucketBucketLifecycleConfigurationDetails getBucketLifecycleConfiguration() {
return this.bucketLifecycleConfiguration;
}
/**
*
* The lifecycle configuration for objects in the S3 bucket.
*
*
* @param bucketLifecycleConfiguration
* The lifecycle configuration for objects in the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withBucketLifecycleConfiguration(AwsS3BucketBucketLifecycleConfigurationDetails bucketLifecycleConfiguration) {
setBucketLifecycleConfiguration(bucketLifecycleConfiguration);
return this;
}
/**
*
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*
*
* @param publicAccessBlockConfiguration
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*/
public void setPublicAccessBlockConfiguration(AwsS3AccountPublicAccessBlockDetails publicAccessBlockConfiguration) {
this.publicAccessBlockConfiguration = publicAccessBlockConfiguration;
}
/**
*
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*
*
* @return Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*/
public AwsS3AccountPublicAccessBlockDetails getPublicAccessBlockConfiguration() {
return this.publicAccessBlockConfiguration;
}
/**
*
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
*
*
* @param publicAccessBlockConfiguration
* Provides information about the Amazon S3 Public Access Block configuration for the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withPublicAccessBlockConfiguration(AwsS3AccountPublicAccessBlockDetails publicAccessBlockConfiguration) {
setPublicAccessBlockConfiguration(publicAccessBlockConfiguration);
return this;
}
/**
*
* The access control list for the S3 bucket.
*
*
* @param accessControlList
* The access control list for the S3 bucket.
*/
public void setAccessControlList(String accessControlList) {
this.accessControlList = accessControlList;
}
/**
*
* The access control list for the S3 bucket.
*
*
* @return The access control list for the S3 bucket.
*/
public String getAccessControlList() {
return this.accessControlList;
}
/**
*
* The access control list for the S3 bucket.
*
*
* @param accessControlList
* The access control list for the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withAccessControlList(String accessControlList) {
setAccessControlList(accessControlList);
return this;
}
/**
*
* The logging configuration for the S3 bucket.
*
*
* @param bucketLoggingConfiguration
* The logging configuration for the S3 bucket.
*/
public void setBucketLoggingConfiguration(AwsS3BucketLoggingConfiguration bucketLoggingConfiguration) {
this.bucketLoggingConfiguration = bucketLoggingConfiguration;
}
/**
*
* The logging configuration for the S3 bucket.
*
*
* @return The logging configuration for the S3 bucket.
*/
public AwsS3BucketLoggingConfiguration getBucketLoggingConfiguration() {
return this.bucketLoggingConfiguration;
}
/**
*
* The logging configuration for the S3 bucket.
*
*
* @param bucketLoggingConfiguration
* The logging configuration for the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withBucketLoggingConfiguration(AwsS3BucketLoggingConfiguration bucketLoggingConfiguration) {
setBucketLoggingConfiguration(bucketLoggingConfiguration);
return this;
}
/**
*
* The website configuration parameters for the S3 bucket.
*
*
* @param bucketWebsiteConfiguration
* The website configuration parameters for the S3 bucket.
*/
public void setBucketWebsiteConfiguration(AwsS3BucketWebsiteConfiguration bucketWebsiteConfiguration) {
this.bucketWebsiteConfiguration = bucketWebsiteConfiguration;
}
/**
*
* The website configuration parameters for the S3 bucket.
*
*
* @return The website configuration parameters for the S3 bucket.
*/
public AwsS3BucketWebsiteConfiguration getBucketWebsiteConfiguration() {
return this.bucketWebsiteConfiguration;
}
/**
*
* The website configuration parameters for the S3 bucket.
*
*
* @param bucketWebsiteConfiguration
* The website configuration parameters for the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withBucketWebsiteConfiguration(AwsS3BucketWebsiteConfiguration bucketWebsiteConfiguration) {
setBucketWebsiteConfiguration(bucketWebsiteConfiguration);
return this;
}
/**
*
* The notification configuration for the S3 bucket.
*
*
* @param bucketNotificationConfiguration
* The notification configuration for the S3 bucket.
*/
public void setBucketNotificationConfiguration(AwsS3BucketNotificationConfiguration bucketNotificationConfiguration) {
this.bucketNotificationConfiguration = bucketNotificationConfiguration;
}
/**
*
* The notification configuration for the S3 bucket.
*
*
* @return The notification configuration for the S3 bucket.
*/
public AwsS3BucketNotificationConfiguration getBucketNotificationConfiguration() {
return this.bucketNotificationConfiguration;
}
/**
*
* The notification configuration for the S3 bucket.
*
*
* @param bucketNotificationConfiguration
* The notification configuration for the S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketDetails withBucketNotificationConfiguration(AwsS3BucketNotificationConfiguration bucketNotificationConfiguration) {
setBucketNotificationConfiguration(bucketNotificationConfiguration);
return this;
}
/**
* 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 (getOwnerId() != null)
sb.append("OwnerId: ").append(getOwnerId()).append(",");
if (getOwnerName() != null)
sb.append("OwnerName: ").append(getOwnerName()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getServerSideEncryptionConfiguration() != null)
sb.append("ServerSideEncryptionConfiguration: ").append(getServerSideEncryptionConfiguration()).append(",");
if (getBucketLifecycleConfiguration() != null)
sb.append("BucketLifecycleConfiguration: ").append(getBucketLifecycleConfiguration()).append(",");
if (getPublicAccessBlockConfiguration() != null)
sb.append("PublicAccessBlockConfiguration: ").append(getPublicAccessBlockConfiguration()).append(",");
if (getAccessControlList() != null)
sb.append("AccessControlList: ").append(getAccessControlList()).append(",");
if (getBucketLoggingConfiguration() != null)
sb.append("BucketLoggingConfiguration: ").append(getBucketLoggingConfiguration()).append(",");
if (getBucketWebsiteConfiguration() != null)
sb.append("BucketWebsiteConfiguration: ").append(getBucketWebsiteConfiguration()).append(",");
if (getBucketNotificationConfiguration() != null)
sb.append("BucketNotificationConfiguration: ").append(getBucketNotificationConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsS3BucketDetails == false)
return false;
AwsS3BucketDetails other = (AwsS3BucketDetails) obj;
if (other.getOwnerId() == null ^ this.getOwnerId() == null)
return false;
if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false)
return false;
if (other.getOwnerName() == null ^ this.getOwnerName() == null)
return false;
if (other.getOwnerName() != null && other.getOwnerName().equals(this.getOwnerName()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getServerSideEncryptionConfiguration() == null ^ this.getServerSideEncryptionConfiguration() == null)
return false;
if (other.getServerSideEncryptionConfiguration() != null
&& other.getServerSideEncryptionConfiguration().equals(this.getServerSideEncryptionConfiguration()) == false)
return false;
if (other.getBucketLifecycleConfiguration() == null ^ this.getBucketLifecycleConfiguration() == null)
return false;
if (other.getBucketLifecycleConfiguration() != null && other.getBucketLifecycleConfiguration().equals(this.getBucketLifecycleConfiguration()) == false)
return false;
if (other.getPublicAccessBlockConfiguration() == null ^ this.getPublicAccessBlockConfiguration() == null)
return false;
if (other.getPublicAccessBlockConfiguration() != null
&& other.getPublicAccessBlockConfiguration().equals(this.getPublicAccessBlockConfiguration()) == false)
return false;
if (other.getAccessControlList() == null ^ this.getAccessControlList() == null)
return false;
if (other.getAccessControlList() != null && other.getAccessControlList().equals(this.getAccessControlList()) == false)
return false;
if (other.getBucketLoggingConfiguration() == null ^ this.getBucketLoggingConfiguration() == null)
return false;
if (other.getBucketLoggingConfiguration() != null && other.getBucketLoggingConfiguration().equals(this.getBucketLoggingConfiguration()) == false)
return false;
if (other.getBucketWebsiteConfiguration() == null ^ this.getBucketWebsiteConfiguration() == null)
return false;
if (other.getBucketWebsiteConfiguration() != null && other.getBucketWebsiteConfiguration().equals(this.getBucketWebsiteConfiguration()) == false)
return false;
if (other.getBucketNotificationConfiguration() == null ^ this.getBucketNotificationConfiguration() == null)
return false;
if (other.getBucketNotificationConfiguration() != null
&& other.getBucketNotificationConfiguration().equals(this.getBucketNotificationConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode());
hashCode = prime * hashCode + ((getOwnerName() == null) ? 0 : getOwnerName().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getServerSideEncryptionConfiguration() == null) ? 0 : getServerSideEncryptionConfiguration().hashCode());
hashCode = prime * hashCode + ((getBucketLifecycleConfiguration() == null) ? 0 : getBucketLifecycleConfiguration().hashCode());
hashCode = prime * hashCode + ((getPublicAccessBlockConfiguration() == null) ? 0 : getPublicAccessBlockConfiguration().hashCode());
hashCode = prime * hashCode + ((getAccessControlList() == null) ? 0 : getAccessControlList().hashCode());
hashCode = prime * hashCode + ((getBucketLoggingConfiguration() == null) ? 0 : getBucketLoggingConfiguration().hashCode());
hashCode = prime * hashCode + ((getBucketWebsiteConfiguration() == null) ? 0 : getBucketWebsiteConfiguration().hashCode());
hashCode = prime * hashCode + ((getBucketNotificationConfiguration() == null) ? 0 : getBucketNotificationConfiguration().hashCode());
return hashCode;
}
@Override
public AwsS3BucketDetails clone() {
try {
return (AwsS3BucketDetails) 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.securityhub.model.transform.AwsS3BucketDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}