@@ -45,6 +45,8 @@ class _ActivityCancelReasonEnumTypeWrapper(
4545 """Activity timed out"""
4646 WORKER_SHUTDOWN : _ActivityCancelReason .ValueType # 3
4747 """Core is shutting down and the graceful timeout has elapsed"""
48+ PAUSED : _ActivityCancelReason .ValueType # 4
49+ """Activity was paused"""
4850
4951class ActivityCancelReason (
5052 _ActivityCancelReason , metaclass = _ActivityCancelReasonEnumTypeWrapper
@@ -58,6 +60,8 @@ TIMED_OUT: ActivityCancelReason.ValueType # 2
5860"""Activity timed out"""
5961WORKER_SHUTDOWN : ActivityCancelReason .ValueType # 3
6062"""Core is shutting down and the graceful timeout has elapsed"""
63+ PAUSED : ActivityCancelReason .ValueType # 4
64+ """Activity was paused"""
6165global___ActivityCancelReason = ActivityCancelReason
6266
6367class ActivityTask (google .protobuf .message .Message ):
@@ -320,14 +324,66 @@ class Cancel(google.protobuf.message.Message):
320324 DESCRIPTOR : google .protobuf .descriptor .Descriptor
321325
322326 REASON_FIELD_NUMBER : builtins .int
327+ DETAILS_FIELD_NUMBER : builtins .int
323328 reason : global___ActivityCancelReason .ValueType
329+ """Primary cancellation reason"""
330+ @property
331+ def details (self ) -> global___ActivityCancellationDetails :
332+ """Activity cancellation details, surfaces all cancellation reasons."""
324333 def __init__ (
325334 self ,
326335 * ,
327336 reason : global___ActivityCancelReason .ValueType = ...,
337+ details : global___ActivityCancellationDetails | None = ...,
328338 ) -> None : ...
339+ def HasField (
340+ self , field_name : typing_extensions .Literal ["details" , b"details" ]
341+ ) -> builtins .bool : ...
329342 def ClearField (
330- self , field_name : typing_extensions .Literal ["reason" , b"reason" ]
343+ self ,
344+ field_name : typing_extensions .Literal [
345+ "details" , b"details" , "reason" , b"reason"
346+ ],
331347 ) -> None : ...
332348
333349global___Cancel = Cancel
350+
351+ class ActivityCancellationDetails (google .protobuf .message .Message ):
352+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
353+
354+ IS_NOT_FOUND_FIELD_NUMBER : builtins .int
355+ IS_CANCELLED_FIELD_NUMBER : builtins .int
356+ IS_PAUSED_FIELD_NUMBER : builtins .int
357+ IS_TIMED_OUT_FIELD_NUMBER : builtins .int
358+ IS_WORKER_SHUTDOWN_FIELD_NUMBER : builtins .int
359+ is_not_found : builtins .bool
360+ is_cancelled : builtins .bool
361+ is_paused : builtins .bool
362+ is_timed_out : builtins .bool
363+ is_worker_shutdown : builtins .bool
364+ def __init__ (
365+ self ,
366+ * ,
367+ is_not_found : builtins .bool = ...,
368+ is_cancelled : builtins .bool = ...,
369+ is_paused : builtins .bool = ...,
370+ is_timed_out : builtins .bool = ...,
371+ is_worker_shutdown : builtins .bool = ...,
372+ ) -> None : ...
373+ def ClearField (
374+ self ,
375+ field_name : typing_extensions .Literal [
376+ "is_cancelled" ,
377+ b"is_cancelled" ,
378+ "is_not_found" ,
379+ b"is_not_found" ,
380+ "is_paused" ,
381+ b"is_paused" ,
382+ "is_timed_out" ,
383+ b"is_timed_out" ,
384+ "is_worker_shutdown" ,
385+ b"is_worker_shutdown" ,
386+ ],
387+ ) -> None : ...
388+
389+ global___ActivityCancellationDetails = ActivityCancellationDetails
0 commit comments