/**
 * 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.vision.computervision.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Text extracted from a page in the input document.
 */
public class ReadResult {
    /**
     * The 1-based page number of the recognition result.
     */
    @JsonProperty(value = "page", required = true)
    private int page;

    /**
     * The BCP-47 language code of the recognized text page.
     */
    @JsonProperty(value = "language")
    private String language;

    /**
     * The orientation of the image in degrees in the clockwise direction.
     * Range between [-180, 180).
     */
    @JsonProperty(value = "angle", required = true)
    private double angle;

    /**
     * The width of the image in pixels or the PDF in inches.
     */
    @JsonProperty(value = "width", required = true)
    private double width;

    /**
     * The height of the image in pixels or the PDF in inches.
     */
    @JsonProperty(value = "height", required = true)
    private double height;

    /**
     * The unit used in the Width, Height and BoundingBox. For images, the unit
     * is 'pixel'. For PDF, the unit is 'inch'. Possible values include:
     * 'pixel', 'inch'.
     */
    @JsonProperty(value = "unit", required = true)
    private TextRecognitionResultDimensionUnit unit;

    /**
     * A list of recognized text lines.
     */
    @JsonProperty(value = "lines", required = true)
    private List<Line> lines;

    /**
     * Get the page value.
     *
     * @return the page value
     */
    public int page() {
        return this.page;
    }

    /**
     * Set the page value.
     *
     * @param page the page value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withPage(int page) {
        this.page = page;
        return this;
    }

    /**
     * Get the language value.
     *
     * @return the language value
     */
    public String language() {
        return this.language;
    }

    /**
     * Set the language value.
     *
     * @param language the language value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withLanguage(String language) {
        this.language = language;
        return this;
    }

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

    /**
     * Set the angle value.
     *
     * @param angle the angle value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withAngle(double angle) {
        this.angle = angle;
        return this;
    }

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

    /**
     * Set the width value.
     *
     * @param width the width value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withWidth(double width) {
        this.width = width;
        return this;
    }

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

    /**
     * Set the height value.
     *
     * @param height the height value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withHeight(double height) {
        this.height = height;
        return this;
    }

    /**
     * Get the unit value.
     *
     * @return the unit value
     */
    public TextRecognitionResultDimensionUnit unit() {
        return this.unit;
    }

    /**
     * Set the unit value.
     *
     * @param unit the unit value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withUnit(TextRecognitionResultDimensionUnit unit) {
        this.unit = unit;
        return this;
    }

    /**
     * Get the lines value.
     *
     * @return the lines value
     */
    public List<Line> lines() {
        return this.lines;
    }

    /**
     * Set the lines value.
     *
     * @param lines the lines value to set
     * @return the ReadResult object itself.
     */
    public ReadResult withLines(List<Line> lines) {
        this.lines = lines;
        return this;
    }

}
