/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * 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'; import type { LogEvent } from './LogEvent'; import { LogEventFromJSON, LogEventFromJSONTyped, LogEventToJSON, LogEventToJSONTyped, } from './LogEvent'; /** * result of a policy test * @export * @interface PolicyTestResult */ export interface PolicyTestResult { /** * * @type {boolean} * @memberof PolicyTestResult */ passing: boolean; /** * * @type {Array} * @memberof PolicyTestResult */ readonly messages: Array; /** * * @type {Array} * @memberof PolicyTestResult */ readonly logMessages: Array; } /** * Check if a given object implements the PolicyTestResult interface. */ export function instanceOfPolicyTestResult(value: object): value is PolicyTestResult { if (!('passing' in value) || value['passing'] === undefined) return false; if (!('messages' in value) || value['messages'] === undefined) return false; if (!('logMessages' in value) || value['logMessages'] === undefined) return false; return true; } export function PolicyTestResultFromJSON(json: any): PolicyTestResult { return PolicyTestResultFromJSONTyped(json, false); } export function PolicyTestResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyTestResult { if (json == null) { return json; } return { 'passing': json['passing'], 'messages': json['messages'], 'logMessages': ((json['log_messages'] as Array).map(LogEventFromJSON)), }; } export function PolicyTestResultToJSON(json: any): PolicyTestResult { return PolicyTestResultToJSONTyped(json, false); } export function PolicyTestResultToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'passing': value['passing'], }; }