{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "DriverScoreInteraction",
    "type": "object",
    "additionalProperties": false,
    "description": "Driver Score Interaction Schema",
    "properties": {
        "log_context": {
            "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": [
                "DRIVER_SCORE_INTERACTION"
            ]
        },
        "schema_definition": {
            "type": "string",
            "enum": [
                "DriverScoreInteraction"
            ]
        },
        "score": {
            "type": "integer",
            "description": " The score displayed to the user"
        },
        "action": {
            "type": "string",
            "description": "The type of engagement with the user",
            "enum": ["IMPRESSION", "CLICK", "DISMISS"]
        },
        "moment": {
            "type": "string",
            "description": "The moment when the driver score was displayed",
            "enum": ["ARRIVAL", "STARTUP", "RECENTS"]
        },
        "delta_value": {
            "type": "integer",
            "description": "The delta value of the driver score"
        },
        "message_type": {
            "type": "string",
            "description": "The type of message displayed to the user",
            "enum": ["FTUE", "WEEKLY_REPORT", "UPSELL", "NONE", "EMAIL_SIGNUP_EXPLICIT_ALERT", "LAST_TRIP_WITH_CHALLENGE"]
        },
        "delta_displayed": {
            "type": "boolean",
            "description": "Whether driver score delta is displayed to the user or not."
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "score",
        "action",
        "moment"
    ]
}