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
-String
value of event name- Returns:
- same
ModuleEvent.Builder
object
-
withValue
Sets event value. Can be replaced withModuleEvent.attributes
ifModuleEvent.attributes
is not null or empty.- Parameters:
value
-String
value of event value- Returns:
- same
ModuleEvent.Builder
object
-
withServiceDataReporterType
Sets the way event is processed.- Parameters:
serviceDataReporterType
- type ofServiceDataReporter
- Returns:
- same
ModuleEvent.Builder
object
-
withEnvironment
Sets event environment.- Parameters:
environment
- map with environment keys and values- Returns:
- same
ModuleEvent.Builder
object
-
withExtras
Sets event extras.- Parameters:
extras
- map with extras keys and values- Returns:
- same
ModuleEvent.Builder
object
-
withAttributes
Sets event attributes. It will replaceModuleEvent.value
if not null or empty.- Parameters:
attributes
- map with attributes keys and values- Returns:
- same
ModuleEvent.Builder
object
-
build
Creates instance ofModuleEvent
.- Returns:
ModuleEvent
object
-