// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.maps.search.implementation.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.models.GeoObject;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Polygon model. */
@Fluent
public final class Polygon {
    /*
     * ID of the returned entity
     */
    @JsonProperty(value = "providerID", access = JsonProperty.Access.WRITE_ONLY)
    private String providerID;

    /*
     * Geometry data in GeoJSON format. Please refer to [RFC
     * 7946](https://tools.ietf.org/html/rfc7946) for details. Present only if
     * "error" is not present.
     */
    @JsonProperty(value = "geometryData")
    private GeoJsonObject geometryData;

    /**
     * Get the providerID property: ID of the returned entity.
     *
     * @return the providerID value.
     */
    public String getProviderId() {
        return this.providerID;
    }

    /**
     * Get the geometryData property: Geometry data in GeoJSON format. Please refer to [RFC
     * 7946](https://tools.ietf.org/html/rfc7946) for details. Present only if "error" is not present.
     *
     * @return the geometryData value.
     */
    public GeoObject getGeometry() {
        GeoJsonObject returnValue = this.geometryData;
        return com.azure.maps.search.implementation.helpers.Utility.toGeoObject(returnValue);
    }
}
