/* 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 { PositionFunding } from './PositionFunding'; import { PositionFundingFromJSON, PositionFundingFromJSONTyped, PositionFundingToJSON, } from './PositionFunding'; /** * * @export * @interface PositionFundings */ export interface PositionFundings { /** * * @type {number} * @memberof PositionFundings */ code: number; /** * * @type {string} * @memberof PositionFundings */ message?: string; /** * * @type {Array} * @memberof PositionFundings */ position_fundings: Array; /** * * @type {string} * @memberof PositionFundings */ next_cursor?: string; } /** * Check if a given object implements the PositionFundings interface. */ export function instanceOfPositionFundings(value: object): value is PositionFundings { if (!('code' in value) || value['code'] === undefined) return false; if (!('position_fundings' in value) || value['position_fundings'] === undefined) return false; return true; } export function PositionFundingsFromJSON(json: any): PositionFundings { return PositionFundingsFromJSONTyped(json, false); } export function PositionFundingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PositionFundings { if (json == null) { return json; } return { 'code': json['code'], 'message': json['message'] == null ? undefined : json['message'], 'position_fundings': ((json['position_fundings'] as Array).map(PositionFundingFromJSON)), 'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'], }; } export function PositionFundingsToJSON(value?: PositionFundings | null): any { if (value == null) { return value; } return { 'code': value['code'], 'message': value['message'], 'position_fundings': ((value['position_fundings'] as Array).map(PositionFundingToJSON)), 'next_cursor': value['next_cursor'], }; }