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

/**
 * Error definition for managed integration runtime.
 *
 */
class ManagedIntegrationRuntimeError {
  /**
   * Create a ManagedIntegrationRuntimeError.
   * @member {date} [time] The time when the error occurred.
   * @member {string} [code] Error code.
   * @member {array} [parameters] Managed integration runtime error parameters.
   * @member {string} [message] Error message.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ManagedIntegrationRuntimeError
   *
   * @returns {object} metadata of ManagedIntegrationRuntimeError
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ManagedIntegrationRuntimeError',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'ManagedIntegrationRuntimeError',
        modelProperties: {
          time: {
            required: false,
            readOnly: true,
            serializedName: 'time',
            type: {
              name: 'DateTime'
            }
          },
          code: {
            required: false,
            readOnly: true,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          parameters: {
            required: false,
            readOnly: true,
            serializedName: 'parameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          message: {
            required: false,
            readOnly: true,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedIntegrationRuntimeError;
