/* tslint:disable */
/* eslint-disable */
/**
 * Tribufu API
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 *
 * 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';
import type { TokenHintType } from './TokenHintType';
import {
    TokenHintTypeFromJSON,
    TokenHintTypeFromJSONTyped,
    TokenHintTypeToJSON,
    TokenHintTypeToJSONTyped,
} from './TokenHintType';

/**
 * 
 * @export
 * @interface IntrospectRequest
 */
export interface IntrospectRequest {
    /**
     * 
     * @type {string}
     * @memberof IntrospectRequest
     */
    token: string | null;
    /**
     * 
     * @type {TokenHintType}
     * @memberof IntrospectRequest
     */
    tokenTypeHint: TokenHintType;
}



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

export function IntrospectRequestFromJSON(json: any): IntrospectRequest {
    return IntrospectRequestFromJSONTyped(json, false);
}

export function IntrospectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntrospectRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'token': json['token'],
        'tokenTypeHint': TokenHintTypeFromJSON(json['token_type_hint']),
    };
}

export function IntrospectRequestToJSON(json: any): IntrospectRequest {
    return IntrospectRequestToJSONTyped(json, false);
}

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

    return {
        
        'token': value['token'],
        'token_type_hint': TokenHintTypeToJSON(value['tokenTypeHint']),
    };
}

