/* 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';
/**
 * NotificationWebhookMapping Serializer
 * @export
 * @interface NotificationWebhookMapping
 */
export interface NotificationWebhookMapping {
    /**
     * 
     * @type {string}
     * @memberof NotificationWebhookMapping
     */
    readonly pk: string;
    /**
     * 
     * @type {string}
     * @memberof NotificationWebhookMapping
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof NotificationWebhookMapping
     */
    expression: string;
}

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

export function NotificationWebhookMappingFromJSON(json: any): NotificationWebhookMapping {
    return NotificationWebhookMappingFromJSONTyped(json, false);
}

export function NotificationWebhookMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationWebhookMapping {
    if (json == null) {
        return json;
    }
    return {
        
        'pk': json['pk'],
        'name': json['name'],
        'expression': json['expression'],
    };
}

export function NotificationWebhookMappingToJSON(json: any): NotificationWebhookMapping {
    return NotificationWebhookMappingToJSONTyped(json, false);
}

export function NotificationWebhookMappingToJSONTyped(value?: Omit<NotificationWebhookMapping, 'pk'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

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

