
com.amazonaws.services.proton.model.ServiceTemplateVersionSummary Maven / Gradle / Ivy
/*
* 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.proton.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Summary data of an Proton service template version resource.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ServiceTemplateVersionSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the version of a service template.
*
*/
private String arn;
/**
*
* The time when the version of a service template was created.
*
*/
private java.util.Date createdAt;
/**
*
* A description of the version of a service template.
*
*/
private String description;
/**
*
* The time when the version of a service template was last modified.
*
*/
private java.util.Date lastModifiedAt;
/**
*
* The latest major version that's associated with the version of a service template.
*
*/
private String majorVersion;
/**
*
* The minor version of a service template.
*
*/
private String minorVersion;
/**
*
* The recommended minor version of the service template.
*
*/
private String recommendedMinorVersion;
/**
*
* The service template minor version status.
*
*/
private String status;
/**
*
* A service template minor version status message.
*
*/
private String statusMessage;
/**
*
* The name of the service template.
*
*/
private String templateName;
/**
*
* The Amazon Resource Name (ARN) of the version of a service template.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the version of a service template.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the version of a service template.
*
*
* @return The Amazon Resource Name (ARN) of the version of a service template.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the version of a service template.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the version of a service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The time when the version of a service template was created.
*
*
* @param createdAt
* The time when the version of a service template was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The time when the version of a service template was created.
*
*
* @return The time when the version of a service template was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The time when the version of a service template was created.
*
*
* @param createdAt
* The time when the version of a service template was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* A description of the version of a service template.
*
*
* @param description
* A description of the version of a service template.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the version of a service template.
*
*
* @return A description of the version of a service template.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the version of a service template.
*
*
* @param description
* A description of the version of a service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The time when the version of a service template was last modified.
*
*
* @param lastModifiedAt
* The time when the version of a service template was last modified.
*/
public void setLastModifiedAt(java.util.Date lastModifiedAt) {
this.lastModifiedAt = lastModifiedAt;
}
/**
*
* The time when the version of a service template was last modified.
*
*
* @return The time when the version of a service template was last modified.
*/
public java.util.Date getLastModifiedAt() {
return this.lastModifiedAt;
}
/**
*
* The time when the version of a service template was last modified.
*
*
* @param lastModifiedAt
* The time when the version of a service template was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withLastModifiedAt(java.util.Date lastModifiedAt) {
setLastModifiedAt(lastModifiedAt);
return this;
}
/**
*
* The latest major version that's associated with the version of a service template.
*
*
* @param majorVersion
* The latest major version that's associated with the version of a service template.
*/
public void setMajorVersion(String majorVersion) {
this.majorVersion = majorVersion;
}
/**
*
* The latest major version that's associated with the version of a service template.
*
*
* @return The latest major version that's associated with the version of a service template.
*/
public String getMajorVersion() {
return this.majorVersion;
}
/**
*
* The latest major version that's associated with the version of a service template.
*
*
* @param majorVersion
* The latest major version that's associated with the version of a service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withMajorVersion(String majorVersion) {
setMajorVersion(majorVersion);
return this;
}
/**
*
* The minor version of a service template.
*
*
* @param minorVersion
* The minor version of a service template.
*/
public void setMinorVersion(String minorVersion) {
this.minorVersion = minorVersion;
}
/**
*
* The minor version of a service template.
*
*
* @return The minor version of a service template.
*/
public String getMinorVersion() {
return this.minorVersion;
}
/**
*
* The minor version of a service template.
*
*
* @param minorVersion
* The minor version of a service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withMinorVersion(String minorVersion) {
setMinorVersion(minorVersion);
return this;
}
/**
*
* The recommended minor version of the service template.
*
*
* @param recommendedMinorVersion
* The recommended minor version of the service template.
*/
public void setRecommendedMinorVersion(String recommendedMinorVersion) {
this.recommendedMinorVersion = recommendedMinorVersion;
}
/**
*
* The recommended minor version of the service template.
*
*
* @return The recommended minor version of the service template.
*/
public String getRecommendedMinorVersion() {
return this.recommendedMinorVersion;
}
/**
*
* The recommended minor version of the service template.
*
*
* @param recommendedMinorVersion
* The recommended minor version of the service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withRecommendedMinorVersion(String recommendedMinorVersion) {
setRecommendedMinorVersion(recommendedMinorVersion);
return this;
}
/**
*
* The service template minor version status.
*
*
* @param status
* The service template minor version status.
* @see TemplateVersionStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The service template minor version status.
*
*
* @return The service template minor version status.
* @see TemplateVersionStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The service template minor version status.
*
*
* @param status
* The service template minor version status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TemplateVersionStatus
*/
public ServiceTemplateVersionSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The service template minor version status.
*
*
* @param status
* The service template minor version status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TemplateVersionStatus
*/
public ServiceTemplateVersionSummary withStatus(TemplateVersionStatus status) {
this.status = status.toString();
return this;
}
/**
*
* A service template minor version status message.
*
*
* @param statusMessage
* A service template minor version status message.
*/
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
/**
*
* A service template minor version status message.
*
*
* @return A service template minor version status message.
*/
public String getStatusMessage() {
return this.statusMessage;
}
/**
*
* A service template minor version status message.
*
*
* @param statusMessage
* A service template minor version status message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withStatusMessage(String statusMessage) {
setStatusMessage(statusMessage);
return this;
}
/**
*
* The name of the service template.
*
*
* @param templateName
* The name of the service template.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* The name of the service template.
*
*
* @return The name of the service template.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* The name of the service template.
*
*
* @param templateName
* The name of the service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceTemplateVersionSummary withTemplateName(String templateName) {
setTemplateName(templateName);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getLastModifiedAt() != null)
sb.append("LastModifiedAt: ").append(getLastModifiedAt()).append(",");
if (getMajorVersion() != null)
sb.append("MajorVersion: ").append(getMajorVersion()).append(",");
if (getMinorVersion() != null)
sb.append("MinorVersion: ").append(getMinorVersion()).append(",");
if (getRecommendedMinorVersion() != null)
sb.append("RecommendedMinorVersion: ").append(getRecommendedMinorVersion()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getStatusMessage() != null)
sb.append("StatusMessage: ").append("***Sensitive Data Redacted***").append(",");
if (getTemplateName() != null)
sb.append("TemplateName: ").append(getTemplateName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ServiceTemplateVersionSummary == false)
return false;
ServiceTemplateVersionSummary other = (ServiceTemplateVersionSummary) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getLastModifiedAt() == null ^ this.getLastModifiedAt() == null)
return false;
if (other.getLastModifiedAt() != null && other.getLastModifiedAt().equals(this.getLastModifiedAt()) == false)
return false;
if (other.getMajorVersion() == null ^ this.getMajorVersion() == null)
return false;
if (other.getMajorVersion() != null && other.getMajorVersion().equals(this.getMajorVersion()) == false)
return false;
if (other.getMinorVersion() == null ^ this.getMinorVersion() == null)
return false;
if (other.getMinorVersion() != null && other.getMinorVersion().equals(this.getMinorVersion()) == false)
return false;
if (other.getRecommendedMinorVersion() == null ^ this.getRecommendedMinorVersion() == null)
return false;
if (other.getRecommendedMinorVersion() != null && other.getRecommendedMinorVersion().equals(this.getRecommendedMinorVersion()) == 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.getStatusMessage() == null ^ this.getStatusMessage() == null)
return false;
if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false)
return false;
if (other.getTemplateName() == null ^ this.getTemplateName() == null)
return false;
if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getLastModifiedAt() == null) ? 0 : getLastModifiedAt().hashCode());
hashCode = prime * hashCode + ((getMajorVersion() == null) ? 0 : getMajorVersion().hashCode());
hashCode = prime * hashCode + ((getMinorVersion() == null) ? 0 : getMinorVersion().hashCode());
hashCode = prime * hashCode + ((getRecommendedMinorVersion() == null) ? 0 : getRecommendedMinorVersion().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode());
hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode());
return hashCode;
}
@Override
public ServiceTemplateVersionSummary clone() {
try {
return (ServiceTemplateVersionSummary) 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.proton.model.transform.ServiceTemplateVersionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}