/* * Copyright 2010-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.comprehend.model; import java.io.Serializable; /** *
* Describes information about a document classifier and its versions. *
*/ public class DocumentClassifierSummary implements Serializable { /** ** The name that you assigned the document classifier. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*/
private String documentClassifierName;
/**
*
* The number of versions you created. *
*/ private Integer numberOfVersions; /** ** The time that the latest document classifier version was submitted for * processing. *
*/ private java.util.Date latestVersionCreatedAt; /** ** The version name you assigned to the latest document classifier version. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*/
private String latestVersionName;
/**
*
* Provides the status of the latest document classifier version. *
*
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*/
private String latestVersionStatus;
/**
*
* The name that you assigned the document classifier. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @return
* The name that you assigned the document classifier. *
*/ public String getDocumentClassifierName() { return documentClassifierName; } /** ** The name that you assigned the document classifier. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param documentClassifierName
* The name that you assigned the document classifier. *
*/ public void setDocumentClassifierName(String documentClassifierName) { this.documentClassifierName = documentClassifierName; } /** ** The name that you assigned the document classifier. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param documentClassifierName
* The name that you assigned the document classifier. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DocumentClassifierSummary withDocumentClassifierName(String documentClassifierName) { this.documentClassifierName = documentClassifierName; return this; } /** ** The number of versions you created. *
* * @return* The number of versions you created. *
*/ public Integer getNumberOfVersions() { return numberOfVersions; } /** ** The number of versions you created. *
* * @param numberOfVersions* The number of versions you created. *
*/ public void setNumberOfVersions(Integer numberOfVersions) { this.numberOfVersions = numberOfVersions; } /** ** The number of versions you created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param numberOfVersions
* The number of versions you created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DocumentClassifierSummary withNumberOfVersions(Integer numberOfVersions) { this.numberOfVersions = numberOfVersions; return this; } /** ** The time that the latest document classifier version was submitted for * processing. *
* * @return* The time that the latest document classifier version was * submitted for processing. *
*/ public java.util.Date getLatestVersionCreatedAt() { return latestVersionCreatedAt; } /** ** The time that the latest document classifier version was submitted for * processing. *
* * @param latestVersionCreatedAt* The time that the latest document classifier version was * submitted for processing. *
*/ public void setLatestVersionCreatedAt(java.util.Date latestVersionCreatedAt) { this.latestVersionCreatedAt = latestVersionCreatedAt; } /** ** The time that the latest document classifier version was submitted for * processing. *
** Returns a reference to this object so that method calls can be chained * together. * * @param latestVersionCreatedAt
* The time that the latest document classifier version was * submitted for processing. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DocumentClassifierSummary withLatestVersionCreatedAt( java.util.Date latestVersionCreatedAt) { this.latestVersionCreatedAt = latestVersionCreatedAt; return this; } /** ** The version name you assigned to the latest document classifier version. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @return
* The version name you assigned to the latest document classifier * version. *
*/ public String getLatestVersionName() { return latestVersionName; } /** ** The version name you assigned to the latest document classifier version. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param latestVersionName
* The version name you assigned to the latest document * classifier version. *
*/ public void setLatestVersionName(String latestVersionName) { this.latestVersionName = latestVersionName; } /** ** The version name you assigned to the latest document classifier version. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param latestVersionName
* The version name you assigned to the latest document * classifier version. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DocumentClassifierSummary withLatestVersionName(String latestVersionName) { this.latestVersionName = latestVersionName; return this; } /** ** Provides the status of the latest document classifier version. *
*
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*
* @return
* Provides the status of the latest document classifier version. *
* @see ModelStatus */ public String getLatestVersionStatus() { return latestVersionStatus; } /** ** Provides the status of the latest document classifier version. *
*
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version. *
* @see ModelStatus */ public void setLatestVersionStatus(String latestVersionStatus) { this.latestVersionStatus = latestVersionStatus; } /** ** Provides the status of the latest document classifier version. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ModelStatus */ public DocumentClassifierSummary withLatestVersionStatus(String latestVersionStatus) { this.latestVersionStatus = latestVersionStatus; return this; } /** ** Provides the status of the latest document classifier version. *
*
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version. *
* @see ModelStatus */ public void setLatestVersionStatus(ModelStatus latestVersionStatus) { this.latestVersionStatus = latestVersionStatus.toString(); } /** ** Provides the status of the latest document classifier version. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SUBMITTED, TRAINING, DELETING, STOP_REQUESTED,
* STOPPED, IN_ERROR, TRAINED, TRAINED_WITH_WARNING
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ModelStatus */ public DocumentClassifierSummary withLatestVersionStatus(ModelStatus latestVersionStatus) { this.latestVersionStatus = latestVersionStatus.toString(); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDocumentClassifierName() != null) sb.append("DocumentClassifierName: " + getDocumentClassifierName() + ","); if (getNumberOfVersions() != null) sb.append("NumberOfVersions: " + getNumberOfVersions() + ","); if (getLatestVersionCreatedAt() != null) sb.append("LatestVersionCreatedAt: " + getLatestVersionCreatedAt() + ","); if (getLatestVersionName() != null) sb.append("LatestVersionName: " + getLatestVersionName() + ","); if (getLatestVersionStatus() != null) sb.append("LatestVersionStatus: " + getLatestVersionStatus()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDocumentClassifierName() == null) ? 0 : getDocumentClassifierName() .hashCode()); hashCode = prime * hashCode + ((getNumberOfVersions() == null) ? 0 : getNumberOfVersions().hashCode()); hashCode = prime * hashCode + ((getLatestVersionCreatedAt() == null) ? 0 : getLatestVersionCreatedAt() .hashCode()); hashCode = prime * hashCode + ((getLatestVersionName() == null) ? 0 : getLatestVersionName().hashCode()); hashCode = prime * hashCode + ((getLatestVersionStatus() == null) ? 0 : getLatestVersionStatus().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DocumentClassifierSummary == false) return false; DocumentClassifierSummary other = (DocumentClassifierSummary) obj; if (other.getDocumentClassifierName() == null ^ this.getDocumentClassifierName() == null) return false; if (other.getDocumentClassifierName() != null && other.getDocumentClassifierName().equals(this.getDocumentClassifierName()) == false) return false; if (other.getNumberOfVersions() == null ^ this.getNumberOfVersions() == null) return false; if (other.getNumberOfVersions() != null && other.getNumberOfVersions().equals(this.getNumberOfVersions()) == false) return false; if (other.getLatestVersionCreatedAt() == null ^ this.getLatestVersionCreatedAt() == null) return false; if (other.getLatestVersionCreatedAt() != null && other.getLatestVersionCreatedAt().equals(this.getLatestVersionCreatedAt()) == false) return false; if (other.getLatestVersionName() == null ^ this.getLatestVersionName() == null) return false; if (other.getLatestVersionName() != null && other.getLatestVersionName().equals(this.getLatestVersionName()) == false) return false; if (other.getLatestVersionStatus() == null ^ this.getLatestVersionStatus() == null) return false; if (other.getLatestVersionStatus() != null && other.getLatestVersionStatus().equals(this.getLatestVersionStatus()) == false) return false; return true; } }