{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/webjobpublishsettings-json/latest.json",
  "title": "JSON schema for Azure Webjobs configuration files",
  "x-lintel": {
    "source": "https://www.schemastore.org/webjob-publish-settings.json",
    "sourceSha256": "b85bfefaa0ae61723d265f07671bb6cc07431613ac88f285158a2a1d1f5b6575",
    "fileMatch": [
      "webjobpublishsettings.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "required": [
    "runMode"
  ],
  "$defs": {
    "shared": {
      "properties": {
        "webJobName": {
          "type": "string",
          "description": "The name of the Azure Webjob."
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start time of a scheduled job. Example. 2014-06-11T00:00:00-08:00"
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time of a scheduled job. Example. 2014-06-12T00:00:00-08:00"
        },
        "jobRecurrenceFrequency": {
          "type": "string",
          "enum": [
            "Second",
            "Minute",
            "Hour",
            "Day",
            "Week",
            "Month"
          ],
          "description": "The frequency metric used with the 'interval' property."
        },
        "interval": {
          "type": "integer",
          "description": "The interval of how often the Azure Webjob should run. Use it with the 'jobRecurrenceFrequency' property."
        }
      }
    },
    "scheduled": {
      "required": [
        "webJobName",
        "startTime",
        "endTime",
        "jobRecurrenceFrequency",
        "interval"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/shared"
        }
      ],
      "properties": {
        "runMode": {
          "type": "string",
          "enum": [
            "Scheduled"
          ],
          "description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
        }
      },
      "type": "object"
    },
    "notScheduled": {
      "required": [
        "runMode"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/shared"
        }
      ],
      "properties": {
        "runMode": {
          "type": "string",
          "enum": [
            "Continuous",
            "OnDemand"
          ],
          "description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
        }
      },
      "type": "object"
    }
  },
  "id": "https://json.schemastore.org/webjob-publish-settings.json",
  "oneOf": [
    {
      "$ref": "#/$defs/scheduled"
    },
    {
      "$ref": "#/$defs/notScheduled"
    }
  ]
}
