{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/resource/download-manager",
  "title" : "Download-manager Resource Configuration",
  "description" : "This `download-manager` provides functionality for downloading and caching files from various sources.\n\nIt handles downloading files from local or remote locations, caching them locally, and tracking download progress.\n",
  "type" : "object",
  "properties" : {
    "download-manager" : {
      "type" : "object",
      "properties" : {
        "printDownloadProgress" : {
          "type" : "boolean",
          "description" : "Whether to display progress information during file downloads.",
          "default" : "false"
        },
        "cache" : {
          "type" : "object",
          "description" : "This configuration controls how files are cached locally, including the cache location,\nsize limits, expiration policy, and cleanup behavior. If not provided files will be cached in the /tmp directory.\n",
          "properties" : {
            "directory" : {
              "type" : "string",
              "description" : "Directory where files will be cached. If not specified, a temporary directory will be created."
            },
            "maxCacheSize" : {
              "type" : "integer",
              "description" : "Maximum size of the cache in bytes. Files will be evicted when the cache exceeds this size. Use 0 for unlimited.",
              "default" : "0",
              "minimum" : -9223372036854775808,
              "maximum" : 9223372036854775807
            },
            "expirationTime" : {
              "type" : "string",
              "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
              "description" : "Duration after which cached files are considered stale and will not be used by the system."
            },
            "cleanupOnStart" : {
              "type" : "boolean",
              "description" : "Whether to clean up expired or invalid cache entries when the cache is initialized.",
              "default" : "false"
            }
          },
          "additionalProperties" : false
        }
      },
      "additionalProperties" : false
    }
  },
  "required" : [ "download-manager" ],
  "additionalProperties" : false
}
