@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
45 lines • 1.56 kB
JavaScript
/* 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 { CardInDeckRequestFromJSON, CardInDeckRequestToJSON, } from './CardInDeckRequest.js';
/**
* Check if a given object implements the DeckRequest interface.
*/
export function instanceOfDeckRequest(value) {
return true;
}
export function DeckRequestFromJSON(json) {
return DeckRequestFromJSONTyped(json, false);
}
export function DeckRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'main': json['main'] == null ? undefined : (json['main'].map(CardInDeckRequestFromJSON)),
'commanders': json['commanders'] == null ? undefined : (json['commanders'].map(CardInDeckRequestFromJSON)),
};
}
export function DeckRequestToJSON(json) {
return DeckRequestToJSONTyped(json, false);
}
export function DeckRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'main': value['main'] == null ? undefined : (value['main'].map(CardInDeckRequestToJSON)),
'commanders': value['commanders'] == null ? undefined : (value['commanders'].map(CardInDeckRequestToJSON)),
};
}
//# sourceMappingURL=DeckRequest.js.map