/* * 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.rekognition.model; import java.io.Serializable; /** *
* Provides statistics about a dataset. For more information, see * DescribeDataset. *
*/ public class DatasetStats implements Serializable { /** ** The total number of images in the dataset that have labels. *
*
* Constraints:
* Range: 0 -
*/
private Integer labeledEntries;
/**
*
* The total number of images in the dataset. *
*
* Constraints:
* Range: 0 -
*/
private Integer totalEntries;
/**
*
* The total number of labels declared in the dataset. *
*
* Constraints:
* Range: 0 -
*/
private Integer totalLabels;
/**
*
* The total number of entries that contain at least one error. *
*
* Constraints:
* Range: 0 -
*/
private Integer errorEntries;
/**
*
* The total number of images in the dataset that have labels. *
*
* Constraints:
* Range: 0 -
*
* @return
* The total number of images in the dataset that have labels. *
*/ public Integer getLabeledEntries() { return labeledEntries; } /** ** The total number of images in the dataset that have labels. *
*
* Constraints:
* Range: 0 -
*
* @param labeledEntries
* The total number of images in the dataset that have labels. *
*/ public void setLabeledEntries(Integer labeledEntries) { this.labeledEntries = labeledEntries; } /** ** The total number of images in the dataset that have labels. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param labeledEntries
* The total number of images in the dataset that have labels. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetStats withLabeledEntries(Integer labeledEntries) { this.labeledEntries = labeledEntries; return this; } /** ** The total number of images in the dataset. *
*
* Constraints:
* Range: 0 -
*
* @return
* The total number of images in the dataset. *
*/ public Integer getTotalEntries() { return totalEntries; } /** ** The total number of images in the dataset. *
*
* Constraints:
* Range: 0 -
*
* @param totalEntries
* The total number of images in the dataset. *
*/ public void setTotalEntries(Integer totalEntries) { this.totalEntries = totalEntries; } /** ** The total number of images in the dataset. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param totalEntries
* The total number of images in the dataset. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetStats withTotalEntries(Integer totalEntries) { this.totalEntries = totalEntries; return this; } /** ** The total number of labels declared in the dataset. *
*
* Constraints:
* Range: 0 -
*
* @return
* The total number of labels declared in the dataset. *
*/ public Integer getTotalLabels() { return totalLabels; } /** ** The total number of labels declared in the dataset. *
*
* Constraints:
* Range: 0 -
*
* @param totalLabels
* The total number of labels declared in the dataset. *
*/ public void setTotalLabels(Integer totalLabels) { this.totalLabels = totalLabels; } /** ** The total number of labels declared in the dataset. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param totalLabels
* The total number of labels declared in the dataset. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetStats withTotalLabels(Integer totalLabels) { this.totalLabels = totalLabels; return this; } /** ** The total number of entries that contain at least one error. *
*
* Constraints:
* Range: 0 -
*
* @return
* The total number of entries that contain at least one error. *
*/ public Integer getErrorEntries() { return errorEntries; } /** ** The total number of entries that contain at least one error. *
*
* Constraints:
* Range: 0 -
*
* @param errorEntries
* The total number of entries that contain at least one error. *
*/ public void setErrorEntries(Integer errorEntries) { this.errorEntries = errorEntries; } /** ** The total number of entries that contain at least one error. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param errorEntries
* The total number of entries that contain at least one error. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetStats withErrorEntries(Integer errorEntries) { this.errorEntries = errorEntries; 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 (getLabeledEntries() != null) sb.append("LabeledEntries: " + getLabeledEntries() + ","); if (getTotalEntries() != null) sb.append("TotalEntries: " + getTotalEntries() + ","); if (getTotalLabels() != null) sb.append("TotalLabels: " + getTotalLabels() + ","); if (getErrorEntries() != null) sb.append("ErrorEntries: " + getErrorEntries()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLabeledEntries() == null) ? 0 : getLabeledEntries().hashCode()); hashCode = prime * hashCode + ((getTotalEntries() == null) ? 0 : getTotalEntries().hashCode()); hashCode = prime * hashCode + ((getTotalLabels() == null) ? 0 : getTotalLabels().hashCode()); hashCode = prime * hashCode + ((getErrorEntries() == null) ? 0 : getErrorEntries().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatasetStats == false) return false; DatasetStats other = (DatasetStats) obj; if (other.getLabeledEntries() == null ^ this.getLabeledEntries() == null) return false; if (other.getLabeledEntries() != null && other.getLabeledEntries().equals(this.getLabeledEntries()) == false) return false; if (other.getTotalEntries() == null ^ this.getTotalEntries() == null) return false; if (other.getTotalEntries() != null && other.getTotalEntries().equals(this.getTotalEntries()) == false) return false; if (other.getTotalLabels() == null ^ this.getTotalLabels() == null) return false; if (other.getTotalLabels() != null && other.getTotalLabels().equals(this.getTotalLabels()) == false) return false; if (other.getErrorEntries() == null ^ this.getErrorEntries() == null) return false; if (other.getErrorEntries() != null && other.getErrorEntries().equals(this.getErrorEntries()) == false) return false; return true; } }