{
    "format": "ndjson",
    "definitions": {},
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://example.com/root.json",
    "type": "object",
    "title": "Spotify Streams Schema",
    "required": [
        "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]+)$"
        },
        "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": "^(.*)$"
        },
         "region": {
            "$id": "#/properties/region",
            "type": "string",
            "title": "The Region Schema",
            "default": "",
            "examples": [
                "JP-14",
                "JP",
                "Unknown"
            ],
            "pattern": "^(.*)$"
        },
        "access": {
            "$id": "#/properties/access",
            "type": "string",
            "title": "The Access Schema",
            "default": "",
            "examples": [
                "free",
                "premium"
            ],
            "pattern": "^(.*)$"
        },
        "type": {
            "$id": "#/properties/type",
            "type": "string",
            "title": "The Type Schema",
            "default": "",
            "examples": [
                "paid",
                "ad"
            ],
            "pattern": "^(.*)$"
        },
        "product": {
            "$id": "#/properties/product",
            "type": "string",
            "title": "The Product Schema",
            "default": "",
            "examples": [
                "family-sub"
            ],
            "pattern": "^(.*)$"
        },
        "partner": {
            "$id": "#/properties/partner",
            "type": "string",
            "title": "The Partner Schema",
            "default": "",
            "examples": [
                "partner name"
            ],
            "pattern": "^(.*)$"
        },
        "registration_country": {
            "$id": "#/properties/country",
            "type": "string",
            "title": "The Country Schema",
            "default": "",
            "examples": [
                "JP",
                "AU"
            ],
            "pattern": "^(.*)$"
        },
        "registration_zipcode": {
            "$id": "#/properties/zipcode",
            "type": "string",
            "title": "The Zipcode Schema",
            "default": "",
            "examples": [
                "123456"
            ],
            "pattern": "^(.*)$"
        }
	}
}
