/* 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.
 */

import { mapValues } from '../runtime';
/**
 * Role-bound object level permission
 * @export
 * @interface RoleObjectPermission
 */
export interface RoleObjectPermission {
    /**
     * 
     * @type {number}
     * @memberof RoleObjectPermission
     */
    readonly id: number;
    /**
     * 
     * @type {string}
     * @memberof RoleObjectPermission
     */
    readonly codename: string;
    /**
     * 
     * @type {string}
     * @memberof RoleObjectPermission
     */
    readonly model: string;
    /**
     * 
     * @type {string}
     * @memberof RoleObjectPermission
     */
    readonly appLabel: string;
    /**
     * 
     * @type {string}
     * @memberof RoleObjectPermission
     */
    objectPk: string;
    /**
     * 
     * @type {string}
     * @memberof RoleObjectPermission
     */
    readonly name: string;
}

/**
 * Check if a given object implements the RoleObjectPermission interface.
 */
export function instanceOfRoleObjectPermission(value: object): value is RoleObjectPermission {
    if (!('id' in value) || value['id'] === 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 (!('objectPk' in value) || value['objectPk'] === undefined) return false;
    if (!('name' in value) || value['name'] === undefined) return false;
    return true;
}

export function RoleObjectPermissionFromJSON(json: any): RoleObjectPermission {
    return RoleObjectPermissionFromJSONTyped(json, false);
}

export function RoleObjectPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleObjectPermission {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'],
        'codename': json['codename'],
        'model': json['model'],
        'appLabel': json['app_label'],
        'objectPk': json['object_pk'],
        'name': json['name'],
    };
}

export function RoleObjectPermissionToJSON(json: any): RoleObjectPermission {
    return RoleObjectPermissionToJSONTyped(json, false);
}

export function RoleObjectPermissionToJSONTyped(value?: Omit<RoleObjectPermission, 'id'|'codename'|'model'|'app_label'|'name'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'object_pk': value['objectPk'],
    };
}

