{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "LogContext",
    "type": "object",
    "additionalProperties": false,
    "description": "Log Context Schema",
    "properties": {
        "utc_timestamp": {
            "type": "integer",
            "description": "UTC timestamp in milliseconds for event"
        },
        "raw_gps_timestamp": {
            "type": "integer",
            "description": "UTC timestamp in milliseconds from the raw GPS point received"
        },
        "time_zone": {
            "$ref": "/resources/schema/analytics/client/v4/type/TimeZoneType.json",
            "description": "User specific timestamp in milliseconds for event/click"
        },
        "log_id": {
            "type": "string",
            "description": "UUID of the record"
        },
        "user_id": {
            "type": "string",
            "description": "Registered Visitor ID - Currently known as internal UserID. It can also take values - Guest, OptOut or Demo for different type of customers"
        },
        "os_version": {
            "type": "string",
            "description": "Device OS version e.g. iOS 7.01"
        },
        "firmware_version": {
            "type": "string",
            "description": "The firmware version of the device"
        },
        "os_name": {
            "type": "string",
            "description": "Device OS"
        },
        "connection_type": {
            "$ref": "/resources/schema/analytics/client/v4/type/InternetConnectionType.json",
            "description": "Connection Type of device for the event/click"
        },
        "device_make": {
            "type": "string",
            "description": "Device Make, e.g. Apple, HTC, Samsumg"
        },
        "device_model": {
            "type": "string",
            "description": "Device Model, e.g. iPhone, HTCOneX, Galaxy Nexus"
        },
        "current_lat": {
            "type": "number",
            "description": "Current latitude of the user"
        },
        "current_lon": {
            "type": "number",
            "description": "Current longitude of the user"
        },
        "log_version": {
            "$ref": "/resources/schema/analytics/client/v4/type/LogVersionType.json",
            "description": "Version of the logging specs.  This one is v4"
        },
        "device_id": {
            "type": "string",
            "description": "Unique id for the device. Should be able to infer the model, screen size etc from the id."
        },
        "session_id": {
            "type": "string",
            "description": "Unique identifier for a session"
        },
        "session_timer": {
            "type": "number",
            "description": "Time elapsed since start of the app session in milliseconds"
        },
        "raw_gps_lat": {
            "type": "number",
            "description": "Latitude of the GPS location. If not available send default value of 90"
        },
        "raw_gps_lon": {
            "type": "number",
            "description": "Longitude of the GPS location. If not available send default value of 0"
        },
        "client_name": {
            "type": "string",
            "description": "Name of the the client from where we are collecting the data"
        },
        "client_version": {
            "type": "string",
            "description": "Version of the client. Can be used to capture client application version"
        },
        "sdk_version": {
            "type": "string",
            "description": "Version of the sdk related to the current event being logged"
        },
        "app_id": {
            "type": "string",
            "description": "The application id. api_key can represent app_id where available"
        },
        "build": {
            "type": "string",
            "description": "Additional information about the build apart from application version"
        },
        "trip_id": {
            "type": "string",
            "description": "Trip id"
        },
        "media_provider": {
            "$ref": "/resources/schema/analytics/client/v4/type/MediaProviderValues.json",
            "description": "This property is used to identify the media provider used when an event occurred. If this property doesn't apply for a product, NONE should be fired."
        },
        "event_environment": {
            "$ref": "/resources/schema/analytics/client/v4/type/EventEnvironmentValues.json",
            "description": "To identify if event happened on the mobile app or when connected to Car Play or if the app is on a memory stick or directly on a head unit."
        },
        "page_title": {
            "type": "string",
            "description": "The identify the screen where the event occured. This is the URL for the screen/page"
        },
        "city": {
            "type": "string",
            "description": "The city from which the user is using the app."
        },
        "country": {
            "type": "string",
            "description": "The country from which the user is using the app."
        },
        "map_version": {
            "type": "string",
            "description": "The version of map that is currently active"
        },
        "vehicle_speed": {
            "type": "number",
            "description": "Speed of the car in meters per second"
        },
        "power_type": {
            "type": "string",
            "enum": ["ELECTRIC", "FUEL", "HYBRID"],
            "description": "The power type of the vehicle"
        },
        "log_anonymized": {
            "type": "boolean",
            "description": "Indicate whether pii data is anonymized in event."
        }
    },
    "required": [
        "utc_timestamp",
        "log_id",
        "device_id",
        "user_id",
        "log_version",
        "current_lat",
        "current_lon",
        "session_id",
        "client_version",
        "client_name"
    ]
}