{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-neptune/json-schema/amazon-neptune-get-propertygraph-stream-output-schema.json",
  "title": "GetPropertygraphStreamOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-neptune-property-graph-stream-api-openapi.yml#/components/schemas/GetPropertygraphStreamOutput",
  "type": "object",
  "properties": {
    "lastEventId": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Sequence identifier of the last change in the stream response. An event ID is composed of two fields: a commitNum, which identifies a transaction that changed the graph, and an opNum, which identifies a specific operation within that transaction:"
    },
    "lastTrxTimestampInMillis": {
      "type": "integer",
      "description": "The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch."
    },
    "format": {
      "type": "string",
      "description": "Serialization format for the change records being returned. Currently, the only supported value is PG_JSON."
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PropertygraphRecord"
      },
      "description": "An array of serialized change-log stream records included in the response."
    },
    "totalRecords": {
      "type": "integer",
      "description": "The total number of records in the response."
    }
  },
  "required": [
    "lastEventId",
    "lastTrxTimestampInMillis",
    "format",
    "records",
    "totalRecords"
  ],
  "$defs": {
    "PropertygraphData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the Gremlin or openCypher element."
        },
        "type": {
          "type": "string",
          "description": "The type of this Gremlin or openCypher element. Must be one of: v1 - Vertex label for Gremlin, or node label for openCypher. vp - Vertex properties for Gremlin, or node properties for openCypher. e - Edge and edge label for Gremlin, or relationship and relationship type for openCypher. ep - Edge properties for Gremlin, or relationship properties for openCypher."
        },
        "key": {
          "type": "string",
          "description": "The property name. For element labels, this is label."
        },
        "value": {
          "type": "object",
          "description": "This is a JSON object that contains a value field for the value itself, and a datatype field for the JSON data type of that value:"
        },
        "from": {
          "type": "string",
          "description": "If this is an edge (type = e), the ID of the corresponding from vertex or source node."
        },
        "to": {
          "type": "string",
          "description": "If this is an edge (type = e), the ID of the corresponding to vertex or target node."
        }
      },
      "required": [
        "id",
        "type",
        "key",
        "value"
      ]
    },
    "PropertygraphRecord": {
      "type": "object",
      "properties": {
        "commitTimestampInMillis": {
          "type": "integer",
          "description": "The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch."
        },
        "eventId": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The sequence identifier of the stream change record."
        },
        "data": {
          "$ref": "#/$defs/PropertygraphData"
        },
        "op": {
          "type": "string",
          "description": "The operation that created the change."
        },
        "isLastOp": {
          "type": "boolean",
          "description": "Only present if this operation is the last one in its transaction. If present, it is set to true. It is useful for ensuring that an entire transaction is consumed."
        }
      },
      "required": [
        "commitTimestampInMillis",
        "eventId",
        "data",
        "op"
      ]
    }
  }
}