/* 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.2.2
 * 
 *
 * 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'],
    };
}

