UAActionArguments

Objective-C


@interface UAActionArguments : NSObject

Swift

class ActionArguments : NSObject

Contains the arguments passed into an action during execution.

Action Arguments Properties

  • Situation of the action

    Declaration

    Objective-C

    @property (nonatomic, readonly) UASituation situation;

    Swift

    var situation: Situation { get }
  • The value associated with the action

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) id value;

    Swift

    var value: Any? { get }
  • The argument’s metadata. Metadata provides more information about the environment that the action was triggered from.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSDictionary *metadata;

    Swift

    var metadata: [AnyHashable : Any]? { get }

Action Arguments Factories

  • UAActionArguments factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)argumentsWithValue:(nullable id)value
                                 withSituation:(UASituation)situation;

    Swift

    convenience init(value: Any?, with situation: Situation)

    Parameters

    value

    The value associated with the arguments.

    situation

    The situation of the action.

  • UAActionArguments factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)argumentsWithValue:(nullable id)value
                                 withSituation:(UASituation)situation
                                      metadata:(nullable NSDictionary *)metadata;

    Swift

    convenience init(value: Any?, with situation: Situation, metadata: [AnyHashable : Any]?)

    Parameters

    value

    The value associated with the arguments.

    situation

    The situation of the action.

    metadata

    for the action - e.g. webview, payload, etc.