
com.amazonaws.services.sagemaker.model.TrainingJobSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sagemaker Show documentation
/*
* 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.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides summary information about a training job.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TrainingJobSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the training job that you want a summary for.
*
*/
private String trainingJobName;
/**
*
* The Amazon Resource Name (ARN) of the training job.
*
*/
private String trainingJobArn;
/**
*
* A timestamp that shows when the training job was created.
*
*/
private java.util.Date creationTime;
/**
*
* A timestamp that shows when the training job ended. This field is set only if the training job has one of the
* terminal statuses (Completed
, Failed
, or Stopped
).
*
*/
private java.util.Date trainingEndTime;
/**
*
* Timestamp when the training job was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The status of the training job.
*
*/
private String trainingJobStatus;
/**
*
* The status of the warm pool associated with the training job.
*
*/
private WarmPoolStatus warmPoolStatus;
/**
*
* The name of the training job that you want a summary for.
*
*
* @param trainingJobName
* The name of the training job that you want a summary for.
*/
public void setTrainingJobName(String trainingJobName) {
this.trainingJobName = trainingJobName;
}
/**
*
* The name of the training job that you want a summary for.
*
*
* @return The name of the training job that you want a summary for.
*/
public String getTrainingJobName() {
return this.trainingJobName;
}
/**
*
* The name of the training job that you want a summary for.
*
*
* @param trainingJobName
* The name of the training job that you want a summary for.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withTrainingJobName(String trainingJobName) {
setTrainingJobName(trainingJobName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the training job.
*
*
* @param trainingJobArn
* The Amazon Resource Name (ARN) of the training job.
*/
public void setTrainingJobArn(String trainingJobArn) {
this.trainingJobArn = trainingJobArn;
}
/**
*
* The Amazon Resource Name (ARN) of the training job.
*
*
* @return The Amazon Resource Name (ARN) of the training job.
*/
public String getTrainingJobArn() {
return this.trainingJobArn;
}
/**
*
* The Amazon Resource Name (ARN) of the training job.
*
*
* @param trainingJobArn
* The Amazon Resource Name (ARN) of the training job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withTrainingJobArn(String trainingJobArn) {
setTrainingJobArn(trainingJobArn);
return this;
}
/**
*
* A timestamp that shows when the training job was created.
*
*
* @param creationTime
* A timestamp that shows when the training job was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* A timestamp that shows when the training job was created.
*
*
* @return A timestamp that shows when the training job was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* A timestamp that shows when the training job was created.
*
*
* @param creationTime
* A timestamp that shows when the training job was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* A timestamp that shows when the training job ended. This field is set only if the training job has one of the
* terminal statuses (Completed
, Failed
, or Stopped
).
*
*
* @param trainingEndTime
* A timestamp that shows when the training job ended. This field is set only if the training job has one of
* the terminal statuses (Completed
, Failed
, or Stopped
).
*/
public void setTrainingEndTime(java.util.Date trainingEndTime) {
this.trainingEndTime = trainingEndTime;
}
/**
*
* A timestamp that shows when the training job ended. This field is set only if the training job has one of the
* terminal statuses (Completed
, Failed
, or Stopped
).
*
*
* @return A timestamp that shows when the training job ended. This field is set only if the training job has one of
* the terminal statuses (Completed
, Failed
, or Stopped
).
*/
public java.util.Date getTrainingEndTime() {
return this.trainingEndTime;
}
/**
*
* A timestamp that shows when the training job ended. This field is set only if the training job has one of the
* terminal statuses (Completed
, Failed
, or Stopped
).
*
*
* @param trainingEndTime
* A timestamp that shows when the training job ended. This field is set only if the training job has one of
* the terminal statuses (Completed
, Failed
, or Stopped
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withTrainingEndTime(java.util.Date trainingEndTime) {
setTrainingEndTime(trainingEndTime);
return this;
}
/**
*
* Timestamp when the training job was last modified.
*
*
* @param lastModifiedTime
* Timestamp when the training job was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* Timestamp when the training job was last modified.
*
*
* @return Timestamp when the training job was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* Timestamp when the training job was last modified.
*
*
* @param lastModifiedTime
* Timestamp when the training job was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The status of the training job.
*
*
* @param trainingJobStatus
* The status of the training job.
* @see TrainingJobStatus
*/
public void setTrainingJobStatus(String trainingJobStatus) {
this.trainingJobStatus = trainingJobStatus;
}
/**
*
* The status of the training job.
*
*
* @return The status of the training job.
* @see TrainingJobStatus
*/
public String getTrainingJobStatus() {
return this.trainingJobStatus;
}
/**
*
* The status of the training job.
*
*
* @param trainingJobStatus
* The status of the training job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TrainingJobStatus
*/
public TrainingJobSummary withTrainingJobStatus(String trainingJobStatus) {
setTrainingJobStatus(trainingJobStatus);
return this;
}
/**
*
* The status of the training job.
*
*
* @param trainingJobStatus
* The status of the training job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TrainingJobStatus
*/
public TrainingJobSummary withTrainingJobStatus(TrainingJobStatus trainingJobStatus) {
this.trainingJobStatus = trainingJobStatus.toString();
return this;
}
/**
*
* The status of the warm pool associated with the training job.
*
*
* @param warmPoolStatus
* The status of the warm pool associated with the training job.
*/
public void setWarmPoolStatus(WarmPoolStatus warmPoolStatus) {
this.warmPoolStatus = warmPoolStatus;
}
/**
*
* The status of the warm pool associated with the training job.
*
*
* @return The status of the warm pool associated with the training job.
*/
public WarmPoolStatus getWarmPoolStatus() {
return this.warmPoolStatus;
}
/**
*
* The status of the warm pool associated with the training job.
*
*
* @param warmPoolStatus
* The status of the warm pool associated with the training job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingJobSummary withWarmPoolStatus(WarmPoolStatus warmPoolStatus) {
setWarmPoolStatus(warmPoolStatus);
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 (getTrainingJobName() != null)
sb.append("TrainingJobName: ").append(getTrainingJobName()).append(",");
if (getTrainingJobArn() != null)
sb.append("TrainingJobArn: ").append(getTrainingJobArn()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getTrainingEndTime() != null)
sb.append("TrainingEndTime: ").append(getTrainingEndTime()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getTrainingJobStatus() != null)
sb.append("TrainingJobStatus: ").append(getTrainingJobStatus()).append(",");
if (getWarmPoolStatus() != null)
sb.append("WarmPoolStatus: ").append(getWarmPoolStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TrainingJobSummary == false)
return false;
TrainingJobSummary other = (TrainingJobSummary) obj;
if (other.getTrainingJobName() == null ^ this.getTrainingJobName() == null)
return false;
if (other.getTrainingJobName() != null && other.getTrainingJobName().equals(this.getTrainingJobName()) == false)
return false;
if (other.getTrainingJobArn() == null ^ this.getTrainingJobArn() == null)
return false;
if (other.getTrainingJobArn() != null && other.getTrainingJobArn().equals(this.getTrainingJobArn()) == 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.getTrainingEndTime() == null ^ this.getTrainingEndTime() == null)
return false;
if (other.getTrainingEndTime() != null && other.getTrainingEndTime().equals(this.getTrainingEndTime()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
if (other.getTrainingJobStatus() == null ^ this.getTrainingJobStatus() == null)
return false;
if (other.getTrainingJobStatus() != null && other.getTrainingJobStatus().equals(this.getTrainingJobStatus()) == false)
return false;
if (other.getWarmPoolStatus() == null ^ this.getWarmPoolStatus() == null)
return false;
if (other.getWarmPoolStatus() != null && other.getWarmPoolStatus().equals(this.getWarmPoolStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTrainingJobName() == null) ? 0 : getTrainingJobName().hashCode());
hashCode = prime * hashCode + ((getTrainingJobArn() == null) ? 0 : getTrainingJobArn().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getTrainingEndTime() == null) ? 0 : getTrainingEndTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getTrainingJobStatus() == null) ? 0 : getTrainingJobStatus().hashCode());
hashCode = prime * hashCode + ((getWarmPoolStatus() == null) ? 0 : getWarmPoolStatus().hashCode());
return hashCode;
}
@Override
public TrainingJobSummary clone() {
try {
return (TrainingJobSummary) 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.sagemaker.model.transform.TrainingJobSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}