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

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

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

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