/*
 * 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.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Defines a user predicted entity that extends an already existing one.
 *
 */
class ExternalEntity {
  /**
   * Create a ExternalEntity.
   * @property {string} entityName The name of the entity to extend.
   * @property {number} startIndex The start character index of the predicted
   * entity.
   * @property {number} entityLength The length of the predicted entity.
   * @property {object} [resolution] A user supplied custom resolution to
   * return as the entity's prediction.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ExternalEntity
   *
   * @returns {object} metadata of ExternalEntity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExternalEntity',
      type: {
        name: 'Composite',
        className: 'ExternalEntity',
        modelProperties: {
          entityName: {
            required: true,
            serializedName: 'entityName',
            type: {
              name: 'String'
            }
          },
          startIndex: {
            required: true,
            serializedName: 'startIndex',
            type: {
              name: 'Number'
            }
          },
          entityLength: {
            required: true,
            serializedName: 'entityLength',
            type: {
              name: 'Number'
            }
          },
          resolution: {
            required: false,
            serializedName: 'resolution',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = ExternalEntity;
