/* 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'; /** * * @export * @interface ReqGetAccountPnL */ export interface ReqGetAccountPnL { /** * made optional to support header auth clients * @type {string} * @memberof ReqGetAccountPnL */ auth?: string; /** * * @type {string} * @memberof ReqGetAccountPnL */ by: ReqGetAccountPnLByEnum; /** * * @type {string} * @memberof ReqGetAccountPnL */ value: string; /** * * @type {string} * @memberof ReqGetAccountPnL */ resolution: ReqGetAccountPnLResolutionEnum; /** * * @type {number} * @memberof ReqGetAccountPnL */ start_timestamp: number; /** * * @type {number} * @memberof ReqGetAccountPnL */ end_timestamp: number; /** * * @type {number} * @memberof ReqGetAccountPnL */ count_back: number; /** * * @type {boolean} * @memberof ReqGetAccountPnL */ ignore_transfers?: boolean; } /** * @export */ export const ReqGetAccountPnLByEnum = { Index: 'index' } as const; export type ReqGetAccountPnLByEnum = typeof ReqGetAccountPnLByEnum[keyof typeof ReqGetAccountPnLByEnum]; /** * @export */ export const ReqGetAccountPnLResolutionEnum = { _1m: '1m', _5m: '5m', _15m: '15m', _1h: '1h', _4h: '4h', _1d: '1d' } as const; export type ReqGetAccountPnLResolutionEnum = typeof ReqGetAccountPnLResolutionEnum[keyof typeof ReqGetAccountPnLResolutionEnum]; /** * Check if a given object implements the ReqGetAccountPnL interface. */ export function instanceOfReqGetAccountPnL(value: object): value is ReqGetAccountPnL { if (!('by' in value) || value['by'] === undefined) return false; if (!('value' in value) || value['value'] === undefined) return false; if (!('resolution' in value) || value['resolution'] === undefined) return false; if (!('start_timestamp' in value) || value['start_timestamp'] === undefined) return false; if (!('end_timestamp' in value) || value['end_timestamp'] === undefined) return false; if (!('count_back' in value) || value['count_back'] === undefined) return false; return true; } export function ReqGetAccountPnLFromJSON(json: any): ReqGetAccountPnL { return ReqGetAccountPnLFromJSONTyped(json, false); } export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountPnL { if (json == null) { return json; } return { 'auth': json['auth'] == null ? undefined : json['auth'], 'by': json['by'], 'value': json['value'], 'resolution': json['resolution'], 'start_timestamp': json['start_timestamp'], 'end_timestamp': json['end_timestamp'], 'count_back': json['count_back'], 'ignore_transfers': json['ignore_transfers'] == null ? undefined : json['ignore_transfers'], }; } export function ReqGetAccountPnLToJSON(value?: ReqGetAccountPnL | null): any { if (value == null) { return value; } return { 'auth': value['auth'], 'by': value['by'], 'value': value['value'], 'resolution': value['resolution'], 'start_timestamp': value['start_timestamp'], 'end_timestamp': value['end_timestamp'], 'count_back': value['count_back'], 'ignore_transfers': value['ignore_transfers'], }; }