
it.contactlab.hub.sdk.java.models.AbstractEvent Maven / Gradle / Ivy
package it.contactlab.hub.sdk.java.models;
import org.immutables.value.Value;
import java.time.OffsetDateTime;
import java.util.Map;
import java.util.Optional;
/**
* An Event.
*/
@Value.Immutable
@Value.Style(typeImmutable = "*")
public abstract class AbstractEvent {
/**
* The ID of this Event.
*/
public abstract Optional id();
/**
* The CustomerId for this Event.
*/
public abstract Optional customerId();
/**
* The ExternalId for this Event.
*/
public abstract Optional externalId();
/**
* The SessionId for this Event.
*/
public abstract Optional sessionId();
/**
* The event type of this Event.
*/
public abstract EventType type();
/**
* The event context of this Event.
*/
public abstract EventContext context();
/**
* The properties of this Event.
*/
public abstract Map properties();
/**
* The context-specific properties of this Event.
*/
public abstract Map contextInfo();
/**
* The moment when this Event happened.
*
* It defaults to "now()" if not specified when creating a new Event.
*/
@Value.Default
public OffsetDateTime date() {
return OffsetDateTime.now();
}
/**
* The moment when this Event was registered.
*/
public abstract Optional registeredAt();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy