{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-dataset-schema.json",
  "title": "Dataset",
  "description": "A dataset is a logical collection of records. The dataset contains all the information necessary to describe a record's source, format, type of annotations allowed on these records, and labels allowed on annotations.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-datalabelingmanagement-api-openapi.yml#/components/schemas/Dataset",
  "properties": {
    "annotationFormat": {
      "description": "The annotation format name required for labeling records.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "compartmentId": {
      "description": "The OCID of the compartment of the resource.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "datasetFormatDetails": {
      "$ref": "#/$defs/DatasetFormatDetails"
    },
    "datasetSourceDetails": {
      "$ref": "#/$defs/DatasetSourceDetails"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer, and boolean types are supported.\n",
          "type": "object"
        },
        "description": "A key-value pair representing predefined tags' keys and values scoped to a namespace.\nFor example: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "The defined tags for this resource. Each key is predefined and scoped to a namespace.\nFor example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "A user provided description of the dataset",
      "maxLength": 1024,
      "type": "string"
    },
    "displayName": {
      "description": "A user-friendly display name for the resource.",
      "maxLength": 255,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only.\nFor example: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The OCID of the Dataset.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "initialRecordGenerationConfiguration": {
      "$ref": "#/$defs/InitialRecordGenerationConfiguration"
    },
    "labelSet": {
      "$ref": "#/$defs/LabelSet"
    },
    "labelingInstructions": {
      "description": "The labeling instructions for human labelers in rich text format",
      "maxLength": 32767,
      "minLength": 0,
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in FAILED or NEEDS_ATTENTION state.",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The state of a dataset.\nCREATING - The dataset is being created.  It will transition to ACTIVE when it is ready for labeling.\nACTIVE   - The dataset is ready for labeling.\nUPDATING - The dataset is being updated.  It and its related resources may be unavailable for other updates until it returns to ACTIVE.\nNEEDS_ATTENTION - A dataset updation operation has failed due to validation or other errors and needs attention.\nDELETING - The dataset and its related resources are being deleted.\nDELETED  - The dataset has been deleted and is no longer available.\nFAILED   - The dataset has failed due to validation or other errors.\n",
      "enum": [
        "CREATING",
        "UPDATING",
        "ACTIVE",
        "NEEDS_ATTENTION",
        "DELETING",
        "DELETED",
        "FAILED"
      ],
      "type": "string"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer, and boolean types are supported.\n",
          "type": "object"
        },
        "description": "A key-value pair representing system tags' keys and values scoped to a namespace.\nFor example: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "The usage of system tag keys. These predefined keys are scoped to namespaces.\nFor example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
      "type": "object"
    },
    "timeCreated": {
      "description": "The date and time the resource was created, in the timestamp format defined by RFC3339.",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The date and time the resource was last updated, in the timestamp format defined by RFC3339.",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "compartmentId",
    "timeCreated",
    "timeUpdated",
    "lifecycleState",
    "annotationFormat",
    "datasetSourceDetails",
    "datasetFormatDetails",
    "labelSet"
  ],
  "type": "object",
  "$defs": {
    "DatasetFormatDetails": {
      "description": "It specifies how to process the data. Supported formats include DOCUMENT, IMAGE, and TEXT.",
      "properties": {
        "formatType": {
          "description": "The format type. DOCUMENT format is for record contents that are PDFs or TIFFs. IMAGE format is for record contents that are JPEGs or PNGs. TEXT format is for record contents that are TXT files.",
          "enum": [
            "DOCUMENT",
            "IMAGE",
            "TEXT"
          ],
          "type": "string"
        }
      },
      "required": [
        "formatType"
      ]
    },
    "DatasetSourceDetails": {
      "description": "This allows the customer to specify the source of the dataset.",
      "properties": {
        "sourceType": {
          "description": "The source type. OBJECT_STORAGE allows the user to describe where in object storage the dataset is.",
          "enum": [
            "OBJECT_STORAGE"
          ],
          "type": "string"
        }
      },
      "required": [
        "sourceType"
      ],
      "type": "object"
    },
    "InitialRecordGenerationConfiguration": {
      "description": "The initial generate records configuration. It generates records from the dataset's source.",
      "properties": {
        "limit": {
          "description": "The maximum number of records to generate.",
          "format": "integer",
          "type": "number"
        }
      },
      "type": "object"
    },
    "Label": {
      "description": "It represents a label.",
      "properties": {
        "name": {
          "description": "An unique name for a label within its dataset.",
          "maxLength": 255,
          "type": "string"
        }
      },
      "type": "object"
    },
    "LabelSet": {
      "description": "An ordered collection of labels that are unique by name.\n",
      "properties": {
        "items": {
          "description": "An ordered collection of labels that are unique by name.",
          "items": {
            "$ref": "#/$defs/Label"
          },
          "maxItems": 250,
          "minItems": 0,
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}