"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.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.instanceOfPermission = instanceOfPermission;
exports.PermissionFromJSON = PermissionFromJSON;
exports.PermissionFromJSONTyped = PermissionFromJSONTyped;
exports.PermissionToJSON = PermissionToJSON;
exports.PermissionToJSONTyped = PermissionToJSONTyped;
/**
 * Check if a given object implements the Permission interface.
 */
function instanceOfPermission(value) {
    if (!('id' in value) || value['id'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('codename' in value) || value['codename'] === undefined)
        return false;
    if (!('model' in value) || value['model'] === undefined)
        return false;
    if (!('appLabel' in value) || value['appLabel'] === undefined)
        return false;
    if (!('appLabelVerbose' in value) || value['appLabelVerbose'] === undefined)
        return false;
    if (!('modelVerbose' in value) || value['modelVerbose'] === undefined)
        return false;
    return true;
}
function PermissionFromJSON(json) {
    return PermissionFromJSONTyped(json, false);
}
function PermissionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'id': json['id'],
        'name': json['name'],
        'codename': json['codename'],
        'model': json['model'],
        'appLabel': json['app_label'],
        'appLabelVerbose': json['app_label_verbose'],
        'modelVerbose': json['model_verbose'],
    };
}
function PermissionToJSON(json) {
    return PermissionToJSONTyped(json, false);
}
function PermissionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'codename': value['codename'],
    };
}
//# sourceMappingURL=Permission.js.map