"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.instanceOfOAuth2ProviderRequest = instanceOfOAuth2ProviderRequest;
exports.OAuth2ProviderRequestFromJSON = OAuth2ProviderRequestFromJSON;
exports.OAuth2ProviderRequestFromJSONTyped = OAuth2ProviderRequestFromJSONTyped;
exports.OAuth2ProviderRequestToJSON = OAuth2ProviderRequestToJSON;
exports.OAuth2ProviderRequestToJSONTyped = OAuth2ProviderRequestToJSONTyped;
const RedirectURIRequest_1 = require("./RedirectURIRequest");
const ClientTypeEnum_1 = require("./ClientTypeEnum");
const SubModeEnum_1 = require("./SubModeEnum");
const OAuth2ProviderLogoutMethodEnum_1 = require("./OAuth2ProviderLogoutMethodEnum");
const IssuerModeEnum_1 = require("./IssuerModeEnum");
/**
 * Check if a given object implements the OAuth2ProviderRequest interface.
 */
function instanceOfOAuth2ProviderRequest(value) {
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined)
        return false;
    if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined)
        return false;
    if (!('redirectUris' in value) || value['redirectUris'] === undefined)
        return false;
    return true;
}
function OAuth2ProviderRequestFromJSON(json) {
    return OAuth2ProviderRequestFromJSONTyped(json, false);
}
function OAuth2ProviderRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'authorizationFlow': json['authorization_flow'],
        'invalidationFlow': json['invalidation_flow'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'clientType': json['client_type'] == null ? undefined : (0, ClientTypeEnum_1.ClientTypeEnumFromJSON)(json['client_type']),
        'clientId': json['client_id'] == null ? undefined : json['client_id'],
        'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'],
        'accessCodeValidity': json['access_code_validity'] == null ? undefined : json['access_code_validity'],
        'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'],
        'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'],
        'refreshTokenThreshold': json['refresh_token_threshold'] == null ? undefined : json['refresh_token_threshold'],
        'includeClaimsInIdToken': json['include_claims_in_id_token'] == null ? undefined : json['include_claims_in_id_token'],
        'signingKey': json['signing_key'] == null ? undefined : json['signing_key'],
        'encryptionKey': json['encryption_key'] == null ? undefined : json['encryption_key'],
        'redirectUris': (json['redirect_uris'].map(RedirectURIRequest_1.RedirectURIRequestFromJSON)),
        'logoutUri': json['logout_uri'] == null ? undefined : json['logout_uri'],
        'logoutMethod': json['logout_method'] == null ? undefined : (0, OAuth2ProviderLogoutMethodEnum_1.OAuth2ProviderLogoutMethodEnumFromJSON)(json['logout_method']),
        'subMode': json['sub_mode'] == null ? undefined : (0, SubModeEnum_1.SubModeEnumFromJSON)(json['sub_mode']),
        'issuerMode': json['issuer_mode'] == null ? undefined : (0, IssuerModeEnum_1.IssuerModeEnumFromJSON)(json['issuer_mode']),
        'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'],
        'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'],
    };
}
function OAuth2ProviderRequestToJSON(json) {
    return OAuth2ProviderRequestToJSONTyped(json, false);
}
function OAuth2ProviderRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'authentication_flow': value['authenticationFlow'],
        'authorization_flow': value['authorizationFlow'],
        'invalidation_flow': value['invalidationFlow'],
        'property_mappings': value['propertyMappings'],
        'client_type': (0, ClientTypeEnum_1.ClientTypeEnumToJSON)(value['clientType']),
        'client_id': value['clientId'],
        'client_secret': value['clientSecret'],
        'access_code_validity': value['accessCodeValidity'],
        'access_token_validity': value['accessTokenValidity'],
        'refresh_token_validity': value['refreshTokenValidity'],
        'refresh_token_threshold': value['refreshTokenThreshold'],
        'include_claims_in_id_token': value['includeClaimsInIdToken'],
        'signing_key': value['signingKey'],
        'encryption_key': value['encryptionKey'],
        'redirect_uris': (value['redirectUris'].map(RedirectURIRequest_1.RedirectURIRequestToJSON)),
        'logout_uri': value['logoutUri'],
        'logout_method': (0, OAuth2ProviderLogoutMethodEnum_1.OAuth2ProviderLogoutMethodEnumToJSON)(value['logoutMethod']),
        'sub_mode': (0, SubModeEnum_1.SubModeEnumToJSON)(value['subMode']),
        'issuer_mode': (0, IssuerModeEnum_1.IssuerModeEnumToJSON)(value['issuerMode']),
        'jwt_federation_sources': value['jwtFederationSources'],
        'jwt_federation_providers': value['jwtFederationProviders'],
    };
}
//# sourceMappingURL=OAuth2ProviderRequest.js.map