in greengrasssdk/stream_manager/data/__init__.py [0:0]
def as_dict(self):
d = {}
if self.__export_config_identifier is not None:
d["exportConfigIdentifier"] = (
self.__export_config_identifier.as_dict()
if hasattr(self.__export_config_identifier, "as_dict")
else self.__export_config_identifier
)
if self.__last_exported_sequence_number is not None:
d["lastExportedSequenceNumber"] = (
self.__last_exported_sequence_number.as_dict()
if hasattr(self.__last_exported_sequence_number, "as_dict")
else self.__last_exported_sequence_number
)
if self.__last_export_time is not None:
d["lastExportTime"] = (
self.__last_export_time.as_dict()
if hasattr(self.__last_export_time, "as_dict")
else self.__last_export_time
)
if self.__error_message is not None:
d["errorMessage"] = (
self.__error_message.as_dict()
if hasattr(self.__error_message, "as_dict")
else self.__error_message
)
if self.__exported_bytes_from_stream is not None:
d["exportedBytesFromStream"] = (
self.__exported_bytes_from_stream.as_dict()
if hasattr(self.__exported_bytes_from_stream, "as_dict")
else self.__exported_bytes_from_stream
)
if self.__exported_messages_count is not None:
d["exportedMessagesCount"] = (
self.__exported_messages_count.as_dict()
if hasattr(self.__exported_messages_count, "as_dict")
else self.__exported_messages_count
)
return d