class documentation
class _AdkPayloadConverter(PydanticPayloadConverter): (source)
Constructor: _AdkPayloadConverter()
PayloadConverter for Google ADK that strips unset None fields.
| Method | __init__ |
Initialize object. |
Inherited from CompositePayloadConverter (via PydanticPayloadConverter):
| Method | from |
Decode values trying each converter. |
| Method | get |
Return converter instances with context set. |
| Method | to |
Encode values trying each converter. |
| Method | with |
Return a new instance with context set on the component converters. |
| Instance Variable | converters |
List of payload converters to delegate to, in order. |
| Method | _set |
Undocumented |
| Property | _any |
Undocumented |
Inherited from PayloadConverter (via PydanticPayloadConverter, CompositePayloadConverter):
| Method | from |
Convert a single payload to a value. |
| Method | from |
from_payloads for the temporalio.api.common.v1.Payloads wrapper. |
| Method | to |
Convert a single value to a payload. |
| Method | to |
to_payloads for the temporalio.api.common.v1.Payloads wrapper. |
| Class Variable | default |
Default payload converter. |
Initialize object.
| Parameters | |
| to | Options for serializing values to JSON. |
| max | Maximum number of type adapters to cache, with least-recently-used eviction. Defaults to 1024. If None, the cache is unbounded. If zero, caching is disabled. To configure this through a
class MyPayloadConverter(PydanticPayloadConverter):
def __init__(self) -> None:
super().__init__(max_cached_type_adapters=128)
my_data_converter = DataConverter(
payload_converter_class=MyPayloadConverter
)
|