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

/**
 * Result of recognition text operation.
 *
 */
class TextOperationResult {
  /**
   * Create a TextOperationResult.
   * @property {string} [status] Status of the text operation. Possible values
   * include: 'Not Started', 'Running', 'Failed', 'Succeeded'
   * @property {object} [recognitionResult] Text recognition result of the text
   * operation.
   * @property {number} [recognitionResult.page] The 1-based page number of the
   * recognition result.
   * @property {number} [recognitionResult.clockwiseOrientation] The
   * orientation of the image in degrees in the clockwise direction. Range
   * between [0, 360).
   * @property {number} [recognitionResult.width] The width of the image in
   * pixels or the PDF in inches.
   * @property {number} [recognitionResult.height] The height of the image in
   * pixels or the PDF in inches.
   * @property {string} [recognitionResult.unit] The unit used in the Width,
   * Height and BoundingBox. For images, the unit is "pixel". For PDF, the unit
   * is "inch". Possible values include: 'pixel', 'inch'
   * @property {array} [recognitionResult.lines] A list of recognized text
   * lines.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TextOperationResult
   *
   * @returns {object} metadata of TextOperationResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TextOperationResult',
      type: {
        name: 'Composite',
        className: 'TextOperationResult',
        modelProperties: {
          status: {
            required: false,
            nullable: false,
            serializedName: 'status',
            type: {
              name: 'Enum',
              allowedValues: [ 'Not Started', 'Running', 'Failed', 'Succeeded' ]
            }
          },
          recognitionResult: {
            required: false,
            serializedName: 'recognitionResult',
            type: {
              name: 'Composite',
              className: 'TextRecognitionResult'
            }
          }
        }
      }
    };
  }
}

module.exports = TextOperationResult;
