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

import { array, lazy, object, optional, Schema, string } from '../schema';
import {
  CardTypeResponseCustomerCardTypesItems,
  cardTypeResponseCustomerCardTypesItemsSchema,
} from './cardTypeResponseCustomerCardTypesItems';
import {
  CardTypeResponseError,
  cardTypeResponseErrorSchema,
} from './cardTypeResponseError';

export interface CardTypeResponse {
  customerCardTypes?: CardTypeResponseCustomerCardTypesItems[];
  error?: CardTypeResponseError;
  /** API Request Id */
  requestId?: string;
}

export const cardTypeResponseSchema: Schema<CardTypeResponse> = object({
  customerCardTypes: [
    'CustomerCardTypes',
    optional(array(lazy(() => cardTypeResponseCustomerCardTypesItemsSchema))),
  ],
  error: ['Error', optional(lazy(() => cardTypeResponseErrorSchema))],
  requestId: ['RequestId', optional(string())],
});
