/*
 * 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 recurrence schedule.
 *
 */
class RecurrenceSchedule {
  /**
   * Create a RecurrenceSchedule.
   * @member {array} [minutes] The minutes.
   * @member {array} [hours] The hours.
   * @member {array} [weekDays] The days of the week.
   * @member {array} [monthDays] The month days.
   * @member {array} [monthlyOccurrences] The monthly occurrences.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RecurrenceSchedule
   *
   * @returns {object} metadata of RecurrenceSchedule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecurrenceSchedule',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'RecurrenceSchedule',
        modelProperties: {
          minutes: {
            required: false,
            serializedName: 'minutes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          hours: {
            required: false,
            serializedName: 'hours',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          weekDays: {
            required: false,
            serializedName: 'weekDays',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DaysOfWeekElementType',
                  type: {
                    name: 'Enum',
                    allowedValues: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
                  }
              }
            }
          },
          monthDays: {
            required: false,
            serializedName: 'monthDays',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          monthlyOccurrences: {
            required: false,
            serializedName: 'monthlyOccurrences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RecurrenceScheduleOccurrenceElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'RecurrenceScheduleOccurrence'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RecurrenceSchedule;
