{
    "format": "ndjson",
    "definitions": {},
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://example.com/root.json",
    "type": "object",
    "title": "Spotify Streams Schema",
    "required": [
        "user_id",
        "track_id"
    ],
    "properties": {
        "message": {
            "$id": "#/properties/message",
            "type": "string",
            "title": "Message header identifying API",
            "default": "",
            "examples": [
                "APIUserData"
            ],
            "pattern": "^(.*)$"
        },
        "version": {
            "$id": "#/properties/version",
            "type": "integer",
            "title": "The API version number",
            "default": "",
            "examples": [
                "2"
            ],
            "pattern": "^([\\d]+)$"
        },
        "user_id": {
            "$id": "#/properties/user_id",
            "type": "string",
            "title": "The User_id Schema",
            "default": "",
            "examples": [
                "00005bda07f8b09bc0ceed9343af3eda"
            ],
            "pattern": "^[a-f\\d]{32}$|^[a-f\\d]{64}$"
        },
        "track_id": {
            "$id": "#/properties/track_id",
            "type": "string",
            "title": "The Track_id Schema",
            "default": "",
            "examples": [
                "517b5ab9308b4c068b1fbc400d611b1d"
            ],
            "pattern": "^[a-f\\d]{32}$|^[a-f\\d]{64}$"
        },
        "country": {
            "$id": "#/properties/country",
            "type": "string",
            "title": "The Country Schema",
            "default": "",
            "examples": [
                "JP",
                "AU"
            ],
            "pattern": "^(.*)$"
        },
        "timestamp": {
            "$id": "#/properties/timestamp",
            "type": "string",
            "title": "The Timestamp Schema",
            "default": "",
            "examples": [
                "20190527T06:45:00"
            ],
            "format": "date-time",
            "pattern": "^(.*)$"
        },
        "cached": {
            "$id": "#/properties/cached",
            "type": "string",
            "title": "The Cached Schema",
            "default": "",
            "examples": [
                "Y",
                "N",
                ""
            ],
            "pattern": "^(.*)$"
        },
        "offline_timestamp": {
            "$id": "#/properties/offline_timestamp",
            "type": "string",
            "title": "The Offline_timestamp Schema",
            "default": "",
            "examples": [
                "20190527T06:45:00"
            ],
            "pattern": "^(.*)$"
        },
        "length": {
            "$id": "#/properties/length",
            "type": "integer",
            "title": "The Length Schema",
            "default": "",
            "examples": [
                "444"
            ],
            "pattern": "^([\\d]+)$"
        },
        "source": {
            "$id": "#/properties/source",
            "type": "string",
            "title": "The Source Schema",
            "default": "",
            "examples": [
                "other",
                "other_playlist",
                "collection",
                "album"
            ],
            "pattern": "^(.*)$"
        },
        "source_uri": {
            "$id": "#/properties/source_uri",
            "type": "string",
            "title": "The Source_uri Schema",
            "default": "",
            "examples": [
                "spotify:playlist:2Km6ga6BkgMfJARgw9cxXr"
            ],
            "format": "uri",
            "pattern": "^(.*)$"
        },
        "device_type": {
            "$id": "#/properties/device_type",
            "type": "string",
            "title": "The Device_type Schema",
            "default": "",
            "examples": [
                "desktop",
                "mobile",
                "laptop"
            ],
            "pattern": "^(.*)$"
        },
        "os": {
            "$id": "#/properties/os",
            "type": "string",
            "title": "The Os Schema",
            "default": "",
            "examples": [
                "iOS",
                "Android",
                "Windows"
            ],
            "pattern": "^(.*)$"
        },
        "shuffle": {
            "$id": "#/properties/shuffle",
            "type": "string",
            "title": "The shuffle Schema",
            "default": "",
            "examples": [
                "Y",
                "N",
                ""
            ],
            "pattern": "^(.*)$"
        },
        "repeat_play": {
            "$id": "#/properties/repeat_play",
            "type": "string",
            "title": "The repeat_play Schema",
            "default": "",
            "examples": [
                "Y",
                "N",
                ""
            ],
            "pattern": "^(.*)$"
        },
        "utc_timestamp_offset": {
            "$id": "#/properties/utc_timestamp_offset",
            "type": "string",
            "title": "The utc_timestamp_offset Schema",
            "default": "",
            "examples": [
                "09:00"
            ],
            "format": "string",
            "pattern": "^(.*)$"
        },
        "content_type_flag": {
            "$id": "#/properties/content_type_flag",
            "type": "string",
            "title": "The content_type_flag Schema",
            "default": "",
            "examples": [
                "audio",
                "video",
                ""
            ],
            "pattern": "^(.*)$"
        },
        "completion_flag": {
            "$id": "#/properties/completion_flag",
            "type": "string",
            "title": "The completion_flag Schema",
            "default": "",
            "examples": [
                "Y",
                "N",
                ""
            ],
            "pattern": "^(.*)$"
        },
        "new_user_id": {
            "$id": "#/properties/user_id",
            "type": "string",
            "title": "The new_user_id Schema",
            "default": "",
            "examples": [
                "00005bda07f8b09bc0ceed9343af3eda"
            ],
            "pattern": "^(.*)$"
        }
	}
}
