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

/**
 * Definition of schedule parameters.
 *
 */
class ScheduleProperties {
  /**
   * Create a ScheduleProperties.
   * @member {date} [startTime] Gets or sets the start time of the schedule.
   * @member {number} [startTimeOffsetMinutes] Gets the start time's offset in
   * minutes.
   * @member {date} [expiryTime] Gets or sets the end time of the schedule.
   * @member {number} [expiryTimeOffsetMinutes] Gets or sets the expiry time's
   * offset in minutes.
   * @member {boolean} [isEnabled] Gets or sets a value indicating whether this
   * schedule is enabled. Default value: false .
   * @member {date} [nextRun] Gets or sets the next run time of the schedule.
   * @member {number} [nextRunOffsetMinutes] Gets or sets the next run time's
   * offset in minutes.
   * @member {number} [interval] Gets or sets the interval of the schedule.
   * @member {string} [frequency] Gets or sets the frequency of the schedule.
   * Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month'
   * @member {string} [timeZone] Gets or sets the time zone of the schedule.
   * @member {object} [advancedSchedule] Gets or sets the advanced schedule.
   * @member {array} [advancedSchedule.weekDays] Days of the week that the job
   * should execute on.
   * @member {array} [advancedSchedule.monthDays] Days of the month that the
   * job should execute on. Must be between 1 and 31.
   * @member {array} [advancedSchedule.monthlyOccurrences] Occurrences of days
   * within a month.
   * @member {date} [creationTime] Gets or sets the creation time.
   * @member {date} [lastModifiedTime] Gets or sets the last modified time.
   * @member {string} [description] Gets or sets the description.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ScheduleProperties
   *
   * @returns {object} metadata of ScheduleProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ScheduleProperties',
      type: {
        name: 'Composite',
        className: 'ScheduleProperties',
        modelProperties: {
          startTime: {
            required: false,
            nullable: false,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          startTimeOffsetMinutes: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'startTimeOffsetMinutes',
            type: {
              name: 'Number'
            }
          },
          expiryTime: {
            required: false,
            nullable: true,
            serializedName: 'expiryTime',
            type: {
              name: 'DateTime'
            }
          },
          expiryTimeOffsetMinutes: {
            required: false,
            nullable: false,
            serializedName: 'expiryTimeOffsetMinutes',
            type: {
              name: 'Number'
            }
          },
          isEnabled: {
            required: false,
            serializedName: 'isEnabled',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          nextRun: {
            required: false,
            nullable: true,
            serializedName: 'nextRun',
            type: {
              name: 'DateTime'
            }
          },
          nextRunOffsetMinutes: {
            required: false,
            nullable: false,
            serializedName: 'nextRunOffsetMinutes',
            type: {
              name: 'Number'
            }
          },
          interval: {
            required: false,
            serializedName: 'interval',
            type: {
              name: 'Number'
            }
          },
          frequency: {
            required: false,
            serializedName: 'frequency',
            type: {
              name: 'String'
            }
          },
          timeZone: {
            required: false,
            serializedName: 'timeZone',
            type: {
              name: 'String'
            }
          },
          advancedSchedule: {
            required: false,
            serializedName: 'advancedSchedule',
            type: {
              name: 'Composite',
              className: 'AdvancedSchedule'
            }
          },
          creationTime: {
            required: false,
            nullable: false,
            serializedName: 'creationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: false,
            serializedName: 'lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ScheduleProperties;
