{
  "namespace": "com.pacbio.common.models.pipeline",
  "type": "record",
  "name": "PipelineTemplateView",
  "doc": "Custom views of a Resolved Pipeline Template and task options",
  "fields": [
    {
      "name": "id",
      "type": "string",
      "doc": "Fully qualified pipeline ID, must only have [A-Z][0-9]_."
    },
    {
      "name": "name",
      "type": "string",
      "doc": "Plain-English name of the pipeline as it will appear in UI"
    },
    {
      "name": "description",
      "type": "string",
      "doc": "More detailed description of the pipeline as it will appear in UI"
    },
    {
      "name": "taskOptions",
      "type": ["null", {
        "type": "array",
        "items": {
          "type": "record",
          "name": "TaskOptionViewRule",
          "fields": [
            {
              "name": "id",
              "type": "string",
              "doc": "Source ID as it appears in the pbsmrtpipe datastore, Should have the from {task-id}-{in|out}-{positional-index}"
            },
            {
              "name": "hidden",
              "type": "boolean",
              "doc": "Specifies that a field should not appear in the UI"
            },
            {
              "name": "advanced",
              "type": "boolean",
              "doc": "Specifies that a field should only appear in the advanced settings window"
            }
          ]
        }
      }],
      "default": null
    },
    {
      "name": "entryPoints",
      "type": ["null", {
        "type": "array",
        "items": {
          "type": "record",
          "name": "EntryPointsViewRule",
          "fields": [
            {
              "name": "entryId",
              "type": "enum",
              "symbols": ["eid_subread", "eid_hdfsubread", "eid_ref_dataset", "eid_barcode"],
              "doc": "The entry point id"
            },
            {
              "name": "uuid",
              "type": ["null", "string"],
              "doc": "The UUID of the default dataset for this entrypoint",
              "default": null
            },
            {
              "name": "label",
              "type": ["null", "string"],
              "default": null,
              "doc": "Entry point label to display in the UI"
            }
          ]
        }
      }],
      "default": null
    },
    {
      "name": "inputFilters",
      "doc": "Used to filter datasets for selection for the entry point(s) of this pipeline",
      "type": ["null", {
        "type": "array", 
        "items": {
          "type": "record",
          "name": "FilterEncoding",
          "fields": [
            {
              "name": "field",
              "type": "string",
              "doc": "The dataset field on which to filter"
            },
            {
              "name": "operator",
              "type": "enum",
              "symbols": ["=", "!=", "contains"],
              "doc": "The operator.  One of: '=', '!=', or 'contains'."
            },
            {
              "name": "value",
              "type": "string",
              "doc": "The value of the dataset at the given field.  The left hand side of the comparison in the filter"
            },
            {
              "name": "entryId",
              "type": "enum",
              "symbols": ["eid_subread", "eid_hdfsubread", "eid_ref_dataset", "eid_barcode"],
              "default": "eid_subread",
              "doc": "Entry point ID that the filter applies to, e.g. eid_subread or eid_ref_dataset.  This is assumed to be eid_subread if not specified."
            }
          ]
        }
      }]
    }
  ]
}
