/* * 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; /** *
* Structure containing details about the detected label, including the name, * detected instances, parent labels, and level of confidence. *
**
*/ public class Label implements Serializable { /** ** The name (label) of the object or scene. *
*/ private String name; /** ** Level of confidence. *
*
* Constraints:
* Length: 0.0 - 100.0
*/
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. *
* * @return* The name (label) of the object or scene. *
*/ public String getName() { return name; } /** ** 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param name
* The name (label) of the object or scene. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withName(String name) { this.name = name; return this; } /** ** Level of confidence. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @return
* Level of confidence. *
*/ public Float getConfidence() { return confidence; } /** ** Level of confidence. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @param confidence
* Level of confidence. *
*/ public void setConfidence(Float confidence) { this.confidence = confidence; } /** ** Level of confidence. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0.0 - 100.0
*
* @param confidence
* Level of confidence. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withConfidence(Float confidence) { this.confidence = 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param instances
* 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.
*
* 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.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param instances
* 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. *
* * @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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param parents
* The parent labels for a label. The response includes all * ancestor labels. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withParents(Parent... parents) { if (getParents() == null) { this.parents = new java.util.ArrayList* The parent labels for a label. The response includes all ancestor labels. *
** Returns a reference to this object so that method calls can be chained * together. * * @param parents
* The parent labels for a label. The response includes all * ancestor labels. *
* @return A reference to this updated 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param aliases
* A list of potential aliases for a given label. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withAliases(LabelAlias... aliases) { if (getAliases() == null) { this.aliases = new java.util.ArrayList* A list of potential aliases for a given label. *
** Returns a reference to this object so that method calls can be chained * together. * * @param aliases
* A list of potential aliases for a given label. *
* @return A reference to this updated 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param categories
* A list of the categories associated with a given label. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withCategories(LabelCategory... categories) { if (getCategories() == null) { this.categories = new java.util.ArrayList* A list of the categories associated with a given label. *
** Returns a reference to this object so that method calls can be chained * together. * * @param categories
* A list of the categories associated with a given label. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Label withCategories(java.util.Collection