Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions amazon_kclpy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,15 @@ def __init__(self, json_dict):
* subSequenceNumber

The provided dictionary can optionally contain:
* action
* error

:param dict json_dict:
"""
self._sequence_number = json_dict["sequenceNumber"]
self._sub_sequence_number = json_dict["subSequenceNumber"]
self._error = json_dict.get("error", None)
self._action = json_dict.get("action", "checkpoint")

@property
def sequence_number(self):
Expand Down Expand Up @@ -373,6 +375,16 @@ def error(self):
"""
return self._error

@property
def action(self):
"""
The action that spawned this message

:return: the original action value
:rtype: str
"""
return self._action


class Record(object):
"""
Expand Down