/*
 * 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 LanguageBatchResult.
 */
class LanguageBatchResult {
  /**
   * Create a LanguageBatchResult.
   * @property {array} [documents] Response by document
   * @property {array} [errors] Errors and Warnings by document
   * @property {object} [statistics] (Optional) if showStats=true was specified
   * in the request this field will contain information about the request
   * payload.
   * @property {number} [statistics.documentsCount] Number of documents
   * submitted in the request.
   * @property {number} [statistics.validDocumentsCount] Number of valid
   * documents. This excludes empty, over-size limit or non-supported languages
   * documents.
   * @property {number} [statistics.erroneousDocumentsCount] Number of invalid
   * documents. This includes empty, over-size limit or non-supported languages
   * documents.
   * @property {number} [statistics.transactionsCount] Number of transactions
   * for the request.
   */
  constructor() {
  }

  /**
   * Defines the metadata of LanguageBatchResult
   *
   * @returns {object} metadata of LanguageBatchResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LanguageBatchResult',
      type: {
        name: 'Composite',
        className: 'LanguageBatchResult',
        modelProperties: {
          documents: {
            required: false,
            readOnly: true,
            serializedName: 'documents',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'LanguageBatchResultItemElementType',
                  type: {
                    name: 'Composite',
                    className: 'LanguageBatchResultItem'
                  }
              }
            }
          },
          errors: {
            required: false,
            readOnly: true,
            serializedName: 'errors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ErrorRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'ErrorRecord'
                  }
              }
            }
          },
          statistics: {
            required: false,
            readOnly: true,
            serializedName: 'statistics',
            type: {
              name: 'Composite',
              className: 'RequestStatistics'
            }
          }
        }
      }
    };
  }
}

module.exports = LanguageBatchResult;
