"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.ModelRequestFromJSON = ModelRequestFromJSON;
exports.ModelRequestFromJSONTyped = ModelRequestFromJSONTyped;
exports.ModelRequestToJSON = ModelRequestToJSON;
exports.ModelRequestToJSONTyped = ModelRequestToJSONTyped;
const GoogleWorkspaceProviderRequest_1 = require("./GoogleWorkspaceProviderRequest");
const LDAPProviderRequest_1 = require("./LDAPProviderRequest");
const MicrosoftEntraProviderRequest_1 = require("./MicrosoftEntraProviderRequest");
const OAuth2ProviderRequest_1 = require("./OAuth2ProviderRequest");
const ProxyProviderRequest_1 = require("./ProxyProviderRequest");
const RACProviderRequest_1 = require("./RACProviderRequest");
const RadiusProviderRequest_1 = require("./RadiusProviderRequest");
const SAMLProviderRequest_1 = require("./SAMLProviderRequest");
const SCIMProviderRequest_1 = require("./SCIMProviderRequest");
const SSFProviderRequest_1 = require("./SSFProviderRequest");
const WSFederationProviderRequest_1 = require("./WSFederationProviderRequest");
function ModelRequestFromJSON(json) {
    return ModelRequestFromJSONTyped(json, false);
}
function ModelRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['provider_model']) {
        case 'authentik_providers_google_workspace.googleworkspaceprovider':
            return Object.assign({}, (0, GoogleWorkspaceProviderRequest_1.GoogleWorkspaceProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_google_workspace.googleworkspaceprovider' });
        case 'authentik_providers_ldap.ldapprovider':
            return Object.assign({}, (0, LDAPProviderRequest_1.LDAPProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_ldap.ldapprovider' });
        case 'authentik_providers_microsoft_entra.microsoftentraprovider':
            return Object.assign({}, (0, MicrosoftEntraProviderRequest_1.MicrosoftEntraProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_microsoft_entra.microsoftentraprovider' });
        case 'authentik_providers_oauth2.oauth2provider':
            return Object.assign({}, (0, OAuth2ProviderRequest_1.OAuth2ProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_oauth2.oauth2provider' });
        case 'authentik_providers_proxy.proxyprovider':
            return Object.assign({}, (0, ProxyProviderRequest_1.ProxyProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_proxy.proxyprovider' });
        case 'authentik_providers_rac.racprovider':
            return Object.assign({}, (0, RACProviderRequest_1.RACProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_rac.racprovider' });
        case 'authentik_providers_radius.radiusprovider':
            return Object.assign({}, (0, RadiusProviderRequest_1.RadiusProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_radius.radiusprovider' });
        case 'authentik_providers_saml.samlprovider':
            return Object.assign({}, (0, SAMLProviderRequest_1.SAMLProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_saml.samlprovider' });
        case 'authentik_providers_scim.scimprovider':
            return Object.assign({}, (0, SCIMProviderRequest_1.SCIMProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_scim.scimprovider' });
        case 'authentik_providers_ssf.ssfprovider':
            return Object.assign({}, (0, SSFProviderRequest_1.SSFProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_ssf.ssfprovider' });
        case 'authentik_providers_ws_federation.wsfederationprovider':
            return Object.assign({}, (0, WSFederationProviderRequest_1.WSFederationProviderRequestFromJSONTyped)(json, true), { providerModel: 'authentik_providers_ws_federation.wsfederationprovider' });
        default:
            return json;
    }
}
function ModelRequestToJSON(json) {
    return ModelRequestToJSONTyped(json, false);
}
function ModelRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['providerModel']) {
        case 'authentik_providers_google_workspace.googleworkspaceprovider':
            return Object.assign({}, (0, GoogleWorkspaceProviderRequest_1.GoogleWorkspaceProviderRequestToJSON)(value), { providerModel: 'authentik_providers_google_workspace.googleworkspaceprovider' });
        case 'authentik_providers_ldap.ldapprovider':
            return Object.assign({}, (0, LDAPProviderRequest_1.LDAPProviderRequestToJSON)(value), { providerModel: 'authentik_providers_ldap.ldapprovider' });
        case 'authentik_providers_microsoft_entra.microsoftentraprovider':
            return Object.assign({}, (0, MicrosoftEntraProviderRequest_1.MicrosoftEntraProviderRequestToJSON)(value), { providerModel: 'authentik_providers_microsoft_entra.microsoftentraprovider' });
        case 'authentik_providers_oauth2.oauth2provider':
            return Object.assign({}, (0, OAuth2ProviderRequest_1.OAuth2ProviderRequestToJSON)(value), { providerModel: 'authentik_providers_oauth2.oauth2provider' });
        case 'authentik_providers_proxy.proxyprovider':
            return Object.assign({}, (0, ProxyProviderRequest_1.ProxyProviderRequestToJSON)(value), { providerModel: 'authentik_providers_proxy.proxyprovider' });
        case 'authentik_providers_rac.racprovider':
            return Object.assign({}, (0, RACProviderRequest_1.RACProviderRequestToJSON)(value), { providerModel: 'authentik_providers_rac.racprovider' });
        case 'authentik_providers_radius.radiusprovider':
            return Object.assign({}, (0, RadiusProviderRequest_1.RadiusProviderRequestToJSON)(value), { providerModel: 'authentik_providers_radius.radiusprovider' });
        case 'authentik_providers_saml.samlprovider':
            return Object.assign({}, (0, SAMLProviderRequest_1.SAMLProviderRequestToJSON)(value), { providerModel: 'authentik_providers_saml.samlprovider' });
        case 'authentik_providers_scim.scimprovider':
            return Object.assign({}, (0, SCIMProviderRequest_1.SCIMProviderRequestToJSON)(value), { providerModel: 'authentik_providers_scim.scimprovider' });
        case 'authentik_providers_ssf.ssfprovider':
            return Object.assign({}, (0, SSFProviderRequest_1.SSFProviderRequestToJSON)(value), { providerModel: 'authentik_providers_ssf.ssfprovider' });
        case 'authentik_providers_ws_federation.wsfederationprovider':
            return Object.assign({}, (0, WSFederationProviderRequest_1.WSFederationProviderRequestToJSON)(value), { providerModel: 'authentik_providers_ws_federation.wsfederationprovider' });
        default:
            return value;
    }
}
//# sourceMappingURL=ModelRequest.js.map