/* * 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; /** *
* Contains a subset of the possible runtime environment attributes. Used in the environment list. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EnvironmentSummary implements Serializable, Cloneable, StructuredPojo { /** ** The timestamp when the runtime environment was created. *
*/ private java.util.Date creationTime; /** ** The target platform for the runtime environment. *
*/ private String engineType; /** ** The version of the runtime engine. *
*/ private String engineVersion; /** ** The Amazon Resource Name (ARN) of a particular runtime environment. *
*/ private String environmentArn; /** ** The unique identifier of a particular runtime environment. *
*/ private String environmentId; /** ** The instance type of the runtime environment. *
*/ private String instanceType; /** ** The name of the runtime environment. *
*/ private String name; /** ** The status of the runtime environment *
*/ private String status; /** ** The timestamp when the runtime environment was created. *
* * @param creationTime * The timestamp when the runtime environment was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** The timestamp when the runtime environment was created. *
* * @return The timestamp when the runtime environment was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** The timestamp when the runtime environment was created. *
* * @param creationTime * The timestamp when the runtime environment was created. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** The target platform for the runtime environment. *
* * @param engineType * The target platform for the runtime environment. * @see EngineType */ public void setEngineType(String engineType) { this.engineType = engineType; } /** ** The target platform for the runtime environment. *
* * @return The target platform for the runtime environment. * @see EngineType */ public String getEngineType() { return this.engineType; } /** ** The target platform for the runtime environment. *
* * @param engineType * The target platform for the runtime environment. * @return Returns a reference to this object so that method calls can be chained together. * @see EngineType */ public EnvironmentSummary withEngineType(String engineType) { setEngineType(engineType); return this; } /** ** The target platform for the runtime environment. *
* * @param engineType * The target platform for the runtime environment. * @return Returns a reference to this object so that method calls can be chained together. * @see EngineType */ public EnvironmentSummary withEngineType(EngineType engineType) { this.engineType = engineType.toString(); return this; } /** ** The version of the runtime engine. *
* * @param engineVersion * The version of the runtime engine. */ public void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } /** ** The version of the runtime engine. *
* * @return The version of the runtime engine. */ public String getEngineVersion() { return this.engineVersion; } /** ** The version of the runtime engine. *
* * @param engineVersion * The version of the runtime engine. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withEngineVersion(String engineVersion) { setEngineVersion(engineVersion); return this; } /** ** The Amazon Resource Name (ARN) of a particular runtime environment. *
* * @param environmentArn * The Amazon Resource Name (ARN) of a particular runtime environment. */ public void setEnvironmentArn(String environmentArn) { this.environmentArn = environmentArn; } /** ** The Amazon Resource Name (ARN) of a particular runtime environment. *
* * @return The Amazon Resource Name (ARN) of a particular runtime environment. */ public String getEnvironmentArn() { return this.environmentArn; } /** ** The Amazon Resource Name (ARN) of a particular runtime environment. *
* * @param environmentArn * The Amazon Resource Name (ARN) of a particular runtime environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withEnvironmentArn(String environmentArn) { setEnvironmentArn(environmentArn); return this; } /** ** The unique identifier of a particular runtime environment. *
* * @param environmentId * The unique identifier of a particular runtime environment. */ public void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } /** ** The unique identifier of a particular runtime environment. *
* * @return The unique identifier of a particular runtime environment. */ public String getEnvironmentId() { return this.environmentId; } /** ** The unique identifier of a particular runtime environment. *
* * @param environmentId * The unique identifier of a particular runtime environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withEnvironmentId(String environmentId) { setEnvironmentId(environmentId); return this; } /** ** The instance type of the runtime environment. *
* * @param instanceType * The instance type of the runtime environment. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The instance type of the runtime environment. *
* * @return The instance type of the runtime environment. */ public String getInstanceType() { return this.instanceType; } /** ** The instance type of the runtime environment. *
* * @param instanceType * The instance type of the runtime environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The name of the runtime environment. *
* * @param name * The name of the runtime environment. */ public void setName(String name) { this.name = name; } /** ** The name of the runtime environment. *
* * @return The name of the runtime environment. */ public String getName() { return this.name; } /** ** The name of the runtime environment. *
* * @param name * The name of the runtime environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentSummary withName(String name) { setName(name); return this; } /** ** The status of the runtime environment *
* * @param status * The status of the runtime environment * @see EnvironmentLifecycle */ public void setStatus(String status) { this.status = status; } /** ** The status of the runtime environment *
* * @return The status of the runtime environment * @see EnvironmentLifecycle */ public String getStatus() { return this.status; } /** ** The status of the runtime environment *
* * @param status * The status of the runtime environment * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentLifecycle */ public EnvironmentSummary withStatus(String status) { setStatus(status); return this; } /** ** The status of the runtime environment *
* * @param status * The status of the runtime environment * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentLifecycle */ public EnvironmentSummary withStatus(EnvironmentLifecycle status) { this.status = status.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 (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getEngineType() != null) sb.append("EngineType: ").append(getEngineType()).append(","); if (getEngineVersion() != null) sb.append("EngineVersion: ").append(getEngineVersion()).append(","); if (getEnvironmentArn() != null) sb.append("EnvironmentArn: ").append(getEnvironmentArn()).append(","); if (getEnvironmentId() != null) sb.append("EnvironmentId: ").append(getEnvironmentId()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EnvironmentSummary == false) return false; EnvironmentSummary other = (EnvironmentSummary) obj; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getEngineType() == null ^ this.getEngineType() == null) return false; if (other.getEngineType() != null && other.getEngineType().equals(this.getEngineType()) == false) return false; if (other.getEngineVersion() == null ^ this.getEngineVersion() == null) return false; if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false) return false; if (other.getEnvironmentArn() == null ^ this.getEnvironmentArn() == null) return false; if (other.getEnvironmentArn() != null && other.getEnvironmentArn().equals(this.getEnvironmentArn()) == false) return false; if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == null) return false; if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getEngineType() == null) ? 0 : getEngineType().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); hashCode = prime * hashCode + ((getEnvironmentArn() == null) ? 0 : getEnvironmentArn().hashCode()); hashCode = prime * hashCode + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public EnvironmentSummary clone() { try { return (EnvironmentSummary) 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.EnvironmentSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }