/* 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 { BestSellingItem } from './BestSellingItem'; import { BestSellingItemFromJSON, BestSellingItemFromJSONTyped, BestSellingItemToJSON, } from './BestSellingItem'; import type { Related } from './Related'; import { RelatedFromJSON, RelatedFromJSONTyped, RelatedToJSON, } from './Related'; import type { VersionMetadata } from './VersionMetadata'; import { VersionMetadataFromJSON, VersionMetadataFromJSONTyped, VersionMetadataToJSON, } from './VersionMetadata'; /** * * @export * @interface BestSellingResponse */ export interface BestSellingResponse { /** * * @type {number} * @memberof BestSellingResponse */ latestChainBlock: number; /** * * @type {number} * @memberof BestSellingResponse */ latestIndexedBlock: number; /** * * @type {number} * @memberof BestSellingResponse */ latestChainSlotPlays: number; /** * * @type {number} * @memberof BestSellingResponse */ latestIndexedSlotPlays: number; /** * * @type {string} * @memberof BestSellingResponse */ signature: string; /** * * @type {string} * @memberof BestSellingResponse */ timestamp: string; /** * * @type {VersionMetadata} * @memberof BestSellingResponse */ version: VersionMetadata; /** * * @type {Array} * @memberof BestSellingResponse */ data?: Array; /** * * @type {Related} * @memberof BestSellingResponse */ related?: Related; } /** * Check if a given object implements the BestSellingResponse interface. */ export function instanceOfBestSellingResponse(value: object): value is BestSellingResponse { 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 BestSellingResponseFromJSON(json: any): BestSellingResponse { return BestSellingResponseFromJSONTyped(json, false); } export function BestSellingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BestSellingResponse { 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 : ((json['data'] as Array).map(BestSellingItemFromJSON)), 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), }; } export function BestSellingResponseToJSON(value?: BestSellingResponse | 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': value.data === undefined ? undefined : ((value.data as Array).map(BestSellingItemToJSON)), 'related': RelatedToJSON(value.related), }; }