@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
63 lines • 2.02 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.instanceOfFeature = instanceOfFeature;
exports.FeatureFromJSON = FeatureFromJSON;
exports.FeatureFromJSONTyped = FeatureFromJSONTyped;
exports.FeatureToJSON = FeatureToJSON;
exports.FeatureToJSONTyped = FeatureToJSONTyped;
const featureStatusEnum_1 = require("./featureStatusEnum");
/**
* Check if a given object implements the Feature interface.
*/
function instanceOfFeature(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('uncountable' in value) || value['uncountable'] === undefined)
return false;
if (!('status' in value) || value['status'] === undefined)
return false;
return true;
}
function FeatureFromJSON(json) {
return FeatureFromJSONTyped(json, false);
}
function FeatureFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'uncountable': json['uncountable'],
'status': (0, featureStatusEnum_1.FeatureStatusEnumFromJSON)(json['status']),
};
}
function FeatureToJSON(json) {
return FeatureToJSONTyped(json, false);
}
function FeatureToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'uncountable': value['uncountable'],
'status': (0, featureStatusEnum_1.FeatureStatusEnumToJSON)(value['status']),
};
}
//# sourceMappingURL=feature.js.map