/* tslint:disable */ /* eslint-disable */ /** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { PnLEntry } from './PnLEntry'; import { PnLEntryFromJSON, PnLEntryFromJSONTyped, PnLEntryToJSON, } from './PnLEntry'; /** * * @export * @interface AccountPnL */ export interface AccountPnL { /** * * @type {number} * @memberof AccountPnL */ code: number; /** * * @type {string} * @memberof AccountPnL */ message?: string; /** * * @type {string} * @memberof AccountPnL */ resolution: string; /** * * @type {Array} * @memberof AccountPnL */ pnl: Array; } /** * Check if a given object implements the AccountPnL interface. */ export function instanceOfAccountPnL(value: object): value is AccountPnL { if (!('code' in value) || value['code'] === undefined) return false; if (!('resolution' in value) || value['resolution'] === undefined) return false; if (!('pnl' in value) || value['pnl'] === undefined) return false; return true; } export function AccountPnLFromJSON(json: any): AccountPnL { return AccountPnLFromJSONTyped(json, false); } export function AccountPnLFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPnL { if (json == null) { return json; } return { 'code': json['code'], 'message': json['message'] == null ? undefined : json['message'], 'resolution': json['resolution'], 'pnl': ((json['pnl'] as Array).map(PnLEntryFromJSON)), }; } export function AccountPnLToJSON(value?: AccountPnL | null): any { if (value == null) { return value; } return { 'code': value['code'], 'message': value['message'], 'resolution': value['resolution'], 'pnl': ((value['pnl'] as Array).map(PnLEntryToJSON)), }; }