"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.instanceOfEndpoint = instanceOfEndpoint;
exports.EndpointFromJSON = EndpointFromJSON;
exports.EndpointFromJSONTyped = EndpointFromJSONTyped;
exports.EndpointToJSON = EndpointToJSON;
exports.EndpointToJSONTyped = EndpointToJSONTyped;
const AuthModeEnum_1 = require("./AuthModeEnum");
const ProtocolEnum_1 = require("./ProtocolEnum");
const RACProvider_1 = require("./RACProvider");
/**
 * Check if a given object implements the Endpoint interface.
 */
function instanceOfEndpoint(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('provider' in value) || value['provider'] === undefined)
        return false;
    if (!('providerObj' in value) || value['providerObj'] === undefined)
        return false;
    if (!('protocol' in value) || value['protocol'] === undefined)
        return false;
    if (!('host' in value) || value['host'] === undefined)
        return false;
    if (!('authMode' in value) || value['authMode'] === undefined)
        return false;
    if (!('launchUrl' in value) || value['launchUrl'] === undefined)
        return false;
    return true;
}
function EndpointFromJSON(json) {
    return EndpointFromJSONTyped(json, false);
}
function EndpointFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'provider': json['provider'],
        'providerObj': (0, RACProvider_1.RACProviderFromJSON)(json['provider_obj']),
        'protocol': (0, ProtocolEnum_1.ProtocolEnumFromJSON)(json['protocol']),
        'host': json['host'],
        'settings': json['settings'] == null ? undefined : json['settings'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'authMode': (0, AuthModeEnum_1.AuthModeEnumFromJSON)(json['auth_mode']),
        'launchUrl': json['launch_url'],
        'maximumConnections': json['maximum_connections'] == null ? undefined : json['maximum_connections'],
    };
}
function EndpointToJSON(json) {
    return EndpointToJSONTyped(json, false);
}
function EndpointToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'provider': value['provider'],
        'protocol': (0, ProtocolEnum_1.ProtocolEnumToJSON)(value['protocol']),
        'host': value['host'],
        'settings': value['settings'],
        'property_mappings': value['propertyMappings'],
        'auth_mode': (0, AuthModeEnum_1.AuthModeEnumToJSON)(value['authMode']),
        'maximum_connections': value['maximumConnections'],
    };
}
//# sourceMappingURL=Endpoint.js.map