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

var util = require('util');

/**
 * @class
 * Initializes a new instance of the ResourceManagementErrorWithDetails class.
 * @constructor
 * @member {string} code The error code returned from the server.
 * 
 * @member {string} message The error message returned from the server.
 * 
 * @member {string} [target] The target of the error.
 * 
 * @member {array} [details] Validation error.
 * 
 */
function ResourceManagementErrorWithDetails() {
}

/**
 * Defines the metadata of ResourceManagementErrorWithDetails
 *
 * @returns {object} metadata of ResourceManagementErrorWithDetails
 *
 */
ResourceManagementErrorWithDetails.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'ResourceManagementErrorWithDetails',
    type: {
      name: 'Composite',
      className: 'ResourceManagementErrorWithDetails',
      modelProperties: {
        code: {
          required: true,
          serializedName: 'code',
          type: {
            name: 'String'
          }
        },
        message: {
          required: true,
          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: 'ResourceManagementErrorWithDetailsElementType',
                type: {
                  name: 'Composite',
                  className: 'ResourceManagementErrorWithDetails'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = ResourceManagementErrorWithDetails;
