/**
 * 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.luis.authoring.models;

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

/**
 * Defines the entity type and position of the extracted entity within the
 * example.
 */
public class EntityLabelObject {
    /**
     * The entity type.
     */
    @JsonProperty(value = "entityName", required = true)
    private String entityName;

    /**
     * The index within the utterance where the extracted entity starts.
     */
    @JsonProperty(value = "startCharIndex", required = true)
    private int startCharIndex;

    /**
     * The index within the utterance where the extracted entity ends.
     */
    @JsonProperty(value = "endCharIndex", required = true)
    private int endCharIndex;

    /**
     * The role the entity plays in the utterance.
     */
    @JsonProperty(value = "role")
    private String role;

    /**
     * The identified entities within the example utterance.
     */
    @JsonProperty(value = "children")
    private List<EntityLabelObject> children;

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

    /**
     * Set the entityName value.
     *
     * @param entityName the entityName value to set
     * @return the EntityLabelObject object itself.
     */
    public EntityLabelObject withEntityName(String entityName) {
        this.entityName = entityName;
        return this;
    }

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

    /**
     * Set the startCharIndex value.
     *
     * @param startCharIndex the startCharIndex value to set
     * @return the EntityLabelObject object itself.
     */
    public EntityLabelObject withStartCharIndex(int startCharIndex) {
        this.startCharIndex = startCharIndex;
        return this;
    }

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

    /**
     * Set the endCharIndex value.
     *
     * @param endCharIndex the endCharIndex value to set
     * @return the EntityLabelObject object itself.
     */
    public EntityLabelObject withEndCharIndex(int endCharIndex) {
        this.endCharIndex = endCharIndex;
        return this;
    }

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

    /**
     * Set the role value.
     *
     * @param role the role value to set
     * @return the EntityLabelObject object itself.
     */
    public EntityLabelObject withRole(String role) {
        this.role = role;
        return this;
    }

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

    /**
     * Set the children value.
     *
     * @param children the children value to set
     * @return the EntityLabelObject object itself.
     */
    public EntityLabelObject withChildren(List<EntityLabelObject> children) {
        this.children = children;
        return this;
    }

}
