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

var models = require('./index');

/**
 * @class
 * Initializes a new instance of the AzureAsyncOperationResult class.
 * @constructor
 * The response body contains the status of the specified asynchronous
 * operation, indicating whether it has succeeded, is in progress, or has
 * failed. Note that this status is distinct from the HTTP status code
 * returned for the Get Operation Status operation itself. If the
 * asynchronous operation succeeded, the response body includes the HTTP
 * status code for the successful request. If the asynchronous operation
 * failed, the response body includes the HTTP status code for the failed
 * request and error information regarding the failure.
 *
 * @member {string} [status] the status of the AzureAsuncOperation. Possible
 * values include: 'InProgress', 'Succeeded', 'Failed'
 * 
 * @member {object} [error]
 * 
 * @member {string} [error.code] the HTTP status code or error code associated
 * with this error
 * 
 * @member {string} [error.message] the error message to display.
 * 
 * @member {string} [error.target] the target of the error.
 * 
 * @member {array} [error.details] the list of error details
 * 
 * @member {object} [error.innerError] the inner exceptions or errors, if any
 * 
 * @member {string} [error.innerError.trace] the stack trace for the error
 * 
 * @member {string} [error.innerError.context] the context for the error
 * message
 * 
 */
function AzureAsyncOperationResult() {
}

/**
 * Defines the metadata of AzureAsyncOperationResult
 *
 * @returns {object} metadata of AzureAsyncOperationResult
 *
 */
AzureAsyncOperationResult.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'AzureAsyncOperationResult',
    type: {
      name: 'Composite',
      className: 'AzureAsyncOperationResult',
      modelProperties: {
        status: {
          required: false,
          readOnly: true,
          serializedName: 'status',
          type: {
            name: 'Enum',
            allowedValues: [ 'InProgress', 'Succeeded', 'Failed' ]
          }
        },
        error: {
          required: false,
          readOnly: true,
          serializedName: 'error',
          type: {
            name: 'Composite',
            className: 'ErrorModel'
          }
        }
      }
    }
  };
};

module.exports = AzureAsyncOperationResult;
