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

import { lazy, object, optional, Schema, string } from '../schema';
import { ChargeError, chargeErrorSchema } from './chargeError';

export interface ChargeRetrieveState {
  /**
   * Describes the session state
   * started, stopped, start-requested, stop-requested, failed-to-start, failed-to-stop
   */
  status?: string;
  error?: ChargeError;
}

export const chargeRetrieveStateSchema: Schema<ChargeRetrieveState> = object({
  status: ['status', optional(string())],
  error: ['error', optional(lazy(() => chargeErrorSchema))],
});
