/* * 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.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provides a summary about an AutoML job. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutoMLJobSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the AutoML job you are requesting. *

*/ private String autoMLJobName; /** *

* The ARN of the AutoML job. *

*/ private String autoMLJobArn; /** *

* The status of the AutoML job. *

*/ private String autoMLJobStatus; /** *

* The secondary status of the AutoML job. *

*/ private String autoMLJobSecondaryStatus; /** *

* When the AutoML job was created. *

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

* The end time of an AutoML job. *

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

* When the AutoML job was last modified. *

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

* The failure reason of an AutoML job. *

*/ private String failureReason; /** *

* The list of reasons for partial failures within an AutoML job. *

*/ private java.util.List partialFailureReasons; /** *

* The name of the AutoML job you are requesting. *

* * @param autoMLJobName * The name of the AutoML job you are requesting. */ public void setAutoMLJobName(String autoMLJobName) { this.autoMLJobName = autoMLJobName; } /** *

* The name of the AutoML job you are requesting. *

* * @return The name of the AutoML job you are requesting. */ public String getAutoMLJobName() { return this.autoMLJobName; } /** *

* The name of the AutoML job you are requesting. *

* * @param autoMLJobName * The name of the AutoML job you are requesting. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withAutoMLJobName(String autoMLJobName) { setAutoMLJobName(autoMLJobName); return this; } /** *

* The ARN of the AutoML job. *

* * @param autoMLJobArn * The ARN of the AutoML job. */ public void setAutoMLJobArn(String autoMLJobArn) { this.autoMLJobArn = autoMLJobArn; } /** *

* The ARN of the AutoML job. *

* * @return The ARN of the AutoML job. */ public String getAutoMLJobArn() { return this.autoMLJobArn; } /** *

* The ARN of the AutoML job. *

* * @param autoMLJobArn * The ARN of the AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withAutoMLJobArn(String autoMLJobArn) { setAutoMLJobArn(autoMLJobArn); return this; } /** *

* The status of the AutoML job. *

* * @param autoMLJobStatus * The status of the AutoML job. * @see AutoMLJobStatus */ public void setAutoMLJobStatus(String autoMLJobStatus) { this.autoMLJobStatus = autoMLJobStatus; } /** *

* The status of the AutoML job. *

* * @return The status of the AutoML job. * @see AutoMLJobStatus */ public String getAutoMLJobStatus() { return this.autoMLJobStatus; } /** *

* The status of the AutoML job. *

* * @param autoMLJobStatus * The status of the AutoML job. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMLJobStatus */ public AutoMLJobSummary withAutoMLJobStatus(String autoMLJobStatus) { setAutoMLJobStatus(autoMLJobStatus); return this; } /** *

* The status of the AutoML job. *

* * @param autoMLJobStatus * The status of the AutoML job. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMLJobStatus */ public AutoMLJobSummary withAutoMLJobStatus(AutoMLJobStatus autoMLJobStatus) { this.autoMLJobStatus = autoMLJobStatus.toString(); return this; } /** *

* The secondary status of the AutoML job. *

* * @param autoMLJobSecondaryStatus * The secondary status of the AutoML job. * @see AutoMLJobSecondaryStatus */ public void setAutoMLJobSecondaryStatus(String autoMLJobSecondaryStatus) { this.autoMLJobSecondaryStatus = autoMLJobSecondaryStatus; } /** *

* The secondary status of the AutoML job. *

* * @return The secondary status of the AutoML job. * @see AutoMLJobSecondaryStatus */ public String getAutoMLJobSecondaryStatus() { return this.autoMLJobSecondaryStatus; } /** *

* The secondary status of the AutoML job. *

* * @param autoMLJobSecondaryStatus * The secondary status of the AutoML job. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMLJobSecondaryStatus */ public AutoMLJobSummary withAutoMLJobSecondaryStatus(String autoMLJobSecondaryStatus) { setAutoMLJobSecondaryStatus(autoMLJobSecondaryStatus); return this; } /** *

* The secondary status of the AutoML job. *

* * @param autoMLJobSecondaryStatus * The secondary status of the AutoML job. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMLJobSecondaryStatus */ public AutoMLJobSummary withAutoMLJobSecondaryStatus(AutoMLJobSecondaryStatus autoMLJobSecondaryStatus) { this.autoMLJobSecondaryStatus = autoMLJobSecondaryStatus.toString(); return this; } /** *

* When the AutoML job was created. *

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

* When the AutoML job was created. *

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

* When the AutoML job was created. *

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

* The end time of an AutoML job. *

* * @param endTime * The end time of an AutoML job. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The end time of an AutoML job. *

* * @return The end time of an AutoML job. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The end time of an AutoML job. *

* * @param endTime * The end time of an AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* When the AutoML job was last modified. *

* * @param lastModifiedTime * When the AutoML job was last modified. */ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** *

* When the AutoML job was last modified. *

