/* * 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 where an object (DetectCustomLabels) or text * (DetectText) is located on an image. *
*/ public class Geometry implements Serializable { /** ** An axis-aligned coarse representation of the detected item's location on * the image. *
*/ private BoundingBox boundingBox; /** ** Within the bounding box, a fine-grained polygon around the detected item. *
*/ private java.util.List* An axis-aligned coarse representation of the detected item's location on * the image. *
* * @return* An axis-aligned coarse representation of the detected item's * location on the image. *
*/ public BoundingBox getBoundingBox() { return boundingBox; } /** ** An axis-aligned coarse representation of the detected item's location on * the image. *
* * @param boundingBox* An axis-aligned coarse representation of the detected item's * location on the image. *
*/ public void setBoundingBox(BoundingBox boundingBox) { this.boundingBox = boundingBox; } /** ** An axis-aligned coarse representation of the detected item's location on * the image. *
** Returns a reference to this object so that method calls can be chained * together. * * @param boundingBox
* An axis-aligned coarse representation of the detected item's * location on the image. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Geometry withBoundingBox(BoundingBox boundingBox) { this.boundingBox = boundingBox; return this; } /** ** Within the bounding box, a fine-grained polygon around the detected item. *
* * @return* Within the bounding box, a fine-grained polygon around the * detected item. *
*/ public java.util.List* Within the bounding box, a fine-grained polygon around the detected item. *
* * @param polygon* Within the bounding box, a fine-grained polygon around the * detected item. *
*/ public void setPolygon(java.util.Collection* Within the bounding box, a fine-grained polygon around the detected item. *
** Returns a reference to this object so that method calls can be chained * together. * * @param polygon
* Within the bounding box, a fine-grained polygon around the * detected item. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Geometry withPolygon(Point... polygon) { if (getPolygon() == null) { this.polygon = new java.util.ArrayList* Within the bounding box, a fine-grained polygon around the detected item. *
** Returns a reference to this object so that method calls can be chained * together. * * @param polygon
* Within the bounding box, a fine-grained polygon around the * detected item. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Geometry withPolygon(java.util.Collection