/**
 * 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.js';
import { ErrorStatus, errorStatusSchema } from './errorStatus.js';
import { Restriction, restrictionSchema } from './restriction.js';
import {
  RestrictionCardList,
  restrictionCardListSchema,
} from './restrictionCardList.js';

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

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