/* 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';
/**
 * Global permission
 * @export
 * @interface PermissionRequest
 */
export interface PermissionRequest {
    /**
     * 
     * @type {string}
     * @memberof PermissionRequest
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof PermissionRequest
     */
    codename: string;
}

/**
 * Check if a given object implements the PermissionRequest interface.
 */
export function instanceOfPermissionRequest(value: object): value is PermissionRequest {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('codename' in value) || value['codename'] === undefined) return false;
    return true;
}

export function PermissionRequestFromJSON(json: any): PermissionRequest {
    return PermissionRequestFromJSONTyped(json, false);
}

export function PermissionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'codename': json['codename'],
    };
}

export function PermissionRequestToJSON(json: any): PermissionRequest {
    return PermissionRequestToJSONTyped(json, false);
}

export function PermissionRequestToJSONTyped(value?: PermissionRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'name': value['name'],
        'codename': value['codename'],
    };
}

