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

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Describes a closed polygon configuration. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type")
@JsonTypeName("#Microsoft.VideoAnalyzer.NamedPolygonString")
@Fluent
public final class NamedPolygonString extends NamedPolygonBase {
    /*
     * Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9,
     * 0.8],[0.7, 0.6]]'. Each point is expressed as [LEFT, TOP] coordinate
     * ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame
     * corner and [1, 1] is the bottom-right frame corner.
     */
    @JsonProperty(value = "polygon", required = true)
    private String polygon;

    /**
     * Creates an instance of NamedPolygonString class.
     *
     * @param name the name value to set.
     * @param polygon the polygon value to set.
     */
    @JsonCreator
    public NamedPolygonString(
            @JsonProperty(value = "name", required = true) String name,
            @JsonProperty(value = "polygon", required = true) String polygon) {
        super(name);
        this.polygon = polygon;
    }

    /**
     * Get the polygon property: Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, 0.8],[0.7, 0.6]]'. Each
     * point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame
     * corner and [1, 1] is the bottom-right frame corner.
     *
     * @return the polygon value.
     */
    public String getPolygon() {
        return this.polygon;
    }
}
