{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-hosting-private-database-task-schema.json",
  "title": "hosting.privateDatabase.Task",
  "description": "Web Cloud Database task",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-hosting-privateDatabase-openapi.yml#/components/schemas/hosting.privateDatabase.Task",
  "type": "object",
  "properties": {
    "databaseName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Database name on which the task is working",
      "readOnly": true
    },
    "doneDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Completion date",
      "format": "date-time",
      "readOnly": true
    },
    "dumpId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "DumpId on which the task is working",
      "readOnly": true
    },
    "function": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.task.FunctionEnum"
        }
      ],
      "description": "Function name",
      "readOnly": true
    },
    "id": {
      "type": "integer",
      "description": "The id of the task",
      "readOnly": true
    },
    "lastUpdate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last update",
      "format": "date-time",
      "readOnly": true
    },
    "startDate": {
      "type": "string",
      "description": "Task creation date",
      "format": "date-time",
      "readOnly": true
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.task.StatusEnum"
        }
      ],
      "description": "Task status",
      "readOnly": true
    },
    "userName": {
      "type": [
        "string",
        "null"
      ],
      "description": "User name on which the task is working",
      "readOnly": true
    }
  },
  "$defs": {
    "hosting.privateDatabase.task.FunctionEnum": {
      "type": "string",
      "description": "Task's dunction",
      "enum": [
        "abuse",
        "changeFtpPassword",
        "changeRam",
        "changeVersion",
        "configuration/update",
        "create",
        "database/copy",
        "database/copyRestore",
        "database/create",
        "database/delete",
        "database/dump",
        "database/dump/delete",
        "database/extension/create",
        "database/extension/delete",
        "database/import",
        "database/restore",
        "database/wizard",
        "delete",
        "grant/create",
        "grant/delete",
        "grant/update",
        "install",
        "overquota/in",
        "overquota/out",
        "quotaRefresh",
        "refresh",
        "reopen",
        "restart",
        "start",
        "stop",
        "suspend",
        "user/changePassword",
        "user/create",
        "user/delete",
        "webhostingNetwork/disable",
        "webhostingNetwork/enable",
        "whitelist/create",
        "whitelist/delete",
        "whitelist/update"
      ]
    },
    "hosting.privateDatabase.task.StatusEnum": {
      "type": "string",
      "description": "Task's status",
      "enum": [
        "cancelled",
        "doing",
        "done",
        "error",
        "todo"
      ]
    }
  }
}