"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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.instanceOfPatchedTelegramSourceRequest = instanceOfPatchedTelegramSourceRequest;
exports.PatchedTelegramSourceRequestFromJSON = PatchedTelegramSourceRequestFromJSON;
exports.PatchedTelegramSourceRequestFromJSONTyped = PatchedTelegramSourceRequestFromJSONTyped;
exports.PatchedTelegramSourceRequestToJSON = PatchedTelegramSourceRequestToJSON;
exports.PatchedTelegramSourceRequestToJSONTyped = PatchedTelegramSourceRequestToJSONTyped;
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const UserMatchingModeEnum_1 = require("./UserMatchingModeEnum");
/**
 * Check if a given object implements the PatchedTelegramSourceRequest interface.
 */
function instanceOfPatchedTelegramSourceRequest(value) {
    return true;
}
function PatchedTelegramSourceRequestFromJSON(json) {
    return PatchedTelegramSourceRequestFromJSONTyped(json, false);
}
function PatchedTelegramSourceRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'] == null ? undefined : json['name'],
        'slug': json['slug'] == null ? undefined : json['slug'],
        'enabled': json['enabled'] == null ? undefined : json['enabled'],
        'promoted': json['promoted'] == null ? undefined : json['promoted'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'],
        'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'],
        'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'],
        'policyEngineMode': json['policy_engine_mode'] == null ? undefined : (0, PolicyEngineMode_1.PolicyEngineModeFromJSON)(json['policy_engine_mode']),
        'userMatchingMode': json['user_matching_mode'] == null ? undefined : (0, UserMatchingModeEnum_1.UserMatchingModeEnumFromJSON)(json['user_matching_mode']),
        'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'],
        'botUsername': json['bot_username'] == null ? undefined : json['bot_username'],
        'botToken': json['bot_token'] == null ? undefined : json['bot_token'],
        'requestMessageAccess': json['request_message_access'] == null ? undefined : json['request_message_access'],
        'preAuthenticationFlow': json['pre_authentication_flow'] == null ? undefined : json['pre_authentication_flow'],
    };
}
function PatchedTelegramSourceRequestToJSON(json) {
    return PatchedTelegramSourceRequestToJSONTyped(json, false);
}
function PatchedTelegramSourceRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'slug': value['slug'],
        'enabled': value['enabled'],
        'promoted': value['promoted'],
        'authentication_flow': value['authenticationFlow'],
        'enrollment_flow': value['enrollmentFlow'],
        'user_property_mappings': value['userPropertyMappings'],
        'group_property_mappings': value['groupPropertyMappings'],
        'policy_engine_mode': (0, PolicyEngineMode_1.PolicyEngineModeToJSON)(value['policyEngineMode']),
        'user_matching_mode': (0, UserMatchingModeEnum_1.UserMatchingModeEnumToJSON)(value['userMatchingMode']),
        'user_path_template': value['userPathTemplate'],
        'bot_username': value['botUsername'],
        'bot_token': value['botToken'],
        'request_message_access': value['requestMessageAccess'],
        'pre_authentication_flow': value['preAuthenticationFlow'],
    };
}
//# sourceMappingURL=PatchedTelegramSourceRequest.js.map