"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.instanceOfRoleAssignedObjectPermission = instanceOfRoleAssignedObjectPermission;
exports.RoleAssignedObjectPermissionFromJSON = RoleAssignedObjectPermissionFromJSON;
exports.RoleAssignedObjectPermissionFromJSONTyped = RoleAssignedObjectPermissionFromJSONTyped;
exports.RoleAssignedObjectPermissionToJSON = RoleAssignedObjectPermissionToJSON;
exports.RoleAssignedObjectPermissionToJSONTyped = RoleAssignedObjectPermissionToJSONTyped;
const RoleModelPermission_1 = require("./RoleModelPermission");
const RoleObjectPermission_1 = require("./RoleObjectPermission");
/**
 * Check if a given object implements the RoleAssignedObjectPermission interface.
 */
function instanceOfRoleAssignedObjectPermission(value) {
    if (!('rolePk' in value) || value['rolePk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('objectPermissions' in value) || value['objectPermissions'] === undefined)
        return false;
    if (!('modelPermissions' in value) || value['modelPermissions'] === undefined)
        return false;
    return true;
}
function RoleAssignedObjectPermissionFromJSON(json) {
    return RoleAssignedObjectPermissionFromJSONTyped(json, false);
}
function RoleAssignedObjectPermissionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'rolePk': json['role_pk'],
        'name': json['name'],
        'objectPermissions': (json['object_permissions'].map(RoleObjectPermission_1.RoleObjectPermissionFromJSON)),
        'modelPermissions': (json['model_permissions'].map(RoleModelPermission_1.RoleModelPermissionFromJSON)),
    };
}
function RoleAssignedObjectPermissionToJSON(json) {
    return RoleAssignedObjectPermissionToJSONTyped(json, false);
}
function RoleAssignedObjectPermissionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'object_permissions': (value['objectPermissions'].map(RoleObjectPermission_1.RoleObjectPermissionToJSON)),
        'model_permissions': (value['modelPermissions'].map(RoleModelPermission_1.RoleModelPermissionToJSON)),
    };
}
//# sourceMappingURL=RoleAssignedObjectPermission.js.map