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