"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfConnectionToken = instanceOfConnectionToken;
exports.ConnectionTokenFromJSON = ConnectionTokenFromJSON;
exports.ConnectionTokenFromJSONTyped = ConnectionTokenFromJSONTyped;
exports.ConnectionTokenToJSON = ConnectionTokenToJSON;
exports.ConnectionTokenToJSONTyped = ConnectionTokenToJSONTyped;
const PartialUser_1 = require("./PartialUser");
const Endpoint_1 = require("./Endpoint");
const RACProvider_1 = require("./RACProvider");
/**
 * Check if a given object implements the ConnectionToken interface.
 */
function instanceOfConnectionToken(value) {
    if (!('provider' in value) || value['provider'] === undefined)
        return false;
    if (!('providerObj' in value) || value['providerObj'] === undefined)
        return false;
    if (!('endpoint' in value) || value['endpoint'] === undefined)
        return false;
    if (!('endpointObj' in value) || value['endpointObj'] === undefined)
        return false;
    if (!('user' in value) || value['user'] === undefined)
        return false;
    return true;
}
function ConnectionTokenFromJSON(json) {
    return ConnectionTokenFromJSONTyped(json, false);
}
function ConnectionTokenFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'] == null ? undefined : json['pk'],
        'provider': json['provider'],
        'providerObj': (0, RACProvider_1.RACProviderFromJSON)(json['provider_obj']),
        'endpoint': json['endpoint'],
        'endpointObj': (0, Endpoint_1.EndpointFromJSON)(json['endpoint_obj']),
        'user': (0, PartialUser_1.PartialUserFromJSON)(json['user']),
    };
}
function ConnectionTokenToJSON(json) {
    return ConnectionTokenToJSONTyped(json, false);
}
function ConnectionTokenToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'pk': value['pk'],
        'provider': value['provider'],
        'endpoint': value['endpoint'],
    };
}
//# sourceMappingURL=ConnectionToken.js.map