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

/**
 * Data Lake Store filesystem error containing a specific WebHDFS exception.
 *
 */
class AdlsError {
  /**
   * Create a AdlsError.
   * @property {object} [remoteException] the object representing the actual
   * WebHDFS exception being returned.
   * @property {string} [remoteException.javaClassName] the full class package
   * name for the exception thrown, such as
   * 'java.lang.IllegalArgumentException'.
   * @property {string} [remoteException.message] the message associated with
   * the exception that was thrown, such as 'Invalid value for webhdfs
   * parameter "permission":...'.
   * @property {string} [remoteException.exception] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of AdlsError
   *
   * @returns {object} metadata of AdlsError
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AdlsError',
      type: {
        name: 'Composite',
        className: 'AdlsError',
        modelProperties: {
          remoteException: {
            required: false,
            readOnly: true,
            serializedName: 'remoteException',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'exception',
                clientName: 'exception'
              },
              uberParent: 'AdlsRemoteException',
              className: 'AdlsRemoteException'
            }
          }
        }
      }
    };
  }
}

module.exports = AdlsError;
