/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The sampling parameters that are associated with the machine learning transform. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TaskRun implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier for the transform. *
*/ private String transformId; /** ** The unique identifier for this task run. *
*/ private String taskRunId; /** ** The current status of the requested task run. *
*/ private String status; /** ** The names of the log group for secure logging, associated with this task run. *
*/ private String logGroupName; /** ** Specifies configuration properties associated with this task run. *
*/ private TaskRunProperties properties; /** ** The list of error strings associated with this task run. *
*/ private String errorString; /** ** The date and time that this task run started. *
*/ private java.util.Date startedOn; /** ** The last point in time that the requested task run was updated. *
*/ private java.util.Date lastModifiedOn; /** ** The last point in time that the requested task run was completed. *
*/ private java.util.Date completedOn; /** ** The amount of time (in seconds) that the task run consumed resources. *
*/ private Integer executionTime; /** ** The unique identifier for the transform. *
* * @param transformId * The unique identifier for the transform. */ public void setTransformId(String transformId) { this.transformId = transformId; } /** ** The unique identifier for the transform. *
* * @return The unique identifier for the transform. */ public String getTransformId() { return this.transformId; } /** ** The unique identifier for the transform. *
* * @param transformId * The unique identifier for the transform. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withTransformId(String transformId) { setTransformId(transformId); return this; } /** ** The unique identifier for this task run. *
* * @param taskRunId * The unique identifier for this task run. */ public void setTaskRunId(String taskRunId) { this.taskRunId = taskRunId; } /** ** The unique identifier for this task run. *
* * @return The unique identifier for this task run. */ public String getTaskRunId() { return this.taskRunId; } /** ** The unique identifier for this task run. *
* * @param taskRunId * The unique identifier for this task run. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withTaskRunId(String taskRunId) { setTaskRunId(taskRunId); return this; } /** ** The current status of the requested task run. *
* * @param status * The current status of the requested task run. * @see TaskStatusType */ public void setStatus(String status) { this.status = status; } /** ** The current status of the requested task run. *
* * @return The current status of the requested task run. * @see TaskStatusType */ public String getStatus() { return this.status; } /** ** The current status of the requested task run. *
* * @param status * The current status of the requested task run. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatusType */ public TaskRun withStatus(String status) { setStatus(status); return this; } /** ** The current status of the requested task run. *
* * @param status * The current status of the requested task run. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatusType */ public TaskRun withStatus(TaskStatusType status) { this.status = status.toString(); return this; } /** ** The names of the log group for secure logging, associated with this task run. *
* * @param logGroupName * The names of the log group for secure logging, associated with this task run. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** ** The names of the log group for secure logging, associated with this task run. *
* * @return The names of the log group for secure logging, associated with this task run. */ public String getLogGroupName() { return this.logGroupName; } /** ** The names of the log group for secure logging, associated with this task run. *
* * @param logGroupName * The names of the log group for secure logging, associated with this task run. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** ** Specifies configuration properties associated with this task run. *
* * @param properties * Specifies configuration properties associated with this task run. */ public void setProperties(TaskRunProperties properties) { this.properties = properties; } /** ** Specifies configuration properties associated with this task run. *
* * @return Specifies configuration properties associated with this task run. */ public TaskRunProperties getProperties() { return this.properties; } /** ** Specifies configuration properties associated with this task run. *
* * @param properties * Specifies configuration properties associated with this task run. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withProperties(TaskRunProperties properties) { setProperties(properties); return this; } /** ** The list of error strings associated with this task run. *
* * @param errorString * The list of error strings associated with this task run. */ public void setErrorString(String errorString) { this.errorString = errorString; } /** ** The list of error strings associated with this task run. *
* * @return The list of error strings associated with this task run. */ public String getErrorString() { return this.errorString; } /** ** The list of error strings associated with this task run. *
* * @param errorString * The list of error strings associated with this task run. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withErrorString(String errorString) { setErrorString(errorString); return this; } /** ** The date and time that this task run started. *
* * @param startedOn * The date and time that this task run started. */ public void setStartedOn(java.util.Date startedOn) { this.startedOn = startedOn; } /** ** The date and time that this task run started. *
* * @return The date and time that this task run started. */ public java.util.Date getStartedOn() { return this.startedOn; } /** ** The date and time that this task run started. *
* * @param startedOn * The date and time that this task run started. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withStartedOn(java.util.Date startedOn) { setStartedOn(startedOn); return this; } /** ** The last point in time that the requested task run was updated. *
* * @param lastModifiedOn * The last point in time that the requested task run was updated. */ public void setLastModifiedOn(java.util.Date lastModifiedOn) { this.lastModifiedOn = lastModifiedOn; } /** ** The last point in time that the requested task run was updated. *
* * @return The last point in time that the requested task run was updated. */ public java.util.Date getLastModifiedOn() { return this.lastModifiedOn; } /** ** The last point in time that the requested task run was updated. *
* * @param lastModifiedOn * The last point in time that the requested task run was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withLastModifiedOn(java.util.Date lastModifiedOn) { setLastModifiedOn(lastModifiedOn); return this; } /** ** The last point in time that the requested task run was completed. *
* * @param completedOn * The last point in time that the requested task run was completed. */ public void setCompletedOn(java.util.Date completedOn) { this.completedOn = completedOn; } /** ** The last point in time that the requested task run was completed. *
* * @return The last point in time that the requested task run was completed. */ public java.util.Date getCompletedOn() { return this.completedOn; } /** ** The last point in time that the requested task run was completed. *
* * @param completedOn * The last point in time that the requested task run was completed. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withCompletedOn(java.util.Date completedOn) { setCompletedOn(completedOn); return this; } /** ** The amount of time (in seconds) that the task run consumed resources. *
* * @param executionTime * The amount of time (in seconds) that the task run consumed resources. */ public void setExecutionTime(Integer executionTime) { this.executionTime = executionTime; } /** ** The amount of time (in seconds) that the task run consumed resources. *
* * @return The amount of time (in seconds) that the task run consumed resources. */ public Integer getExecutionTime() { return this.executionTime; } /** ** The amount of time (in seconds) that the task run consumed resources. *
* * @param executionTime * The amount of time (in seconds) that the task run consumed resources. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskRun withExecutionTime(Integer executionTime) { setExecutionTime(executionTime); 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 (getTransformId() != null) sb.append("TransformId: ").append(getTransformId()).append(","); if (getTaskRunId() != null) sb.append("TaskRunId: ").append(getTaskRunId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getLogGroupName() != null) sb.append("LogGroupName: ").append(getLogGroupName()).append(","); if (getProperties() != null) sb.append("Properties: ").append(getProperties()).append(","); if (getErrorString() != null) sb.append("ErrorString: ").append(getErrorString()).append(","); if (getStartedOn() != null) sb.append("StartedOn: ").append(getStartedOn()).append(","); if (getLastModifiedOn() != null) sb.append("LastModifiedOn: ").append(getLastModifiedOn()).append(","); if (getCompletedOn() != null) sb.append("CompletedOn: ").append(getCompletedOn()).append(","); if (getExecutionTime() != null) sb.append("ExecutionTime: ").append(getExecutionTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TaskRun == false) return false; TaskRun other = (TaskRun) obj; if (other.getTransformId() == null ^ this.getTransformId() == null) return false; if (other.getTransformId() != null && other.getTransformId().equals(this.getTransformId()) == false) return false; if (other.getTaskRunId() == null ^ this.getTaskRunId() == null) return false; if (other.getTaskRunId() != null && other.getTaskRunId().equals(this.getTaskRunId()) == 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.getLogGroupName() == null ^ this.getLogGroupName() == null) return false; if (other.getLogGroupName() != null && other.getLogGroupName().equals(this.getLogGroupName()) == false) return false; if (other.getProperties() == null ^ this.getProperties() == null) return false; if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == false) return false; if (other.getErrorString() == null ^ this.getErrorString() == null) return false; if (other.getErrorString() != null && other.getErrorString().equals(this.getErrorString()) == false) return false; if (other.getStartedOn() == null ^ this.getStartedOn() == null) return false; if (other.getStartedOn() != null && other.getStartedOn().equals(this.getStartedOn()) == false) return false; if (other.getLastModifiedOn() == null ^ this.getLastModifiedOn() == null) return false; if (other.getLastModifiedOn() != null && other.getLastModifiedOn().equals(this.getLastModifiedOn()) == false) return false; if (other.getCompletedOn() == null ^ this.getCompletedOn() == null) return false; if (other.getCompletedOn() != null && other.getCompletedOn().equals(this.getCompletedOn()) == false) return false; if (other.getExecutionTime() == null ^ this.getExecutionTime() == null) return false; if (other.getExecutionTime() != null && other.getExecutionTime().equals(this.getExecutionTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTransformId() == null) ? 0 : getTransformId().hashCode()); hashCode = prime * hashCode + ((getTaskRunId() == null) ? 0 : getTaskRunId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getLogGroupName() == null) ? 0 : getLogGroupName().hashCode()); hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode()); hashCode = prime * hashCode + ((getErrorString() == null) ? 0 : getErrorString().hashCode()); hashCode = prime * hashCode + ((getStartedOn() == null) ? 0 : getStartedOn().hashCode()); hashCode = prime * hashCode + ((getLastModifiedOn() == null) ? 0 : getLastModifiedOn().hashCode()); hashCode = prime * hashCode + ((getCompletedOn() == null) ? 0 : getCompletedOn().hashCode()); hashCode = prime * hashCode + ((getExecutionTime() == null) ? 0 : getExecutionTime().hashCode()); return hashCode; } @Override public TaskRun clone() { try { return (TaskRun) 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.glue.model.transform.TaskRunMarshaller.getInstance().marshall(this, protocolMarshaller); } }