/* 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';
import type { ModelEnum } from './ModelEnum';
import {
    ModelEnumFromJSON,
    ModelEnumFromJSONTyped,
    ModelEnumToJSON,
    ModelEnumToJSONTyped,
} from './ModelEnum';

/**
 * Request to assign a new permission
 * @export
 * @interface PatchedPermissionAssignRequest
 */
export interface PatchedPermissionAssignRequest {
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedPermissionAssignRequest
     */
    permissions?: Array<string>;
    /**
     * 
     * @type {ModelEnum}
     * @memberof PatchedPermissionAssignRequest
     */
    model?: ModelEnum;
    /**
     * 
     * @type {string}
     * @memberof PatchedPermissionAssignRequest
     */
    objectPk?: string;
}



/**
 * Check if a given object implements the PatchedPermissionAssignRequest interface.
 */
export function instanceOfPatchedPermissionAssignRequest(value: object): value is PatchedPermissionAssignRequest {
    return true;
}

export function PatchedPermissionAssignRequestFromJSON(json: any): PatchedPermissionAssignRequest {
    return PatchedPermissionAssignRequestFromJSONTyped(json, false);
}

export function PatchedPermissionAssignRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPermissionAssignRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'permissions': json['permissions'] == null ? undefined : json['permissions'],
        'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']),
        'objectPk': json['object_pk'] == null ? undefined : json['object_pk'],
    };
}

export function PatchedPermissionAssignRequestToJSON(json: any): PatchedPermissionAssignRequest {
    return PatchedPermissionAssignRequestToJSONTyped(json, false);
}

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

    return {
        
        'permissions': value['permissions'],
        'model': ModelEnumToJSON(value['model']),
        'object_pk': value['objectPk'],
    };
}

