/* 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 Asset */ export interface Asset { /** * * @type {number} * @memberof Asset */ asset_id: number; /** * * @type {string} * @memberof Asset */ symbol: string; /** * * @type {number} * @memberof Asset */ l1_decimals: number; /** * * @type {number} * @memberof Asset */ decimals: number; /** * * @type {string} * @memberof Asset */ min_transfer_amount: string; /** * * @type {string} * @memberof Asset */ min_withdrawal_amount: string; /** * * @type {string} * @memberof Asset */ margin_mode: AssetMarginModeEnum; /** * * @type {string} * @memberof Asset */ index_price: string; /** * * @type {number} * @memberof Asset */ price_decimals: number; /** * * @type {string} * @memberof Asset */ l1_address: string; /** * * @type {string} * @memberof Asset */ loan_to_value: string; /** * * @type {string} * @memberof Asset */ liquidation_threshold: string; /** * * @type {string} * @memberof Asset */ liquidation_fee: string; /** * * @type {string} * @memberof Asset */ global_supply_cap: string; /** * * @type {string} * @memberof Asset */ user_supply_cap: string; /** * * @type {string} * @memberof Asset */ total_supplied: string; } /** * @export */ export const AssetMarginModeEnum = { Enabled: 'enabled', Disabled: 'disabled' } as const; export type AssetMarginModeEnum = typeof AssetMarginModeEnum[keyof typeof AssetMarginModeEnum]; /** * Check if a given object implements the Asset interface. */ export function instanceOfAsset(value: object): value is Asset { if (!('asset_id' in value) || value['asset_id'] === undefined) return false; if (!('symbol' in value) || value['symbol'] === undefined) return false; if (!('l1_decimals' in value) || value['l1_decimals'] === undefined) return false; if (!('decimals' in value) || value['decimals'] === undefined) return false; if (!('min_transfer_amount' in value) || value['min_transfer_amount'] === undefined) return false; if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false; if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false; if (!('index_price' in value) || value['index_price'] === undefined) return false; if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false; if (!('l1_address' in value) || value['l1_address'] === undefined) return false; if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false; if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false; if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false; if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false; if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false; if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false; return true; } export function AssetFromJSON(json: any): Asset { return AssetFromJSONTyped(json, false); } export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Asset { if (json == null) { return json; } return { 'asset_id': json['asset_id'], 'symbol': json['symbol'], 'l1_decimals': json['l1_decimals'], 'decimals': json['decimals'], 'min_transfer_amount': json['min_transfer_amount'], 'min_withdrawal_amount': json['min_withdrawal_amount'], 'margin_mode': json['margin_mode'], 'index_price': json['index_price'], 'price_decimals': json['price_decimals'], 'l1_address': json['l1_address'], 'loan_to_value': json['loan_to_value'], 'liquidation_threshold': json['liquidation_threshold'], 'liquidation_fee': json['liquidation_fee'], 'global_supply_cap': json['global_supply_cap'], 'user_supply_cap': json['user_supply_cap'], 'total_supplied': json['total_supplied'], }; } export function AssetToJSON(value?: Asset | null): any { if (value == null) { return value; } return { 'asset_id': value['asset_id'], 'symbol': value['symbol'], 'l1_decimals': value['l1_decimals'], 'decimals': value['decimals'], 'min_transfer_amount': value['min_transfer_amount'], 'min_withdrawal_amount': value['min_withdrawal_amount'], 'margin_mode': value['margin_mode'], 'index_price': value['index_price'], 'price_decimals': value['price_decimals'], 'l1_address': value['l1_address'], 'loan_to_value': value['loan_to_value'], 'liquidation_threshold': value['liquidation_threshold'], 'liquidation_fee': value['liquidation_fee'], 'global_supply_cap': value['global_supply_cap'], 'user_supply_cap': value['user_supply_cap'], 'total_supplied': value['total_supplied'], }; }