"use strict";
/* 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfNotificationRule = instanceOfNotificationRule;
exports.NotificationRuleFromJSON = NotificationRuleFromJSON;
exports.NotificationRuleFromJSONTyped = NotificationRuleFromJSONTyped;
exports.NotificationRuleToJSON = NotificationRuleToJSON;
exports.NotificationRuleToJSONTyped = NotificationRuleToJSONTyped;
const Group_1 = require("./Group");
const SeverityEnum_1 = require("./SeverityEnum");
/**
 * Check if a given object implements the NotificationRule interface.
 */
function instanceOfNotificationRule(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('destinationGroupObj' in value) || value['destinationGroupObj'] === undefined)
        return false;
    return true;
}
function NotificationRuleFromJSON(json) {
    return NotificationRuleFromJSONTyped(json, false);
}
function NotificationRuleFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'transports': json['transports'] == null ? undefined : json['transports'],
        'severity': json['severity'] == null ? undefined : (0, SeverityEnum_1.SeverityEnumFromJSON)(json['severity']),
        'destinationGroup': json['destination_group'] == null ? undefined : json['destination_group'],
        'destinationGroupObj': (0, Group_1.GroupFromJSON)(json['destination_group_obj']),
        'destinationEventUser': json['destination_event_user'] == null ? undefined : json['destination_event_user'],
    };
}
function NotificationRuleToJSON(json) {
    return NotificationRuleToJSONTyped(json, false);
}
function NotificationRuleToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'transports': value['transports'],
        'severity': (0, SeverityEnum_1.SeverityEnumToJSON)(value['severity']),
        'destination_group': value['destinationGroup'],
        'destination_event_user': value['destinationEventUser'],
    };
}
//# sourceMappingURL=NotificationRule.js.map