com.amazonaws.services.worklink.model.DomainSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-worklink 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.worklink.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The summary of the domain.
*
*
* @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 domainName;
/**
*
* The name to display.
*
*/
private String displayName;
/**
*
* The time that the domain was created.
*
*/
private java.util.Date createdTime;
/**
*
* The status of the domain.
*
*/
private String domainStatus;
/**
*
* The name of the domain.
*
*
* @param domainName
* The name of the domain.
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* The name of the domain.
*
*
* @return The name of the domain.
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* The name of the domain.
*
*
* @param domainName
* The name of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
*
* The name to display.
*
*
* @param displayName
* The name to display.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The name to display.
*
*
* @return The name to display.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The name to display.
*
*
* @param displayName
* The name to display.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainSummary withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* The time that the domain was created.
*
*
* @param createdTime
* The time that the domain was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* The time that the domain was created.
*
*
* @return The time that the domain was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* The time that the domain was created.
*
*
* @param createdTime
* The time that 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 status of the domain.
*
*
* @param domainStatus
* The status of the domain.
* @see DomainStatus
*/
public void setDomainStatus(String domainStatus) {
this.domainStatus = domainStatus;
}
/**
*
* The status of the domain.
*
*
* @return The status of the domain.
* @see DomainStatus
*/
public String getDomainStatus() {
return this.domainStatus;
}
/**
*
* The status of the domain.
*
*
* @param domainStatus
* The status of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainSummary withDomainStatus(String domainStatus) {
setDomainStatus(domainStatus);
return this;
}
/**
*
* The status of the domain.
*
*
* @param domainStatus
* The status of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainSummary withDomainStatus(DomainStatus domainStatus) {
this.domainStatus = domainStatus.toString();
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 (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getDomainStatus() != null)
sb.append("DomainStatus: ").append(getDomainStatus());
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.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == 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.getDomainStatus() == null ^ this.getDomainStatus() == null)
return false;
if (other.getDomainStatus() != null && other.getDomainStatus().equals(this.getDomainStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getDomainStatus() == null) ? 0 : getDomainStatus().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.worklink.model.transform.DomainSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}