diff --git a/models/eventhandler.go b/models/eventhandler.go index 32e5a8b..acbc292 100644 --- a/models/eventhandler.go +++ b/models/eventhandler.go @@ -38,6 +38,7 @@ type EventHandlerUpdate struct { SetPriority *int `json:"setPriority"` SetTargetKind *ReferenceKind `json:"setTargetKind"` SetTargetValue *string `json:"setTargetValue"` + SetOneShot *bool `json:"setOneShot"` SetConditions map[string]EventCondition `json:"setConditions"` PatchConditions map[string]*EventCondition `json:"patchConditions"` SetActions *EventAction `json:"setActions"` @@ -59,6 +60,9 @@ func (h *EventHandler) ApplyUpdate(update EventHandlerUpdate) { if update.SetActions != nil { h.Actions = *update.SetActions } + if update.SetOneShot != nil { + h.OneShot = *update.SetOneShot + } if update.SetConditions != nil { h.Conditions = update.SetConditions