{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-ledger-query-result-schema.json",
  "title": "LedgerQueryResult",
  "description": "The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-app-api-openapi.yml#/components/schemas/LedgerQueryResult",
  "required": [
    "state"
  ],
  "properties": {
    "state": {
      "$ref": "#/$defs/LedgerQueryState"
    },
    "entry": {
      "description": "The ledger entry found as a result of the query. This is only available if the query is in Ready state.",
      "$ref": "#/$defs/LedgerEntry"
    }
  },
  "type": "object",
  "$defs": {
    "LedgerEntry": {
      "description": "An entry in the ledger.",
      "required": [
        "contents"
      ],
      "properties": {
        "contents": {
          "type": "string",
          "description": "Contents of the ledger entry."
        },
        "collectionId": {
          "type": "string",
          "readOnly": true
        },
        "transactionId": {
          "$ref": "#/$defs/TransactionId",
          "readOnly": true
        }
      },
      "type": "object"
    },
    "LedgerQueryState": {
      "description": "State of a ledger query.",
      "type": "string",
      "enum": [
        "Loading",
        "Ready"
      ],
      "x-ms-enum": {
        "name": "ConfidentialLedgerQueryState",
        "modelAsString": true
      }
    },
    "TransactionId": {
      "description": "A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read.",
      "type": "string"
    }
  }
}