{
  "documentation": "A template for a scheduled report in LogScale.",
  "properties": {
    "name": {
      "documentation": "The name of the scheduled report.",
      "minLength": 1,
      "type": "string"
    },
    "description": {
      "documentation": "A description of what the scheduled report does.",
      "type": "string"
    },
    "recipients": {
      "type": "array",
      "documentation": "A list of email recipients for the scheduled report.",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean",
      "documentation": "If false the scheduled report will not trigger.",
      "default": false
    },
    "timeInterval": {
      "pattern": "(^(\\d+) ?(years?|y|yrs?|quarters?|q|qtrs?|months?|mon|weeks?|w|days?|d|hours?|hr?|hrs|minutes?|m|min|seconds?|s|secs?|milliseconds?|millis|ms))|(^now)$",
      "documentation": "A relative time interval in Humio Relative Time Format. See https://library.humio.com/syntax-time-relative.",
      "type": "string"
    },
    "labels": {
      "type": "array",
      "documentation": "A list of labels",
      "items": {
        "type": "string"
      }
    },
    "schedule": {
      "documentation": "The schedule configuration for when the report should run.",
      "properties": {
        "endDate": {
          "documentation": "The end date for the schedule in epoch milliseconds.",
          "default": 0,
          "minimum": 0,
          "type": "integer"
        },
        "scheduleExpression": {
          "documentation": "Set schedule using a UNIX cron expression.",
          "minLength": 1,
          "type": "string"
        },
        "timeZone": {
          "pattern": "^(UTC|UTC(-|\\+)\\d{1,2}|UTC(-|\\+)\\d{2}(:\\d{2}){1,2}|[A-Za-z_]+/[A-Za-z_/+-]+)$",
          "documentation": "The UTC offset. Examples: 'Europe/Copenhagen', 'UTC', 'UTC-01' or 'UTC+12:45'",
          "type": "string"
        },
        "startDate": {
          "documentation": "The start date for the schedule in epoch milliseconds.",
          "default": 0,
          "minimum": 0,
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["scheduleExpression", "startDate", "timeZone"]
    },
    "layout": {
      "documentation": "The layout configuration for the PDF report.",
      "properties": {
        "showTitleHeader": {
          "type": "boolean",
          "documentation": "Whether to show title in the header of the report.",
          "default": false
        },
        "showDescription": {
          "type": "boolean",
          "documentation": "Whether to show the description in the report.",
          "default": false
        },
        "showExportDate": {
          "type": "boolean",
          "documentation": "Whether to show the export date in the report.",
          "default": false
        },
        "paperSize": {
          "documentation": "Paper size for the PDF report (e.g., 'A4', 'Letter').",
          "minLength": 1,
          "type": "string"
        },
        "paperOrientation": {
          "documentation": "Paper orientation for the PDF report (e.g., 'portrait', 'landscape').",
          "minLength": 1,
          "type": "string"
        },
        "showTitleFrontpage": {
          "type": "boolean",
          "documentation": "Whether to show title on the front page of the report.",
          "default": false
        },
        "maxNumberOfRows": {
          "documentation": "Maximum number of rows to include in the report.",
          "maximum": 2000,
          "minimum": 1,
          "type": "integer"
        },
        "paperLayout": {
          "documentation": "Paper layout for the PDF report.",
          "minLength": 1,
          "type": "string"
        },
        "footerShowPageNumbers": {
          "type": "boolean",
          "documentation": "Whether to show page numbers in the footer of the report.",
          "default": false
        },
        "showParameters": {
          "type": "boolean",
          "documentation": "Whether to show parameters in the report.",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["footerShowPageNumbers", "maxNumberOfRows", "paperLayout", "paperOrientation", "paperSize", "showDescription", "showExportDate", "showParameters", "showTitleFrontpage", "showTitleHeader"]
    },
    "parameters": {
      "type": "array",
      "documentation": "A list of parameter values for the dashboard.",
      "items": {
        "properties": {
          "id": {
            "documentation": "The parameter ID.",
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "documentation": "The parameter value.",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": ["id", "value"]
      }
    },
    "password": {
      "documentation": "Password for protecting the generated PDF report. This will never be exported or otherwise exposed.",
      "type": "string"
    },
    "$schema": {
      "enum": ["https://schemas.humio.com/scheduledreport/v0.1.0"],
      "type": "string"
    },
    "dashboardNameReference": {
      "documentation": "The name of the dashboard that this scheduled report references. Resolved to dashboard ID at install time.",
      "minLength": 1,
      "type": "string"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": ["$schema", "dashboardNameReference", "layout", "name", "schedule"]
}