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

/**
 * An object containing more specific information about the error. As per
 * Microsoft One API guidelines -
 * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
 *
 */
class InnerErrorModel {
  /**
   * Create a InnerErrorModel.
   * @property {string} [code] A more specific error code than was provided by
   * the containing error.
   * @property {object} [innerError] An object containing more specific
   * information than the current object about the error.
   */
  constructor() {
  }

  /**
   * Defines the metadata of InnerErrorModel
   *
   * @returns {object} metadata of InnerErrorModel
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InnerErrorModel',
      type: {
        name: 'Composite',
        className: 'InnerErrorModel',
        modelProperties: {
          code: {
            required: false,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          innerError: {
            required: false,
            serializedName: 'innerError',
            type: {
              name: 'Composite',
              className: 'InnerErrorModel'
            }
          }
        }
      }
    };
  }
}

module.exports = InnerErrorModel;
