"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.instanceOfPlexSourceRequest = instanceOfPlexSourceRequest;
exports.PlexSourceRequestFromJSON = PlexSourceRequestFromJSON;
exports.PlexSourceRequestFromJSONTyped = PlexSourceRequestFromJSONTyped;
exports.PlexSourceRequestToJSON = PlexSourceRequestToJSON;
exports.PlexSourceRequestToJSONTyped = PlexSourceRequestToJSONTyped;
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const UserMatchingModeEnum_1 = require("./UserMatchingModeEnum");
const GroupMatchingModeEnum_1 = require("./GroupMatchingModeEnum");
/**
 * Check if a given object implements the PlexSourceRequest interface.
 */
function instanceOfPlexSourceRequest(value) {
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('slug' in value) || value['slug'] === undefined)
        return false;
    if (!('plexToken' in value) || value['plexToken'] === undefined)
        return false;
    return true;
}
function PlexSourceRequestFromJSON(json) {
    return PlexSourceRequestFromJSONTyped(json, false);
}
function PlexSourceRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'],
        'slug': 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'],
        'groupMatchingMode': json['group_matching_mode'] == null ? undefined : (0, GroupMatchingModeEnum_1.GroupMatchingModeEnumFromJSON)(json['group_matching_mode']),
        'clientId': json['client_id'] == null ? undefined : json['client_id'],
        'allowedServers': json['allowed_servers'] == null ? undefined : json['allowed_servers'],
        'allowFriends': json['allow_friends'] == null ? undefined : json['allow_friends'],
        'plexToken': json['plex_token'],
    };
}
function PlexSourceRequestToJSON(json) {
    return PlexSourceRequestToJSONTyped(json, false);
}
function PlexSourceRequestToJSONTyped(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'],
        'group_matching_mode': (0, GroupMatchingModeEnum_1.GroupMatchingModeEnumToJSON)(value['groupMatchingMode']),
        'client_id': value['clientId'],
        'allowed_servers': value['allowedServers'],
        'allow_friends': value['allowFriends'],
        'plex_token': value['plexToken'],
    };
}
//# sourceMappingURL=PlexSourceRequest.js.map