/* * 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; /** *
* Information about a body part detected by DetectProtectiveEquipment
* that contains PPE. An array of ProtectiveEquipmentBodyPart
* objects is returned for each person detected by
* DetectProtectiveEquipment
.
*
* The detected body part. *
*
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*/
private String name;
/**
*
* The confidence that Amazon Rekognition has in the detection accuracy of * the detected body part. *
*
* Constraints:
* Length: 0.0 - 100.0
*/
private Float confidence;
/**
*
* An array of Personal Protective Equipment items detected around a body * part. *
*/ private java.util.List* The detected body part. *
*
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*
* @return
* The detected body part. *
* @see BodyPart */ public String getName() { return name; } /** ** The detected body part. *
*
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*
* @param name
* The detected body part. *
* @see BodyPart */ public void setName(String name) { this.name = name; } /** ** The detected body part. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*
* @param name
* The detected body part. *
* @return A reference to this updated object so that method calls can be * chained together. * @see BodyPart */ public ProtectiveEquipmentBodyPart withName(String name) { this.name = name; return this; } /** ** The detected body part. *
*
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*
* @param name
* The detected body part. *
* @see BodyPart */ public void setName(BodyPart name) { this.name = name.toString(); } /** ** The detected body part. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: FACE, HEAD, LEFT_HAND, RIGHT_HAND
*
* @param name
* The detected body part. *
* @return A reference to this updated object so that method calls can be * chained together. * @see BodyPart */ public ProtectiveEquipmentBodyPart withName(BodyPart name) { this.name = name.toString(); return this; } /** ** The confidence that Amazon Rekognition has in the detection accuracy of * the detected body part. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @return
* The confidence that Amazon Rekognition has in the detection * accuracy of the detected body part. *
*/ public Float getConfidence() { return confidence; } /** ** The confidence that Amazon Rekognition has in the detection accuracy of * the detected body part. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @param confidence
* The confidence that Amazon Rekognition has in the detection * accuracy of the detected body part. *
*/ public void setConfidence(Float confidence) { this.confidence = confidence; } /** ** The confidence that Amazon Rekognition has in the detection accuracy of * the detected body part. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0.0 - 100.0
*
* @param confidence
* The confidence that Amazon Rekognition has in the detection * accuracy of the detected body part. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ProtectiveEquipmentBodyPart withConfidence(Float confidence) { this.confidence = confidence; return this; } /** ** An array of Personal Protective Equipment items detected around a body * part. *
* * @return* An array of Personal Protective Equipment items detected around a * body part. *
*/ public java.util.List* An array of Personal Protective Equipment items detected around a body * part. *
* * @param equipmentDetections* An array of Personal Protective Equipment items detected * around a body part. *
*/ public void setEquipmentDetections(java.util.Collection* An array of Personal Protective Equipment items detected around a body * part. *
** Returns a reference to this object so that method calls can be chained * together. * * @param equipmentDetections
* An array of Personal Protective Equipment items detected * around a body part. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ProtectiveEquipmentBodyPart withEquipmentDetections( EquipmentDetection... equipmentDetections) { if (getEquipmentDetections() == null) { this.equipmentDetections = new java.util.ArrayList* An array of Personal Protective Equipment items detected around a body * part. *
** Returns a reference to this object so that method calls can be chained * together. * * @param equipmentDetections
* An array of Personal Protective Equipment items detected * around a body part. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ProtectiveEquipmentBodyPart withEquipmentDetections( java.util.Collection