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

    Swift

    public init(
          _ triggerID: String,
          targetID: TypedID,
          enabled: Bool,
          predicate: Predicate,
          command: Command,
          title: String? = nil,
          triggerDescription: String? = nil,
          metadata: Dictionary<String, Any>? = nil)

    Parameters

    triggerID

    ID of trigger

    targetID

    ID of trigger target

    enabled

    True to enable trigger

    predicate

    Predicate instance

    command

    Command instance

    title

    Title of a trigger. This should be equal or less than 50 characters.

    triggerDescription

    Description of a trigger. This should be equal or less than 200 characters.

    metadata

    Meta 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)