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

const models = require('./index');

/**
 * The schedule for bandwidth setting.
 *
 */
class BandwidthSchedule {
  /**
   * Create a BandwidthSchedule.
   * @member {object} start The start time of the schdule.
   * @member {number} [start.hours] The hour.
   * @member {number} [start.minutes] The minute.
   * @member {number} [start.seconds] The second.
   * @member {object} stop The stop time of the schedule.
   * @member {number} [stop.hours] The hour.
   * @member {number} [stop.minutes] The minute.
   * @member {number} [stop.seconds] The second.
   * @member {number} rateInMbps The rate in Mbps.
   * @member {array} days The days of the week when this schedule is
   * applicable.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BandwidthSchedule
   *
   * @returns {object} metadata of BandwidthSchedule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BandwidthSchedule',
      type: {
        name: 'Composite',
        className: 'BandwidthSchedule',
        modelProperties: {
          start: {
            required: true,
            serializedName: 'start',
            type: {
              name: 'Composite',
              className: 'Time'
            }
          },
          stop: {
            required: true,
            serializedName: 'stop',
            type: {
              name: 'Composite',
              className: 'Time'
            }
          },
          rateInMbps: {
            required: true,
            serializedName: 'rateInMbps',
            type: {
              name: 'Number'
            }
          },
          days: {
            required: true,
            serializedName: 'days',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DayOfWeekElementType',
                  type: {
                    name: 'Enum',
                    allowedValues: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = BandwidthSchedule;
