Package com.vaadin.copilot.analytics
Record Class AnalyticsRequest
java.lang.Object
java.lang.Record
com.vaadin.copilot.analytics.AnalyticsRequest
- Record Components:
userId
- user identifier, can be userKey or proKeyanonymousId
- identifier of anonymous user, can be machineIdevent
- Event nameproperties
- Event propertiescontext
- Event context properties
public record AnalyticsRequest(String userId, String anonymousId, String event, Map<String,String> properties, Map<String,String> context)
extends Record
Tracking request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanonymousId
record component.context()
Returns the value of thecontext
record component.final boolean
Indicates whether some other object is "equal to" this one.event()
Returns the value of theevent
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theproperties
record component.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
AnalyticsRequest
public AnalyticsRequest(String userId, String anonymousId, String event, Map<String, String> properties, Map<String, String> context) Creates an instance of aAnalyticsRequest
record class.- Parameters:
userId
- the value for theuserId
record componentanonymousId
- the value for theanonymousId
record componentevent
- the value for theevent
record componentproperties
- the value for theproperties
record componentcontext
- the value for thecontext
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
userId
Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-
anonymousId
Returns the value of theanonymousId
record component.- Returns:
- the value of the
anonymousId
record component
-
event
Returns the value of theevent
record component.- Returns:
- the value of the
event
record component
-
properties
Returns the value of theproperties
record component.- Returns:
- the value of the
properties
record component
-
context
Returns the value of thecontext
record component.- Returns:
- the value of the
context
record component
-