/*
 * 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 SentimentBatchResultItem.
 */
class SentimentBatchResultItem {
  /**
   * Create a SentimentBatchResultItem.
   * @property {string} [id] Unique, non-empty document identifier.
   * @property {number} [score] A decimal number between 0 and 1 denoting the
   * sentiment of the document. A score above 0.7 usually refers to a positive
   * document while a score below 0.3 normally has a negative connotation. Mid
   * values refer to neutral text.
   * @property {object} [statistics] (Optional) if showStats=true was specified
   * in the request this field will contain information about the document
   * payload.
   * @property {number} [statistics.charactersCount] Number of text elements
   * recognized in the document.
   * @property {number} [statistics.transactionsCount] Number of transactions
   * for the document.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SentimentBatchResultItem
   *
   * @returns {object} metadata of SentimentBatchResultItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SentimentBatchResultItem',
      type: {
        name: 'Composite',
        className: 'SentimentBatchResultItem',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          score: {
            required: false,
            serializedName: 'score',
            type: {
              name: 'Number'
            }
          },
          statistics: {
            required: false,
            serializedName: 'statistics',
            type: {
              name: 'Composite',
              className: 'DocumentStatistics'
            }
          }
        }
      }
    };
  }
}

module.exports = SentimentBatchResultItem;
