class documentation

A payload codec that sets serialization context for the command associated with each payload.

This codec responds to the context variable set by _command_aware_visitor.CommandAwarePayloadVisitor.

Async Method decode Decode the given payloads.
Async Method encode Encode the given payloads.
Class Variable context_free_payload_codec Undocumented
Class Variable instance Undocumented
Class Variable workflow_context Undocumented
Class Variable workflow_context_payload_codec Undocumented
Method _get_current_command_codec Undocumented

Inherited from PayloadCodec:

Async Method decode_failure Decode payloads of a failure. Intended as a helper method, not for overriding. It is not guaranteed that all failures will be decoded with this method rather than decoding the underlying payloads.
Async Method decode_wrapper decode for the temporalio.api.common.v1.Payloads wrapper.
Async Method encode_failure Encode payloads of a failure. Intended as a helper method, not for overriding. It is not guaranteed that all failures will be encoded with this method rather than encoding the underlying payloads.
Async Method encode_wrapper encode for the temporalio.api.common.v1.Payloads wrapper.
Async Method _apply_to_failure_payloads Undocumented

Decode the given payloads.

Parameters
payloads:Sequence[temporalio.api.common.v1.Payload]Payloads to decode. This value should not be mutated.
Returns
list[temporalio.api.common.v1.Payload]Decoded payloads. Note, this does not have to be the same number as payloads given, but must be at least one and cannot be more than was given.

Encode the given payloads.

Parameters
payloads:Sequence[temporalio.api.common.v1.Payload]Payloads to encode. This value should not be mutated.
Returns
list[temporalio.api.common.v1.Payload]Encoded payloads. Note, this does not have to be the same number as payloads given, but must be at least one and cannot be more than was given.

Undocumented

instance: WorkflowInstance = (source)

Undocumented

workflow_context_payload_codec: temporalio.converter.PayloadCodec = (source)

Undocumented

def _get_current_command_codec(self) -> temporalio.converter.PayloadCodec: (source)

Undocumented