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

/**
 * OCR result of the read operation.
 *
 */
class ReadOperationResult {
  /**
   * Create a ReadOperationResult.
   * @property {string} [status] Status of the read operation. Possible values
   * include: 'Not Started', 'Running', 'Failed', 'Succeeded'
   * @property {array} [recognitionResults] A array of text recognition result
   * of the read operation.
   */
  constructor() {
  }

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

module.exports = ReadOperationResult;
