/* 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 { AccountAsset } from './AccountAsset'; import { AccountAssetFromJSON, AccountAssetFromJSONTyped, AccountAssetToJSON, } from './AccountAsset'; import type { ApprovedIntegrator } from './ApprovedIntegrator'; import { ApprovedIntegratorFromJSON, ApprovedIntegratorFromJSONTyped, ApprovedIntegratorToJSON, } from './ApprovedIntegrator'; import type { PendingUnlock } from './PendingUnlock'; import { PendingUnlockFromJSON, PendingUnlockFromJSONTyped, PendingUnlockToJSON, } from './PendingUnlock'; import type { AccountPosition } from './AccountPosition'; import { AccountPositionFromJSON, AccountPositionFromJSONTyped, AccountPositionToJSON, } from './AccountPosition'; import type { PublicPoolInfo } from './PublicPoolInfo'; import { PublicPoolInfoFromJSON, PublicPoolInfoFromJSONTyped, PublicPoolInfoToJSON, } from './PublicPoolInfo'; import type { PublicPoolShare } from './PublicPoolShare'; import { PublicPoolShareFromJSON, PublicPoolShareFromJSONTyped, PublicPoolShareToJSON, } from './PublicPoolShare'; /** * * @export * @interface DetailedAccount */ export interface DetailedAccount { /** * * @type {number} * @memberof DetailedAccount */ code: number; /** * * @type {string} * @memberof DetailedAccount */ message?: string; /** * * @type {number} * @memberof DetailedAccount */ account_type: number; /** * * @type {number} * @memberof DetailedAccount */ index: number; /** * * @type {string} * @memberof DetailedAccount */ l1_address: string; /** * * @type {number} * @memberof DetailedAccount */ cancel_all_time: number; /** * * @type {number} * @memberof DetailedAccount */ total_order_count: number; /** * * @type {number} * @memberof DetailedAccount */ total_isolated_order_count: number; /** * * @type {number} * @memberof DetailedAccount */ pending_order_count: number; /** * * @type {string} * @memberof DetailedAccount */ available_balance: string; /** * * @type {number} * @memberof DetailedAccount */ status: number; /** * * @type {string} * @memberof DetailedAccount */ collateral: string; /** * * @type {number} * @memberof DetailedAccount */ transaction_time: number; /** * * @type {number} * @memberof DetailedAccount */ account_trading_mode?: number; /** * * @type {number} * @memberof DetailedAccount */ account_index: number; /** * * @type {string} * @memberof DetailedAccount */ name: string; /** * * @type {string} * @memberof DetailedAccount */ description: string; /** * Remove After FE uses L1 meta endpoint * @type {boolean} * @memberof DetailedAccount */ can_invite: boolean; /** * Remove After FE uses L1 meta endpoint * @type {string} * @memberof DetailedAccount */ referral_points_percentage: string; /** * * @type {boolean} * @memberof DetailedAccount */ can_rfq: boolean; /** * * @type {number} * @memberof DetailedAccount */ created_at: number; /** * * @type {Array} * @memberof DetailedAccount */ positions: Array; /** * * @type {Array} * @memberof DetailedAccount */ assets: Array; /** * * @type {string} * @memberof DetailedAccount */ total_asset_value: string; /** * * @type {string} * @memberof DetailedAccount */ cross_asset_value: string; /** * * @type {string} * @memberof DetailedAccount */ cross_initial_margin_requirement: string; /** * * @type {string} * @memberof DetailedAccount */ cross_maintenance_margin_requirement: string; /** * * @type {PublicPoolInfo} * @memberof DetailedAccount */ pool_info: PublicPoolInfo; /** * * @type {Array} * @memberof DetailedAccount */ shares: Array; /** * * @type {Array} * @memberof DetailedAccount */ pending_unlocks?: Array; /** * * @type {Array} * @memberof DetailedAccount */ approved_integrators?: Array; } /** * Check if a given object implements the DetailedAccount interface. */ export function instanceOfDetailedAccount(value: object): value is DetailedAccount { if (!('code' in value) || value['code'] === undefined) return false; if (!('account_type' in value) || value['account_type'] === undefined) return false; if (!('index' in value) || value['index'] === undefined) return false; if (!('l1_address' in value) || value['l1_address'] === undefined) return false; if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false; if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false; if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false; if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false; if (!('available_balance' in value) || value['available_balance'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('collateral' in value) || value['collateral'] === undefined) return false; if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false; if (!('account_index' in value) || value['account_index'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('can_invite' in value) || value['can_invite'] === undefined) return false; if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false; if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false; if (!('created_at' in value) || value['created_at'] === undefined) return false; if (!('positions' in value) || value['positions'] === undefined) return false; if (!('assets' in value) || value['assets'] === undefined) return false; if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false; if (!('cross_asset_value' in value) || value['cross_asset_value'] === undefined) return false; if (!('cross_initial_margin_requirement' in value) || value['cross_initial_margin_requirement'] === undefined) return false; if (!('cross_maintenance_margin_requirement' in value) || value['cross_maintenance_margin_requirement'] === undefined) return false; if (!('pool_info' in value) || value['pool_info'] === undefined) return false; if (!('shares' in value) || value['shares'] === undefined) return false; return true; } export function DetailedAccountFromJSON(json: any): DetailedAccount { return DetailedAccountFromJSONTyped(json, false); } export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedAccount { if (json == null) { return json; } return { 'code': json['code'], 'message': json['message'] == null ? undefined : json['message'], 'account_type': json['account_type'], 'index': json['index'], 'l1_address': json['l1_address'], 'cancel_all_time': json['cancel_all_time'], 'total_order_count': json['total_order_count'], 'total_isolated_order_count': json['total_isolated_order_count'], 'pending_order_count': json['pending_order_count'], 'available_balance': json['available_balance'], 'status': json['status'], 'collateral': json['collateral'], 'transaction_time': json['transaction_time'], 'account_trading_mode': json['account_trading_mode'] == null ? undefined : json['account_trading_mode'], 'account_index': json['account_index'], 'name': json['name'], 'description': json['description'], 'can_invite': json['can_invite'], 'referral_points_percentage': json['referral_points_percentage'], 'can_rfq': json['can_rfq'], 'created_at': json['created_at'], 'positions': ((json['positions'] as Array).map(AccountPositionFromJSON)), 'assets': ((json['assets'] as Array).map(AccountAssetFromJSON)), 'total_asset_value': json['total_asset_value'], 'cross_asset_value': json['cross_asset_value'], 'cross_initial_margin_requirement': json['cross_initial_margin_requirement'], 'cross_maintenance_margin_requirement': json['cross_maintenance_margin_requirement'], 'pool_info': PublicPoolInfoFromJSON(json['pool_info']), 'shares': ((json['shares'] as Array).map(PublicPoolShareFromJSON)), 'pending_unlocks': json['pending_unlocks'] == null ? undefined : ((json['pending_unlocks'] as Array).map(PendingUnlockFromJSON)), 'approved_integrators': json['approved_integrators'] == null ? undefined : ((json['approved_integrators'] as Array).map(ApprovedIntegratorFromJSON)), }; } export function DetailedAccountToJSON(value?: DetailedAccount | null): any { if (value == null) { return value; } return { 'code': value['code'], 'message': value['message'], 'account_type': value['account_type'], 'index': value['index'], 'l1_address': value['l1_address'], 'cancel_all_time': value['cancel_all_time'], 'total_order_count': value['total_order_count'], 'total_isolated_order_count': value['total_isolated_order_count'], 'pending_order_count': value['pending_order_count'], 'available_balance': value['available_balance'], 'status': value['status'], 'collateral': value['collateral'], 'transaction_time': value['transaction_time'], 'account_trading_mode': value['account_trading_mode'], 'account_index': value['account_index'], 'name': value['name'], 'description': value['description'], 'can_invite': value['can_invite'], 'referral_points_percentage': value['referral_points_percentage'], 'can_rfq': value['can_rfq'], 'created_at': value['created_at'], 'positions': ((value['positions'] as Array).map(AccountPositionToJSON)), 'assets': ((value['assets'] as Array).map(AccountAssetToJSON)), 'total_asset_value': value['total_asset_value'], 'cross_asset_value': value['cross_asset_value'], 'cross_initial_margin_requirement': value['cross_initial_margin_requirement'], 'cross_maintenance_margin_requirement': value['cross_maintenance_margin_requirement'], 'pool_info': PublicPoolInfoToJSON(value['pool_info']), 'shares': ((value['shares'] as Array).map(PublicPoolShareToJSON)), 'pending_unlocks': value['pending_unlocks'] == null ? undefined : ((value['pending_unlocks'] as Array).map(PendingUnlockToJSON)), 'approved_integrators': value['approved_integrators'] == null ? undefined : ((value['approved_integrators'] as Array).map(ApprovedIntegratorToJSON)), }; }