Package io.appmetrica.analytics
Class ModuleEvent.Builder
java.lang.Object
io.appmetrica.analytics.ModuleEvent.Builder
- Enclosing class:
- ModuleEvent
Builds a new
ModuleEvent object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates instance ofModuleEvent.withAttributes(Map<String, Object> attributes) Sets event attributes.withEnvironment(Map<String, Object> environment) Sets event environment.withExtras(Map<String, byte[]> extras) Sets event extras.Sets event name.withServiceDataReporterType(int serviceDataReporterType) Sets the way event is processed.Sets event value.
-
Method Details
-
withName
Sets event name.- Parameters:
name-Stringvalue of event name- Returns:
- same
ModuleEvent.Builderobject
-
withValue
Sets event value. Can be replaced withModuleEvent.attributesifModuleEvent.attributesis not null or empty.- Parameters:
value-Stringvalue of event value- Returns:
- same
ModuleEvent.Builderobject
-
withServiceDataReporterType
Sets the way event is processed.- Parameters:
serviceDataReporterType- type ofServiceDataReporter- Returns:
- same
ModuleEvent.Builderobject
-
withEnvironment
Sets event environment.- Parameters:
environment- map with environment keys and values- Returns:
- same
ModuleEvent.Builderobject
-
withExtras
Sets event extras.- Parameters:
extras- map with extras keys and values- Returns:
- same
ModuleEvent.Builderobject
-
withAttributes
Sets event attributes. It will replaceModuleEvent.valueif not null or empty.- Parameters:
attributes- map with attributes keys and values- Returns:
- same
ModuleEvent.Builderobject
-
build
Creates instance ofModuleEvent.- Returns:
ModuleEventobject
-