UASearchEventTemplate

Objective-C

@interface UASearchEventTemplate : NSObject

Swift

class UASearchEventTemplate : NSObject

A UASearchEventTemplate represents a custom search event template for the application.

Search Event Template Properties

  • The event’s value. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDecimalNumber *eventValue;

    Swift

    var eventValue: NSDecimalNumber? { get set }
  • The event’s type.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *type;

    Swift

    var type: String? { get set }
  • The event’s identifier.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *identifier;

    Swift

    var identifier: String? { get set }
  • The event’s category.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *category;

    Swift

    var category: String? { get set }
  • The event’s query.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *query;

    Swift

    var query: String? { get set }
  • The event’s total results.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger totalResults;

    Swift

    var totalResults: Int { get set }

Search Event Template Factories

  • Factory method for creating a search event template.

    Declaration

    Objective-C

    + (nonnull instancetype)template;

    Return Value

    UASearchEventTemplate instance.

  • Factory method for creating a search event template with a value.

    Declaration

    Objective-C

    + (nonnull instancetype)templateWithValue:(nullable NSNumber *)eventValue;

    Swift

    convenience init(value eventValue: NSNumber?)

    Parameters

    eventValue

    The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.

    Return Value

    UASearchEventTemplate instance.

  • Creates the custom search event.

    Declaration

    Objective-C

    - (nonnull UACustomEvent *)createEvent;

    Swift

    func createEvent() -> UACustomEvent

    Return Value

    Created UACustomEvent instance.