{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-keyspaces/json-schema/amazon-keyspaces-get-records-output-schema.json",
  "title": "GetRecordsOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-keyspaces-operations-api-openapi.yml#/components/schemas/GetRecordsOutput",
  "type": "object",
  "properties": {
    "changeRecords": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Record"
      },
      "description": "An array of change data records retrieved from the specified shard. Each record represents a single data modification (insert, update, or delete) to a row in the Amazon Keyspaces table. Records include the primary key columns and information about what data was modified."
    },
    "nextShardIterator": {
      "type": "string",
      "description": "The next position in the shard from which to start sequentially reading data records. If null, the shard has been closed and the requested iterator will not return any more data."
    },
    "iteratorDescription": {
      "$ref": "#/$defs/IteratorDescription"
    }
  },
  "$defs": {
    "IteratorDescription": {
      "type": "object",
      "properties": {
        "iteratorPosition": {
          "type": "string",
          "enum": [
            "AT_TIP",
            "BEHIND_TIP"
          ],
          "description": "Indicates the current iterator's position within the shard. The possible values are: AT_TIP - No more records are currently available. BEHIND_TIP - Additional records may be available. Stream progresses in absence of customer records. BEHIND_TIP with an empty changeRecords list indicates the stream is progressing but no customer records are available at this position. Continue polling normally."
        }
      }
    },
    "KeyspacesCell": {
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/KeyspacesCellValue"
        },
        "metadata": {
          "$ref": "#/$defs/KeyspacesMetadata"
        }
      }
    },
    "KeyspacesCellMapDefinition": {
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/KeyspacesCellValue"
        },
        "value": {
          "$ref": "#/$defs/KeyspacesCellValue"
        },
        "metadata": {
          "$ref": "#/$defs/KeyspacesMetadata"
        }
      }
    },
    "KeyspacesCellValue": {
      "type": "object",
      "properties": {
        "asciiT": {
          "type": "string",
          "description": "A value of ASCII text type, containing US-ASCII characters."
        },
        "bigintT": {
          "type": "string",
          "description": "A 64-bit signed integer value."
        },
        "blobT": {
          "type": "string",
          "description": "A binary large object (BLOB) value stored as a Base64-encoded string."
        },
        "boolT": {
          "type": "boolean",
          "description": "A Boolean value, either true or false."
        },
        "counterT": {
          "type": "string",
          "description": "A distributed counter value that can be incremented and decremented."
        },
        "dateT": {
          "type": "string",
          "description": "A date value without a time component, represented as days since epoch (January 1, 1970)."
        },
        "decimalT": {
          "type": "string",
          "description": "A variable-precision decimal number value."
        },
        "doubleT": {
          "type": "string",
          "description": "A 64-bit double-precision floating point value."
        },
        "durationT": {
          "type": "string",
          "description": "A duration value with nanosecond precision, representing a period of time encoded as 32-bit months, 32-bit days, and 64-bit nanoseconds."
        },
        "floatT": {
          "type": "string",
          "description": "A 32-bit single-precision floating point value."
        },
        "inetT": {
          "type": "string",
          "description": "An IP address value, either IPv4 or IPv6 format."
        },
        "intT": {
          "type": "string",
          "description": "A 32-bit signed integer value."
        },
        "listT": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "An ordered collection of elements that can contain duplicate values."
        },
        "mapT": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyspacesCellMapDefinition"
          },
          "description": "A collection of key-value pairs where each key is unique."
        },
        "setT": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "An unordered collection of unique elements."
        },
        "smallintT": {
          "type": "string",
          "description": "A 16-bit signed integer value."
        },
        "textT": {
          "type": "string",
          "description": "A UTF-8 encoded string value."
        },
        "timeT": {
          "type": "string",
          "description": "A time value without a date component, with nanosecond precision."
        },
        "timestampT": {
          "type": "string",
          "description": "A timestamp value representing date and time with millisecond precision."
        },
        "timeuuidT": {
          "type": "string",
          "description": "A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering."
        },
        "tinyintT": {
          "type": "string",
          "description": "An 8-bit signed integer value."
        },
        "tupleT": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "A fixed-length ordered list of elements, where each element can be of a different data type."
        },
        "uuidT": {
          "type": "string",
          "description": "A universally unique identifier (UUID) value."
        },
        "varcharT": {
          "type": "string",
          "description": "A UTF-8 encoded string value, functionally equivalent to text type."
        },
        "varintT": {
          "type": "string",
          "description": "An integer value within the +/-10^38 range."
        },
        "udtT": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "A user-defined type (UDT) value consisting of named fields, each with its own data type."
        }
      },
      "description": "Exactly one member is set."
    },
    "KeyspacesMetadata": {
      "type": "object",
      "properties": {
        "expirationTime": {
          "type": "string",
          "description": "The time at which the associated data will expire, based on the time-to-live (TTL) setting."
        },
        "writeTime": {
          "type": "string",
          "description": "The timestamp at which the associated data was written to the database."
        }
      }
    },
    "KeyspacesRow": {
      "type": "object",
      "properties": {
        "valueCells": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "A map of regular (non-static) column cells in the row, where keys are column names and values are the corresponding cells."
        },
        "staticCells": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/KeyspacesCell"
          },
          "description": "A map of static column cells shared by all rows with the same partition key, where keys are column names and values are the corresponding cells."
        },
        "rowMetadata": {
          "$ref": "#/$defs/KeyspacesMetadata"
        }
      }
    },
    "Record": {
      "type": "object",
      "properties": {
        "eventVersion": {
          "type": "string",
          "description": "The version of the record format, used to track the evolution of the record structure over time."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp indicating when this change data capture record was created."
        },
        "origin": {
          "type": "string",
          "enum": [
            "USER",
            "REPLICATION",
            "TTL"
          ],
          "description": "The origin or source of this change data capture record."
        },
        "partitionKeys": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/KeyspacesCellValue"
          },
          "description": "The partition key columns and their values for the affected row."
        },
        "clusteringKeys": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/KeyspacesCellValue"
          },
          "description": "The clustering key columns and their values for the affected row, which determine the order of rows within a partition."
        },
        "newImage": {
          "$ref": "#/$defs/KeyspacesRow"
        },
        "oldImage": {
          "$ref": "#/$defs/KeyspacesRow"
        },
        "sequenceNumber": {
          "type": "string",
          "description": "A unique identifier assigned to this record within the shard, used for ordering and tracking purposes."
        }
      }
    }
  }
}