"use strict";
/* 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfEventRequest = instanceOfEventRequest;
exports.EventRequestFromJSON = EventRequestFromJSON;
exports.EventRequestFromJSONTyped = EventRequestFromJSONTyped;
exports.EventRequestToJSON = EventRequestToJSON;
exports.EventRequestToJSONTyped = EventRequestToJSONTyped;
const EventActions_1 = require("./EventActions");
/**
 * Check if a given object implements the EventRequest interface.
 */
function instanceOfEventRequest(value) {
    if (!('action' in value) || value['action'] === undefined)
        return false;
    if (!('app' in value) || value['app'] === undefined)
        return false;
    return true;
}
function EventRequestFromJSON(json) {
    return EventRequestFromJSONTyped(json, false);
}
function EventRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'user': json['user'] == null ? undefined : json['user'],
        'action': (0, EventActions_1.EventActionsFromJSON)(json['action']),
        'app': json['app'],
        'context': json['context'] == null ? undefined : json['context'],
        'clientIp': json['client_ip'] == null ? undefined : json['client_ip'],
        'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
        'brand': json['brand'] == null ? undefined : json['brand'],
    };
}
function EventRequestToJSON(json) {
    return EventRequestToJSONTyped(json, false);
}
function EventRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'user': value['user'],
        'action': (0, EventActions_1.EventActionsToJSON)(value['action']),
        'app': value['app'],
        'context': value['context'],
        'client_ip': value['clientIp'],
        'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()),
        'brand': value['brand'],
    };
}
//# sourceMappingURL=EventRequest.js.map