{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/eagle-eye-networks/main/json-schema/eagle-eye-networks-api-download-details-with-includes-schema.json",
  "title": "ApiDownloadDetailsWithIncludes",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eagle-eye-networks-media-openapi.yml#/components/schemas/ApiDownloadDetailsWithIncludes",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ApiDownloadsMain"
    }
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Account ID specified in as an ESN Type.",
      "pattern": "^[a-fA-F0-9]{8}$"
    },
    "createTimestamp": {
      "description": "Date and time when the item was created.",
      "readOnly": true,
      "allOf": [
        {
          "$ref": "#/$defs/timestamp2"
        }
      ]
    },
    "updateTimestamp": {
      "description": "Date and time when the item was last updated.",
      "readOnly": true,
      "allOf": [
        {
          "$ref": "#/$defs/timestamp2"
        }
      ]
    },
    "size": {
      "allOf": [
        {
          "$ref": "#/$defs/size"
        }
      ]
    },
    "metadata": {
      "type": "object",
      "description": "Custom metadata associated with the download.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "tags": {
      "allOf": [
        {
          "$ref": "#/$defs/tags"
        }
      ]
    },
    "notes": {
      "allOf": [
        {
          "$ref": "#/$defs/notes"
        }
      ]
    },
    "md5": {
      "allOf": [
        {
          "$ref": "#/$defs/md5"
        }
      ]
    },
    "details": {
      "nullable": true,
      "readOnly": true,
      "allOf": [
        {
          "$ref": "#/$defs/fileDetails"
        }
      ]
    }
  },
  "$defs": {
    "ApiDownloadsMain": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/id1"
        },
        "directory": {
          "$ref": "#/$defs/directory"
        },
        "mimeType": {
          "$ref": "#/$defs/mimeType1"
        },
        "name": {
          "$ref": "#/$defs/name1"
        },
        "expireTimestamp": {
          "$ref": "#/$defs/expireTimestamp"
        },
        "status": {
          "$ref": "#/$defs/status"
        }
      },
      "required": [
        "id"
      ]
    },
    "directory": {
      "type": "string",
      "description": "Name of the parent directory.",
      "readOnly": false
    },
    "expireTimestamp": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "exportFileDetails": {
      "description": "Extra information about the parameters used to create the exported file",
      "required": [
        "type",
        "deviceId",
        "startTimestamp",
        "endTimestamp"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "exportFileDetails"
          ]
        },
        "deviceId": {
          "type": "string",
          "description": "ID of the source device for the export."
        },
        "jobId": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the export job that created the file."
        },
        "videoType": {
          "type": "string",
          "description": "Type of video generated by the export. Normal video of the main video stream, or a time lapse of the preview stream.",
          "enum": [
            "video",
            "timeLapse"
          ]
        },
        "startTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Start timestamp of the export."
        },
        "endTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "End timestamp of the export."
        }
      }
    },
    "fileDetails": {
      "oneOf": [
        {
          "$ref": "#/$defs/exportFileDetails"
        }
      ]
    },
    "id1": {
      "type": "string",
      "description": "The ID of the download.",
      "format": "uuid",
      "readOnly": true
    },
    "md5": {
      "type": "string",
      "description": "MD5 hash of the file.",
      "readOnly": true
    },
    "mimeType1": {
      "type": "string",
      "description": "The media content type.",
      "readOnly": true
    },
    "name1": {
      "type": "string",
      "description": "Name of the item.",
      "readOnly": false,
      "minLength": 1,
      "maxLength": 128
    },
    "notes": {
      "type": "string",
      "description": "User entered annotations.",
      "readOnly": false
    },
    "size": {
      "type": "integer",
      "description": "Size of the file in Bytes.",
      "readOnly": true
    },
    "status": {
      "type": "string",
      "description": "Expiration status of the download. Possible values are \"available\" or \"expired\".",
      "readOnly": true,
      "enum": [
        "available",
        "expired"
      ]
    },
    "tags": {
      "description": "List of tags associated with the file.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "timestamp2": {
      "type": "string",
      "description": "Date and time when the item was created.",
      "format": "date-time",
      "readOnly": true
    }
  }
}