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

/**
 * By default, Event Grid expects events to be in the Event Grid event schema.
 * Specifying an input schema mapping enables publishing to Event Grid using a
 * custom input schema. Currently, the only supported type of
 * InputSchemaMapping is 'JsonInputSchemaMapping'.
 *
 */
class InputSchemaMapping {
  /**
   * Create a InputSchemaMapping.
   * @property {string} inputSchemaMappingType Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of InputSchemaMapping
   *
   * @returns {object} metadata of InputSchemaMapping
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InputSchemaMapping',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'inputSchemaMappingType',
          clientName: 'inputSchemaMappingType'
        },
        uberParent: 'InputSchemaMapping',
        className: 'InputSchemaMapping',
        modelProperties: {
          inputSchemaMappingType: {
            required: true,
            serializedName: 'inputSchemaMappingType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = InputSchemaMapping;
