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

import {
  array,
  lazy,
  nullable,
  object,
  optional,
  Schema,
  string,
} from '../schema';
import { ErrorStatus, errorStatusSchema } from './errorStatus';
import { Restriction, restrictionSchema } from './restriction';
import {
  RestrictionCardList,
  restrictionCardListSchema,
} from './restrictionCardList';

export interface SearchCardRestrictionRes {
  /** Request Id of the API call */
  requestId?: string | null;
  cards?: RestrictionCardList[];
  restrictions?: Restriction;
  error?: ErrorStatus;
}

export const searchCardRestrictionResSchema: Schema<SearchCardRestrictionRes> = object(
  {
    requestId: ['RequestId', optional(nullable(string()))],
    cards: ['cards', optional(array(lazy(() => restrictionCardListSchema)))],
    restrictions: ['Restrictions', optional(lazy(() => restrictionSchema))],
    error: ['Error', optional(lazy(() => errorStatusSchema))],
  }
);
