com.amazonaws.services.codeartifact.model.DomainSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codeartifact Show documentation
/*
* Copyright 2015-2020 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.codeartifact.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about a domain, including its name, Amazon Resource Name (ARN), and status. The ListDomains
* operation returns a list of DomainSummary
objects.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DomainSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the domain.
*
*/
private String name;
/**
*
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
*
*/
private String owner;
/**
*
* The ARN of the domain.
*
*/
private String arn;
/**
*
* A string that contains the status of the domain. The valid values are:
*
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
*
*/
private String status;
/**
*
* A timestamp that contains the date and time the domain was created.
*
*/
private java.util.Date createdTime;
/**
*
* The key used to encrypt the domain.
*
*/
private String encryptionKey;
/**
*
* The name of the domain.
*
*
* @param name
* The name of the domain.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the domain.
*
*
* @return The name of the domain.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the domain.
*
*
* @param name
* The name of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
*
*
* @param owner
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
*
*
* @return The 12-digit account number of the AWS account that owns the domain. It does not include dashes or
* spaces.
*/
public String getOwner() {
return this.owner;
}
/**
*
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
*
*
* @param owner
* The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withOwner(String owner) {
setOwner(owner);
return this;
}
/**
*
* The ARN of the domain.
*
*
* @param arn
* The ARN of the domain.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the domain.
*
*
* @return The ARN of the domain.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the domain.
*
*
* @param arn
* The ARN of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* A string that contains the status of the domain. The valid values are:
*
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
*
*
* @param status
* A string that contains the status of the domain. The valid values are:
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
* @see DomainStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* A string that contains the status of the domain. The valid values are:
*
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
*
*
* @return A string that contains the status of the domain. The valid values are:
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
* @see DomainStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* A string that contains the status of the domain. The valid values are:
*
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
*
*
* @param status
* A string that contains the status of the domain. The valid values are:
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* A string that contains the status of the domain. The valid values are:
*
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
*
*
* @param status
* A string that contains the status of the domain. The valid values are:
*
* -
*
* Active
*
*
* -
*
* Deleted
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainSummary withStatus(DomainStatus status) {
this.status = status.toString();
return this;
}
/**
*
* A timestamp that contains the date and time the domain was created.
*
*
* @param createdTime
* A timestamp that contains the date and time the domain was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* A timestamp that contains the date and time the domain was created.
*
*
* @return A timestamp that contains the date and time the domain was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* A timestamp that contains the date and time the domain was created.
*
*
* @param createdTime
* A timestamp that contains the date and time the domain was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* The key used to encrypt the domain.
*
*
* @param encryptionKey
* The key used to encrypt the domain.
*/
public void setEncryptionKey(String encryptionKey) {
this.encryptionKey = encryptionKey;
}
/**
*
* The key used to encrypt the domain.
*
*
* @return The key used to encrypt the domain.
*/
public String getEncryptionKey() {
return this.encryptionKey;
}
/**
*
* The key used to encrypt the domain.
*
*
* @param encryptionKey
* The key used to encrypt the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withEncryptionKey(String encryptionKey) {
setEncryptionKey(encryptionKey);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getEncryptionKey() != null)
sb.append("EncryptionKey: ").append(getEncryptionKey());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DomainSummary == false)
return false;
DomainSummary other = (DomainSummary) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getOwner() == null ^ this.getOwner() == null)
return false;
if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getEncryptionKey() == null ^ this.getEncryptionKey() == null)
return false;
if (other.getEncryptionKey() != null && other.getEncryptionKey().equals(this.getEncryptionKey()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getEncryptionKey() == null) ? 0 : getEncryptionKey().hashCode());
return hashCode;
}
@Override
public DomainSummary clone() {
try {
return (DomainSummary) 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.codeartifact.model.transform.DomainSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}