{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-update-trigger-request-schema.json",
  "title": "UpdateTriggerRequest",
  "description": "Partial update. Changing `preRules`, `postRules`, or `dedupe` regenerates\n`preCode`/`postCode`. Raw code is never accepted. `s3Bucket`/`s3Prefix` only apply\nto (and are only accepted for) an existing `aws_s3` trigger. `upstreamSpecName`\nonly applies to (and is only accepted for) an existing `spec_success` trigger,\nand is re-validated for cycles just like create-trigger. `frequency` applies to\nsftp/aws_s3/schedule triggers. A trigger's `type` cannot be changed.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-job-triggers-api-openapi.yml#/components/schemas/UpdateTriggerRequest",
  "type": "object",
  "required": [
    "action",
    "workspaceId",
    "triggerId"
  ],
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "update-trigger"
      ]
    },
    "workspaceId": {
      "type": "string",
      "format": "uuid"
    },
    "triggerId": {
      "type": "string",
      "format": "uuid"
    },
    "frequency": {
      "$ref": "#/$defs/TriggerFrequency"
    },
    "preRules": {
      "type": "string"
    },
    "postRules": {
      "type": "string"
    },
    "dedupe": {
      "type": "boolean"
    },
    "enabled": {
      "type": "boolean"
    },
    "s3Bucket": {
      "type": "string",
      "description": "aws_s3 triggers only."
    },
    "s3Prefix": {
      "type": "string",
      "description": "aws_s3 triggers only."
    },
    "upstreamSpecName": {
      "type": "string",
      "description": "spec_success triggers only. Re-points the trigger at a different upstream spec."
    }
  },
  "$defs": {
    "TriggerFrequency": {
      "type": "object",
      "description": "Polling cadence, evaluated in UTC by the hourly dispatcher.\n`hourOfDay` is required for `daily`/`monthly`; `dayOfMonth` for `monthly`.\n",
      "required": [
        "unit"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "hourly",
            "daily",
            "monthly"
          ]
        },
        "hourOfDay": {
          "type": "integer",
          "minimum": 0,
          "maximum": 23,
          "description": "Hour of day (UTC). Required for daily and monthly."
        },
        "dayOfMonth": {
          "type": "integer",
          "minimum": 1,
          "maximum": 31,
          "description": "Day of month. Required for monthly."
        }
      }
    }
  }
}