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

import { array, boolean, lazy, object, optional, Schema } from '../schema';
import {
  ScheduleCardBlockCardsItems,
  scheduleCardBlockCardsItemsSchema,
} from './scheduleCardBlockCardsItems';

export interface ScheduleCardBlockRequest {
  /**
   * Default: False
   * True – It supports both date & time.
   * False – It supports only date. Time will be ignored if it is provided in the request.
   */
  isTimeSupported?: boolean;
  /** List of ScheduleCardBlockCard entity. Each card in the list will be scheduled for Block or Unblock. The details of the entity are given below. */
  scheduleCardBlockCards?: ScheduleCardBlockCardsItems[];
}

export const scheduleCardBlockRequestSchema: Schema<ScheduleCardBlockRequest> = object(
  {
    isTimeSupported: ['IsTimeSupported', optional(boolean())],
    scheduleCardBlockCards: [
      'ScheduleCardBlockCards',
      optional(array(lazy(() => scheduleCardBlockCardsItemsSchema))),
    ],
  }
);
