module Mpv.Data.Message where

import Data.Aeson (Value)
import Data.Aeson.TH (deriveJSON)

import Mpv.Data.MpvEvent (MpvEvent)
import Mpv.Json (untaggedOptions)

data Message =
  ResponseMessage {
    Message -> Int
request_id :: Int,
    Message -> Text
error :: Text,
    Message -> Maybe Value
_data :: Maybe Value
  }
  |
  ResponseEvent MpvEvent

deriveJSON untaggedOptions ''Message