/*
 * 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 0.15.0.0
 * 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 ComputeLongRunningOperationResult class.
 * @constructor
 * The Compute service response for long-running operations.
 * @member {string} [operationId] Gets the operation identifier.
 * 
 * @member {string} [status] Gets the operation status. Possible values
 * include: 'InProgress', 'Failed', 'Succeeded', 'Preempted'
 * 
 * @member {date} [startTime] Gets the operation start time
 * 
 * @member {date} [endTime] Gets the operation end time
 * 
 * @member {object} [properties]
 * 
 * @member {object} [properties.output] Operation output data (raw JSON)
 * 
 * @member {object} [error] Gets the operation error, if any occurred.
 * 
 * @member {array} [error.details] Gets or sets the Api error details
 * 
 * @member {object} [error.innererror] Gets or sets the Api inner error
 * 
 * @member {string} [error.innererror.exceptiontype] Gets or sets the
 * exception type.
 * 
 * @member {string} [error.innererror.errordetail] Gets or sets the internal
 * error message or exception dump.
 * 
 * @member {string} [error.code] Gets or sets the error code.
 * 
 * @member {string} [error.target] Gets or sets the target of the particular
 * error.
 * 
 * @member {string} [error.message] Gets or sets the error message.
 * 
 */
function ComputeLongRunningOperationResult() {
}

/**
 * Defines the metadata of ComputeLongRunningOperationResult
 *
 * @returns {object} metadata of ComputeLongRunningOperationResult
 *
 */
ComputeLongRunningOperationResult.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'ComputeLongRunningOperationResult',
    type: {
      name: 'Composite',
      className: 'ComputeLongRunningOperationResult',
      modelProperties: {
        operationId: {
          required: false,
          serializedName: 'operationId',
          type: {
            name: 'String'
          }
        },
        status: {
          required: false,
          serializedName: 'status',
          type: {
            name: 'Enum',
            allowedValues: [ 'InProgress', 'Failed', 'Succeeded', 'Preempted' ]
          }
        },
        startTime: {
          required: false,
          serializedName: 'startTime',
          type: {
            name: 'DateTime'
          }
        },
        endTime: {
          required: false,
          serializedName: 'endTime',
          type: {
            name: 'DateTime'
          }
        },
        properties: {
          required: false,
          serializedName: 'properties',
          type: {
            name: 'Composite',
            className: 'ComputeLongRunningOperationProperties'
          }
        },
        error: {
          required: false,
          serializedName: 'error',
          type: {
            name: 'Composite',
            className: 'ApiError'
          }
        }
      }
    }
  };
};

module.exports = ComputeLongRunningOperationResult;
