{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/google-fitness/refs/heads/main/json-schema/fitness.json",
  "title": "Google Fit Session",
  "description": "A session resource from the Google Fit REST API representing a time-bounded fitness activity.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A client-generated identifier that is unique across all sessions owned by this particular user."
    },
    "name": {
      "type": "string",
      "description": "A human readable name of the session."
    },
    "description": {
      "type": "string",
      "description": "A description for this session."
    },
    "startTimeMillis": {
      "type": "string",
      "description": "A start time in milliseconds since epoch, inclusive."
    },
    "endTimeMillis": {
      "type": "string",
      "description": "An end time in milliseconds since epoch, inclusive."
    },
    "modifiedTimeMillis": {
      "type": "string",
      "description": "A timestamp that indicates when the session was last modified."
    },
    "application": {
      "type": "object",
      "description": "The application that created the session.",
      "properties": {
        "name": {
          "type": "string"
        },
        "packageName": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "detailsUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "activityType": {
      "type": "integer",
      "description": "The type of activity this session represents."
    },
    "activeTimeMillis": {
      "type": "string",
      "description": "Active time in milliseconds."
    }
  },
  "required": ["id", "startTimeMillis", "endTimeMillis", "activityType"]
}
