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

/**
 * Defines a time range in a 24 hour day specified by a start and end time.
 *
 */
class TimeRange {
  /**
   * Create a TimeRange.
   * @property {object} [startTime] Defines an hour and minute of the day
   * specified in 24 hour time.
   * @property {number} [startTime.hour] Represents the hour of the day. Value
   * must be between 0 and 23 inclusive.
   * @property {number} [startTime.minute] Represents the minute of the hour.
   * Value must be between 0 to 59 inclusive.
   * @property {object} [endTime] Defines an hour and minute of the day
   * specified in 24 hour time.
   * @property {number} [endTime.hour] Represents the hour of the day. Value
   * must be between 0 and 23 inclusive.
   * @property {number} [endTime.minute] Represents the minute of the hour.
   * Value must be between 0 to 59 inclusive.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TimeRange
   *
   * @returns {object} metadata of TimeRange
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TimeRange',
      type: {
        name: 'Composite',
        className: 'TimeRange',
        modelProperties: {
          startTime: {
            required: false,
            serializedName: 'StartTime',
            type: {
              name: 'Composite',
              className: 'TimeOfDay'
            }
          },
          endTime: {
            required: false,
            serializedName: 'EndTime',
            type: {
              name: 'Composite',
              className: 'TimeOfDay'
            }
          }
        }
      }
    };
  }
}

module.exports = TimeRange;
