/**
 * Shell Card Management APIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { boolean, object, optional, Schema, string } from '../schema';

export interface DayTimeRestrictions {
  /** True if card could be used on a Monday, else false */
  monday?: boolean;
  /** True if card could be used on a Tuesday, else false. */
  tuesday?: boolean;
  /** True if card could be used on a Wednesday, else false. */
  wednesday?: boolean;
  /** True if card could be used on a Thursday, else false */
  thursday?: boolean;
  /** True if card could be used on a Friday, else false */
  friday?: boolean;
  /** True if card could be used on a Saturday, else false */
  saturday?: boolean;
  /** True if card could be used on a Sunday, else false. */
  sunday?: boolean;
  /**
   * Card could be used from this time in a day.
   * Format: HH:mm (24-hour format)
   * Note:
   * 1.    Clients to convert this to appropriate DateTime or TimeSpan type.
   * “00:00” is the lowest time value and “23:59” is the highest time value.
   */
  timeFrom?: string;
  /**
   * Card could be used up to this time in a day.
   * Format: HH:mm (24-hour format)
   * Note:
   * 1.    Clients to convert this to appropriate DateTime or TimeSpan type.
   * “00:00” is the lowest time value and “23:59” is the highest time value.
   */
  timeTo?: string;
}

export const dayTimeRestrictionsSchema: Schema<DayTimeRestrictions> = object({
  monday: ['Monday', optional(boolean())],
  tuesday: ['Tuesday', optional(boolean())],
  wednesday: ['Wednesday', optional(boolean())],
  thursday: ['Thursday', optional(boolean())],
  friday: ['Friday', optional(boolean())],
  saturday: ['Saturday', optional(boolean())],
  sunday: ['Sunday', optional(boolean())],
  timeFrom: ['TimeFrom', optional(string())],
  timeTo: ['TimeTo', optional(string())],
});
