UNPKG

@space-cow-media/spellbook-client

Version:

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

61 lines 2.65 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 { ZoneLocationsEnumFromJSON, ZoneLocationsEnumToJSON, } from './ZoneLocationsEnum.js'; /** * Check if a given object implements the CardUsedInVariantSuggestionRequest interface. */ export function instanceOfCardUsedInVariantSuggestionRequest(value) { if (!('card' in value) || value['card'] === undefined) return false; if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false; return true; } export function CardUsedInVariantSuggestionRequestFromJSON(json) { return CardUsedInVariantSuggestionRequestFromJSONTyped(json, false); } export function CardUsedInVariantSuggestionRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'card': json['card'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'zoneLocations': (json['zoneLocations'].map(ZoneLocationsEnumFromJSON)), 'battlefieldCardState': json['battlefieldCardState'] == null ? undefined : json['battlefieldCardState'], 'exileCardState': json['exileCardState'] == null ? undefined : json['exileCardState'], 'libraryCardState': json['libraryCardState'] == null ? undefined : json['libraryCardState'], 'graveyardCardState': json['graveyardCardState'] == null ? undefined : json['graveyardCardState'], 'mustBeCommander': json['mustBeCommander'] == null ? undefined : json['mustBeCommander'], }; } export function CardUsedInVariantSuggestionRequestToJSON(json) { return CardUsedInVariantSuggestionRequestToJSONTyped(json, false); } export function CardUsedInVariantSuggestionRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'card': value['card'], 'quantity': value['quantity'], 'zoneLocations': (value['zoneLocations'].map(ZoneLocationsEnumToJSON)), 'battlefieldCardState': value['battlefieldCardState'], 'exileCardState': value['exileCardState'], 'libraryCardState': value['libraryCardState'], 'graveyardCardState': value['graveyardCardState'], 'mustBeCommander': value['mustBeCommander'], }; } //# sourceMappingURL=CardUsedInVariantSuggestionRequest.js.map