/* 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 ClaimedPrize */ export interface ClaimedPrize { /** * The unique identifier of the claimed prize record * @type {number} * @memberof ClaimedPrize */ id: number; /** * The wallet address that claimed the prize * @type {string} * @memberof ClaimedPrize */ wallet: string; /** * The transaction signature used to claim the prize * @type {string} * @memberof ClaimedPrize */ signature: string; /** * The coin mint address used for the claim * @type {string} * @memberof ClaimedPrize */ mint: string; /** * The amount paid to claim the prize (in smallest unit, e.g., lamports) * @type {number} * @memberof ClaimedPrize */ amount: number; /** * The unique identifier of the prize won * @type {string} * @memberof ClaimedPrize */ prizeId: string; /** * The name of the prize won * @type {string} * @memberof ClaimedPrize */ prizeName: string; /** * The type of prize (e.g., "coin_airdrop", "download") * @type {string} * @memberof ClaimedPrize */ prizeType?: string; /** * When the prize was claimed * @type {Date} * @memberof ClaimedPrize */ createdAt: Date; } /** * Check if a given object implements the ClaimedPrize interface. */ export function instanceOfClaimedPrize(value: object): value is ClaimedPrize { let isInstance = true; isInstance = isInstance && "id" in value && value["id"] !== undefined; isInstance = isInstance && "wallet" in value && value["wallet"] !== undefined; isInstance = isInstance && "signature" in value && value["signature"] !== undefined; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; isInstance = isInstance && "amount" in value && value["amount"] !== undefined; isInstance = isInstance && "prizeId" in value && value["prizeId"] !== undefined; isInstance = isInstance && "prizeName" in value && value["prizeName"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; return isInstance; } export function ClaimedPrizeFromJSON(json: any): ClaimedPrize { return ClaimedPrizeFromJSONTyped(json, false); } export function ClaimedPrizeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimedPrize { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'wallet': json['wallet'], 'signature': json['signature'], 'mint': json['mint'], 'amount': json['amount'], 'prizeId': json['prize_id'], 'prizeName': json['prize_name'], 'prizeType': !exists(json, 'prize_type') ? undefined : json['prize_type'], 'createdAt': (new Date(json['created_at'])), }; } export function ClaimedPrizeToJSON(value?: ClaimedPrize | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'wallet': value.wallet, 'signature': value.signature, 'mint': value.mint, 'amount': value.amount, 'prize_id': value.prizeId, 'prize_name': value.prizeName, 'prize_type': value.prizeType, 'created_at': (value.createdAt.toISOString()), }; }