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

import { lazy, object, optional, Schema, unknown } from '../schema';
import {
  BundledDetailsProductList,
  bundledDetailsProductListSchema,
} from './bundledDetailsProductList';
import {
  DayTimeRestrictions,
  dayTimeRestrictionsSchema,
} from './dayTimeRestrictions';
import {
  LocationRestriction,
  locationRestrictionSchema,
} from './locationRestriction';

export interface BundledRestrictionsList {
  usageRestrictions?: unknown;
  dayTimeRestrictions?: DayTimeRestrictions;
  productRestrictions?: BundledDetailsProductList;
  locationRestrictions?: LocationRestriction;
}

export const bundledRestrictionsListSchema: Schema<BundledRestrictionsList> = object(
  {
    usageRestrictions: ['UsageRestrictions', optional(unknown())],
    dayTimeRestrictions: [
      'DayTimeRestrictions',
      optional(lazy(() => dayTimeRestrictionsSchema)),
    ],
    productRestrictions: [
      'ProductRestrictions',
      optional(lazy(() => bundledDetailsProductListSchema)),
    ],
    locationRestrictions: [
      'LocationRestrictions',
      optional(lazy(() => locationRestrictionSchema)),
    ],
  }
);
