/* * Copyright 2018-2023 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.mainframemodernization.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Defines an application version summary. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ApplicationVersionSummary implements Serializable, Cloneable, StructuredPojo { /** ** The application version. *
*/ private Integer applicationVersion; /** ** The timestamp when the application version was created. *
*/ private java.util.Date creationTime; /** ** The status of the application. *
*/ private String status; /** ** The reason for the reported status. *
*/ private String statusReason; /** ** The application version. *
* * @param applicationVersion * The application version. */ public void setApplicationVersion(Integer applicationVersion) { this.applicationVersion = applicationVersion; } /** ** The application version. *
* * @return The application version. */ public Integer getApplicationVersion() { return this.applicationVersion; } /** ** The application version. *
* * @param applicationVersion * The application version. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationVersionSummary withApplicationVersion(Integer applicationVersion) { setApplicationVersion(applicationVersion); return this; } /** ** The timestamp when the application version was created. *
* * @param creationTime * The timestamp when the application version was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** The timestamp when the application version was created. *
* * @return The timestamp when the application version was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** The timestamp when the application version was created. *
* * @param creationTime * The timestamp when the application version was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationVersionSummary withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** The status of the application. *
* * @param status * The status of the application. * @see ApplicationVersionLifecycle */ public void setStatus(String status) { this.status = status; } /** ** The status of the application. *
* * @return The status of the application. * @see ApplicationVersionLifecycle */ public String getStatus() { return this.status; } /** ** The status of the application. *
* * @param status * The status of the application. * @return Returns a reference to this object so that method calls can be chained together. * @see ApplicationVersionLifecycle */ public ApplicationVersionSummary withStatus(String status) { setStatus(status); return this; } /** ** The status of the application. *
* * @param status * The status of the application. * @return Returns a reference to this object so that method calls can be chained together. * @see ApplicationVersionLifecycle */ public ApplicationVersionSummary withStatus(ApplicationVersionLifecycle status) { this.status = status.toString(); return this; } /** ** The reason for the reported status. *
* * @param statusReason * The reason for the reported status. */ public void setStatusReason(String statusReason) { this.statusReason = statusReason; } /** ** The reason for the reported status. *
* * @return The reason for the reported status. */ public String getStatusReason() { return this.statusReason; } /** ** The reason for the reported status. *
* * @param statusReason * The reason for the reported status. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationVersionSummary withStatusReason(String statusReason) { setStatusReason(statusReason); 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 (getApplicationVersion() != null) sb.append("ApplicationVersion: ").append(getApplicationVersion()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusReason() != null) sb.append("StatusReason: ").append(getStatusReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationVersionSummary == false) return false; ApplicationVersionSummary other = (ApplicationVersionSummary) obj; if (other.getApplicationVersion() == null ^ this.getApplicationVersion() == null) return false; if (other.getApplicationVersion() != null && other.getApplicationVersion().equals(this.getApplicationVersion()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == 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.getStatusReason() == null ^ this.getStatusReason() == null) return false; if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationVersion() == null) ? 0 : getApplicationVersion().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode()); return hashCode; } @Override public ApplicationVersionSummary clone() { try { return (ApplicationVersionSummary) 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.mainframemodernization.model.transform.ApplicationVersionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }