@@ -4,13 +4,16 @@ isort:skip_file
44"""
55
66import builtins
7+ import collections .abc
78import sys
89
910import google .protobuf .descriptor
1011import google .protobuf .duration_pb2
12+ import google .protobuf .internal .containers
1113import google .protobuf .message
1214import google .protobuf .timestamp_pb2
1315
16+ import temporalio .api .callback .v1 .message_pb2
1417import temporalio .api .common .v1 .message_pb2
1518import temporalio .api .deployment .v1 .message_pb2
1619import temporalio .api .enums .v1 .activity_pb2
@@ -202,6 +205,8 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
202205 HEADER_FIELD_NUMBER : builtins .int
203206 USER_METADATA_FIELD_NUMBER : builtins .int
204207 CANCELED_REASON_FIELD_NUMBER : builtins .int
208+ LINKS_FIELD_NUMBER : builtins .int
209+ TOTAL_HEARTBEAT_COUNT_FIELD_NUMBER : builtins .int
205210 activity_id : builtins .str
206211 """Unique identifier of this activity within its namespace along with run ID (below)."""
207212 run_id : builtins .str
@@ -313,6 +318,15 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
313318 """Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity."""
314319 canceled_reason : builtins .str
315320 """Set if activity cancelation was requested."""
321+ @property
322+ def links (
323+ self ,
324+ ) -> google .protobuf .internal .containers .RepeatedCompositeFieldContainer [
325+ temporalio .api .common .v1 .message_pb2 .Link
326+ ]:
327+ """Links to related entities, such as the entity that started this activity."""
328+ total_heartbeat_count : builtins .int
329+ """Total number of heartbeats recorded across all attempts of this activity, including retries."""
316330 def __init__ (
317331 self ,
318332 * ,
@@ -353,6 +367,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
353367 user_metadata : temporalio .api .sdk .v1 .user_metadata_pb2 .UserMetadata
354368 | None = ...,
355369 canceled_reason : builtins .str = ...,
370+ links : collections .abc .Iterable [temporalio .api .common .v1 .message_pb2 .Link ]
371+ | None = ...,
372+ total_heartbeat_count : builtins .int = ...,
356373 ) -> None : ...
357374 def HasField (
358375 self ,
@@ -440,6 +457,8 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
440457 b"last_started_time" ,
441458 "last_worker_identity" ,
442459 b"last_worker_identity" ,
460+ "links" ,
461+ b"links" ,
443462 "next_attempt_schedule_time" ,
444463 b"next_attempt_schedule_time" ,
445464 "priority" ,
@@ -468,6 +487,8 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
468487 b"status" ,
469488 "task_queue" ,
470489 b"task_queue" ,
490+ "total_heartbeat_count" ,
491+ b"total_heartbeat_count" ,
471492 "user_metadata" ,
472493 b"user_metadata" ,
473494 ],
@@ -587,3 +608,69 @@ class ActivityExecutionListInfo(google.protobuf.message.Message):
587608 ) -> None : ...
588609
589610global___ActivityExecutionListInfo = ActivityExecutionListInfo
611+
612+ class CallbackInfo (google .protobuf .message .Message ):
613+ """CallbackInfo contains the state of an attached activity callback."""
614+
615+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
616+
617+ class ActivityClosed (google .protobuf .message .Message ):
618+ """Trigger for when the activity is closed."""
619+
620+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
621+
622+ def __init__ (
623+ self ,
624+ ) -> None : ...
625+
626+ class Trigger (google .protobuf .message .Message ):
627+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
628+
629+ ACTIVITY_CLOSED_FIELD_NUMBER : builtins .int
630+ @property
631+ def activity_closed (self ) -> global___CallbackInfo .ActivityClosed : ...
632+ def __init__ (
633+ self ,
634+ * ,
635+ activity_closed : global___CallbackInfo .ActivityClosed | None = ...,
636+ ) -> None : ...
637+ def HasField (
638+ self ,
639+ field_name : typing_extensions .Literal [
640+ "activity_closed" , b"activity_closed" , "variant" , b"variant"
641+ ],
642+ ) -> builtins .bool : ...
643+ def ClearField (
644+ self ,
645+ field_name : typing_extensions .Literal [
646+ "activity_closed" , b"activity_closed" , "variant" , b"variant"
647+ ],
648+ ) -> None : ...
649+ def WhichOneof (
650+ self , oneof_group : typing_extensions .Literal ["variant" , b"variant" ]
651+ ) -> typing_extensions .Literal ["activity_closed" ] | None : ...
652+
653+ TRIGGER_FIELD_NUMBER : builtins .int
654+ INFO_FIELD_NUMBER : builtins .int
655+ @property
656+ def trigger (self ) -> global___CallbackInfo .Trigger :
657+ """Trigger for this callback."""
658+ @property
659+ def info (self ) -> temporalio .api .callback .v1 .message_pb2 .CallbackInfo :
660+ """Common callback info."""
661+ def __init__ (
662+ self ,
663+ * ,
664+ trigger : global___CallbackInfo .Trigger | None = ...,
665+ info : temporalio .api .callback .v1 .message_pb2 .CallbackInfo | None = ...,
666+ ) -> None : ...
667+ def HasField (
668+ self ,
669+ field_name : typing_extensions .Literal ["info" , b"info" , "trigger" , b"trigger" ],
670+ ) -> builtins .bool : ...
671+ def ClearField (
672+ self ,
673+ field_name : typing_extensions .Literal ["info" , b"info" , "trigger" , b"trigger" ],
674+ ) -> None : ...
675+
676+ global___CallbackInfo = CallbackInfo
0 commit comments