UNPKG

@space-cow-media/spellbook-client

Version:

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

63 lines 2.89 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 TemplateRequiredInVariantSuggestionRequest interface. */ export function instanceOfTemplateRequiredInVariantSuggestionRequest(value) { if (!('template' in value) || value['template'] === undefined) return false; if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false; return true; } export function TemplateRequiredInVariantSuggestionRequestFromJSON(json) { return TemplateRequiredInVariantSuggestionRequestFromJSONTyped(json, false); } export function TemplateRequiredInVariantSuggestionRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'template': json['template'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'scryfallQuery': json['scryfallQuery'] == null ? undefined : json['scryfallQuery'], '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 TemplateRequiredInVariantSuggestionRequestToJSON(json) { return TemplateRequiredInVariantSuggestionRequestToJSONTyped(json, false); } export function TemplateRequiredInVariantSuggestionRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'template': value['template'], 'quantity': value['quantity'], 'scryfallQuery': value['scryfallQuery'], 'zoneLocations': (value['zoneLocations'].map(ZoneLocationsEnumToJSON)), 'battlefieldCardState': value['battlefieldCardState'], 'exileCardState': value['exileCardState'], 'libraryCardState': value['libraryCardState'], 'graveyardCardState': value['graveyardCardState'], 'mustBeCommander': value['mustBeCommander'], }; } //# sourceMappingURL=TemplateRequiredInVariantSuggestionRequest.js.map