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

/**
 * Information about the HybridConnection destination for an event
 * subscription.
 *
 * @extends models['EventSubscriptionDestination']
 */
class HybridConnectionEventSubscriptionDestination extends models['EventSubscriptionDestination'] {
  /**
   * Create a HybridConnectionEventSubscriptionDestination.
   * @property {string} [resourceId] The Azure Resource ID of an hybrid
   * connection that is the destination of an event subscription.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HybridConnectionEventSubscriptionDestination
   *
   * @returns {object} metadata of HybridConnectionEventSubscriptionDestination
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HybridConnection',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'endpointType',
          clientName: 'endpointType'
        },
        uberParent: 'EventSubscriptionDestination',
        className: 'HybridConnectionEventSubscriptionDestination',
        modelProperties: {
          endpointType: {
            required: true,
            serializedName: 'endpointType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          resourceId: {
            required: false,
            serializedName: 'properties.resourceId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HybridConnectionEventSubscriptionDestination;
