/**
 * 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.UUID;
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 EntityLabel {
    /**
     * The entity type.
     */
    @JsonProperty(value = "entityName", required = true)
    private String entityName;

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

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

    /**
     * The role of the predicted entity.
     */
    @JsonProperty(value = "role")
    private String role;

    /**
     * The role id for the predicted entity.
     */
    @JsonProperty(value = "roleId")
    private UUID roleId;

    /**
     * The children property.
     */
    @JsonProperty(value = "children")
    private List<EntityLabel> 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 EntityLabel object itself.
     */
    public EntityLabel withEntityName(String entityName) {
        this.entityName = entityName;
        return this;
    }

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

    /**
     * Set the startTokenIndex value.
     *
     * @param startTokenIndex the startTokenIndex value to set
     * @return the EntityLabel object itself.
     */
    public EntityLabel withStartTokenIndex(int startTokenIndex) {
        this.startTokenIndex = startTokenIndex;
        return this;
    }

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

    /**
     * Set the endTokenIndex value.
     *
     * @param endTokenIndex the endTokenIndex value to set
     * @return the EntityLabel object itself.
     */
    public EntityLabel withEndTokenIndex(int endTokenIndex) {
        this.endTokenIndex = endTokenIndex;
        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 EntityLabel object itself.
     */
    public EntityLabel withRole(String role) {
        this.role = role;
        return this;
    }

    /**
     * Get the roleId value.
     *
     * @return the roleId value
     */
    public UUID roleId() {
        return this.roleId;
    }

    /**
     * Set the roleId value.
     *
     * @param roleId the roleId value to set
     * @return the EntityLabel object itself.
     */
    public EntityLabel withRoleId(UUID roleId) {
        this.roleId = roleId;
        return this;
    }

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

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

}
