EventData

public struct EventData : Codable, Equatable

Query event data object.

  • The environment_id associated with the query that the event is associated with.

    Declaration

    Swift

    public var environmentID: String
  • The session token that was returned as part of the query results that this event is associated with.

    Declaration

    Swift

    public var sessionToken: String
  • The optional timestamp for the event that was created. If not provided, the time that the event was created in the log was used.

    Declaration

    Swift

    public var clientTimestamp: Date?
  • The rank of the result item which the event is associated with.

    Declaration

    Swift

    public var displayRank: Int?
  • The collection_id of the document that this event is associated with.

    Declaration

    Swift

    public var collectionID: String
  • The document_id of the document that this event is associated with.

    Declaration

    Swift

    public var documentID: String
  • The query identifier stored in the log. The query and any events associated with that query are stored with the same query_id.

    Declaration

    Swift

    public var queryID: String?
  • Initialize a EventData with member variables.

    Declaration

    Swift

    public init(
        environmentID: String,
        sessionToken: String,
        collectionID: String,
        documentID: String,
        clientTimestamp: Date? = nil,
        displayRank: Int? = nil
    )

    Parameters

    environmentID

    The environment_id associated with the query that the event is associated with.

    sessionToken

    The session token that was returned as part of the query results that this event is associated with.

    collectionID

    The collection_id of the document that this event is associated with.

    documentID

    The document_id of the document that this event is associated with.

    clientTimestamp

    The optional timestamp for the event that was created. If not provided, the time that the event was created in the log was used.

    displayRank

    The rank of the result item which the event is associated with.

    Return Value

    An initialized EventData.