/* * 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.rekognition.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Structure containing details about the detected label, including the name, detected instances, parent labels, and * level of confidence. *
**
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Label implements Serializable, Cloneable, StructuredPojo { /** ** The name (label) of the object or scene. *
*/ private String name; /** ** Level of confidence. *
*/ private Float confidence; /** *
* If Label
represents an object, Instances
contains the bounding boxes for each instance
* of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture,
* apparel or pets.
*
* The parent labels for a label. The response includes all ancestor labels. *
*/ private java.util.List* A list of potential aliases for a given label. *
*/ private java.util.List* A list of the categories associated with a given label. *
*/ private java.util.List* The name (label) of the object or scene. *
* * @param name * The name (label) of the object or scene. */ public void setName(String name) { this.name = name; } /** ** The name (label) of the object or scene. *
* * @return The name (label) of the object or scene. */ public String getName() { return this.name; } /** ** The name (label) of the object or scene. *
* * @param name * The name (label) of the object or scene. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withName(String name) { setName(name); return this; } /** ** Level of confidence. *
* * @param confidence * Level of confidence. */ public void setConfidence(Float confidence) { this.confidence = confidence; } /** ** Level of confidence. *
* * @return Level of confidence. */ public Float getConfidence() { return this.confidence; } /** ** Level of confidence. *
* * @param confidence * Level of confidence. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withConfidence(Float confidence) { setConfidence(confidence); return this; } /** *
* If Label
represents an object, Instances
contains the bounding boxes for each instance
* of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture,
* apparel or pets.
*
Label
represents an object, Instances
contains the bounding boxes for each
* instance of the detected object. Bounding boxes are returned for common object labels such as people,
* cars, furniture, apparel or pets.
*/
public java.util.List
* If Label
represents an object, Instances
contains the bounding boxes for each instance
* of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture,
* apparel or pets.
*
Label
represents an object, Instances
contains the bounding boxes for each
* instance of the detected object. Bounding boxes are returned for common object labels such as people,
* cars, furniture, apparel or pets.
*/
public void setInstances(java.util.Collection
* If Label
represents an object, Instances
contains the bounding boxes for each instance
* of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture,
* apparel or pets.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. *
* * @param instances * IfLabel
represents an object, Instances
contains the bounding boxes for each
* instance of the detected object. Bounding boxes are returned for common object labels such as people,
* cars, furniture, apparel or pets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Label withInstances(Instance... instances) {
if (this.instances == null) {
setInstances(new java.util.ArrayList
* If Label
represents an object, Instances
contains the bounding boxes for each instance
* of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture,
* apparel or pets.
*
Label
represents an object, Instances
contains the bounding boxes for each
* instance of the detected object. Bounding boxes are returned for common object labels such as people,
* cars, furniture, apparel or pets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Label withInstances(java.util.Collection* The parent labels for a label. The response includes all ancestor labels. *
* * @return The parent labels for a label. The response includes all ancestor labels. */ public java.util.List* The parent labels for a label. The response includes all ancestor labels. *
* * @param parents * The parent labels for a label. The response includes all ancestor labels. */ public void setParents(java.util.Collection* The parent labels for a label. The response includes all ancestor labels. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setParents(java.util.Collection)} or {@link #withParents(java.util.Collection)} if you want to override * the existing values. *
* * @param parents * The parent labels for a label. The response includes all ancestor labels. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withParents(Parent... parents) { if (this.parents == null) { setParents(new java.util.ArrayList* The parent labels for a label. The response includes all ancestor labels. *
* * @param parents * The parent labels for a label. The response includes all ancestor labels. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withParents(java.util.Collection* A list of potential aliases for a given label. *
* * @return A list of potential aliases for a given label. */ public java.util.List* A list of potential aliases for a given label. *
* * @param aliases * A list of potential aliases for a given label. */ public void setAliases(java.util.Collection* A list of potential aliases for a given label. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAliases(java.util.Collection)} or {@link #withAliases(java.util.Collection)} if you want to override * the existing values. *
* * @param aliases * A list of potential aliases for a given label. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withAliases(LabelAlias... aliases) { if (this.aliases == null) { setAliases(new java.util.ArrayList* A list of potential aliases for a given label. *
* * @param aliases * A list of potential aliases for a given label. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withAliases(java.util.Collection* A list of the categories associated with a given label. *
* * @return A list of the categories associated with a given label. */ public java.util.List* A list of the categories associated with a given label. *
* * @param categories * A list of the categories associated with a given label. */ public void setCategories(java.util.Collection* A list of the categories associated with a given label. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to * override the existing values. *
* * @param categories * A list of the categories associated with a given label. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withCategories(LabelCategory... categories) { if (this.categories == null) { setCategories(new java.util.ArrayList* A list of the categories associated with a given label. *
* * @param categories * A list of the categories associated with a given label. * @return Returns a reference to this object so that method calls can be chained together. */ public Label withCategories(java.util.Collection