@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
76 lines (65 loc) • 1.74 kB
text/typescript
/* 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.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface CardInDeck
*/
export interface CardInDeck {
/**
*
* @type {string}
* @memberof CardInDeck
*/
card: string;
/**
*
* @type {number}
* @memberof CardInDeck
*/
quantity: number;
}
/**
* Check if a given object implements the CardInDeck interface.
*/
export function instanceOfCardInDeck(value: object): value is CardInDeck {
if (!('card' in value) || value['card'] === undefined) return false;
if (!('quantity' in value) || value['quantity'] === undefined) return false;
return true;
}
export function CardInDeckFromJSON(json: any): CardInDeck {
return CardInDeckFromJSONTyped(json, false);
}
export function CardInDeckFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardInDeck {
if (json == null) {
return json;
}
return {
'card': json['card'],
'quantity': json['quantity'],
};
}
export function CardInDeckToJSON(json: any): CardInDeck {
return CardInDeckToJSONTyped(json, false);
}
export function CardInDeckToJSONTyped(value?: CardInDeck | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'card': value['card'],
'quantity': value['quantity'],
};
}