"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.instanceOfInitialPermissions = instanceOfInitialPermissions;
exports.InitialPermissionsFromJSON = InitialPermissionsFromJSON;
exports.InitialPermissionsFromJSONTyped = InitialPermissionsFromJSONTyped;
exports.InitialPermissionsToJSON = InitialPermissionsToJSON;
exports.InitialPermissionsToJSONTyped = InitialPermissionsToJSONTyped;
const Permission_1 = require("./Permission");
const InitialPermissionsModeEnum_1 = require("./InitialPermissionsModeEnum");
/**
 * Check if a given object implements the InitialPermissions interface.
 */
function instanceOfInitialPermissions(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('mode' in value) || value['mode'] === undefined)
        return false;
    if (!('role' in value) || value['role'] === undefined)
        return false;
    if (!('permissionsObj' in value) || value['permissionsObj'] === undefined)
        return false;
    return true;
}
function InitialPermissionsFromJSON(json) {
    return InitialPermissionsFromJSONTyped(json, false);
}
function InitialPermissionsFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'mode': (0, InitialPermissionsModeEnum_1.InitialPermissionsModeEnumFromJSON)(json['mode']),
        'role': json['role'],
        'permissions': json['permissions'] == null ? undefined : json['permissions'],
        'permissionsObj': (json['permissions_obj'].map(Permission_1.PermissionFromJSON)),
    };
}
function InitialPermissionsToJSON(json) {
    return InitialPermissionsToJSONTyped(json, false);
}
function InitialPermissionsToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'mode': (0, InitialPermissionsModeEnum_1.InitialPermissionsModeEnumToJSON)(value['mode']),
        'role': value['role'],
        'permissions': value['permissions'],
    };
}
//# sourceMappingURL=InitialPermissions.js.map