/* tslint:disable */ /* eslint-disable */ // @ts-nocheck /** * Audius API * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * * @export * @interface UserCoin */ export interface UserCoin { /** * The coin mint address * @type {string} * @memberof UserCoin */ mint: string; /** * The coin symbol * @type {string} * @memberof UserCoin */ ticker: string; /** * The number of decimals for the coin * @type {number} * @memberof UserCoin */ decimals: number; /** * The ID of the user associated with the coin * @type {string} * @memberof UserCoin */ ownerId: string; /** * URL to the coin's logo image * @type {string} * @memberof UserCoin */ logoUri?: string | null; /** * URL to the coin's banner image * @type {string} * @memberof UserCoin */ bannerImageUrl?: string | null; /** * Whether the coin has a Discord server * @type {boolean} * @memberof UserCoin */ hasDiscord: boolean; /** * The balance of the coin in the user's account (in wei) * @type {number} * @memberof UserCoin */ balance: number; /** * The balance of the coin in the user's account in USD * @type {number} * @memberof UserCoin */ balanceUsd: number; } /** * Check if a given object implements the UserCoin interface. */ export function instanceOfUserCoin(value: object): value is UserCoin { let isInstance = true; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; isInstance = isInstance && "ticker" in value && value["ticker"] !== undefined; isInstance = isInstance && "decimals" in value && value["decimals"] !== undefined; isInstance = isInstance && "ownerId" in value && value["ownerId"] !== undefined; isInstance = isInstance && "hasDiscord" in value && value["hasDiscord"] !== undefined; isInstance = isInstance && "balance" in value && value["balance"] !== undefined; isInstance = isInstance && "balanceUsd" in value && value["balanceUsd"] !== undefined; return isInstance; } export function UserCoinFromJSON(json: any): UserCoin { return UserCoinFromJSONTyped(json, false); } export function UserCoinFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCoin { if ((json === undefined) || (json === null)) { return json; } return { 'mint': json['mint'], 'ticker': json['ticker'], 'decimals': json['decimals'], 'ownerId': json['owner_id'], 'logoUri': !exists(json, 'logo_uri') ? undefined : json['logo_uri'], 'bannerImageUrl': !exists(json, 'banner_image_url') ? undefined : json['banner_image_url'], 'hasDiscord': json['has_discord'], 'balance': json['balance'], 'balanceUsd': json['balance_usd'], }; } export function UserCoinToJSON(value?: UserCoin | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'mint': value.mint, 'ticker': value.ticker, 'decimals': value.decimals, 'owner_id': value.ownerId, 'logo_uri': value.logoUri, 'banner_image_url': value.bannerImageUrl, 'has_discord': value.hasDiscord, 'balance': value.balance, 'balance_usd': value.balanceUsd, }; }