Trigger
public struct Trigger
Class represents Trigger
-
Undocumented
Declaration
Swift
public struct Trigger -
ID of the Trigger
Declaration
Swift
public let triggerID: String -
ID of the Trigger target
Declaration
Swift
public let targetID: TypedID -
Flag indicate whether the Trigger is enabled
Declaration
Swift
public let enabled: Bool -
Predicate of the Trigger
Declaration
Swift
public let predicate: Predicate -
Command to be fired
Declaration
Swift
public let command: Command? -
ServerCode to be fired
Declaration
Swift
public let serverCode: ServerCode? -
Title of the Trigger
Declaration
Swift
public let title: String? -
Description of the Trigger
Declaration
Swift
public let triggerDescription: String? -
Metadata of the Trigger
Declaration
Swift
public let metadata: Dictionary<String, Any>? -
Init Trigger with Command
Developers rarely use this initializer. If you want to recreate same instance from stored data or transmitted data, you can use this method.
Declaration
Parameters
triggerIDID of trigger
targetIDID of trigger target
enabledTrue to enable trigger
predicatePredicate instance
commandCommand instance
titleTitle of a trigger. This should be equal or less than 50 characters.
triggerDescriptionDescription of a trigger. This should be equal or less than 200 characters.
metadataMeta data of a trigger.
-
Init Trigger with Server code
Developers rarely use this initializer. If you want to recreate same instance from stored data or transmitted data, you can use this method.
Declaration
Swift
public init( _ triggerID: String, targetID: TypedID, enabled: Bool, predicate: Predicate, serverCode: ServerCode, title: String? = nil, triggerDescription: String? = nil, metadata: Dictionary<String, Any>? = nil)
View on GitHub
Trigger Struct Reference