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

/**
 * Information about the retry policy for an event subscription
 *
 */
class RetryPolicy {
  /**
   * Create a RetryPolicy.
   * @property {number} [maxDeliveryAttempts] Maximum number of delivery retry
   * attempts for events.
   * @property {number} [eventTimeToLiveInMinutes] Time To Live (in minutes)
   * for events.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RetryPolicy
   *
   * @returns {object} metadata of RetryPolicy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RetryPolicy',
      type: {
        name: 'Composite',
        className: 'RetryPolicy',
        modelProperties: {
          maxDeliveryAttempts: {
            required: false,
            serializedName: 'maxDeliveryAttempts',
            type: {
              name: 'Number'
            }
          },
          eventTimeToLiveInMinutes: {
            required: false,
            serializedName: 'eventTimeToLiveInMinutes',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = RetryPolicy;
