/*
 * 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 storage queue destination for an event subscription.
 *
 * @extends models['EventSubscriptionDestination']
 */
class StorageQueueEventSubscriptionDestination extends models['EventSubscriptionDestination'] {
  /**
   * Create a StorageQueueEventSubscriptionDestination.
   * @property {string} [resourceId] The Azure Resource ID of the storage
   * account that contains the queue that is the destination of an event
   * subscription.
   * @property {string} [queueName] The name of the Storage queue under a
   * storage account that is the destination of an event subscription.
   */
  constructor() {
    super();
  }

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

module.exports = StorageQueueEventSubscriptionDestination;
