/* 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 CardInDeckRequest
 */
export interface CardInDeckRequest {
    /**
     * 
     * @type {string}
     * @memberof CardInDeckRequest
     */
    card: string;
    /**
     * 
     * @type {number}
     * @memberof CardInDeckRequest
     */
    quantity?: number;
}

/**
 * Check if a given object implements the CardInDeckRequest interface.
 */
export function instanceOfCardInDeckRequest(value: object): value is CardInDeckRequest {
    if (!('card' in value) || value['card'] === undefined) return false;
    return true;
}

export function CardInDeckRequestFromJSON(json: any): CardInDeckRequest {
    return CardInDeckRequestFromJSONTyped(json, false);
}

export function CardInDeckRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardInDeckRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'card': json['card'],
        'quantity': json['quantity'] == null ? undefined : json['quantity'],
    };
}

export function CardInDeckRequestToJSON(json: any): CardInDeckRequest {
    return CardInDeckRequestToJSONTyped(json, false);
}

export function CardInDeckRequestToJSONTyped(value?: CardInDeckRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'card': value['card'],
        'quantity': value['quantity'],
    };
}

