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

/**
 * The common properties that are associated with Event Hub data sources.
 *
 * @extends models['ServiceBusDataSourceProperties']
 */
class EventHubDataSourceProperties extends models['ServiceBusDataSourceProperties'] {
  /**
   * Create a EventHubDataSourceProperties.
   * @member {string} [eventHubName] The name of the Event Hub. Required on PUT
   * (CreateOrReplace) requests.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of EventHubDataSourceProperties
   *
   * @returns {object} metadata of EventHubDataSourceProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EventHubDataSourceProperties',
      type: {
        name: 'Composite',
        className: 'EventHubDataSourceProperties',
        modelProperties: {
          serviceBusNamespace: {
            required: false,
            serializedName: 'serviceBusNamespace',
            type: {
              name: 'String'
            }
          },
          sharedAccessPolicyName: {
            required: false,
            serializedName: 'sharedAccessPolicyName',
            type: {
              name: 'String'
            }
          },
          sharedAccessPolicyKey: {
            required: false,
            serializedName: 'sharedAccessPolicyKey',
            type: {
              name: 'String'
            }
          },
          eventHubName: {
            required: false,
            serializedName: 'eventHubName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = EventHubDataSourceProperties;
