{
  "namespace": "org.radarcns.connector.fitbit",
  "type": "record",
  "name": "FitbitSleepStage",
  "doc": "Fitbit 'stages' sleep data as defined at https://dev.fitbit.com/build/reference/web-api/sleep/.",
  "fields": [
    { "name": "dateTime", "type": "string", "doc": "ISO 6801 formatted local date time of device (yyyy-MM-ddTHH:mm:ss)." },
    { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." },
    { "name": "duration", "type": "int", "doc": "Duration at this sleep characteristic in seconds." },
    { "name": "level", "type":
      {"name": "FitbitSleepStageLevel", "type": "enum", "symbols": ["DEEP", "LIGHT", "REM", "AWAKE", "UNKNOWN"], "doc": "Level of sleep as computed by Fitbit."},
      "doc": "Level of sleep as computed by Fitbit.", "default": "UNKNOWN" }
  ]
}
