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

/**
 * Defines how often to run the search and the time interval.
 *
 */
class Schedule {
  /**
   * Create a Schedule.
   * @property {number} frequencyInMinutes frequency (in minutes) at which rule
   * condition should be evaluated.
   * @property {number} timeWindowInMinutes Time window for which data needs to
   * be fetched for query (should be greater than or equal to
   * frequencyInMinutes).
   */
  constructor() {
  }

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

module.exports = Schedule;
