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

/**
 * Rerun tumbling window trigger Parameters.
 *
 */
class RerunTumblingWindowTriggerActionParameters {
  /**
   * Create a RerunTumblingWindowTriggerActionParameters.
   * @member {date} startTime The start time for the time period for which
   * restatement is initiated. Only UTC time is currently supported.
   * @member {date} endTime The end time for the time period for which
   * restatement is initiated. Only UTC time is currently supported.
   * @member {number} maxConcurrency The max number of parallel time windows
   * (ready for execution) for which a rerun is triggered.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RerunTumblingWindowTriggerActionParameters
   *
   * @returns {object} metadata of RerunTumblingWindowTriggerActionParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RerunTumblingWindowTriggerActionParameters',
      type: {
        name: 'Composite',
        className: 'RerunTumblingWindowTriggerActionParameters',
        modelProperties: {
          startTime: {
            required: true,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: true,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          maxConcurrency: {
            required: true,
            serializedName: 'maxConcurrency',
            constraints: {
              InclusiveMaximum: 50,
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = RerunTumblingWindowTriggerActionParameters;
