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

import { object, optional, Schema, string, unknown } from '../schema';

export interface ErrorDetails {
  /** Error code representing the error encountered */
  code?: string;
  /** Error type description */
  title?: string;
  /** Detailed inforamtion about the error */
  detail?: string;
  /** Applicable when more details related to error to be returned */
  additionalInfo?: unknown;
}

export const errorDetailsSchema: Schema<ErrorDetails> = object({
  code: ['Code', optional(string())],
  title: ['Title', optional(string())],
  detail: ['Detail', optional(string())],
  additionalInfo: ['AdditionalInfo', optional(unknown())],
});
