{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/oracle/main/json-schema/oracle-work-request-summary-schema.json",
  "title": "WorkRequestSummary",
  "description": "An asynchronous work request.",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-analytics-api-openapi.yml#/components/schemas/WorkRequestSummary",
  "properties": {
    "compartmentId": {
      "description": "The compartment OCID of this work request.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "id": {
      "description": "The resource OCID.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "operationType": {
      "description": "The operation performed by the work request.\n",
      "enum": [
        "CREATE_ANALYTICS_INSTANCE",
        "DELETE_ANALYTICS_INSTANCE",
        "START_ANALYTICS_INSTANCE",
        "STOP_ANALYTICS_INSTANCE",
        "SCALE_ANALYTICS_INSTANCE",
        "CHANGE_ANALYTICS_INSTANCE_COMPARTMENT",
        "CHANGE_ANALYTICS_INSTANCE_NETWORK_ENDPOINT",
        "CREATE_VANITY_URL",
        "UPDATE_VANITY_URL",
        "DELETE_VANITY_URL",
        "CREATE_PRIVATE_ACCESS_CHANNEL",
        "UPDATE_PRIVATE_ACCESS_CHANNEL",
        "DELETE_PRIVATE_ACCESS_CHANNEL",
        "UPDATE_INSTANCE_ENCRYPTION_KEY"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/WorkRequestOperationType"
    },
    "resources": {
      "description": "The resources this work request affects.\n",
      "items": {
        "$ref": "#/$defs/WorkRequestResource"
      },
      "type": "array"
    },
    "status": {
      "description": "The current status of the work request.\n",
      "enum": [
        "ACCEPTED",
        "IN_PROGRESS",
        "FAILED",
        "SUCCEEDED",
        "CANCELING",
        "CANCELED"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/WorkRequestStatus"
    },
    "timeAccepted": {
      "description": "The time the work request was accepted, in the format defined by RFC3339.\n\nExample: `2016-08-25T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "timeFinished": {
      "description": "The time the work request was finished, in the format defined by RFC3339.\n\nExample: `2016-08-25T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "timeStarted": {
      "description": "The time the work request was started, in the format defined by RFC3339.\n\nExample: `2016-08-25T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "operationType",
    "status",
    "compartmentId",
    "resources",
    "timeAccepted"
  ],
  "type": "object",
  "$defs": {
    "WorkRequestResource": {
      "properties": {
        "actionResult": {
          "description": "The way in which this resource was affected by this work request.\n",
          "enum": [
            "COMPARTMENT_CHANGED",
            "CREATED",
            "DELETED",
            "STARTED",
            "STOPPED",
            "SCALED",
            "NETWORK_ENDPOINT_CHANGED",
            "VANITY_URL_CREATED",
            "VANITY_URL_UPDATED",
            "VANITY_URL_DELETED",
            "PRIVATE_ACCESS_CHANNEL_CREATED",
            "PRIVATE_ACCESS_CHANNEL_UPDATED",
            "PRIVATE_ACCESS_CHANNEL_DELETED",
            "NONE"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/WorkRequestActionResult"
        },
        "identifier": {
          "description": "The OCID of the resource the work request is affecting.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Additional metadata of the resource.\n",
          "type": "object"
        },
        "resourceType": {
          "description": "The type of the resource the work request is affecting.\n",
          "enum": [
            "ANALYTICS_INSTANCE"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/WorkRequestResourceType"
        },
        "resourceUri": {
          "description": "The URI of the affected resource.\n",
          "type": "string"
        }
      },
      "required": [
        "actionResult",
        "resourceType",
        "identifier",
        "resourceUri"
      ]
    }
  }
}