{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-update-intake-payload-schema.json",
  "title": "update-intakePayload",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-intake-openapi.yml#/components/schemas/update-intakePayload",
  "properties": {
    "catalog": {
      "$ref": "#/$defs/intakeCatalogPatch"
    },
    "description": {
      "description": "The description is a longer text chosen by the user to provide more context for the resource.",
      "maxLength": 1024,
      "type": "string"
    },
    "displayName": {
      "description": "The display name is a short name chosen by the user to identify the resource.",
      "maxLength": 32,
      "minLength": 1,
      "type": "string"
    },
    "intakeRunnerId": {
      "description": "The unique id of the intake runner this intake should run on.",
      "format": "uuid",
      "type": "string"
    },
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Labels are key-value pairs associated with the resource. To update labels:\n  - Provide a new set of key-value pairs to replace the existing labels.\n  - Send empty object `{}` to remove all labels.\n  - Omit this field to leave the labels unchanged.\n",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "intakeRunnerId"
  ],
  "$defs": {
    "catalogAuthPatch": {
      "description": "Configures authentication for the Iceberg catalog",
      "properties": {
        "dremio": {
          "$ref": "#/$defs/dremioAuthPatch"
        },
        "type": {
          "$ref": "#/$defs/catalogAuthType"
        }
      }
    },
    "catalogAuthType": {
      "description": "Means of authentication for catalog requests",
      "enum": [
        "none",
        "dremio"
      ],
      "type": "string"
    },
    "dremioAuthPatch": {
      "properties": {
        "personalAccessToken": {
          "description": "A Dremio personal access token for authentication",
          "maxLength": 1024,
          "type": "string"
        },
        "tokenEndpoint": {
          "description": "The URL to the Dremio instance's OAuth 2.0 token endpoint",
          "maxLength": 1024,
          "type": "string"
        }
      }
    },
    "intakeCatalogPatch": {
      "description": "The Iceberg catalog configuration",
      "properties": {
        "auth": {
          "$ref": "#/$defs/catalogAuthPatch"
        },
        "namespace": {
          "default": "intake",
          "description": "The namespace to which data shall be written. It will be automatically created, if it does not exist.",
          "maxLength": 1024,
          "type": "string"
        },
        "partitionBy": {
          "description": "List of Iceberg partitioning expressions to use when creating the target table.\nThis setting can only be used when `partitioning` is set to `manual`.\nSee the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details.\n",
          "items": {
            "maxLength": 1024,
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "partitioning": {
          "$ref": "#/$defs/partitioningUpdateType"
        },
        "tableName": {
          "description": "The table name is a short name chosen by the user to identify the table in Iceberg.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "uri": {
          "description": "The URI to the Iceberg catalog endpoint",
          "maxLength": 1024,
          "type": "string"
        },
        "warehouse": {
          "description": "The Iceberg warehouse to connect to, required when the catalog has no default warehouse configured.",
          "maxLength": 1024,
          "type": "string"
        }
      }
    },
    "partitioningUpdateType": {
      "description": "The target table's partitioning.\n* `none` disables partitioning.\n* `intake-time` configures daily partitioning based on the automatically created ingestion time column `__intake_ts`.\n* `manual` allows arbitrary Iceberg partitioning expression to be set via `partitionBy`.\n",
      "enum": [
        "none",
        "intake-time",
        "manual"
      ],
      "type": "string"
    }
  }
}