/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-rc1
 * Contact: hello@goauthentik.io
 *
 * 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';
/**
 * Test policy execution for a user with context
 * @export
 * @interface PolicyTestRequest
 */
export interface PolicyTestRequest {
    /**
     * 
     * @type {number}
     * @memberof PolicyTestRequest
     */
    user: number;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof PolicyTestRequest
     */
    context?: { [key: string]: any; };
}

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

export function PolicyTestRequestFromJSON(json: any): PolicyTestRequest {
    return PolicyTestRequestFromJSONTyped(json, false);
}

export function PolicyTestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyTestRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'user': json['user'],
        'context': json['context'] == null ? undefined : json['context'],
    };
}

export function PolicyTestRequestToJSON(json: any): PolicyTestRequest {
    return PolicyTestRequestToJSONTyped(json, false);
}

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

    return {
        
        'user': value['user'],
        'context': value['context'],
    };
}

