/* 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 SubAccount */ export interface SubAccount { /** * * @type {number} * @memberof SubAccount */ index: number; /** * * @type {number} * @memberof SubAccount */ sub_account_index: number; /** * * @type {string} * @memberof SubAccount */ l1_address: string; /** * * @type {string} * @memberof SubAccount */ pk: string; /** * * @type {number} * @memberof SubAccount */ nonce: number; /** * * @type {number} * @memberof SubAccount */ status: number; /** * * @type {string} * @memberof SubAccount */ collateral: string; /** * * @type {number} * @memberof SubAccount */ collateral_type: number; } /** * Check if a given object implements the SubAccount interface. */ export function instanceOfSubAccount(value: object): value is SubAccount { if (!('index' in value) || value['index'] === undefined) return false; if (!('sub_account_index' in value) || value['sub_account_index'] === undefined) return false; if (!('l1_address' in value) || value['l1_address'] === undefined) return false; if (!('pk' in value) || value['pk'] === undefined) return false; if (!('nonce' in value) || value['nonce'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('collateral' in value) || value['collateral'] === undefined) return false; if (!('collateral_type' in value) || value['collateral_type'] === undefined) return false; return true; } export function SubAccountFromJSON(json: any): SubAccount { return SubAccountFromJSONTyped(json, false); } export function SubAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubAccount { if (json == null) { return json; } return { 'index': json['index'], 'sub_account_index': json['sub_account_index'], 'l1_address': json['l1_address'], 'pk': json['pk'], 'nonce': json['nonce'], 'status': json['status'], 'collateral': json['collateral'], 'collateral_type': json['collateral_type'], }; } export function SubAccountToJSON(value?: SubAccount | null): any { if (value == null) { return value; } return { 'index': value['index'], 'sub_account_index': value['sub_account_index'], 'l1_address': value['l1_address'], 'pk': value['pk'], 'nonce': value['nonce'], 'status': value['status'], 'collateral': value['collateral'], 'collateral_type': value['collateral_type'], }; }