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

/**
 * The error mangement.
 *
 */
class ConnectorMappingErrorManagement {
  /**
   * Create a ConnectorMappingErrorManagement.
   * @member {string} errorManagementType The type of error management to use
   * for the mapping. Possible values include: 'RejectAndContinue',
   * 'StopImport', 'RejectUntilLimit'
   * @member {number} [errorLimit] The error limit allowed while importing
   * data.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ConnectorMappingErrorManagement
   *
   * @returns {object} metadata of ConnectorMappingErrorManagement
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConnectorMappingErrorManagement',
      type: {
        name: 'Composite',
        className: 'ConnectorMappingErrorManagement',
        modelProperties: {
          errorManagementType: {
            required: true,
            serializedName: 'errorManagementType',
            type: {
              name: 'Enum',
              allowedValues: [ 'RejectAndContinue', 'StopImport', 'RejectUntilLimit' ]
            }
          },
          errorLimit: {
            required: false,
            serializedName: 'errorLimit',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = ConnectorMappingErrorManagement;
