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

/**
 * @class
 * Initializes a new instance of the Schedule class.
 * @constructor
 * The schedule according to which jobs will be created
 * @member {date} [doNotRunUntil] The earliest time at which any job may be
 * created under this job schedule. If you do not specify a doNotRunUntil
 * time, the schedule becomes ready to create jobs immediately.
 * 
 * @member {date} [doNotRunAfter] A time after which no job will be created
 * under this job schedule. The schedule will move to the completed state as
 * soon as this deadline is past and there is no active job under this job
 * schedule.
 * 
 * @member {moment.duration} [startWindow] The time interval, starting from
 * the time at which the schedule indicates a job should be created, within
 * which a job must be created. If a job is not created within the
 * startWindow interval, then the 'opportunity' is lost; no job will be
 * created until the next recurrence of the schedule.
 * 
 * @member {moment.duration} [recurrenceInterval] The time interval between
 * the start times of two successive jobs under the job schedule. A job
 * schedule can have at most one active job under it at any given time.
 * 
 */
function Schedule() {
}

/**
 * Defines the metadata of Schedule
 *
 * @returns {object} metadata of Schedule
 *
 */
Schedule.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'Schedule',
    type: {
      name: 'Composite',
      className: 'Schedule',
      modelProperties: {
        doNotRunUntil: {
          required: false,
          serializedName: 'doNotRunUntil',
          type: {
            name: 'DateTime'
          }
        },
        doNotRunAfter: {
          required: false,
          serializedName: 'doNotRunAfter',
          type: {
            name: 'DateTime'
          }
        },
        startWindow: {
          required: false,
          serializedName: 'startWindow',
          type: {
            name: 'TimeSpan'
          }
        },
        recurrenceInterval: {
          required: false,
          serializedName: 'recurrenceInterval',
          type: {
            name: 'TimeSpan'
          }
        }
      }
    }
  };
};

module.exports = Schedule;
