/* * 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.omics.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetRunTaskResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The task's ID. *

*/ private String taskId; /** *

* The task's status. *

*/ private String status; /** *

* The task's name. *

*/ private String name; /** *

* The task's CPU usage. *

*/ private Integer cpus; /** *

* The task's memory use in gigabytes. *

*/ private Integer memory; /** *

* When the task was created. *

*/ private java.util.Date creationTime; /** *

* The task's start time. *

*/ private java.util.Date startTime; /** *

* The task's stop time. *

*/ private java.util.Date stopTime; /** *

* The task's status message. *

*/ private String statusMessage; /** *

* The task's log stream. *

*/ private String logStream; /** *

* The number of Graphics Processing Units (GPU) specified in the task. *

*/ private Integer gpus; /** *

* The task's ID. *

* * @param taskId * The task's ID. */ public void setTaskId(String taskId) { this.taskId = taskId; } /** *

* The task's ID. *

* * @return The task's ID. */ public String getTaskId() { return this.taskId; } /** *

* The task's ID. *

* * @param taskId * The task's ID. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withTaskId(String taskId) { setTaskId(taskId); return this; } /** *

* The task's status. *

* * @param status * The task's status. * @see TaskStatus */ public void setStatus(String status) { this.status = status; } /** *

* The task's status. *

* * @return The task's status. * @see TaskStatus */ public String getStatus() { return this.status; } /** *

* The task's status. *

* * @param status * The task's status. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatus */ public GetRunTaskResult withStatus(String status) { setStatus(status); return this; } /** *

* The task's status. *

* * @param status * The task's status. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatus */ public GetRunTaskResult withStatus(TaskStatus status) { this.status = status.toString(); return this; } /** *

* The task's name. *

* * @param name * The task's name. */ public void setName(String name) { this.name = name; } /** *

* The task's name. *

* * @return The task's name. */ public String getName() { return this.name; } /** *

* The task's name. *

* * @param name * The task's name. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withName(String name) { setName(name); return this; } /** *

* The task's CPU usage. *

* * @param cpus * The task's CPU usage. */ public void setCpus(Integer cpus) { this.cpus = cpus; } /** *

* The task's CPU usage. *

* * @return The task's CPU usage. */ public Integer getCpus() { return this.cpus; } /** *

* The task's CPU usage. *

* * @param cpus * The task's CPU usage. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withCpus(Integer cpus) { setCpus(cpus); return this; } /** *

* The task's memory use in gigabytes. *

* * @param memory * The task's memory use in gigabytes. */ public void setMemory(Integer memory) { this.memory = memory; } /** *

* The task's memory use in gigabytes. *

* * @return The task's memory use in gigabytes. */ public Integer getMemory() { return this.memory; } /** *

* The task's memory use in gigabytes. *

* * @param memory * The task's memory use in gigabytes. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withMemory(Integer memory) { setMemory(memory); return this; } /** *

* When the task was created. *

* * @param creationTime * When the task was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* When the task was created. *

* * @return When the task was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* When the task was created. *

* * @param creationTime * When the task was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The task's start time. *

* * @param startTime * The task's start time. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The task's start time. *

* * @return The task's start time. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The task's start time. *

* * @param startTime * The task's start time. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The task's stop time. *

* * @param stopTime * The task's stop time. */ public void setStopTime(java.util.Date stopTime) { this.stopTime = stopTime; } /** *

* The task's stop time. *

* * @return The task's stop time. */ public java.util.Date getStopTime() { return this.stopTime; } /** *

* The task's stop time. *

* * @param stopTime * The task's stop time. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withStopTime(java.util.Date stopTime) { setStopTime(stopTime); return this; } /** *

* The task's status message. *

* * @param statusMessage * The task's status message. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* The task's status message. *

* * @return The task's status message. */ public String getStatusMessage() { return this.statusMessage; } /** *

* The task's status message. *

* * @param statusMessage * The task's status message. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

* The task's log stream. *

* * @param logStream * The task's log stream. */ public void setLogStream(String logStream) { this.logStream = logStream; } /** *

* The task's log stream. *

* * @return The task's log stream. */ public String getLogStream() { return this.logStream; } /** *

* The task's log stream. *

* * @param logStream * The task's log stream. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withLogStream(String logStream) { setLogStream(logStream); return this; } /** *

* The number of Graphics Processing Units (GPU) specified in the task. *

* * @param gpus * The number of Graphics Processing Units (GPU) specified in the task. */ public void setGpus(Integer gpus) { this.gpus = gpus; } /** *

* The number of Graphics Processing Units (GPU) specified in the task. *

* * @return The number of Graphics Processing Units (GPU) specified in the task. */ public Integer getGpus() { return this.gpus; } /** *

* The number of Graphics Processing Units (GPU) specified in the task. *

* * @param gpus * The number of Graphics Processing Units (GPU) specified in the task. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunTaskResult withGpus(Integer gpus) { setGpus(gpus); 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 (getTaskId() != null) sb.append("TaskId: ").append(getTaskId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getCpus() != null) sb.append("Cpus: ").append(getCpus()).append(","); if (getMemory() != null) sb.append("Memory: ").append(getMemory()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getStopTime() != null) sb.append("StopTime: ").append(getStopTime()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getLogStream() != null) sb.append("LogStream: ").append(getLogStream()).append(","); if (getGpus() != null) sb.append("Gpus: ").append(getGpus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetRunTaskResult == false) return false; GetRunTaskResult other = (GetRunTaskResult) obj; if (other.getTaskId() == null ^ this.getTaskId() == null) return false; if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getCpus() == null ^ this.getCpus() == null) return false; if (other.getCpus() != null && other.getCpus().equals(this.getCpus()) == false) return false; if (other.getMemory() == null ^ this.getMemory() == null) return false; if (other.getMemory() != null && other.getMemory().equals(this.getMemory()) == 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.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getStopTime() == null ^ this.getStopTime() == null) return false; if (other.getStopTime() != null && other.getStopTime().equals(this.getStopTime()) == 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.getLogStream() == null ^ this.getLogStream() == null) return false; if (other.getLogStream() != null && other.getLogStream().equals(this.getLogStream()) == false) return false; if (other.getGpus() == null ^ this.getGpus() == null) return false; if (other.getGpus() != null && other.getGpus().equals(this.getGpus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getCpus() == null) ? 0 : getCpus().hashCode()); hashCode = prime * hashCode + ((getMemory() == null) ? 0 : getMemory().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getStopTime() == null) ? 0 : getStopTime().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getLogStream() == null) ? 0 : getLogStream().hashCode()); hashCode = prime * hashCode + ((getGpus() == null) ? 0 : getGpus().hashCode()); return hashCode; } @Override public GetRunTaskResult clone() { try { return (GetRunTaskResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }