UNPKG

@space-cow-media/spellbook-client

Version:

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

74 lines 2.75 kB
/* 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: 5.4.10 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { FeatureFromJSON, } from './Feature.js'; /** * Check if a given object implements the FeatureOfCard interface. */ export function instanceOfFeatureOfCard(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('feature' in value) || value['feature'] === undefined) return false; if (!('quantity' in value) || value['quantity'] === undefined) return false; if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false; if (!('battlefieldCardState' in value) || value['battlefieldCardState'] === undefined) return false; if (!('exileCardState' in value) || value['exileCardState'] === undefined) return false; if (!('libraryCardState' in value) || value['libraryCardState'] === undefined) return false; if (!('graveyardCardState' in value) || value['graveyardCardState'] === undefined) return false; if (!('mustBeCommander' in value) || value['mustBeCommander'] === undefined) return false; return true; } export function FeatureOfCardFromJSON(json) { return FeatureOfCardFromJSONTyped(json, false); } export function FeatureOfCardFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'feature': FeatureFromJSON(json['feature']), 'quantity': json['quantity'], 'zoneLocations': json['zoneLocations'], 'battlefieldCardState': json['battlefieldCardState'], 'exileCardState': json['exileCardState'], 'libraryCardState': json['libraryCardState'], 'graveyardCardState': json['graveyardCardState'], 'mustBeCommander': json['mustBeCommander'], }; } export function FeatureOfCardToJSON(json) { return FeatureOfCardToJSONTyped(json, false); } export function FeatureOfCardToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'quantity': value['quantity'], 'battlefieldCardState': value['battlefieldCardState'], 'exileCardState': value['exileCardState'], 'libraryCardState': value['libraryCardState'], 'graveyardCardState': value['graveyardCardState'], 'mustBeCommander': value['mustBeCommander'], }; } //# sourceMappingURL=FeatureOfCard.js.map