/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.cognitiveservices.search.visualsearch.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * A JSON object consisting of coordinates specifying the four corners of a
 * cropped rectangle within the input image.
 */
public class CropArea {
    /**
     * The top coordinate of the region to be cropped. The coordinate is a
     * fractional value of the original image's height and is measured from the
     * top edge of the image. Specify the coordinate as a value from 0.0
     * through 1.0.
     */
    @JsonProperty(value = "top", required = true)
    private double top;

    /**
     * The bottom coordinate of the region to be cropped. The coordinate is a
     * fractional value of the original image's height and is measured from the
     * top edge of the image. Specify the coordinate as a value from 0.0
     * through 1.0.
     */
    @JsonProperty(value = "bottom", required = true)
    private double bottom;

    /**
     * The left coordinate of the region to be cropped. The coordinate is a
     * fractional value of the original image's width and is measured from the
     * left edge of the image. Specify the coordinate as a value from 0.0
     * through 1.0.
     */
    @JsonProperty(value = "left", required = true)
    private double left;

    /**
     * The right coordinate of the region to be cropped. The coordinate is a
     * fractional value of the original image's width and is measured from the
     * left edge of the image. Specify the coordinate as a value from 0.0
     * through 1.0.
     */
    @JsonProperty(value = "right", required = true)
    private double right;

    /**
     * Get the top value.
     *
     * @return the top value
     */
    public double top() {
        return this.top;
    }

    /**
     * Set the top value.
     *
     * @param top the top value to set
     * @return the CropArea object itself.
     */
    public CropArea withTop(double top) {
        this.top = top;
        return this;
    }

    /**
     * Get the bottom value.
     *
     * @return the bottom value
     */
    public double bottom() {
        return this.bottom;
    }

    /**
     * Set the bottom value.
     *
     * @param bottom the bottom value to set
     * @return the CropArea object itself.
     */
    public CropArea withBottom(double bottom) {
        this.bottom = bottom;
        return this;
    }

    /**
     * Get the left value.
     *
     * @return the left value
     */
    public double left() {
        return this.left;
    }

    /**
     * Set the left value.
     *
     * @param left the left value to set
     * @return the CropArea object itself.
     */
    public CropArea withLeft(double left) {
        this.left = left;
        return this;
    }

    /**
     * Get the right value.
     *
     * @return the right value
     */
    public double right() {
        return this.right;
    }

    /**
     * Set the right value.
     *
     * @param right the right value to set
     * @return the CropArea object itself.
     */
    public CropArea withRight(double right) {
        this.right = right;
        return this;
    }

}
