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

const models = require('./index');

/**
 * Event Type for a subject under a topic
 *
 * @extends models['Resource']
 */
class EventType extends models['Resource'] {
  /**
   * Create a EventType.
   * @property {string} [displayName] Display name of the event type.
   * @property {string} [description] Description of the event type.
   * @property {string} [schemaUrl] Url of the schema for this event type.
   * @property {boolean} [isInDefaultSet] IsInDefaultSet flag of the event
   * type.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of EventType
   *
   * @returns {object} metadata of EventType
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EventType',
      type: {
        name: 'Composite',
        className: 'EventType',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          schemaUrl: {
            required: false,
            serializedName: 'properties.schemaUrl',
            type: {
              name: 'String'
            }
          },
          isInDefaultSet: {
            required: false,
            serializedName: 'properties.isInDefaultSet',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = EventType;
