EventAutomationTrigger

public struct EventAutomationTrigger : Sendable, Codable, Equatable

Model for defining when an automation is triggered.

  • The trigger type

    Declaration

    Swift

    public var type: EventAutomationTriggerType
  • The trigger goal

    Declaration

    Swift

    public var goal: Double
  • Predicate to run on the event’s data

    Declaration

    Swift

    public var predicate: JSONPredicate?
  • Event automation trigger initializer

    Declaration

    Swift

    public init(
        type: EventAutomationTriggerType,
        goal: Double,
        predicate: JSONPredicate? = nil
    )

    Parameters

    type

    Trigger type

    goal

    Trigger goal

    predicate

    Predicate to run on the event data

  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws