58 lines
3.3 KiB
Kotlin
58 lines
3.3 KiB
Kotlin
package com.navi.alfred.model
|
|
|
|
import com.google.gson.annotations.SerializedName
|
|
import com.navi.alfred.AlfredManager
|
|
|
|
data class AnalyticsRequest(
|
|
@SerializedName("base_attributes") val baseAttribute: BaseAttribute? = null,
|
|
@SerializedName("events") val events: List<EventAttribute>? = null
|
|
)
|
|
|
|
data class EventAttribute(
|
|
@SerializedName("eventId") val eventId: String? = null,
|
|
@SerializedName("screen_name") val screenName: String? = null,
|
|
@SerializedName("event_name") val eventName: String? = null,
|
|
@SerializedName("event_timestamp") val eventTimestamp: Long? = null,
|
|
@SerializedName("event_type") val eventType: String? = null,
|
|
@SerializedName("attributes") val attributes: Map<String, String>? = null,
|
|
@SerializedName("session_id") val sessionId: String? = null,
|
|
@SerializedName("module_name") val moduleName: String? = null
|
|
)
|
|
|
|
data class SessionRequest(
|
|
@SerializedName("base_attributes") val base_attribute: BaseAttribute,
|
|
@SerializedName("session_upload_event_attributes") val session_upload_event_attributes: SessionEventAttribute
|
|
)
|
|
|
|
data class BaseAttribute(
|
|
@SerializedName("app_version_code") val appVersionCode: String = AlfredManager.config.getAppVersionCode(),
|
|
@SerializedName("app_version_name") val appVersionName: String? = AlfredManager.config.getAppVersionName(),
|
|
@SerializedName("client_ts") val clientTs: Long? = AlfredManager.config.getEventStartRecordingTime(),
|
|
@SerializedName("device_id") val deviceId: String? = AlfredManager.config.getDeviceId(),
|
|
@SerializedName("device_model") val deviceModel: String? = AlfredManager.config.getDeviceModel(),
|
|
@SerializedName("device_manufacturer") val deviceManufacturer: String? = AlfredManager.config.getManufacturer(),
|
|
@SerializedName("app_os") val appOs: String? = AlfredManager.config.getOs(),
|
|
@SerializedName("os_version") val osVersion: String? = AlfredManager.config.getOsVersion(),
|
|
@SerializedName("latitude") val latitude: Double? = AlfredManager.config.getLatitude(),
|
|
@SerializedName("longitude") val longitude: Double? = AlfredManager.config.getLongitude(),
|
|
@SerializedName("customer_id") val customerId: String? = AlfredManager.config.getUserId(),
|
|
@SerializedName("up_time") val upTime: Long? = null,
|
|
@SerializedName("carrier_name") val carrierName: String? = AlfredManager.config.getNetworkCarrier(),
|
|
@SerializedName("parent_session_id") val parentSessionId: String? = null,
|
|
@SerializedName("event_timestamp") val eventTimeStamp: Long? = AlfredManager.config.getEventTimeStamp(),
|
|
@SerializedName("session_id") val sessionId: String? = AlfredManager.config.getAlfredSessionId(),
|
|
@SerializedName("session_time_stamp") val sessionTimeStamp: Long? = AlfredManager.config.getSessionStartRecordingTime(),
|
|
)
|
|
|
|
data class SessionEventAttribute(
|
|
@SerializedName("event_id") val eventId: String? = AlfredManager.config.getAlfredEventId(),
|
|
@SerializedName("beginning_device_attributes") val beginningDeviceAttributes: DeviceAttributes? = null,
|
|
@SerializedName("end_device_attributes") val endDeviceAttributes: DeviceAttributes? = null
|
|
)
|
|
|
|
data class DeviceAttributes(
|
|
@SerializedName("battery") val battery: Float? = null,
|
|
@SerializedName("cpu") val cpu: Float? = null,
|
|
@SerializedName("storage") val storage: Float? = null,
|
|
@SerializedName("memory") val memory: Float? = null,
|
|
) |