/*
 * 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';

/**
 * Class representing a MatchRecord.
 */
class MatchRecord {
  /**
   * Create a MatchRecord.
   * @property {number} [wikipediaScore] (optional) If a well-known item with
   * Wikipedia link is recognized, a decimal number denoting the confidence
   * level of the Wikipedia info will be returned.
   * @property {number} [entityTypeScore] (optional) If an entity type is
   * recognized, a decimal number denoting the confidence level of the entity
   * type will be returned.
   * @property {string} [text] Entity text as appears in the request.
   * @property {number} [offset] Start position (in Unicode characters) for the
   * entity match text.
   * @property {number} [length] Length (in Unicode characters) for the entity
   * match text.
   */
  constructor() {
  }

  /**
   * Defines the metadata of MatchRecord
   *
   * @returns {object} metadata of MatchRecord
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'MatchRecord',
      type: {
        name: 'Composite',
        className: 'MatchRecord',
        modelProperties: {
          wikipediaScore: {
            required: false,
            serializedName: 'wikipediaScore',
            type: {
              name: 'Number'
            }
          },
          entityTypeScore: {
            required: false,
            serializedName: 'entityTypeScore',
            type: {
              name: 'Number'
            }
          },
          text: {
            required: false,
            serializedName: 'text',
            type: {
              name: 'String'
            }
          },
          offset: {
            required: false,
            serializedName: 'offset',
            type: {
              name: 'Number'
            }
          },
          length: {
            required: false,
            serializedName: 'length',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = MatchRecord;
