/* 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 { Account } from './Account'; import { AccountFromJSON, AccountFromJSONTyped, AccountToJSON, } from './Account'; /** * * @export * @interface SubAccounts */ export interface SubAccounts { /** * * @type {number} * @memberof SubAccounts */ code: number; /** * * @type {string} * @memberof SubAccounts */ message?: string; /** * * @type {string} * @memberof SubAccounts */ l1_address: string; /** * * @type {Array} * @memberof SubAccounts */ sub_accounts: Array; /** * * @type {string} * @memberof SubAccounts */ next_cursor?: string; } /** * Check if a given object implements the SubAccounts interface. */ export function instanceOfSubAccounts(value: object): value is SubAccounts { if (!('code' in value) || value['code'] === undefined) return false; if (!('l1_address' in value) || value['l1_address'] === undefined) return false; if (!('sub_accounts' in value) || value['sub_accounts'] === undefined) return false; return true; } export function SubAccountsFromJSON(json: any): SubAccounts { return SubAccountsFromJSONTyped(json, false); } export function SubAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubAccounts { if (json == null) { return json; } return { 'code': json['code'], 'message': json['message'] == null ? undefined : json['message'], 'l1_address': json['l1_address'], 'sub_accounts': ((json['sub_accounts'] as Array).map(AccountFromJSON)), 'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'], }; } export function SubAccountsToJSON(value?: SubAccounts | null): any { if (value == null) { return value; } return { 'code': value['code'], 'message': value['message'], 'l1_address': value['l1_address'], 'sub_accounts': ((value['sub_accounts'] as Array).map(AccountToJSON)), 'next_cursor': value['next_cursor'], }; }