com.amazonaws.services.datasync.model.DescribeLocationS3Result Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datasync Show documentation
/*
* Copyright 2019-2024 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.datasync.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* DescribeLocationS3Response
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeLocationS3Result extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*
*/
private String locationArn;
/**
*
* The URL of the Amazon S3 location that was described.
*
*/
private String locationUri;
/**
*
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
*
*/
private String s3StorageClass;
private S3Config s3Config;
/**
*
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents
* deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services
* Outpost, see Deploy your
* DataSync agent on Outposts.
*
*/
private java.util.List agentArns;
/**
*
* The time that the Amazon S3 bucket location was created.
*
*/
private java.util.Date creationTime;
/**
*
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*
*
* @param locationArn
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*/
public void setLocationArn(String locationArn) {
this.locationArn = locationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*/
public String getLocationArn() {
return this.locationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
*
*
* @param locationArn
* The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withLocationArn(String locationArn) {
setLocationArn(locationArn);
return this;
}
/**
*
* The URL of the Amazon S3 location that was described.
*
*
* @param locationUri
* The URL of the Amazon S3 location that was described.
*/
public void setLocationUri(String locationUri) {
this.locationUri = locationUri;
}
/**
*
* The URL of the Amazon S3 location that was described.
*
*
* @return The URL of the Amazon S3 location that was described.
*/
public String getLocationUri() {
return this.locationUri;
}
/**
*
* The URL of the Amazon S3 location that was described.
*
*
* @param locationUri
* The URL of the Amazon S3 location that was described.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withLocationUri(String locationUri) {
setLocationUri(locationUri);
return this;
}
/**
*
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
*
*
* @param s3StorageClass
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
* @see S3StorageClass
*/
public void setS3StorageClass(String s3StorageClass) {
this.s3StorageClass = s3StorageClass;
}
/**
*
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
*
*
* @return The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
* @see S3StorageClass
*/
public String getS3StorageClass() {
return this.s3StorageClass;
}
/**
*
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
*
*
* @param s3StorageClass
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
* @return Returns a reference to this object so that method calls can be chained together.
* @see S3StorageClass
*/
public DescribeLocationS3Result withS3StorageClass(String s3StorageClass) {
setS3StorageClass(s3StorageClass);
return this;
}
/**
*
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
*
*
* @param s3StorageClass
* The Amazon S3 storage class that you chose to store your files in when this location is used as a task
* destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have
* behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
* @return Returns a reference to this object so that method calls can be chained together.
* @see S3StorageClass
*/
public DescribeLocationS3Result withS3StorageClass(S3StorageClass s3StorageClass) {
this.s3StorageClass = s3StorageClass.toString();
return this;
}
/**
* @param s3Config
*/
public void setS3Config(S3Config s3Config) {
this.s3Config = s3Config;
}
/**
* @return
*/
public S3Config getS3Config() {
return this.s3Config;
}
/**
* @param s3Config
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withS3Config(S3Config s3Config) {
setS3Config(s3Config);
return this;
}
/**
*
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents
* deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services
* Outpost, see Deploy your
* DataSync agent on Outposts.
*
*
* @return If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2
* agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web
* Services Outpost, see Deploy
* your DataSync agent on Outposts.
*/
public java.util.List getAgentArns() {
return agentArns;
}
/**
*
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents
* deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services
* Outpost, see Deploy your
* DataSync agent on Outposts.
*
*
* @param agentArns
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2
* agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web
* Services Outpost, see Deploy your
* DataSync agent on Outposts.
*/
public void setAgentArns(java.util.Collection agentArns) {
if (agentArns == null) {
this.agentArns = null;
return;
}
this.agentArns = new java.util.ArrayList(agentArns);
}
/**
*
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents
* deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services
* Outpost, see Deploy your
* DataSync agent on Outposts.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAgentArns(java.util.Collection)} or {@link #withAgentArns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param agentArns
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2
* agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web
* Services Outpost, see Deploy your
* DataSync agent on Outposts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withAgentArns(String... agentArns) {
if (this.agentArns == null) {
setAgentArns(new java.util.ArrayList(agentArns.length));
}
for (String ele : agentArns) {
this.agentArns.add(ele);
}
return this;
}
/**
*
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents
* deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services
* Outpost, see Deploy your
* DataSync agent on Outposts.
*
*
* @param agentArns
* If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2
* agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web
* Services Outpost, see Deploy your
* DataSync agent on Outposts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withAgentArns(java.util.Collection agentArns) {
setAgentArns(agentArns);
return this;
}
/**
*
* The time that the Amazon S3 bucket location was created.
*
*
* @param creationTime
* The time that the Amazon S3 bucket location was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time that the Amazon S3 bucket location was created.
*
*
* @return The time that the Amazon S3 bucket location was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time that the Amazon S3 bucket location was created.
*
*
* @param creationTime
* The time that the Amazon S3 bucket location was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeLocationS3Result withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
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 (getLocationArn() != null)
sb.append("LocationArn: ").append(getLocationArn()).append(",");
if (getLocationUri() != null)
sb.append("LocationUri: ").append(getLocationUri()).append(",");
if (getS3StorageClass() != null)
sb.append("S3StorageClass: ").append(getS3StorageClass()).append(",");
if (getS3Config() != null)
sb.append("S3Config: ").append(getS3Config()).append(",");
if (getAgentArns() != null)
sb.append("AgentArns: ").append(getAgentArns()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeLocationS3Result == false)
return false;
DescribeLocationS3Result other = (DescribeLocationS3Result) obj;
if (other.getLocationArn() == null ^ this.getLocationArn() == null)
return false;
if (other.getLocationArn() != null && other.getLocationArn().equals(this.getLocationArn()) == false)
return false;
if (other.getLocationUri() == null ^ this.getLocationUri() == null)
return false;
if (other.getLocationUri() != null && other.getLocationUri().equals(this.getLocationUri()) == false)
return false;
if (other.getS3StorageClass() == null ^ this.getS3StorageClass() == null)
return false;
if (other.getS3StorageClass() != null && other.getS3StorageClass().equals(this.getS3StorageClass()) == false)
return false;
if (other.getS3Config() == null ^ this.getS3Config() == null)
return false;
if (other.getS3Config() != null && other.getS3Config().equals(this.getS3Config()) == false)
return false;
if (other.getAgentArns() == null ^ this.getAgentArns() == null)
return false;
if (other.getAgentArns() != null && other.getAgentArns().equals(this.getAgentArns()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLocationArn() == null) ? 0 : getLocationArn().hashCode());
hashCode = prime * hashCode + ((getLocationUri() == null) ? 0 : getLocationUri().hashCode());
hashCode = prime * hashCode + ((getS3StorageClass() == null) ? 0 : getS3StorageClass().hashCode());
hashCode = prime * hashCode + ((getS3Config() == null) ? 0 : getS3Config().hashCode());
hashCode = prime * hashCode + ((getAgentArns() == null) ? 0 : getAgentArns().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
return hashCode;
}
@Override
public DescribeLocationS3Result clone() {
try {
return (DescribeLocationS3Result) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}