* * @return When the AutoML job was last modified. */ public java.util.Date getLastModifiedTime() { return this.lastModifiedTime; } /** *

* When the AutoML job was last modified. *

* * @param lastModifiedTime * When the AutoML job was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withLastModifiedTime(java.util.Date lastModifiedTime) { setLastModifiedTime(lastModifiedTime); return this; } /** *

* The failure reason of an AutoML job. *

* * @param failureReason * The failure reason of an AutoML job. */ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** *

* The failure reason of an AutoML job. *

* * @return The failure reason of an AutoML job. */ public String getFailureReason() { return this.failureReason; } /** *

* The failure reason of an AutoML job. *

* * @param failureReason * The failure reason of an AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withFailureReason(String failureReason) { setFailureReason(failureReason); return this; } /** *

* The list of reasons for partial failures within an AutoML job. *

* * @return The list of reasons for partial failures within an AutoML job. */ public java.util.List getPartialFailureReasons() { return partialFailureReasons; } /** *

* The list of reasons for partial failures within an AutoML job. *

* * @param partialFailureReasons * The list of reasons for partial failures within an AutoML job. */ public void setPartialFailureReasons(java.util.Collection partialFailureReasons) { if (partialFailureReasons == null) { this.partialFailureReasons = null; return; } this.partialFailureReasons = new java.util.ArrayList(partialFailureReasons); } /** *

* The list of reasons for partial failures within an AutoML job. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPartialFailureReasons(java.util.Collection)} or * {@link #withPartialFailureReasons(java.util.Collection)} if you want to override the existing values. *

* * @param partialFailureReasons * The list of reasons for partial failures within an AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withPartialFailureReasons(AutoMLPartialFailureReason... partialFailureReasons) { if (this.partialFailureReasons == null) { setPartialFailureReasons(new java.util.ArrayList(partialFailureReasons.length)); } for (AutoMLPartialFailureReason ele : partialFailureReasons) { this.partialFailureReasons.add(ele); } return this; } /** *

* The list of reasons for partial failures within an AutoML job. *

* * @param partialFailureReasons * The list of reasons for partial failures within an AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLJobSummary withPartialFailureReasons(java.util.Collection partialFailureReasons) { setPartialFailureReasons(partialFailureReasons); 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 (getAutoMLJobName() != null) sb.append("AutoMLJobName: ").append(getAutoMLJobName()).append(","); if (getAutoMLJobArn() != null) sb.append("AutoMLJobArn: ").append(getAutoMLJobArn()).append(","); if (getAutoMLJobStatus() != null) sb.append("AutoMLJobStatus: ").append(getAutoMLJobStatus()).append(","); if (getAutoMLJobSecondaryStatus() != null) sb.append("AutoMLJobSecondaryStatus: ").append(getAutoMLJobSecondaryStatus()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getLastModifiedTime() != null) sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()).append(","); if (getPartialFailureReasons() != null) sb.append("PartialFailureReasons: ").append(getPartialFailureReasons()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AutoMLJobSummary == false) return false; AutoMLJobSummary other = (AutoMLJobSummary) obj; if (other.getAutoMLJobName() == null ^ this.getAutoMLJobName() == null) return false; if (other.getAutoMLJobName() != null && other.getAutoMLJobName().equals(this.getAutoMLJobName()) == false) return false; if (other.getAutoMLJobArn() == null ^ this.getAutoMLJobArn() == null) return false; if (other.getAutoMLJobArn() != null && other.getAutoMLJobArn().equals(this.getAutoMLJobArn()) == false) return false; if (other.getAutoMLJobStatus() == null ^ this.getAutoMLJobStatus() == null) return false; if (other.getAutoMLJobStatus() != null && other.getAutoMLJobStatus().equals(this.getAutoMLJobStatus()) == false) return false; if (other.getAutoMLJobSecondaryStatus() == null ^ this.getAutoMLJobSecondaryStatus() == null) return false; if (other.getAutoMLJobSecondaryStatus() != null && other.getAutoMLJobSecondaryStatus().equals(this.getAutoMLJobSecondaryStatus()) == 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.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == 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.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; if (other.getPartialFailureReasons() == null ^ this.getPartialFailureReasons() == null) return false; if (other.getPartialFailureReasons() != null && other.getPartialFailureReasons().equals(this.getPartialFailureReasons()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoMLJobName() == null) ? 0 : getAutoMLJobName().hashCode()); hashCode = prime * hashCode + ((getAutoMLJobArn() == null) ? 0 : getAutoMLJobArn().hashCode()); hashCode = prime * hashCode + ((getAutoMLJobStatus() == null) ? 0 : getAutoMLJobStatus().hashCode()); hashCode = prime * hashCode + ((getAutoMLJobSecondaryStatus() == null) ? 0 : getAutoMLJobSecondaryStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); hashCode = prime * hashCode + ((getPartialFailureReasons() == null) ? 0 : getPartialFailureReasons().hashCode()); return hashCode; } @Override public AutoMLJobSummary clone() { try { return (AutoMLJobSummary) 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.AutoMLJobSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }