/* 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'; import type { Supporter } from './Supporter'; import { SupporterFromJSON, SupporterFromJSONTyped, SupporterToJSON, } from './Supporter'; import type { VersionMetadata } from './VersionMetadata'; import { VersionMetadataFromJSON, VersionMetadataFromJSONTyped, VersionMetadataToJSON, } from './VersionMetadata'; /** * * @export * @interface GetSupporter */ export interface GetSupporter { /** * * @type {number} * @memberof GetSupporter */ latestChainBlock: number; /** * * @type {number} * @memberof GetSupporter */ latestIndexedBlock: number; /** * * @type {number} * @memberof GetSupporter */ latestChainSlotPlays: number; /** * * @type {number} * @memberof GetSupporter */ latestIndexedSlotPlays: number; /** * * @type {string} * @memberof GetSupporter */ signature: string; /** * * @type {string} * @memberof GetSupporter */ timestamp: string; /** * * @type {VersionMetadata} * @memberof GetSupporter */ version: VersionMetadata; /** * * @type {Supporter} * @memberof GetSupporter */ data?: Supporter; } /** * Check if a given object implements the GetSupporter interface. */ export function instanceOfGetSupporter(value: object): value is GetSupporter { let isInstance = true; isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; isInstance = isInstance && "signature" in value && value["signature"] !== undefined; isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; isInstance = isInstance && "version" in value && value["version"] !== undefined; return isInstance; } export function GetSupporterFromJSON(json: any): GetSupporter { return GetSupporterFromJSONTyped(json, false); } export function GetSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSupporter { if ((json === undefined) || (json === null)) { return json; } return { 'latestChainBlock': json['latest_chain_block'], 'latestIndexedBlock': json['latest_indexed_block'], 'latestChainSlotPlays': json['latest_chain_slot_plays'], 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], 'signature': json['signature'], 'timestamp': json['timestamp'], 'version': VersionMetadataFromJSON(json['version']), 'data': !exists(json, 'data') ? undefined : SupporterFromJSON(json['data']), }; } export function GetSupporterToJSON(value?: GetSupporter | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'latest_chain_block': value.latestChainBlock, 'latest_indexed_block': value.latestIndexedBlock, 'latest_chain_slot_plays': value.latestChainSlotPlays, 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, 'signature': value.signature, 'timestamp': value.timestamp, 'version': VersionMetadataToJSON(value.version), 'data': SupporterToJSON(value.data), }; }