/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * 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 { SeverityEnum } from './SeverityEnum'; import { SeverityEnumFromJSON, SeverityEnumFromJSONTyped, SeverityEnumToJSON, SeverityEnumToJSONTyped, } from './SeverityEnum'; /** * NotificationRule Serializer * @export * @interface PatchedNotificationRuleRequest */ export interface PatchedNotificationRuleRequest { /** * * @type {string} * @memberof PatchedNotificationRuleRequest */ name?: string; /** * Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. * @type {Array} * @memberof PatchedNotificationRuleRequest */ transports?: Array; /** * Controls which severity level the created notifications will have. * @type {SeverityEnum} * @memberof PatchedNotificationRuleRequest */ severity?: SeverityEnum; /** * Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. * @type {string} * @memberof PatchedNotificationRuleRequest */ destinationGroup?: string | null; /** * When enabled, notification will be sent to user the user that triggered the event.When destination_group is configured, notification is sent to both. * @type {boolean} * @memberof PatchedNotificationRuleRequest */ destinationEventUser?: boolean; } /** * Check if a given object implements the PatchedNotificationRuleRequest interface. */ export function instanceOfPatchedNotificationRuleRequest(value: object): value is PatchedNotificationRuleRequest { return true; } export function PatchedNotificationRuleRequestFromJSON(json: any): PatchedNotificationRuleRequest { return PatchedNotificationRuleRequestFromJSONTyped(json, false); } export function PatchedNotificationRuleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedNotificationRuleRequest { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'transports': json['transports'] == null ? undefined : json['transports'], 'severity': json['severity'] == null ? undefined : SeverityEnumFromJSON(json['severity']), 'destinationGroup': json['destination_group'] == null ? undefined : json['destination_group'], 'destinationEventUser': json['destination_event_user'] == null ? undefined : json['destination_event_user'], }; } export function PatchedNotificationRuleRequestToJSON(json: any): PatchedNotificationRuleRequest { return PatchedNotificationRuleRequestToJSONTyped(json, false); } export function PatchedNotificationRuleRequestToJSONTyped(value?: PatchedNotificationRuleRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'transports': value['transports'], 'severity': SeverityEnumToJSON(value['severity']), 'destination_group': value['destinationGroup'], 'destination_event_user': value['destinationEventUser'], }; }