/* * 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.location.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains the geofence geometry details. *
** A geofence geometry is made up of either a polygon or a circle. Can be either a polygon or a circle. Including both * will return a validation error. *
** Amazon Location doesn't currently support polygons with holes, multipolygons, polygons that are wound clockwise, or * that cross the antimeridian. *
** A circle on the earth, as defined by a center point and a radius. *
*/ private Circle circle; /** ** A polygon is a list of linear rings which are each made up of a list of vertices. *
*
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented as an
* array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is
* called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s
* interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles (
* [[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array
* of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices. *
*/ private java.util.List* A circle on the earth, as defined by a center point and a radius. *
* * @param circle * A circle on the earth, as defined by a center point and a radius. */ public void setCircle(Circle circle) { this.circle = circle; } /** ** A circle on the earth, as defined by a center point and a radius. *
* * @return A circle on the earth, as defined by a center point and a radius. */ public Circle getCircle() { return this.circle; } /** ** A circle on the earth, as defined by a center point and a radius. *
* * @param circle * A circle on the earth, as defined by a center point and a radius. * @return Returns a reference to this object so that method calls can be chained together. */ public GeofenceGeometry withCircle(Circle circle) { setCircle(circle); return this; } /** ** A polygon is a list of linear rings which are each made up of a list of vertices. *
*
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented as an
* array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is
* called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s
* interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles (
* [[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array
* of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices. *
* * @return A polygon is a list of linear rings which are each made up of a list of vertices. *
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented
* as an array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary),
* is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the
* ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles
* ([[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes
* an array of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
*/
public java.util.List
* A polygon is a list of linear rings which are each made up of a list of vertices.
*
* Each vertex is a 2-dimensional point of the form:
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is
* called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s
* interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles (
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array
* of linear rings, which is represented as an array of arrays of arrays of doubles (
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
* [longitude, latitude]
. This is represented as an
* array of doubles of length 2 (so [double, double]
).
* [[double, double], ...]
).
* [[[double, double], ...], ...]
).
*
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented
* as an array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary),
* is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the
* ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles
* ([[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an
* array of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
*/
public void setPolygon(java.util.Collection
* A polygon is a list of linear rings which are each made up of a list of vertices.
*
* Each vertex is a 2-dimensional point of the form:
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is
* called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s
* interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles (
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array
* of linear rings, which is represented as an array of arrays of arrays of doubles (
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPolygon(java.util.Collection)} or {@link #withPolygon(java.util.Collection)} if you want to override
* the existing values.
* [longitude, latitude]
. This is represented as an
* array of doubles of length 2 (so [double, double]
).
* [[double, double], ...]
).
* [[[double, double], ...], ...]
).
*
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented
* as an array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary),
* is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the
* ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles
* ([[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an
* array of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GeofenceGeometry withPolygon(java.util.List
* A polygon is a list of linear rings which are each made up of a list of vertices.
*
* Each vertex is a 2-dimensional point of the form:
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is
* called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s
* interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles (
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array
* of linear rings, which is represented as an array of arrays of arrays of doubles (
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
* [longitude, latitude]
. This is represented as an
* array of doubles of length 2 (so [double, double]
).
* [[double, double], ...]
).
* [[[double, double], ...], ...]
).
*
* Each vertex is a 2-dimensional point of the form: [longitude, latitude]
. This is represented
* as an array of doubles of length 2 (so [double, double]
).
*
* An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary),
* is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the
* ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles
* ([[double, double], ...]
).
*
* A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an
* array of linear rings, which is represented as an array of arrays of arrays of doubles (
* [[[double, double], ...], ...]
).
*
* A linear ring for use in geofences can consist of between 4 and 1,000 vertices.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GeofenceGeometry withPolygon(java.util.Collection