{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-database-tools-sql-report-schema.json",
  "title": "DatabaseToolsSqlReport",
  "description": "Allows generating a summary of SQL query execution details for database operations.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-databasetools-api-openapi.yml#/components/schemas/DatabaseToolsSqlReport",
  "properties": {
    "columns": {
      "description": "Descriptive information on columns referenced in the Database Tools SQL Report source.",
      "items": {
        "$ref": "#/$defs/DatabaseToolsSqlReportColumn"
      },
      "maxItems": 100,
      "type": "array"
    },
    "compartmentId": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment containing the Database Tools SQL report.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "A description of the SQL report.",
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique and can be updated. Avoid entering confidential information.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the Database Tools SQL report.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "instructions": {
      "description": "Instructions on how to use the SQL report. Step-by-step guidance for an AI agent on how to execute or fill in parameters for the report.",
      "maxLength": 4000,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "A message describing the current state in more detail.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current state of the Database Tools SQL report.",
      "enum": [
        "ACTIVE",
        "DELETED"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/DatabaseToolsSqlReportLifecycleState"
    },
    "locks": {
      "description": "Locks associated with this resource.",
      "items": {
        "$ref": "#/$defs/ResourceLock"
      },
      "maxItems": 2,
      "type": "array"
    },
    "purpose": {
      "description": "Purpose of the Database Tools SQL report. Scenario or conditions describing when or why this report should be used. Provides selection criteria to AI agents to improve report selection accuracy.",
      "maxLength": 4000,
      "minLength": 1,
      "type": "string"
    },
    "source": {
      "description": "SQL query executed to generate the report.",
      "maxLength": 32000,
      "minLength": 1,
      "type": "string"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Usage of system tag keys. These predefined keys are scoped to namespaces.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
      "type": "object"
    },
    "timeCreated": {
      "description": "The time the Database Tools SQL report was created. An RFC3339 formatted datetime string.",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The time the Database Tools SQL report was updated. An RFC3339 formatted datetime string.",
      "format": "date-time",
      "type": "string"
    },
    "type": {
      "description": "The Database Tools SQL report type.",
      "enum": [
        "ORACLE_DATABASE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/DatabaseToolsSqlReportType"
    },
    "variables": {
      "description": "Variables referenced in the Database Tools SQL Report source.",
      "items": {
        "$ref": "#/$defs/DatabaseToolsSqlReportVariable"
      },
      "maxItems": 100,
      "type": "array"
    }
  },
  "required": [
    "id",
    "type",
    "compartmentId",
    "displayName",
    "source",
    "lifecycleState",
    "timeCreated",
    "timeUpdated"
  ],
  "type": "object",
  "$defs": {
    "DatabaseToolsSqlReportColumn": {
      "description": "Descriptive information on columns referenced in the Database Tools SQL Report source.",
      "properties": {
        "description": {
          "description": "The description of the column",
          "maxLength": 2000,
          "minLength": 1,
          "type": "string"
        },
        "name": {
          "description": "The name of the column",
          "type": "string"
        },
        "type": {
          "description": "The type of the column",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "description"
      ],
      "type": "object"
    },
    "DatabaseToolsSqlReportVariable": {
      "description": "A variable referenced in the Database Tools SQL Report source.",
      "properties": {
        "description": {
          "description": "The description of the variable",
          "maxLength": 2000,
          "minLength": 1,
          "type": "string"
        },
        "name": {
          "description": "The name of the variable",
          "pattern": "^[A-Za-z][A-Za-z0-9_$#]{0,29}$",
          "type": "string"
        },
        "type": {
          "description": "The type of the variable",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "description"
      ],
      "type": "object"
    },
    "ResourceLock": {
      "description": "Resource locks are used to prevent certain APIs from being called for the resource.\nA full lock prevents both updating the resource and deleting the resource. A delete\nlock prevents deleting the resource.\n",
      "properties": {
        "compartmentId": {
          "description": "The compartment ID of the lock.",
          "type": "string"
        },
        "message": {
          "description": "A message added by the creator of the lock. This is typically used to give an\nindication of why the resource is locked.\n",
          "type": "string"
        },
        "relatedResourceId": {
          "description": "The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.\n",
          "type": "string"
        },
        "timeCreated": {
          "description": "When the lock was created.",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "Type of the lock.",
          "enum": [
            "FULL",
            "DELETE"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "compartmentId"
      ],
      "type": "object"
    }
  }
}