com.amazonaws.services.securityhub.model.AwsS3BucketDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-securityhub Show documentation
Show all versions of aws-java-sdk-securityhub Show documentation
The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service
/*
* Copyright 2014-2019 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 AWS 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;
/**
*
* 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;
}
/**
* 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());
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;
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());
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);
}
}