{
  "namespace": "com.pacbio.common.models.contracts",
  "type": "record",
  "name": "ResolvedToolContract",
  "doc": "Resolved `ToolContract` used to run tasks in pipelines",
  "fields": [
    {
      "name": "resolved_tool_contract",
      "doc": "Container for Resolved Tool Contract metadata",
      "type": {
        "doc": "Resolved Tool Contract Task metadata, such as nproc to use, resolved paths to input and output files and resolved Task Option values",
        "type": "record",
        "name": "ResolvedToolContractTask",
        "fields": [
          {
            "doc": "Resolved paths to input files (Paths must be absolute)",
            "name": "input_files",
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "doc": "Resolved paths to output files (Paths must be absolute)",
            "name": "output_files",
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "doc": "Resolved Task Options",
            "name": "options",
            "type": {
              "type": "map",
              "values": ["long", "boolean", "string", "int", "float"]
            }
          },
          {
            "doc": "Number of Processors to use",
            "name": "nproc",
            "type": "int"
          },
          {
            "doc": "Determine if the task should be submitted to the distributed computing env (e.g, SGE). Only applies if the system is configured to support distributed computing ",
            "name": "is_distributed",
            "type": "boolean"
          },
          {
            "doc": "Task type",
            "name": "task_type",
            "type": "string"
          },
          {
            "doc": "Globally unique id to reference a Tool Contract. This is sometimes referred to as the `task` id (for historical purposes)",
            "name": "tool_contract_id",
            "type": "string"
          },
          {
            "_comment": "FIXME(mkocher) This needs to be well defined",
            "doc": "Log level to emit to. Supports the standard INFO, DEBUG, ERROR values",
            "name": "log_level",
            "type": "string"
          },
          {
            "name": "resources",
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ]
      }
    },
    {
      "doc": "Driver executable to be called to execute the task",
      "name": "driver",
      "type": {
        "type": "record",
        "name": "Driver",
        "fields": [
          {
            "doc": "Executable to be called. The first positional argument will be the path to the `ResolvedToolContract` Example `python -m mytool.module run-tool-contract ` or `my-exe `. The exe must be in $PATH before running the task.",
            "name": "exe",
            "type": "string"
          }
        ]
      }
    }
  ]
}
