/* 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 Account */ export interface Account { /** * * @type {number} * @memberof Account */ code: number; /** * * @type {string} * @memberof Account */ message?: string; /** * * @type {number} * @memberof Account */ account_type: number; /** * * @type {number} * @memberof Account */ index: number; /** * * @type {string} * @memberof Account */ l1_address: string; /** * * @type {number} * @memberof Account */ cancel_all_time: number; /** * * @type {number} * @memberof Account */ total_order_count: number; /** * * @type {number} * @memberof Account */ total_isolated_order_count: number; /** * * @type {number} * @memberof Account */ pending_order_count: number; /** * * @type {string} * @memberof Account */ available_balance: string; /** * * @type {number} * @memberof Account */ status: number; /** * * @type {string} * @memberof Account */ collateral: string; /** * * @type {number} * @memberof Account */ transaction_time: number; /** * * @type {number} * @memberof Account */ account_trading_mode?: number; } /** * Check if a given object implements the Account interface. */ export function instanceOfAccount(value: object): value is Account { 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; return true; } export function AccountFromJSON(json: any): Account { return AccountFromJSONTyped(json, false); } export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account { 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'], }; } export function AccountToJSON(value?: Account | 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'], }; }