/* 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';
/**
 * 
 * @export
 * @interface IntrospectResponse
 */
export interface IntrospectResponse {
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    jti?: string | null;
    /**
     * 
     * @type {boolean}
     * @memberof IntrospectResponse
     */
    active?: boolean;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    tokenType?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    clientId?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    sub?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    username?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    scope?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    iss?: string | null;
    /**
     * 
     * @type {string}
     * @memberof IntrospectResponse
     */
    aud?: string | null;
    /**
     * 
     * @type {number}
     * @memberof IntrospectResponse
     */
    iat?: number | null;
    /**
     * 
     * @type {number}
     * @memberof IntrospectResponse
     */
    exp?: number | null;
    /**
     * 
     * @type {number}
     * @memberof IntrospectResponse
     */
    nbf?: number | null;
}

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

export function IntrospectResponseFromJSON(json: any): IntrospectResponse {
    return IntrospectResponseFromJSONTyped(json, false);
}

export function IntrospectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntrospectResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'jti': json['jti'] == null ? undefined : json['jti'],
        'active': json['active'] == null ? undefined : json['active'],
        'tokenType': json['token_type'] == null ? undefined : json['token_type'],
        'clientId': json['client_id'] == null ? undefined : json['client_id'],
        'sub': json['sub'] == null ? undefined : json['sub'],
        'username': json['username'] == null ? undefined : json['username'],
        'scope': json['scope'] == null ? undefined : json['scope'],
        'iss': json['iss'] == null ? undefined : json['iss'],
        'aud': json['aud'] == null ? undefined : json['aud'],
        'iat': json['iat'] == null ? undefined : json['iat'],
        'exp': json['exp'] == null ? undefined : json['exp'],
        'nbf': json['nbf'] == null ? undefined : json['nbf'],
    };
}

export function IntrospectResponseToJSON(json: any): IntrospectResponse {
    return IntrospectResponseToJSONTyped(json, false);
}

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

    return {
        
        'jti': value['jti'],
        'active': value['active'],
        'token_type': value['tokenType'],
        'client_id': value['clientId'],
        'sub': value['sub'],
        'username': value['username'],
        'scope': value['scope'],
        'iss': value['iss'],
        'aud': value['aud'],
        'iat': value['iat'],
        'exp': value['exp'],
        'nbf': value['nbf'],
    };
}

