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

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

/**
 * ARM inner exception class.
 *
 */
class ARMException {
  /**
   * Create a ARMException.
   * @member {string} [code] Gets HTTP status code for the error.
   * @member {string} [message] Gets exception message.
   * @member {string} [target] Gets exception target.
   * @member {array} [details] Gets service based error details.
   * @member {object} [innererror] Gets private data for service debugging.
   * @member {string} [innererror.trace] Gets complete stack trace of the
   * exception.
   * @member {string} [innererror.source] Gets exception source.
   * @member {object} [innererror.methodStatus] Gets data related to method
   * which threw the exception.
   * @member {string} [innererror.methodStatus.isVirtual] Gets a value
   * indicating whether called method was virtual
   * @member {array} [innererror.methodStatus.parameters] Gets parameter list
   * passed to method.
   * @member {string} [innererror.methodStatus.containsGenericParameters] Gets
   * a value indicating whether method container generic params.
   * @member {string} [innererror.cloudId] Gets cloud Id in exception.
   * @member {string} [innererror.hVHostId] Gets hyperV host ID.
   * @member {string} [innererror.hVClusterId] Gets hyperV cluster Id.
   * @member {string} [innererror.networkId] Gets network Id.
   * @member {string} [innererror.vmId] Gets Vm Id.
   * @member {string} [innererror.fabricId] Gets Fabric Id.
   * @member {string} [innererror.liveId] Gets Live Id of the caller.
   * @member {string} [innererror.containerId] Gets container Id of the caller.
   * @member {string} [innererror.resourceId] Gets resource id used in the
   * call.
   * @member {string} [innererror.resourceName] Gets caller resource name.
   * @member {string} [innererror.subscriptionId] Gets subscription Id.
   * @member {string} [innererror.serializedSRSLogContext] Gets serialized SRS
   * log context.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ARMException
   *
   * @returns {object} metadata of ARMException
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ARMException',
      type: {
        name: 'Composite',
        className: 'ARMException',
        modelProperties: {
          code: {
            required: false,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          target: {
            required: false,
            serializedName: 'target',
            type: {
              name: 'String'
            }
          },
          details: {
            required: false,
            serializedName: 'details',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ARMExceptionDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'ARMExceptionDetails'
                  }
              }
            }
          },
          innererror: {
            required: false,
            serializedName: 'innererror',
            type: {
              name: 'Composite',
              className: 'ARMInnerError'
            }
          }
        }
      }
    };
  }
}

module.exports = ARMException;
