"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.instanceOfAuthenticatedSession = instanceOfAuthenticatedSession;
exports.AuthenticatedSessionFromJSON = AuthenticatedSessionFromJSON;
exports.AuthenticatedSessionFromJSONTyped = AuthenticatedSessionFromJSONTyped;
exports.AuthenticatedSessionToJSON = AuthenticatedSessionToJSON;
exports.AuthenticatedSessionToJSONTyped = AuthenticatedSessionToJSONTyped;
const AuthenticatedSessionGeoIp_1 = require("./AuthenticatedSessionGeoIp");
const AuthenticatedSessionAsn_1 = require("./AuthenticatedSessionAsn");
const AuthenticatedSessionUserAgent_1 = require("./AuthenticatedSessionUserAgent");
/**
 * Check if a given object implements the AuthenticatedSession interface.
 */
function instanceOfAuthenticatedSession(value) {
    if (!('current' in value) || value['current'] === undefined)
        return false;
    if (!('userAgent' in value) || value['userAgent'] === undefined)
        return false;
    if (!('geoIp' in value) || value['geoIp'] === undefined)
        return false;
    if (!('asn' in value) || value['asn'] === undefined)
        return false;
    if (!('user' in value) || value['user'] === undefined)
        return false;
    if (!('lastIp' in value) || value['lastIp'] === undefined)
        return false;
    if (!('lastUserAgent' in value) || value['lastUserAgent'] === undefined)
        return false;
    if (!('lastUsed' in value) || value['lastUsed'] === undefined)
        return false;
    if (!('expires' in value) || value['expires'] === undefined)
        return false;
    return true;
}
function AuthenticatedSessionFromJSON(json) {
    return AuthenticatedSessionFromJSONTyped(json, false);
}
function AuthenticatedSessionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'uuid': json['uuid'] == null ? undefined : json['uuid'],
        'current': json['current'],
        'userAgent': (0, AuthenticatedSessionUserAgent_1.AuthenticatedSessionUserAgentFromJSON)(json['user_agent']),
        'geoIp': (0, AuthenticatedSessionGeoIp_1.AuthenticatedSessionGeoIpFromJSON)(json['geo_ip']),
        'asn': (0, AuthenticatedSessionAsn_1.AuthenticatedSessionAsnFromJSON)(json['asn']),
        'user': json['user'],
        'lastIp': json['last_ip'],
        'lastUserAgent': json['last_user_agent'],
        'lastUsed': (new Date(json['last_used'])),
        'expires': (new Date(json['expires'])),
    };
}
function AuthenticatedSessionToJSON(json) {
    return AuthenticatedSessionToJSONTyped(json, false);
}
function AuthenticatedSessionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'uuid': value['uuid'],
        'user_agent': (0, AuthenticatedSessionUserAgent_1.AuthenticatedSessionUserAgentToJSON)(value['userAgent']),
        'geo_ip': (0, AuthenticatedSessionGeoIp_1.AuthenticatedSessionGeoIpToJSON)(value['geoIp']),
        'asn': (0, AuthenticatedSessionAsn_1.AuthenticatedSessionAsnToJSON)(value['asn']),
        'user': value['user'],
    };
}
//# sourceMappingURL=AuthenticatedSession.js.map