/* 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: 5.4.10
 * 
 *
 * 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.js';
/**
 * 
 * @export
 * @interface TokenObtainPairRequest
 */
export interface TokenObtainPairRequest {
    /**
     * 
     * @type {string}
     * @memberof TokenObtainPairRequest
     */
    username?: string;
    /**
     * 
     * @type {string}
     * @memberof TokenObtainPairRequest
     */
    password?: string;
    /**
     * 
     * @type {string}
     * @memberof TokenObtainPairRequest
     */
    code?: string;
}

/**
 * Check if a given object implements the TokenObtainPairRequest interface.
 */
export function instanceOfTokenObtainPairRequest(value: object): value is TokenObtainPairRequest {
    return true;
}

export function TokenObtainPairRequestFromJSON(json: any): TokenObtainPairRequest {
    return TokenObtainPairRequestFromJSONTyped(json, false);
}

export function TokenObtainPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenObtainPairRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'username': json['username'] == null ? undefined : json['username'],
        'password': json['password'] == null ? undefined : json['password'],
        'code': json['code'] == null ? undefined : json['code'],
    };
}

export function TokenObtainPairRequestToJSON(json: any): TokenObtainPairRequest {
    return TokenObtainPairRequestToJSONTyped(json, false);
}

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

    return {
        
        'username': value['username'],
        'password': value['password'],
        'code': value['code'],
    };
}

