{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "error": {
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "required": [
        "message"
      ],
      "type": "object"
    },
    "main": {
      "description": "Subscribe to lifecycle events for a compute contract. Gateway pushes events as they arrive from the bidder (vm.started, vm.onNetwork, terminated).",
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "AuthRequired"
        }
      ],
      "message": {
        "schema": {
          "refs": [
            "#vm_started",
            "#vm_on_network",
            "#terminated",
            "#error"
          ],
          "type": "union"
        }
      },
      "parameters": {
        "properties": {
          "receiptUri": {
            "description": "AT-URI of the receipt record to subscribe to events for.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "receiptUri"
        ],
        "type": "params"
      },
      "type": "subscription"
    },
    "terminated": {
      "properties": {
        "reason": {
          "type": "string"
        },
        "receiptUri": {
          "format": "at-uri",
          "type": "string"
        },
        "timestamp": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "receiptUri",
        "reason",
        "timestamp"
      ],
      "type": "object"
    },
    "vm_on_network": {
      "properties": {
        "address": {
          "type": "string"
        },
        "receiptUri": {
          "format": "at-uri",
          "type": "string"
        },
        "timestamp": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "receiptUri",
        "address",
        "timestamp"
      ],
      "type": "object"
    },
    "vm_started": {
      "properties": {
        "receiptUri": {
          "format": "at-uri",
          "type": "string"
        },
        "timestamp": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "receiptUri",
        "timestamp"
      ],
      "type": "object"
    }
  },
  "id": "com.publicdomainrelay.temp.gateway.subscribeComputeEvents",
  "lexicon": 1
}
