{
  "name"      : "Collectors",
  "desc"      : "Applications that collect data from an external source and stores it in an archive.",
  "attributes": {
    "name"  : {"desc": "The name of the collector; no more than 30 characters."},
    "desc"  : {"desc": "The description of the collector."},
    "uuid"  : {"desc": "The unique identifier of the collector."},
    "config": {
      "attributes": {
        "collector": {
          "type"      : "object"
        },
        "events"   : {
          "name"      : "Events",
          "type"      : "object",
          "attributes": {
            "when"                : {
              "name"       : "Filter",
              "desc"       : "The filter that specifies the subset of events to store in the archive.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "filter"
            },
            // attribute filters, only one can be used
            "include"             : {
              "name"       : "Included Attributes",
              "desc"       : "The comma-delimited list of attributes to include in the archive storage. Takes precedence over the Excluded Attributes.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "field_name",
              "is_array"   : true
            },
            "exclude"             : {
              "name"       : "Excluded Attributes",
              "desc"       : "The comma-delimited list of attributes to exclude from the archive storage.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "field_name",
              "is_array"   : true
            },
            "retain_original_data": {
              "name"       : "Retain Original Data",
              "desc"       : "Retain original data in the orig_data event attribute.",
              "requirement": "optional",
              "type"       : "boolean",
              "default"    : false
            }
          }
        },
        "archive"  : {
          "name"      : "Archive",
          "desc"      : "The data archive.",
          "type"      : "object",
          "attributes": {
            "enabled"  : {
              "name"       : "Dedicated",
              "desc"       : "Store events in a separate archive to use a location and retention policy different from that of the common archive.",
              "requirement": "required",
              "type"       : "boolean",
              "default"    : true
            },
            "directory": {
              "name"       : "Directory",
              "desc"       : "The subdirectory in $SYMC_DATA/archives/dedicated where the archive is stored.",
              "requirement": "optional",
              "advanced"   : false,
              "pattern"    : "path_name",
              "max_len"    : 1024,
              "type"       : "string"
            },
            "retention": {
              "name"       : "Time Limit",
              "desc"       : "The number of days that the archived events will be retained. Enter a positive integer value to enforce the limit.",
              "requirement": "optional",
              "advanced"   : false,
              "type"       : "integer",
              "range"      : [0, 65535],
              "default"    : 30
            },
            "max_size" : {
              "name"       : "Size Limit (MB)",
              "desc"       : "The maximum size of this archive in Megabytes. Enter a positive integer value to enforce the limit.",
              "requirement": "optional",
              "advanced"   : false,
              "type"       : "integer",
              "range"      : [0, 10000000]
            }
          }
        }
      }
    }
  }
}
