/**
 * 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.language.textanalytics.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The MatchRecord model.
 */
public class MatchRecord {
    /**
     * Entity text as appears in the request.
     */
    @JsonProperty(value = "text")
    private String text;

    /**
     * Start position (in Unicode characters) for the entity match text.
     */
    @JsonProperty(value = "offset")
    private Integer offset;

    /**
     * Length (in Unicode characters) for the entity match text.
     */
    @JsonProperty(value = "length")
    private Integer length;

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

    /**
     * Set the text value.
     *
     * @param text the text value to set
     * @return the MatchRecord object itself.
     */
    public MatchRecord withText(String text) {
        this.text = text;
        return this;
    }

    /**
     * Get the offset value.
     *
     * @return the offset value
     */
    public Integer offset() {
        return this.offset;
    }

    /**
     * Set the offset value.
     *
     * @param offset the offset value to set
     * @return the MatchRecord object itself.
     */
    public MatchRecord withOffset(Integer offset) {
        this.offset = offset;
        return this;
    }

    /**
     * Get the length value.
     *
     * @return the length value
     */
    public Integer length() {
        return this.length;
    }

    /**
     * Set the length value.
     *
     * @param length the length value to set
     * @return the MatchRecord object itself.
     */
    public MatchRecord withLength(Integer length) {
        this.length = length;
        return this;
    }

}
