TriggeredCommandForm

public class TriggeredCommandForm: NSObject, NSCoding

Form of a command of a trigger.

This class contains data in order to create or modify Command in Trigger with followings methods:

Mandatory data are followings:

  • Schema name
  • Schema version
  • List of actions

Optional data are followings:

  • Target thing id
  • Title of a schema
  • Description of a schema
  • Meta data of a schema
  • Schema name.

    Declaration

    Swift

    public let schemaName: String
  • Schema version.

    Declaration

    Swift

    public let schemaVersion: Int
  • List of actions.

    Declaration

    Swift

    public let actions: [Dictionary<String, AnyObject>]
  • Target thing ID.

    Declaration

    Swift

    public let targetID: TypedID?
  • Title of a command.

    Declaration

    Swift

    public let title: String?
  • Description of a command.

    Declaration

    Swift

    public let commandDescription: String?
  • Meta data of ad command.

    Declaration

    Swift

    public let metadata: Dictionary<String, AnyObject>?
  • Initializer of TriggeredCommandForm instance.

    Parameter

    Parameter schemaName: Schema name.

    Parameter

    Parameter schemaVersion: Schema version.

    Parameter

    Parameter actions: List of actions. Must not be empty.

    Parameter

    Parameter targetID: target thing ID.

    Parameter

    Parameter title: Title of a command. This should be equal or less than 50 characters.

    Parameter

    Parameter description: Description of a comand. This should be equal or less than 200 characters.

    Parameter

    Parameter metadata: Meta data of a command.

    Declaration

    Swift

    public init(schemaName: String,
                    schemaVersion: Int,
                    actions: [Dictionary<String, AnyObject>],
                    targetID: TypedID? = nil,
                    title: String? = nil,
                    commandDescription: String? = nil,
                    metadata: Dictionary<String, AnyObject>? = nil)

    Parameters

    schemaName

    Schema name.

    schemaVersion

    Schema version.

    actions

    List of actions. Must not be empty.

    targetID

    target thing ID.

    title

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

    description

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

    metadata

    Meta data of a command.

  • Initializer of TriggeredCommandForm instance.

    This initializer copies following fields:

    If you specify optional arguments corresponding to above mentioned value, Optional argument values win against the Command values.

    Parameter

    Parameter command: source command of this TriggeredCommandForm.

    Parameter

    Parameter schemaName: Schema name.

    Parameter

    Parameter schemaVersion: Schema version.

    Parameter

    Parameter actions: List of actions. Must not be empty.

    Parameter

    Parameter targetID: target thing ID.

    Parameter

    Parameter title: Title of a command. This should be equal or less than 50 characters.

    Parameter

    Parameter description: Description of a comand. This should be equal or less than 200 characters.

    Parameter

    Parameter metadata: Meta data of a command.

    Declaration

    Swift

    public init(command: Command,
                    schemaName: String? = nil,
                    schemaVersion: Int? = nil,
                    actions: [Dictionary<String, AnyObject>]? = nil,
                    targetID: TypedID? = nil,
                    title: String? = nil,
                    commandDescription: String? = nil,
                    metadata: Dictionary<String, AnyObject>? = nil)

    Parameters

    command

    source command of this TriggeredCommandForm.

    schemaName

    Schema name.

    schemaVersion

    Schema version.

    actions

    List of actions. Must not be empty.

    targetID

    target thing ID.

    title

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

    description

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

    metadata

    Meta data of a command.

  • Undocumented

    Declaration

    Swift

    public class TriggeredCommandForm: NSObject, NSCoding
  • Undocumented

    Declaration

    Swift

    public class TriggeredCommandForm: NSObject, NSCoding