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

/**
 * The workflow trigger recurrence.
 *
 */
class WorkflowTriggerRecurrence {
  /**
   * Create a WorkflowTriggerRecurrence.
   * @property {string} [frequency] The frequency. Possible values include:
   * 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'
   * @property {number} [interval] The interval.
   * @property {string} [startTime] The start time.
   * @property {string} [endTime] The end time.
   * @property {string} [timeZone] The time zone.
   * @property {object} [schedule] The recurrence schedule.
   * @property {array} [schedule.minutes] The minutes.
   * @property {array} [schedule.hours] The hours.
   * @property {array} [schedule.weekDays] The days of the week.
   * @property {array} [schedule.monthDays] The month days.
   * @property {array} [schedule.monthlyOccurrences] The monthly occurrences.
   */
  constructor() {
  }

  /**
   * Defines the metadata of WorkflowTriggerRecurrence
   *
   * @returns {object} metadata of WorkflowTriggerRecurrence
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WorkflowTriggerRecurrence',
      type: {
        name: 'Composite',
        className: 'WorkflowTriggerRecurrence',
        modelProperties: {
          frequency: {
            required: false,
            serializedName: 'frequency',
            type: {
              name: 'String'
            }
          },
          interval: {
            required: false,
            serializedName: 'interval',
            type: {
              name: 'Number'
            }
          },
          startTime: {
            required: false,
            serializedName: 'startTime',
            type: {
              name: 'String'
            }
          },
          endTime: {
            required: false,
            serializedName: 'endTime',
            type: {
              name: 'String'
            }
          },
          timeZone: {
            required: false,
            serializedName: 'timeZone',
            type: {
              name: 'String'
            }
          },
          schedule: {
            required: false,
            serializedName: 'schedule',
            type: {
              name: 'Composite',
              className: 'RecurrenceSchedule'
            }
          }
        }
      }
    };
  }
}

module.exports = WorkflowTriggerRecurrence;
