UNPKG

@space-cow-media/spellbook-client

Version:

An Open Api generated client for the Commander Spellbook backend REST API.

166 lines 7.2 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Commander Spellbook API * API for Commander Spellbook, the combo database engine for Magic: The Gathering * * The version of the OpenAPI document: 4.8.19 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCardDetail = instanceOfCardDetail; exports.CardDetailFromJSON = CardDetailFromJSON; exports.CardDetailFromJSONTyped = CardDetailFromJSONTyped; exports.CardDetailToJSON = CardDetailToJSON; exports.CardDetailToJSONTyped = CardDetailToJSONTyped; const featureOfCard_1 = require("./featureOfCard"); const cardLegalities_1 = require("./cardLegalities"); const cardPrices_1 = require("./cardPrices"); const identityEnum_1 = require("./identityEnum"); /** * Check if a given object implements the CardDetail interface. */ function instanceOfCardDetail(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('oracleId' in value) || value['oracleId'] === undefined) return false; if (!('identity' in value) || value['identity'] === undefined) return false; if (!('variantCount' in value) || value['variantCount'] === undefined) return false; if (!('spoiler' in value) || value['spoiler'] === undefined) return false; if (!('typeLine' in value) || value['typeLine'] === undefined) return false; if (!('oracleText' in value) || value['oracleText'] === undefined) return false; if (!('keywords' in value) || value['keywords'] === undefined) return false; if (!('manaValue' in value) || value['manaValue'] === undefined) return false; if (!('reserved' in value) || value['reserved'] === undefined) return false; if (!('latestPrintingSet' in value) || value['latestPrintingSet'] === undefined) return false; if (!('reprinted' in value) || value['reprinted'] === undefined) return false; if (!('gameChanger' in value) || value['gameChanger'] === undefined) return false; if (!('tutor' in value) || value['tutor'] === undefined) return false; if (!('massLandDenial' in value) || value['massLandDenial'] === undefined) return false; if (!('extraTurn' in value) || value['extraTurn'] === undefined) return false; if (!('imageUriFrontPng' in value) || value['imageUriFrontPng'] === undefined) return false; if (!('imageUriFrontLarge' in value) || value['imageUriFrontLarge'] === undefined) return false; if (!('imageUriFrontNormal' in value) || value['imageUriFrontNormal'] === undefined) return false; if (!('imageUriFrontSmall' in value) || value['imageUriFrontSmall'] === undefined) return false; if (!('imageUriFrontArtCrop' in value) || value['imageUriFrontArtCrop'] === undefined) return false; if (!('imageUriBackPng' in value) || value['imageUriBackPng'] === undefined) return false; if (!('imageUriBackLarge' in value) || value['imageUriBackLarge'] === undefined) return false; if (!('imageUriBackNormal' in value) || value['imageUriBackNormal'] === undefined) return false; if (!('imageUriBackSmall' in value) || value['imageUriBackSmall'] === undefined) return false; if (!('imageUriBackArtCrop' in value) || value['imageUriBackArtCrop'] === undefined) return false; if (!('features' in value) || value['features'] === undefined) return false; if (!('legalities' in value) || value['legalities'] === undefined) return false; if (!('prices' in value) || value['prices'] === undefined) return false; return true; } function CardDetailFromJSON(json) { return CardDetailFromJSONTyped(json, false); } function CardDetailFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'oracleId': json['oracleId'], 'identity': (0, identityEnum_1.IdentityEnumFromJSON)(json['identity']), 'variantCount': json['variantCount'], 'spoiler': json['spoiler'], 'typeLine': json['typeLine'], 'oracleText': json['oracleText'], 'keywords': json['keywords'], 'manaValue': json['manaValue'], 'reserved': json['reserved'], 'latestPrintingSet': json['latestPrintingSet'], 'reprinted': json['reprinted'], 'gameChanger': json['gameChanger'], 'tutor': json['tutor'], 'massLandDenial': json['massLandDenial'], 'extraTurn': json['extraTurn'], 'imageUriFrontPng': json['imageUriFrontPng'], 'imageUriFrontLarge': json['imageUriFrontLarge'], 'imageUriFrontNormal': json['imageUriFrontNormal'], 'imageUriFrontSmall': json['imageUriFrontSmall'], 'imageUriFrontArtCrop': json['imageUriFrontArtCrop'], 'imageUriBackPng': json['imageUriBackPng'], 'imageUriBackLarge': json['imageUriBackLarge'], 'imageUriBackNormal': json['imageUriBackNormal'], 'imageUriBackSmall': json['imageUriBackSmall'], 'imageUriBackArtCrop': json['imageUriBackArtCrop'], 'features': (json['features'].map(featureOfCard_1.FeatureOfCardFromJSON)), 'legalities': (0, cardLegalities_1.CardLegalitiesFromJSON)(json['legalities']), 'prices': (0, cardPrices_1.CardPricesFromJSON)(json['prices']), }; } function CardDetailToJSON(json) { return CardDetailToJSONTyped(json, false); } function CardDetailToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'oracleId': value['oracleId'], 'identity': (0, identityEnum_1.IdentityEnumToJSON)(value['identity']), 'spoiler': value['spoiler'], 'typeLine': value['typeLine'], 'oracleText': value['oracleText'], 'keywords': value['keywords'], 'manaValue': value['manaValue'], 'reserved': value['reserved'], 'latestPrintingSet': value['latestPrintingSet'], 'reprinted': value['reprinted'], 'gameChanger': value['gameChanger'], 'tutor': value['tutor'], 'massLandDenial': value['massLandDenial'], 'extraTurn': value['extraTurn'], 'imageUriFrontPng': value['imageUriFrontPng'], 'imageUriFrontLarge': value['imageUriFrontLarge'], 'imageUriFrontNormal': value['imageUriFrontNormal'], 'imageUriFrontSmall': value['imageUriFrontSmall'], 'imageUriFrontArtCrop': value['imageUriFrontArtCrop'], 'imageUriBackPng': value['imageUriBackPng'], 'imageUriBackLarge': value['imageUriBackLarge'], 'imageUriBackNormal': value['imageUriBackNormal'], 'imageUriBackSmall': value['imageUriBackSmall'], 'imageUriBackArtCrop': value['imageUriBackArtCrop'], }; } //# sourceMappingURL=cardDetail.js.map