struct AutomationExecutionEventextension AutomationExecutionTrait.AutomationExecutionEvent : CustomDebugStringConvertible, Equatable, Event, Hashable, Sendable, SendableMetatypeEvent emitted when an automation execution occurs, containing details and metadata of the executed automation.
-
Identifier for this event.
The Event ID is appended onto the Trait ID of the trait this event belongs to.
Declaration
Swift
static let identifier: ScopedEventID -
Name of the given event type.
Declaration
Swift
static let name: StaticString -
A unique identifier of the executed automation.
Declaration
Swift
let automationID: String -
A user provided automation name.
Declaration
Swift
let automationName: String -
Display names of the managing app.
Declaration
Swift
let managingAppDisplayNames: [LocalizedText] -
Timestamp of when the given event occurred on the sender.
Declaration
Swift
let timestamp: TimeInterval -
Reported importance level of the given event.
Declaration
Swift
let importance: EventImportance -
Optional number of the event in the sequence history of this field.
Declaration
Swift
let number: UInt -
Optional ID of the part that emitted this event.
Declaration
Swift
let partID: String? -
Initializer to decode the event.
Declaration
Swift
init(decoder: TraitDecoder, timestamp: TimeInterval, importance: EventImportance, number: UInt, partID: String?) throws -
Memberwise initializer for testing and manual construction.
Declaration
Swift
init(automationID: String, automationName: String, managingAppDisplayNames: [LocalizedText] = [], timestamp: TimeInterval = 0, importance: EventImportance = .productionStandard, number: UInt = 0, partID: String? = nil) -
Encodes the given event.
Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func eventField(id: UInt32) -> (any Field)? -
A textual representation of this instance, suitable for debugging.
Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the
String(reflecting:)initializer. This initializer works with any type, and uses the customdebugDescriptionproperty for types that conform toCustomDebugStringConvertible:struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)"The conversion of
pto a string in the assignment tosuses thePointtype’sdebugDescriptionproperty.Declaration
Swift
var debugDescription: String { get }