com.amazonaws.services.comprehend.model.DocumentClassifierSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-comprehend Show documentation
/*
* 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.comprehend.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes information about a document classifier and its versions.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DocumentClassifierSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name that you assigned the document classifier.
*
*/
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.
*
*/
private String latestVersionName;
/**
*
* Provides the status of the latest document classifier version.
*
*/
private String latestVersionStatus;
/**
*
* The name that you assigned the document classifier.
*
*
* @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.
*
*
* @return The name that you assigned the document classifier.
*/
public String getDocumentClassifierName() {
return this.documentClassifierName;
}
/**
*
* The name that you assigned the document classifier.
*
*
* @param documentClassifierName
* The name that you assigned the document classifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DocumentClassifierSummary withDocumentClassifierName(String documentClassifierName) {
setDocumentClassifierName(documentClassifierName);
return this;
}
/**
*
* 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.
*
*
* @return The number of versions you created.
*/
public Integer getNumberOfVersions() {
return this.numberOfVersions;
}
/**
*
* The number of versions you created.
*
*
* @param numberOfVersions
* The number of versions you created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DocumentClassifierSummary withNumberOfVersions(Integer numberOfVersions) {
setNumberOfVersions(numberOfVersions);
return this;
}
/**
*
* 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.
*
*
* @return The time that the latest document classifier version was submitted for processing.
*/
public java.util.Date getLatestVersionCreatedAt() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DocumentClassifierSummary withLatestVersionCreatedAt(java.util.Date latestVersionCreatedAt) {
setLatestVersionCreatedAt(latestVersionCreatedAt);
return this;
}
/**
*
* The version name you assigned to the latest document classifier version.
*
*
* @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.
*
*
* @return The version name you assigned to the latest document classifier version.
*/
public String getLatestVersionName() {
return this.latestVersionName;
}
/**
*
* The version name you assigned to the latest document classifier version.
*
*
* @param latestVersionName
* The version name you assigned to the latest document classifier version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DocumentClassifierSummary withLatestVersionName(String latestVersionName) {
setLatestVersionName(latestVersionName);
return this;
}
/**
*
* Provides the status of the latest document classifier version.
*
*
* @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.
*
*
* @return Provides the status of the latest document classifier version.
* @see ModelStatus
*/
public String getLatestVersionStatus() {
return this.latestVersionStatus;
}
/**
*
* Provides the status of the latest document classifier version.
*
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ModelStatus
*/
public DocumentClassifierSummary withLatestVersionStatus(String latestVersionStatus) {
setLatestVersionStatus(latestVersionStatus);
return this;
}
/**
*
* Provides the status of the latest document classifier version.
*
*
* @param latestVersionStatus
* Provides the status of the latest document classifier version.
* @return Returns a reference to this 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. 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 (getDocumentClassifierName() != null)
sb.append("DocumentClassifierName: ").append(getDocumentClassifierName()).append(",");
if (getNumberOfVersions() != null)
sb.append("NumberOfVersions: ").append(getNumberOfVersions()).append(",");
if (getLatestVersionCreatedAt() != null)
sb.append("LatestVersionCreatedAt: ").append(getLatestVersionCreatedAt()).append(",");
if (getLatestVersionName() != null)
sb.append("LatestVersionName: ").append(getLatestVersionName()).append(",");
if (getLatestVersionStatus() != null)
sb.append("LatestVersionStatus: ").append(getLatestVersionStatus());
sb.append("}");
return sb.toString();
}
@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;
}
@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 DocumentClassifierSummary clone() {
try {
return (DocumentClassifierSummary) 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.comprehend.model.transform.DocumentClassifierSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}