Repository: digital-asset/dazl-client (language: python)

Issue:
python: Add typing files for selected gRPC/Protobuf files.
python: Add typing files for selected gRPC/Protobuf files in an effort to nudge the `dazl` codebase to being 100% compliant with mypy.

Some notes:
* The gRPC stubs do not appear to being called with Python keyword-named arguments, but positional-only arguments are a Python 3.8 and later feature. So instead we opt for the convention of naming function arguments `__1`, where the double underscore has historically meant an argument that was intended to be positional only. (`master` already is denoted as Python 3.8 only, but we want to eventually release this in the dazl v7 line, which is Python 3.6 and later.)
* I may regret this, but I opted to use `Party` and `PackageRef` in place of `str` where appropriate in the stub files. Both of these types are `NewType(..., str)`, and at runtime the distinction is lost. This is a 100% safe thing to do and will improve the ergonomics of using these types, at the risk of complicating a future attempt to automatically generate these files from the Protobuf definitions.
* Not all Protobuf/gRPC files have accompanying `.pyi` files; I added them on an as-needed basis simply because the real goal of this PR is to turn on `mypy` checking on the `dazl` codebase, and these types stand in the way of that.
python: Full-fledged typing stub files for the Protobuf/gRPC generated code
python: Full-fledged typing stub files for the Protobuf/gRPC generated code.

These files are _now_ automatically generated, as opposed to the original version of these typing files, which were written by hand. I've opted not to include the code that generates this code because it's fairly complex and would make an already large set of changes even larger.

`mypy` continues to successfully typecheck this code with the new typing files.

There are a few bug fixes as a result of this being more systematically generated, but the majority of the changes are due to generated stubs for `daml_lf_1_14/daml_lf_1_pb2.pyi`.

This, in part, address #193.


Discussion / hints:

Fix patch:
diff --git a/.mypy.ini b/.mypy.ini
index 4c5d3456..a3752ed0 100644
--- a/.mypy.ini
+++ b/.mypy.ini
@@ -10,12 +10,18 @@ ignore_missing_imports = True
 [mypy-google.protobuf.pyext.*]
 ignore_missing_imports = True
 
+[mypy-google.rpc.status_pb2.*]
+ignore_missing_imports = True
+
 [mypy-grpc._cython.*]
 ignore_missing_imports = True
 
 [mypy-grpc.aio.*]
 ignore_missing_imports = True
 
+[mypy-grpc_tools.*]
+ignore_missing_imports = True
+
 [mypy-prometheus_client.*]
 ignore_missing_imports = True
 
@@ -30,6 +36,3 @@ ignore_missing_imports = True
 
 [mypy-toposort.*]
 ignore_missing_imports = True
-
-[mypy-dazl._gen.*]
-ignore_errors = True
diff --git a/python/dazl/_gen/__init__.py b/python/dazl/_gen/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/__init__.py
+++ b/python/dazl/_gen/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/__init__.py b/python/dazl/_gen/com/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/com/__init__.py
+++ b/python/dazl/_gen/com/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/daml/__init__.py b/python/dazl/_gen/com/daml/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/com/daml/__init__.py
+++ b/python/dazl/_gen/com/daml/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/daml/daml_lf_1_14/__init__.py b/python/dazl/_gen/com/daml/daml_lf_1_14/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/com/daml/daml_lf_1_14/__init__.py
+++ b/python/dazl/_gen/com/daml/daml_lf_1_14/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_1_pb2.pyi b/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_1_pb2.pyi
index 94da3524..23d51607 100644
--- a/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_1_pb2.pyi
+++ b/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_1_pb2.pyi
@@ -3,12 +3,17 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.descriptor import EnumDescriptor
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "Unit",
     "PackageRef",
@@ -49,298 +54,298 @@ __all__ = [
 
 class PrimType:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    UNIT: _typing.ClassVar[_typing.Literal[0]] = ...
-    BOOL: _typing.ClassVar[_typing.Literal[1]] = ...
-    INT64: _typing.ClassVar[_typing.Literal[2]] = ...
-    DECIMAL: _typing.ClassVar[_typing.Literal[3]] = ...
-    TEXT: _typing.ClassVar[_typing.Literal[5]] = ...
-    TIMESTAMP: _typing.ClassVar[_typing.Literal[6]] = ...
-    PARTY: _typing.ClassVar[_typing.Literal[8]] = ...
-    LIST: _typing.ClassVar[_typing.Literal[9]] = ...
-    UPDATE: _typing.ClassVar[_typing.Literal[10]] = ...
-    SCENARIO: _typing.ClassVar[_typing.Literal[11]] = ...
-    DATE: _typing.ClassVar[_typing.Literal[12]] = ...
-    CONTRACT_ID: _typing.ClassVar[_typing.Literal[13]] = ...
-    OPTIONAL: _typing.ClassVar[_typing.Literal[14]] = ...
-    ARROW: _typing.ClassVar[_typing.Literal[15]] = ...
-    TEXTMAP: _typing.ClassVar[_typing.Literal[16]] = ...
-    NUMERIC: _typing.ClassVar[_typing.Literal[17]] = ...
-    ANY: _typing.ClassVar[_typing.Literal[18]] = ...
-    TYPE_REP: _typing.ClassVar[_typing.Literal[19]] = ...
-    GENMAP: _typing.ClassVar[_typing.Literal[20]] = ...
-    BIGNUMERIC: _typing.ClassVar[_typing.Literal[21]] = ...
-    ROUNDING_MODE: _typing.ClassVar[_typing.Literal[22]] = ...
-    ANY_EXCEPTION: _typing.ClassVar[_typing.Literal[23]] = ...
-UNIT = _typing.Literal[0]
-BOOL = _typing.Literal[1]
-INT64 = _typing.Literal[2]
-DECIMAL = _typing.Literal[3]
-TEXT = _typing.Literal[5]
-TIMESTAMP = _typing.Literal[6]
-PARTY = _typing.Literal[8]
-LIST = _typing.Literal[9]
-UPDATE = _typing.Literal[10]
-SCENARIO = _typing.Literal[11]
-DATE = _typing.Literal[12]
-CONTRACT_ID = _typing.Literal[13]
-OPTIONAL = _typing.Literal[14]
-ARROW = _typing.Literal[15]
-TEXTMAP = _typing.Literal[16]
-NUMERIC = _typing.Literal[17]
-ANY = _typing.Literal[18]
-TYPE_REP = _typing.Literal[19]
-GENMAP = _typing.Literal[20]
-BIGNUMERIC = _typing.Literal[21]
-ROUNDING_MODE = _typing.Literal[22]
-ANY_EXCEPTION = _typing.Literal[23]
+    UNIT: _typing.ClassVar[_L[0]] = ...
+    BOOL: _typing.ClassVar[_L[1]] = ...
+    INT64: _typing.ClassVar[_L[2]] = ...
+    DECIMAL: _typing.ClassVar[_L[3]] = ...
+    TEXT: _typing.ClassVar[_L[5]] = ...
+    TIMESTAMP: _typing.ClassVar[_L[6]] = ...
+    PARTY: _typing.ClassVar[_L[8]] = ...
+    LIST: _typing.ClassVar[_L[9]] = ...
+    UPDATE: _typing.ClassVar[_L[10]] = ...
+    SCENARIO: _typing.ClassVar[_L[11]] = ...
+    DATE: _typing.ClassVar[_L[12]] = ...
+    CONTRACT_ID: _typing.ClassVar[_L[13]] = ...
+    OPTIONAL: _typing.ClassVar[_L[14]] = ...
+    ARROW: _typing.ClassVar[_L[15]] = ...
+    TEXTMAP: _typing.ClassVar[_L[16]] = ...
+    NUMERIC: _typing.ClassVar[_L[17]] = ...
+    ANY: _typing.ClassVar[_L[18]] = ...
+    TYPE_REP: _typing.ClassVar[_L[19]] = ...
+    GENMAP: _typing.ClassVar[_L[20]] = ...
+    BIGNUMERIC: _typing.ClassVar[_L[21]] = ...
+    ROUNDING_MODE: _typing.ClassVar[_L[22]] = ...
+    ANY_EXCEPTION: _typing.ClassVar[_L[23]] = ...
+UNIT = _L[0]
+BOOL = _L[1]
+INT64 = _L[2]
+DECIMAL = _L[3]
+TEXT = _L[5]
+TIMESTAMP = _L[6]
+PARTY = _L[8]
+LIST = _L[9]
+UPDATE = _L[10]
+SCENARIO = _L[11]
+DATE = _L[12]
+CONTRACT_ID = _L[13]
+OPTIONAL = _L[14]
+ARROW = _L[15]
+TEXTMAP = _L[16]
+NUMERIC = _L[17]
+ANY = _L[18]
+TYPE_REP = _L[19]
+GENMAP = _L[20]
+BIGNUMERIC = _L[21]
+ROUNDING_MODE = _L[22]
+ANY_EXCEPTION = _L[23]
 
 class PrimCon:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    CON_UNIT: _typing.ClassVar[_typing.Literal[0]] = ...
-    CON_FALSE: _typing.ClassVar[_typing.Literal[1]] = ...
-    CON_TRUE: _typing.ClassVar[_typing.Literal[2]] = ...
-CON_UNIT = _typing.Literal[0]
-CON_FALSE = _typing.Literal[1]
-CON_TRUE = _typing.Literal[2]
+    CON_UNIT: _typing.ClassVar[_L[0]] = ...
+    CON_FALSE: _typing.ClassVar[_L[1]] = ...
+    CON_TRUE: _typing.ClassVar[_L[2]] = ...
+CON_UNIT = _L[0]
+CON_FALSE = _L[1]
+CON_TRUE = _L[2]
 
 class BuiltinFunction:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    ADD_DECIMAL: _typing.ClassVar[_typing.Literal[0]] = ...
-    SUB_DECIMAL: _typing.ClassVar[_typing.Literal[1]] = ...
-    MUL_DECIMAL: _typing.ClassVar[_typing.Literal[2]] = ...
-    DIV_DECIMAL: _typing.ClassVar[_typing.Literal[3]] = ...
-    ROUND_DECIMAL: _typing.ClassVar[_typing.Literal[6]] = ...
-    ADD_NUMERIC: _typing.ClassVar[_typing.Literal[107]] = ...
-    SUB_NUMERIC: _typing.ClassVar[_typing.Literal[108]] = ...
-    MUL_NUMERIC: _typing.ClassVar[_typing.Literal[109]] = ...
-    DIV_NUMERIC: _typing.ClassVar[_typing.Literal[110]] = ...
-    ROUND_NUMERIC: _typing.ClassVar[_typing.Literal[111]] = ...
-    CAST_NUMERIC: _typing.ClassVar[_typing.Literal[121]] = ...
-    SHIFT_NUMERIC: _typing.ClassVar[_typing.Literal[122]] = ...
-    ADD_INT64: _typing.ClassVar[_typing.Literal[7]] = ...
-    SUB_INT64: _typing.ClassVar[_typing.Literal[8]] = ...
-    MUL_INT64: _typing.ClassVar[_typing.Literal[9]] = ...
-    DIV_INT64: _typing.ClassVar[_typing.Literal[10]] = ...
-    MOD_INT64: _typing.ClassVar[_typing.Literal[11]] = ...
-    EXP_INT64: _typing.ClassVar[_typing.Literal[12]] = ...
-    FOLDL: _typing.ClassVar[_typing.Literal[20]] = ...
-    FOLDR: _typing.ClassVar[_typing.Literal[21]] = ...
-    TEXTMAP_EMPTY: _typing.ClassVar[_typing.Literal[96]] = ...
-    TEXTMAP_INSERT: _typing.ClassVar[_typing.Literal[97]] = ...
-    TEXTMAP_LOOKUP: _typing.ClassVar[_typing.Literal[98]] = ...
-    TEXTMAP_DELETE: _typing.ClassVar[_typing.Literal[99]] = ...
-    TEXTMAP_TO_LIST: _typing.ClassVar[_typing.Literal[100]] = ...
-    TEXTMAP_SIZE: _typing.ClassVar[_typing.Literal[101]] = ...
-    GENMAP_EMPTY: _typing.ClassVar[_typing.Literal[124]] = ...
-    GENMAP_INSERT: _typing.ClassVar[_typing.Literal[125]] = ...
-    GENMAP_LOOKUP: _typing.ClassVar[_typing.Literal[126]] = ...
-    GENMAP_DELETE: _typing.ClassVar[_typing.Literal[127]] = ...
-    GENMAP_KEYS: _typing.ClassVar[_typing.Literal[128]] = ...
-    GENMAP_VALUES: _typing.ClassVar[_typing.Literal[129]] = ...
-    GENMAP_SIZE: _typing.ClassVar[_typing.Literal[130]] = ...
-    EXPLODE_TEXT: _typing.ClassVar[_typing.Literal[23]] = ...
-    APPEND_TEXT: _typing.ClassVar[_typing.Literal[24]] = ...
-    ERROR: _typing.ClassVar[_typing.Literal[25]] = ...
-    ANY_EXCEPTION_MESSAGE: _typing.ClassVar[_typing.Literal[147]] = ...
-    LEQ_INT64: _typing.ClassVar[_typing.Literal[33]] = ...
-    LEQ_DECIMAL: _typing.ClassVar[_typing.Literal[34]] = ...
-    LEQ_NUMERIC: _typing.ClassVar[_typing.Literal[112]] = ...
-    LEQ_TEXT: _typing.ClassVar[_typing.Literal[36]] = ...
-    LEQ_TIMESTAMP: _typing.ClassVar[_typing.Literal[37]] = ...
-    LEQ_DATE: _typing.ClassVar[_typing.Literal[67]] = ...
-    LEQ_PARTY: _typing.ClassVar[_typing.Literal[89]] = ...
-    LESS_INT64: _typing.ClassVar[_typing.Literal[39]] = ...
-    LESS_DECIMAL: _typing.ClassVar[_typing.Literal[40]] = ...
-    LESS_NUMERIC: _typing.ClassVar[_typing.Literal[113]] = ...
-    LESS_TEXT: _typing.ClassVar[_typing.Literal[42]] = ...
-    LESS_TIMESTAMP: _typing.ClassVar[_typing.Literal[43]] = ...
-    LESS_DATE: _typing.ClassVar[_typing.Literal[68]] = ...
-    LESS_PARTY: _typing.ClassVar[_typing.Literal[90]] = ...
-    GEQ_INT64: _typing.ClassVar[_typing.Literal[45]] = ...
-    GEQ_DECIMAL: _typing.ClassVar[_typing.Literal[46]] = ...
-    GEQ_NUMERIC: _typing.ClassVar[_typing.Literal[114]] = ...
-    GEQ_TEXT: _typing.ClassVar[_typing.Literal[48]] = ...
-    GEQ_TIMESTAMP: _typing.ClassVar[_typing.Literal[49]] = ...
-    GEQ_DATE: _typing.ClassVar[_typing.Literal[69]] = ...
-    GEQ_PARTY: _typing.ClassVar[_typing.Literal[91]] = ...
-    GREATER_INT64: _typing.ClassVar[_typing.Literal[51]] = ...
-    GREATER_DECIMAL: _typing.ClassVar[_typing.Literal[52]] = ...
-    GREATER_NUMERIC: _typing.ClassVar[_typing.Literal[115]] = ...
-    GREATER_TEXT: _typing.ClassVar[_typing.Literal[54]] = ...
-    GREATER_TIMESTAMP: _typing.ClassVar[_typing.Literal[55]] = ...
-    GREATER_DATE: _typing.ClassVar[_typing.Literal[70]] = ...
-    GREATER_PARTY: _typing.ClassVar[_typing.Literal[92]] = ...
-    INT64_TO_TEXT: _typing.ClassVar[_typing.Literal[57]] = ...
-    DECIMAL_TO_TEXT: _typing.ClassVar[_typing.Literal[58]] = ...
-    NUMERIC_TO_TEXT: _typing.ClassVar[_typing.Literal[116]] = ...
-    TEXT_TO_TEXT: _typing.ClassVar[_typing.Literal[60]] = ...
-    TIMESTAMP_TO_TEXT: _typing.ClassVar[_typing.Literal[61]] = ...
-    DATE_TO_TEXT: _typing.ClassVar[_typing.Literal[71]] = ...
-    PARTY_TO_QUOTED_TEXT: _typing.ClassVar[_typing.Literal[63]] = ...
-    PARTY_TO_TEXT: _typing.ClassVar[_typing.Literal[94]] = ...
-    TEXT_TO_PARTY: _typing.ClassVar[_typing.Literal[95]] = ...
-    TEXT_TO_INT64: _typing.ClassVar[_typing.Literal[103]] = ...
-    TEXT_TO_DECIMAL: _typing.ClassVar[_typing.Literal[104]] = ...
-    TEXT_TO_NUMERIC: _typing.ClassVar[_typing.Literal[117]] = ...
-    CONTRACT_ID_TO_TEXT: _typing.ClassVar[_typing.Literal[136]] = ...
-    SHA256_TEXT: _typing.ClassVar[_typing.Literal[93]] = ...
-    DATE_TO_UNIX_DAYS: _typing.ClassVar[_typing.Literal[72]] = ...
-    UNIX_DAYS_TO_DATE: _typing.ClassVar[_typing.Literal[73]] = ...
-    TIMESTAMP_TO_UNIX_MICROSECONDS: _typing.ClassVar[_typing.Literal[74]] = ...
-    UNIX_MICROSECONDS_TO_TIMESTAMP: _typing.ClassVar[_typing.Literal[75]] = ...
-    INT64_TO_DECIMAL: _typing.ClassVar[_typing.Literal[76]] = ...
-    DECIMAL_TO_INT64: _typing.ClassVar[_typing.Literal[77]] = ...
-    INT64_TO_NUMERIC: _typing.ClassVar[_typing.Literal[118]] = ...
-    NUMERIC_TO_INT64: _typing.ClassVar[_typing.Literal[119]] = ...
-    IMPLODE_TEXT: _typing.ClassVar[_typing.Literal[78]] = ...
-    EQUAL_INT64: _typing.ClassVar[_typing.Literal[79]] = ...
-    EQUAL_DECIMAL: _typing.ClassVar[_typing.Literal[80]] = ...
-    EQUAL_NUMERIC: _typing.ClassVar[_typing.Literal[120]] = ...
-    EQUAL_TEXT: _typing.ClassVar[_typing.Literal[81]] = ...
-    EQUAL_TIMESTAMP: _typing.ClassVar[_typing.Literal[82]] = ...
-    EQUAL_DATE: _typing.ClassVar[_typing.Literal[83]] = ...
-    EQUAL_PARTY: _typing.ClassVar[_typing.Literal[84]] = ...
-    EQUAL_BOOL: _typing.ClassVar[_typing.Literal[85]] = ...
-    EQUAL_CONTRACT_ID: _typing.ClassVar[_typing.Literal[86]] = ...
-    EQUAL_LIST: _typing.ClassVar[_typing.Literal[87]] = ...
-    EQUAL_TYPE_REP: _typing.ClassVar[_typing.Literal[123]] = ...
-    EQUAL: _typing.ClassVar[_typing.Literal[131]] = ...
-    LESS_EQ: _typing.ClassVar[_typing.Literal[132]] = ...
-    LESS: _typing.ClassVar[_typing.Literal[133]] = ...
-    GREATER_EQ: _typing.ClassVar[_typing.Literal[134]] = ...
-    GREATER: _typing.ClassVar[_typing.Literal[135]] = ...
-    TRACE: _typing.ClassVar[_typing.Literal[88]] = ...
-    COERCE_CONTRACT_ID: _typing.ClassVar[_typing.Literal[102]] = ...
-    CODE_POINTS_TO_TEXT: _typing.ClassVar[_typing.Literal[105]] = ...
-    TEXT_POINTS_TO_CODE: _typing.ClassVar[_typing.Literal[106]] = ...
-    SCALE_BIGNUMERIC: _typing.ClassVar[_typing.Literal[137]] = ...
-    PRECISION_BIGNUMERIC: _typing.ClassVar[_typing.Literal[138]] = ...
-    ADD_BIGNUMERIC: _typing.ClassVar[_typing.Literal[139]] = ...
-    SUB_BIGNUMERIC: _typing.ClassVar[_typing.Literal[140]] = ...
-    MUL_BIGNUMERIC: _typing.ClassVar[_typing.Literal[141]] = ...
-    DIV_BIGNUMERIC: _typing.ClassVar[_typing.Literal[142]] = ...
-    SHIFT_RIGHT_BIGNUMERIC: _typing.ClassVar[_typing.Literal[143]] = ...
-    BIGNUMERIC_TO_NUMERIC: _typing.ClassVar[_typing.Literal[144]] = ...
-    NUMERIC_TO_BIGNUMERIC: _typing.ClassVar[_typing.Literal[145]] = ...
-    BIGNUMERIC_TO_TEXT: _typing.ClassVar[_typing.Literal[146]] = ...
-ADD_DECIMAL = _typing.Literal[0]
-SUB_DECIMAL = _typing.Literal[1]
-MUL_DECIMAL = _typing.Literal[2]
-DIV_DECIMAL = _typing.Literal[3]
-ROUND_DECIMAL = _typing.Literal[6]
-ADD_NUMERIC = _typing.Literal[107]
-SUB_NUMERIC = _typing.Literal[108]
-MUL_NUMERIC = _typing.Literal[109]
-DIV_NUMERIC = _typing.Literal[110]
-ROUND_NUMERIC = _typing.Literal[111]
-CAST_NUMERIC = _typing.Literal[121]
-SHIFT_NUMERIC = _typing.Literal[122]
-ADD_INT64 = _typing.Literal[7]
-SUB_INT64 = _typing.Literal[8]
-MUL_INT64 = _typing.Literal[9]
-DIV_INT64 = _typing.Literal[10]
-MOD_INT64 = _typing.Literal[11]
-EXP_INT64 = _typing.Literal[12]
-FOLDL = _typing.Literal[20]
-FOLDR = _typing.Literal[21]
-TEXTMAP_EMPTY = _typing.Literal[96]
-TEXTMAP_INSERT = _typing.Literal[97]
-TEXTMAP_LOOKUP = _typing.Literal[98]
-TEXTMAP_DELETE = _typing.Literal[99]
-TEXTMAP_TO_LIST = _typing.Literal[100]
-TEXTMAP_SIZE = _typing.Literal[101]
-GENMAP_EMPTY = _typing.Literal[124]
-GENMAP_INSERT = _typing.Literal[125]
-GENMAP_LOOKUP = _typing.Literal[126]
-GENMAP_DELETE = _typing.Literal[127]
-GENMAP_KEYS = _typing.Literal[128]
-GENMAP_VALUES = _typing.Literal[129]
-GENMAP_SIZE = _typing.Literal[130]
-EXPLODE_TEXT = _typing.Literal[23]
-APPEND_TEXT = _typing.Literal[24]
-ERROR = _typing.Literal[25]
-ANY_EXCEPTION_MESSAGE = _typing.Literal[147]
-LEQ_INT64 = _typing.Literal[33]
-LEQ_DECIMAL = _typing.Literal[34]
-LEQ_NUMERIC = _typing.Literal[112]
-LEQ_TEXT = _typing.Literal[36]
-LEQ_TIMESTAMP = _typing.Literal[37]
-LEQ_DATE = _typing.Literal[67]
-LEQ_PARTY = _typing.Literal[89]
-LESS_INT64 = _typing.Literal[39]
-LESS_DECIMAL = _typing.Literal[40]
-LESS_NUMERIC = _typing.Literal[113]
-LESS_TEXT = _typing.Literal[42]
-LESS_TIMESTAMP = _typing.Literal[43]
-LESS_DATE = _typing.Literal[68]
-LESS_PARTY = _typing.Literal[90]
-GEQ_INT64 = _typing.Literal[45]
-GEQ_DECIMAL = _typing.Literal[46]
-GEQ_NUMERIC = _typing.Literal[114]
-GEQ_TEXT = _typing.Literal[48]
-GEQ_TIMESTAMP = _typing.Literal[49]
-GEQ_DATE = _typing.Literal[69]
-GEQ_PARTY = _typing.Literal[91]
-GREATER_INT64 = _typing.Literal[51]
-GREATER_DECIMAL = _typing.Literal[52]
-GREATER_NUMERIC = _typing.Literal[115]
-GREATER_TEXT = _typing.Literal[54]
-GREATER_TIMESTAMP = _typing.Literal[55]
-GREATER_DATE = _typing.Literal[70]
-GREATER_PARTY = _typing.Literal[92]
-INT64_TO_TEXT = _typing.Literal[57]
-DECIMAL_TO_TEXT = _typing.Literal[58]
-NUMERIC_TO_TEXT = _typing.Literal[116]
-TEXT_TO_TEXT = _typing.Literal[60]
-TIMESTAMP_TO_TEXT = _typing.Literal[61]
-DATE_TO_TEXT = _typing.Literal[71]
-PARTY_TO_QUOTED_TEXT = _typing.Literal[63]
-PARTY_TO_TEXT = _typing.Literal[94]
-TEXT_TO_PARTY = _typing.Literal[95]
-TEXT_TO_INT64 = _typing.Literal[103]
-TEXT_TO_DECIMAL = _typing.Literal[104]
-TEXT_TO_NUMERIC = _typing.Literal[117]
-CONTRACT_ID_TO_TEXT = _typing.Literal[136]
-SHA256_TEXT = _typing.Literal[93]
-DATE_TO_UNIX_DAYS = _typing.Literal[72]
-UNIX_DAYS_TO_DATE = _typing.Literal[73]
-TIMESTAMP_TO_UNIX_MICROSECONDS = _typing.Literal[74]
-UNIX_MICROSECONDS_TO_TIMESTAMP = _typing.Literal[75]
-INT64_TO_DECIMAL = _typing.Literal[76]
-DECIMAL_TO_INT64 = _typing.Literal[77]
-INT64_TO_NUMERIC = _typing.Literal[118]
-NUMERIC_TO_INT64 = _typing.Literal[119]
-IMPLODE_TEXT = _typing.Literal[78]
-EQUAL_INT64 = _typing.Literal[79]
-EQUAL_DECIMAL = _typing.Literal[80]
-EQUAL_NUMERIC = _typing.Literal[120]
-EQUAL_TEXT = _typing.Literal[81]
-EQUAL_TIMESTAMP = _typing.Literal[82]
-EQUAL_DATE = _typing.Literal[83]
-EQUAL_PARTY = _typing.Literal[84]
-EQUAL_BOOL = _typing.Literal[85]
-EQUAL_CONTRACT_ID = _typing.Literal[86]
-EQUAL_LIST = _typing.Literal[87]
-EQUAL_TYPE_REP = _typing.Literal[123]
-EQUAL = _typing.Literal[131]
-LESS_EQ = _typing.Literal[132]
-LESS = _typing.Literal[133]
-GREATER_EQ = _typing.Literal[134]
-GREATER = _typing.Literal[135]
-TRACE = _typing.Literal[88]
-COERCE_CONTRACT_ID = _typing.Literal[102]
-CODE_POINTS_TO_TEXT = _typing.Literal[105]
-TEXT_POINTS_TO_CODE = _typing.Literal[106]
-SCALE_BIGNUMERIC = _typing.Literal[137]
-PRECISION_BIGNUMERIC = _typing.Literal[138]
-ADD_BIGNUMERIC = _typing.Literal[139]
-SUB_BIGNUMERIC = _typing.Literal[140]
-MUL_BIGNUMERIC = _typing.Literal[141]
-DIV_BIGNUMERIC = _typing.Literal[142]
-SHIFT_RIGHT_BIGNUMERIC = _typing.Literal[143]
-BIGNUMERIC_TO_NUMERIC = _typing.Literal[144]
-NUMERIC_TO_BIGNUMERIC = _typing.Literal[145]
-BIGNUMERIC_TO_TEXT = _typing.Literal[146]
+    ADD_DECIMAL: _typing.ClassVar[_L[0]] = ...
+    SUB_DECIMAL: _typing.ClassVar[_L[1]] = ...
+    MUL_DECIMAL: _typing.ClassVar[_L[2]] = ...
+    DIV_DECIMAL: _typing.ClassVar[_L[3]] = ...
+    ROUND_DECIMAL: _typing.ClassVar[_L[6]] = ...
+    ADD_NUMERIC: _typing.ClassVar[_L[107]] = ...
+    SUB_NUMERIC: _typing.ClassVar[_L[108]] = ...
+    MUL_NUMERIC: _typing.ClassVar[_L[109]] = ...
+    DIV_NUMERIC: _typing.ClassVar[_L[110]] = ...
+    ROUND_NUMERIC: _typing.ClassVar[_L[111]] = ...
+    CAST_NUMERIC: _typing.ClassVar[_L[121]] = ...
+    SHIFT_NUMERIC: _typing.ClassVar[_L[122]] = ...
+    ADD_INT64: _typing.ClassVar[_L[7]] = ...
+    SUB_INT64: _typing.ClassVar[_L[8]] = ...
+    MUL_INT64: _typing.ClassVar[_L[9]] = ...
+    DIV_INT64: _typing.ClassVar[_L[10]] = ...
+    MOD_INT64: _typing.ClassVar[_L[11]] = ...
+    EXP_INT64: _typing.ClassVar[_L[12]] = ...
+    FOLDL: _typing.ClassVar[_L[20]] = ...
+    FOLDR: _typing.ClassVar[_L[21]] = ...
+    TEXTMAP_EMPTY: _typing.ClassVar[_L[96]] = ...
+    TEXTMAP_INSERT: _typing.ClassVar[_L[97]] = ...
+    TEXTMAP_LOOKUP: _typing.ClassVar[_L[98]] = ...
+    TEXTMAP_DELETE: _typing.ClassVar[_L[99]] = ...
+    TEXTMAP_TO_LIST: _typing.ClassVar[_L[100]] = ...
+    TEXTMAP_SIZE: _typing.ClassVar[_L[101]] = ...
+    GENMAP_EMPTY: _typing.ClassVar[_L[124]] = ...
+    GENMAP_INSERT: _typing.ClassVar[_L[125]] = ...
+    GENMAP_LOOKUP: _typing.ClassVar[_L[126]] = ...
+    GENMAP_DELETE: _typing.ClassVar[_L[127]] = ...
+    GENMAP_KEYS: _typing.ClassVar[_L[128]] = ...
+    GENMAP_VALUES: _typing.ClassVar[_L[129]] = ...
+    GENMAP_SIZE: _typing.ClassVar[_L[130]] = ...
+    EXPLODE_TEXT: _typing.ClassVar[_L[23]] = ...
+    APPEND_TEXT: _typing.ClassVar[_L[24]] = ...
+    ERROR: _typing.ClassVar[_L[25]] = ...
+    ANY_EXCEPTION_MESSAGE: _typing.ClassVar[_L[147]] = ...
+    LEQ_INT64: _typing.ClassVar[_L[33]] = ...
+    LEQ_DECIMAL: _typing.ClassVar[_L[34]] = ...
+    LEQ_NUMERIC: _typing.ClassVar[_L[112]] = ...
+    LEQ_TEXT: _typing.ClassVar[_L[36]] = ...
+    LEQ_TIMESTAMP: _typing.ClassVar[_L[37]] = ...
+    LEQ_DATE: _typing.ClassVar[_L[67]] = ...
+    LEQ_PARTY: _typing.ClassVar[_L[89]] = ...
+    LESS_INT64: _typing.ClassVar[_L[39]] = ...
+    LESS_DECIMAL: _typing.ClassVar[_L[40]] = ...
+    LESS_NUMERIC: _typing.ClassVar[_L[113]] = ...
+    LESS_TEXT: _typing.ClassVar[_L[42]] = ...
+    LESS_TIMESTAMP: _typing.ClassVar[_L[43]] = ...
+    LESS_DATE: _typing.ClassVar[_L[68]] = ...
+    LESS_PARTY: _typing.ClassVar[_L[90]] = ...
+    GEQ_INT64: _typing.ClassVar[_L[45]] = ...
+    GEQ_DECIMAL: _typing.ClassVar[_L[46]] = ...
+    GEQ_NUMERIC: _typing.ClassVar[_L[114]] = ...
+    GEQ_TEXT: _typing.ClassVar[_L[48]] = ...
+    GEQ_TIMESTAMP: _typing.ClassVar[_L[49]] = ...
+    GEQ_DATE: _typing.ClassVar[_L[69]] = ...
+    GEQ_PARTY: _typing.ClassVar[_L[91]] = ...
+    GREATER_INT64: _typing.ClassVar[_L[51]] = ...
+    GREATER_DECIMAL: _typing.ClassVar[_L[52]] = ...
+    GREATER_NUMERIC: _typing.ClassVar[_L[115]] = ...
+    GREATER_TEXT: _typing.ClassVar[_L[54]] = ...
+    GREATER_TIMESTAMP: _typing.ClassVar[_L[55]] = ...
+    GREATER_DATE: _typing.ClassVar[_L[70]] = ...
+    GREATER_PARTY: _typing.ClassVar[_L[92]] = ...
+    INT64_TO_TEXT: _typing.ClassVar[_L[57]] = ...
+    DECIMAL_TO_TEXT: _typing.ClassVar[_L[58]] = ...
+    NUMERIC_TO_TEXT: _typing.ClassVar[_L[116]] = ...
+    TEXT_TO_TEXT: _typing.ClassVar[_L[60]] = ...
+    TIMESTAMP_TO_TEXT: _typing.ClassVar[_L[61]] = ...
+    DATE_TO_TEXT: _typing.ClassVar[_L[71]] = ...
+    PARTY_TO_QUOTED_TEXT: _typing.ClassVar[_L[63]] = ...
+    PARTY_TO_TEXT: _typing.ClassVar[_L[94]] = ...
+    TEXT_TO_PARTY: _typing.ClassVar[_L[95]] = ...
+    TEXT_TO_INT64: _typing.ClassVar[_L[103]] = ...
+    TEXT_TO_DECIMAL: _typing.ClassVar[_L[104]] = ...
+    TEXT_TO_NUMERIC: _typing.ClassVar[_L[117]] = ...
+    CONTRACT_ID_TO_TEXT: _typing.ClassVar[_L[136]] = ...
+    SHA256_TEXT: _typing.ClassVar[_L[93]] = ...
+    DATE_TO_UNIX_DAYS: _typing.ClassVar[_L[72]] = ...
+    UNIX_DAYS_TO_DATE: _typing.ClassVar[_L[73]] = ...
+    TIMESTAMP_TO_UNIX_MICROSECONDS: _typing.ClassVar[_L[74]] = ...
+    UNIX_MICROSECONDS_TO_TIMESTAMP: _typing.ClassVar[_L[75]] = ...
+    INT64_TO_DECIMAL: _typing.ClassVar[_L[76]] = ...
+    DECIMAL_TO_INT64: _typing.ClassVar[_L[77]] = ...
+    INT64_TO_NUMERIC: _typing.ClassVar[_L[118]] = ...
+    NUMERIC_TO_INT64: _typing.ClassVar[_L[119]] = ...
+    IMPLODE_TEXT: _typing.ClassVar[_L[78]] = ...
+    EQUAL_INT64: _typing.ClassVar[_L[79]] = ...
+    EQUAL_DECIMAL: _typing.ClassVar[_L[80]] = ...
+    EQUAL_NUMERIC: _typing.ClassVar[_L[120]] = ...
+    EQUAL_TEXT: _typing.ClassVar[_L[81]] = ...
+    EQUAL_TIMESTAMP: _typing.ClassVar[_L[82]] = ...
+    EQUAL_DATE: _typing.ClassVar[_L[83]] = ...
+    EQUAL_PARTY: _typing.ClassVar[_L[84]] = ...
+    EQUAL_BOOL: _typing.ClassVar[_L[85]] = ...
+    EQUAL_CONTRACT_ID: _typing.ClassVar[_L[86]] = ...
+    EQUAL_LIST: _typing.ClassVar[_L[87]] = ...
+    EQUAL_TYPE_REP: _typing.ClassVar[_L[123]] = ...
+    EQUAL: _typing.ClassVar[_L[131]] = ...
+    LESS_EQ: _typing.ClassVar[_L[132]] = ...
+    LESS: _typing.ClassVar[_L[133]] = ...
+    GREATER_EQ: _typing.ClassVar[_L[134]] = ...
+    GREATER: _typing.ClassVar[_L[135]] = ...
+    TRACE: _typing.ClassVar[_L[88]] = ...
+    COERCE_CONTRACT_ID: _typing.ClassVar[_L[102]] = ...
+    CODE_POINTS_TO_TEXT: _typing.ClassVar[_L[105]] = ...
+    TEXT_POINTS_TO_CODE: _typing.ClassVar[_L[106]] = ...
+    SCALE_BIGNUMERIC: _typing.ClassVar[_L[137]] = ...
+    PRECISION_BIGNUMERIC: _typing.ClassVar[_L[138]] = ...
+    ADD_BIGNUMERIC: _typing.ClassVar[_L[139]] = ...
+    SUB_BIGNUMERIC: _typing.ClassVar[_L[140]] = ...
+    MUL_BIGNUMERIC: _typing.ClassVar[_L[141]] = ...
+    DIV_BIGNUMERIC: _typing.ClassVar[_L[142]] = ...
+    SHIFT_RIGHT_BIGNUMERIC: _typing.ClassVar[_L[143]] = ...
+    BIGNUMERIC_TO_NUMERIC: _typing.ClassVar[_L[144]] = ...
+    NUMERIC_TO_BIGNUMERIC: _typing.ClassVar[_L[145]] = ...
+    BIGNUMERIC_TO_TEXT: _typing.ClassVar[_L[146]] = ...
+ADD_DECIMAL = _L[0]
+SUB_DECIMAL = _L[1]
+MUL_DECIMAL = _L[2]
+DIV_DECIMAL = _L[3]
+ROUND_DECIMAL = _L[6]
+ADD_NUMERIC = _L[107]
+SUB_NUMERIC = _L[108]
+MUL_NUMERIC = _L[109]
+DIV_NUMERIC = _L[110]
+ROUND_NUMERIC = _L[111]
+CAST_NUMERIC = _L[121]
+SHIFT_NUMERIC = _L[122]
+ADD_INT64 = _L[7]
+SUB_INT64 = _L[8]
+MUL_INT64 = _L[9]
+DIV_INT64 = _L[10]
+MOD_INT64 = _L[11]
+EXP_INT64 = _L[12]
+FOLDL = _L[20]
+FOLDR = _L[21]
+TEXTMAP_EMPTY = _L[96]
+TEXTMAP_INSERT = _L[97]
+TEXTMAP_LOOKUP = _L[98]
+TEXTMAP_DELETE = _L[99]
+TEXTMAP_TO_LIST = _L[100]
+TEXTMAP_SIZE = _L[101]
+GENMAP_EMPTY = _L[124]
+GENMAP_INSERT = _L[125]
+GENMAP_LOOKUP = _L[126]
+GENMAP_DELETE = _L[127]
+GENMAP_KEYS = _L[128]
+GENMAP_VALUES = _L[129]
+GENMAP_SIZE = _L[130]
+EXPLODE_TEXT = _L[23]
+APPEND_TEXT = _L[24]
+ERROR = _L[25]
+ANY_EXCEPTION_MESSAGE = _L[147]
+LEQ_INT64 = _L[33]
+LEQ_DECIMAL = _L[34]
+LEQ_NUMERIC = _L[112]
+LEQ_TEXT = _L[36]
+LEQ_TIMESTAMP = _L[37]
+LEQ_DATE = _L[67]
+LEQ_PARTY = _L[89]
+LESS_INT64 = _L[39]
+LESS_DECIMAL = _L[40]
+LESS_NUMERIC = _L[113]
+LESS_TEXT = _L[42]
+LESS_TIMESTAMP = _L[43]
+LESS_DATE = _L[68]
+LESS_PARTY = _L[90]
+GEQ_INT64 = _L[45]
+GEQ_DECIMAL = _L[46]
+GEQ_NUMERIC = _L[114]
+GEQ_TEXT = _L[48]
+GEQ_TIMESTAMP = _L[49]
+GEQ_DATE = _L[69]
+GEQ_PARTY = _L[91]
+GREATER_INT64 = _L[51]
+GREATER_DECIMAL = _L[52]
+GREATER_NUMERIC = _L[115]
+GREATER_TEXT = _L[54]
+GREATER_TIMESTAMP = _L[55]
+GREATER_DATE = _L[70]
+GREATER_PARTY = _L[92]
+INT64_TO_TEXT = _L[57]
+DECIMAL_TO_TEXT = _L[58]
+NUMERIC_TO_TEXT = _L[116]
+TEXT_TO_TEXT = _L[60]
+TIMESTAMP_TO_TEXT = _L[61]
+DATE_TO_TEXT = _L[71]
+PARTY_TO_QUOTED_TEXT = _L[63]
+PARTY_TO_TEXT = _L[94]
+TEXT_TO_PARTY = _L[95]
+TEXT_TO_INT64 = _L[103]
+TEXT_TO_DECIMAL = _L[104]
+TEXT_TO_NUMERIC = _L[117]
+CONTRACT_ID_TO_TEXT = _L[136]
+SHA256_TEXT = _L[93]
+DATE_TO_UNIX_DAYS = _L[72]
+UNIX_DAYS_TO_DATE = _L[73]
+TIMESTAMP_TO_UNIX_MICROSECONDS = _L[74]
+UNIX_MICROSECONDS_TO_TIMESTAMP = _L[75]
+INT64_TO_DECIMAL = _L[76]
+DECIMAL_TO_INT64 = _L[77]
+INT64_TO_NUMERIC = _L[118]
+NUMERIC_TO_INT64 = _L[119]
+IMPLODE_TEXT = _L[78]
+EQUAL_INT64 = _L[79]
+EQUAL_DECIMAL = _L[80]
+EQUAL_NUMERIC = _L[120]
+EQUAL_TEXT = _L[81]
+EQUAL_TIMESTAMP = _L[82]
+EQUAL_DATE = _L[83]
+EQUAL_PARTY = _L[84]
+EQUAL_BOOL = _L[85]
+EQUAL_CONTRACT_ID = _L[86]
+EQUAL_LIST = _L[87]
+EQUAL_TYPE_REP = _L[123]
+EQUAL = _L[131]
+LESS_EQ = _L[132]
+LESS = _L[133]
+GREATER_EQ = _L[134]
+GREATER = _L[135]
+TRACE = _L[88]
+COERCE_CONTRACT_ID = _L[102]
+CODE_POINTS_TO_TEXT = _L[105]
+TEXT_POINTS_TO_CODE = _L[106]
+SCALE_BIGNUMERIC = _L[137]
+PRECISION_BIGNUMERIC = _L[138]
+ADD_BIGNUMERIC = _L[139]
+SUB_BIGNUMERIC = _L[140]
+MUL_BIGNUMERIC = _L[141]
+DIV_BIGNUMERIC = _L[142]
+SHIFT_RIGHT_BIGNUMERIC = _L[143]
+BIGNUMERIC_TO_NUMERIC = _L[144]
+NUMERIC_TO_BIGNUMERIC = _L[145]
+BIGNUMERIC_TO_TEXT = _L[146]
 
 
 class Unit(_Message):
@@ -352,26 +357,26 @@ class Unit(_Message):
 class PackageRef(_Message):
     @property
     def self(self) -> Unit: ...
-    package_id_str: str
-    package_id_interned_str: int
+    package_id_str: _builtins.str
+    package_id_interned_str: _builtins.int
     @_typing.overload
     def __init__(self): ...
     @_typing.overload
     def __init__(self_, *, self: Unit = ...): ...
     @_typing.overload
-    def __init__(self, *, package_id_str: str = ...): ...
+    def __init__(self, *, package_id_str: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, package_id_interned_str: int = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "self", "package_id_str", "package_id_interned_str"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "self", "package_id_str", "package_id_interned_str"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "self", "package_id_str", "package_id_interned_str"]: ...
+    def __init__(self, *, package_id_interned_str: _builtins.int = ...): ...
+    def HasField(self, field_name: _L["Sum", "self", "package_id_str", "package_id_interned_str"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "self", "package_id_str", "package_id_interned_str"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "self", "package_id_str", "package_id_interned_str"]: ...
 
 class DottedName(_Message):
     @property
-    def segments(self) -> RepeatedScalarFieldContainer[str]: ...
-    def __init__(self, *, segments: _typing.Optional[_typing.Iterable[str]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["segments"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["segments"]) -> None: ...
+    def segments(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    def __init__(self, *, segments: _typing.Optional[_typing.Iterable[_builtins.str]] = ...): ...
+    def HasField(self, field_name: _L["segments"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["segments"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ModuleRef(_Message):
@@ -379,119 +384,119 @@ class ModuleRef(_Message):
     def package_ref(self) -> PackageRef: ...
     @property
     def module_name_dname(self) -> DottedName: ...
-    module_name_interned_dname: int
+    module_name_interned_dname: _builtins.int
     @_typing.overload
     def __init__(self, *, package_ref: _typing.Optional[PackageRef] = ...): ...
     @_typing.overload
     def __init__(self, *, package_ref: _typing.Optional[PackageRef] = ..., module_name_dname: DottedName = ...): ...
     @_typing.overload
-    def __init__(self, *, package_ref: _typing.Optional[PackageRef] = ..., module_name_interned_dname: int = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_ref", "module_name", "module_name_dname", "module_name_interned_dname"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_ref", "module_name", "module_name_dname", "module_name_interned_dname"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["module_name"]) -> _typing.Literal[None, "module_name_dname", "module_name_interned_dname"]: ...
+    def __init__(self, *, package_ref: _typing.Optional[PackageRef] = ..., module_name_interned_dname: _builtins.int = ...): ...
+    def HasField(self, field_name: _L["package_ref", "module_name", "module_name_dname", "module_name_interned_dname"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_ref", "module_name", "module_name_dname", "module_name_interned_dname"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["module_name"]) -> _L[None, "module_name_dname", "module_name_interned_dname"]: ...
 
 class TypeConName(_Message):
     @property
     def module(self) -> ModuleRef: ...
     @property
     def name_dname(self) -> DottedName: ...
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @_typing.overload
     def __init__(self, *, module: _typing.Optional[ModuleRef] = ...): ...
     @_typing.overload
     def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_dname: DottedName = ...): ...
     @_typing.overload
-    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_interned_dname: int = ...): ...
-    def HasField(self, field_name: _typing.Literal["module", "name", "name_dname", "name_interned_dname"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["module", "name", "name_dname", "name_interned_dname"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_dname", "name_interned_dname"]: ...
+    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_interned_dname: _builtins.int = ...): ...
+    def HasField(self, field_name: _L["module", "name", "name_dname", "name_interned_dname"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["module", "name", "name_dname", "name_interned_dname"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_dname", "name_interned_dname"]: ...
 
 class TypeSynName(_Message):
     @property
     def module(self) -> ModuleRef: ...
     @property
     def name_dname(self) -> DottedName: ...
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @_typing.overload
     def __init__(self, *, module: _typing.Optional[ModuleRef] = ...): ...
     @_typing.overload
     def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_dname: DottedName = ...): ...
     @_typing.overload
-    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_interned_dname: int = ...): ...
-    def HasField(self, field_name: _typing.Literal["module", "name", "name_dname", "name_interned_dname"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["module", "name", "name_dname", "name_interned_dname"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_dname", "name_interned_dname"]: ...
+    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_interned_dname: _builtins.int = ...): ...
+    def HasField(self, field_name: _L["module", "name", "name_dname", "name_interned_dname"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["module", "name", "name_dname", "name_interned_dname"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_dname", "name_interned_dname"]: ...
 
 class ValName(_Message):
     @property
     def module(self) -> ModuleRef: ...
     @property
-    def name_dname(self) -> RepeatedScalarFieldContainer[str]: ...
-    name_interned_dname: int
-    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_dname: _typing.Optional[_typing.Iterable[str]] = ..., name_interned_dname: _typing.Optional[int] = ...): ...
-    def HasField(self, field_name: _typing.Literal["module", "name_dname", "name_interned_dname"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["module", "name_dname", "name_interned_dname"]) -> None: ...
+    def name_dname(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    name_interned_dname: _builtins.int
+    def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., name_dname: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., name_interned_dname: _typing.Optional[_builtins.int] = ...): ...
+    def HasField(self, field_name: _L["module", "name_dname", "name_interned_dname"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["module", "name_dname", "name_interned_dname"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class FieldWithType(_Message):
-    field_str: str
-    field_interned_str: int
+    field_str: _builtins.str
+    field_interned_str: _builtins.int
     @property
     def type(self) -> Type: ...
     @_typing.overload
     def __init__(self, *, type: _typing.Optional[Type] = ...): ...
     @_typing.overload
-    def __init__(self, *, field_str: str = ..., type: _typing.Optional[Type] = ...): ...
+    def __init__(self, *, field_str: _builtins.str = ..., type: _typing.Optional[Type] = ...): ...
     @_typing.overload
-    def __init__(self, *, field_interned_str: int = ..., type: _typing.Optional[Type] = ...): ...
-    def HasField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "type"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "type"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+    def __init__(self, *, field_interned_str: _builtins.int = ..., type: _typing.Optional[Type] = ...): ...
+    def HasField(self, field_name: _L["field", "field_str", "field_interned_str", "type"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["field", "field_str", "field_interned_str", "type"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
 
 class VarWithType(_Message):
-    var_str: str
-    var_interned_str: int
+    var_str: _builtins.str
+    var_interned_str: _builtins.int
     @property
     def type(self) -> Type: ...
     @_typing.overload
     def __init__(self, *, type: _typing.Optional[Type] = ...): ...
     @_typing.overload
-    def __init__(self, *, var_str: str = ..., type: _typing.Optional[Type] = ...): ...
+    def __init__(self, *, var_str: _builtins.str = ..., type: _typing.Optional[Type] = ...): ...
     @_typing.overload
-    def __init__(self, *, var_interned_str: int = ..., type: _typing.Optional[Type] = ...): ...
-    def HasField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "type"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "type"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["var"]) -> _typing.Literal[None, "var_str", "var_interned_str"]: ...
+    def __init__(self, *, var_interned_str: _builtins.int = ..., type: _typing.Optional[Type] = ...): ...
+    def HasField(self, field_name: _L["var", "var_str", "var_interned_str", "type"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["var", "var_str", "var_interned_str", "type"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["var"]) -> _L[None, "var_str", "var_interned_str"]: ...
 
 class TypeVarWithKind(_Message):
-    var_str: str
-    var_interned_str: int
+    var_str: _builtins.str
+    var_interned_str: _builtins.int
     @property
     def kind(self) -> Kind: ...
     @_typing.overload
     def __init__(self, *, kind: _typing.Optional[Kind] = ...): ...
     @_typing.overload
-    def __init__(self, *, var_str: str = ..., kind: _typing.Optional[Kind] = ...): ...
+    def __init__(self, *, var_str: _builtins.str = ..., kind: _typing.Optional[Kind] = ...): ...
     @_typing.overload
-    def __init__(self, *, var_interned_str: int = ..., kind: _typing.Optional[Kind] = ...): ...
-    def HasField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "kind"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "kind"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["var"]) -> _typing.Literal[None, "var_str", "var_interned_str"]: ...
+    def __init__(self, *, var_interned_str: _builtins.int = ..., kind: _typing.Optional[Kind] = ...): ...
+    def HasField(self, field_name: _L["var", "var_str", "var_interned_str", "kind"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["var", "var_str", "var_interned_str", "kind"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["var"]) -> _L[None, "var_str", "var_interned_str"]: ...
 
 class FieldWithExpr(_Message):
-    field_str: str
-    field_interned_str: int
+    field_str: _builtins.str
+    field_interned_str: _builtins.int
     @property
     def expr(self) -> Expr: ...
     @_typing.overload
     def __init__(self, *, expr: _typing.Optional[Expr] = ...): ...
     @_typing.overload
-    def __init__(self, *, field_str: str = ..., expr: _typing.Optional[Expr] = ...): ...
+    def __init__(self, *, field_str: _builtins.str = ..., expr: _typing.Optional[Expr] = ...): ...
     @_typing.overload
-    def __init__(self, *, field_interned_str: int = ..., expr: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "expr"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "expr"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+    def __init__(self, *, field_interned_str: _builtins.int = ..., expr: _typing.Optional[Expr] = ...): ...
+    def HasField(self, field_name: _L["field", "field_str", "field_interned_str", "expr"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["field", "field_str", "field_interned_str", "expr"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
 
 class Binding(_Message):
     @property
@@ -499,8 +504,8 @@ class Binding(_Message):
     @property
     def bound(self) -> Expr: ...
     def __init__(self, *, binder: _typing.Optional[VarWithType] = ..., bound: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["binder", "bound"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["binder", "bound"]) -> None: ...
+    def HasField(self, field_name: _L["binder", "bound"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["binder", "bound"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Kind(_Message):
@@ -511,8 +516,8 @@ class Kind(_Message):
         @property
         def result(self) -> Kind: ...
         def __init__(self, *, params: _typing.Optional[_typing.Iterable[Kind]] = ..., result: _typing.Optional[Kind] = ...): ...
-        def HasField(self, field_name: _typing.Literal["params", "result"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["params", "result"]) -> None: ...
+        def HasField(self, field_name: _L["params", "result"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["params", "result"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def star(self) -> Unit: ...
@@ -528,26 +533,26 @@ class Kind(_Message):
     def __init__(self, *, arrow: Kind.Arrow = ...): ...
     @_typing.overload
     def __init__(self, *, nat: Unit = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "star", "arrow", "nat"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "star", "arrow", "nat"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "star", "arrow", "nat"]: ...
+    def HasField(self, field_name: _L["Sum", "star", "arrow", "nat"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "star", "arrow", "nat"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "star", "arrow", "nat"]: ...
 
 class Type(_Message):
     
     class Var(_Message):
-        var_str: str
-        var_interned_str: int
+        var_str: _builtins.str
+        var_interned_str: _builtins.int
         @property
         def args(self) -> RepeatedCompositeFieldContainer[Type]: ...
         @_typing.overload
         def __init__(self, *, args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
         @_typing.overload
-        def __init__(self, *, var_str: str = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
+        def __init__(self, *, var_str: _builtins.str = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
         @_typing.overload
-        def __init__(self, *, var_interned_str: int = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "args"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["var", "var_str", "var_interned_str", "args"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["var"]) -> _typing.Literal[None, "var_str", "var_interned_str"]: ...
+        def __init__(self, *, var_interned_str: _builtins.int = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
+        def HasField(self, field_name: _L["var", "var_str", "var_interned_str", "args"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["var", "var_str", "var_interned_str", "args"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["var"]) -> _L[None, "var_str", "var_interned_str"]: ...
     
     class Con(_Message):
         @property
@@ -555,8 +560,8 @@ class Type(_Message):
         @property
         def args(self) -> RepeatedCompositeFieldContainer[Type]: ...
         def __init__(self, *, tycon: _typing.Optional[TypeConName] = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "args"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "args"]) -> None: ...
+        def HasField(self, field_name: _L["tycon", "args"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "args"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Syn(_Message):
@@ -565,17 +570,18 @@ class Type(_Message):
         @property
         def args(self) -> RepeatedCompositeFieldContainer[Type]: ...
         def __init__(self, *, tysyn: _typing.Optional[TypeSynName] = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tysyn", "args"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tysyn", "args"]) -> None: ...
+        def HasField(self, field_name: _L["tysyn", "args"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tysyn", "args"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Prim(_Message):
-        prim: _typing.Literal[0, 1, 2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
+        @property
+        def prim(self) -> _L[0, 1, 2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]: ...
         @property
         def args(self) -> RepeatedCompositeFieldContainer[Type]: ...
-        def __init__(self, *, prim: _typing.Optional[_typing.Literal['UNIT', 0, 'BOOL', 1, 'INT64', 2, 'DECIMAL', 3, 'TEXT', 5, 'TIMESTAMP', 6, 'PARTY', 8, 'LIST', 9, 'UPDATE', 10, 'SCENARIO', 11, 'DATE', 12, 'CONTRACT_ID', 13, 'OPTIONAL', 14, 'ARROW', 15, 'TEXTMAP', 16, 'NUMERIC', 17, 'ANY', 18, 'TYPE_REP', 19, 'GENMAP', 20, 'BIGNUMERIC', 21, 'ROUNDING_MODE', 22, 'ANY_EXCEPTION', 23]] = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["prim", "args"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["prim", "args"]) -> None: ...
+        def __init__(self, *, prim: _typing.Optional[_L['UNIT', 0, 'BOOL', 1, 'INT64', 2, 'DECIMAL', 3, 'TEXT', 5, 'TIMESTAMP', 6, 'PARTY', 8, 'LIST', 9, 'UPDATE', 10, 'SCENARIO', 11, 'DATE', 12, 'CONTRACT_ID', 13, 'OPTIONAL', 14, 'ARROW', 15, 'TEXTMAP', 16, 'NUMERIC', 17, 'ANY', 18, 'TYPE_REP', 19, 'GENMAP', 20, 'BIGNUMERIC', 21, 'ROUNDING_MODE', 22, 'ANY_EXCEPTION', 23]] = ..., args: _typing.Optional[_typing.Iterable[Type]] = ...): ...
+        def HasField(self, field_name: _L["prim", "args"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["prim", "args"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Fun(_Message):
@@ -584,8 +590,8 @@ class Type(_Message):
         @property
         def result(self) -> Type: ...
         def __init__(self, *, params: _typing.Optional[_typing.Iterable[Type]] = ..., result: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["params", "result"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["params", "result"]) -> None: ...
+        def HasField(self, field_name: _L["params", "result"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["params", "result"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Forall(_Message):
@@ -594,16 +600,16 @@ class Type(_Message):
         @property
         def body(self) -> Type: ...
         def __init__(self, *, vars: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., body: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["vars", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["vars", "body"]) -> None: ...
+        def HasField(self, field_name: _L["vars", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["vars", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Struct(_Message):
         @property
         def fields(self) -> RepeatedCompositeFieldContainer[FieldWithType]: ...
         def __init__(self, *, fields: _typing.Optional[_typing.Iterable[FieldWithType]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["fields"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["fields"]) -> None: ...
+        def HasField(self, field_name: _L["fields"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["fields"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def var(self) -> Type.Var: ...
@@ -615,10 +621,10 @@ class Type(_Message):
     def forall(self) -> Type.Forall: ...
     @property
     def struct(self) -> Type.Struct: ...
-    nat: int
+    nat: _builtins.int
     @property
     def syn(self) -> Type.Syn: ...
-    interned: int
+    interned: _builtins.int
     @_typing.overload
     def __init__(self): ...
     @_typing.overload
@@ -632,70 +638,71 @@ class Type(_Message):
     @_typing.overload
     def __init__(self, *, struct: Type.Struct = ...): ...
     @_typing.overload
-    def __init__(self, *, nat: int = ...): ...
+    def __init__(self, *, nat: _builtins.int = ...): ...
     @_typing.overload
     def __init__(self, *, syn: Type.Syn = ...): ...
     @_typing.overload
-    def __init__(self, *, interned: int = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]: ...
+    def __init__(self, *, interned: _builtins.int = ...): ...
+    def HasField(self, field_name: _L["Sum", "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "var", "con", "prim", "forall", "struct", "nat", "syn", "interned"]: ...
 
 class PrimLit(_Message):
-    int64: int
-    decimal_str: str
-    numeric_interned_str: int
-    text_str: str
-    text_interned_str: int
-    timestamp: float
-    party_str: str
-    party_interned_str: int
-    date: int
-    rounding_mode: _typing.Literal[0, 1, 2, 3, 4, 5, 6, 7]
+    int64: _builtins.int
+    decimal_str: _builtins.str
+    numeric_interned_str: _builtins.int
+    text_str: _builtins.str
+    text_interned_str: _builtins.int
+    timestamp: _builtins.float
+    party_str: _builtins.str
+    party_interned_str: _builtins.int
+    date: _builtins.int
+    @property
+    def rounding_mode(self) -> _L[0, 1, 2, 3, 4, 5, 6, 7]: ...
     @_typing.overload
     def __init__(self): ...
     @_typing.overload
-    def __init__(self, *, int64: int = ...): ...
+    def __init__(self, *, int64: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, decimal_str: str = ...): ...
+    def __init__(self, *, decimal_str: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, numeric_interned_str: int = ...): ...
+    def __init__(self, *, numeric_interned_str: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, text_str: str = ...): ...
+    def __init__(self, *, text_str: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, text_interned_str: int = ...): ...
+    def __init__(self, *, text_interned_str: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, timestamp: float = ...): ...
+    def __init__(self, *, timestamp: _builtins.float = ...): ...
     @_typing.overload
-    def __init__(self, *, party_str: str = ...): ...
+    def __init__(self, *, party_str: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, party_interned_str: int = ...): ...
+    def __init__(self, *, party_interned_str: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, date: int = ...): ...
+    def __init__(self, *, date: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, rounding_mode: _typing.Literal['UP', 0, 'DOWN', 1, 'CEILING', 2, 'FLOOR', 3, 'HALF_UP', 4, 'HALF_DOWN', 5, 'HALF_EVEN', 6, 'UNNECESSARY', 7] = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]: ...
+    def __init__(self, *, rounding_mode: _L['UP', 0, 'DOWN', 1, 'CEILING', 2, 'FLOOR', 3, 'HALF_UP', 4, 'HALF_DOWN', 5, 'HALF_EVEN', 6, 'UNNECESSARY', 7] = ...): ...
+    def HasField(self, field_name: _L["Sum", "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "int64", "decimal_str", "numeric_interned_str", "text_str", "text_interned_str", "timestamp", "party_str", "party_interned_str", "date", "rounding_mode"]: ...
 
 class Location(_Message):
     
     class Range(_Message):
-        start_line: int
-        start_col: int
-        end_line: int
-        end_col: int
-        def __init__(self, *, start_line: _typing.Optional[int] = ..., start_col: _typing.Optional[int] = ..., end_line: _typing.Optional[int] = ..., end_col: _typing.Optional[int] = ...): ...
-        def HasField(self, field_name: _typing.Literal["start_line", "start_col", "end_line", "end_col"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["start_line", "start_col", "end_line", "end_col"]) -> None: ...
+        start_line: _builtins.int
+        start_col: _builtins.int
+        end_line: _builtins.int
+        end_col: _builtins.int
+        def __init__(self, *, start_line: _typing.Optional[_builtins.int] = ..., start_col: _typing.Optional[_builtins.int] = ..., end_line: _typing.Optional[_builtins.int] = ..., end_col: _typing.Optional[_builtins.int] = ...): ...
+        def HasField(self, field_name: _L["start_line", "start_col", "end_line", "end_col"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["start_line", "start_col", "end_line", "end_col"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def module(self) -> ModuleRef: ...
     @property
     def range(self) -> Location.Range: ...
     def __init__(self, *, module: _typing.Optional[ModuleRef] = ..., range: _typing.Optional[Location.Range] = ...): ...
-    def HasField(self, field_name: _typing.Literal["module", "range"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["module", "range"]) -> None: ...
+    def HasField(self, field_name: _L["module", "range"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["module", "range"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Expr(_Message):
@@ -706,32 +713,32 @@ class Expr(_Message):
         @property
         def fields(self) -> RepeatedCompositeFieldContainer[FieldWithExpr]: ...
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., fields: _typing.Optional[_typing.Iterable[FieldWithExpr]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "fields"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "fields"]) -> None: ...
+        def HasField(self, field_name: _L["tycon", "fields"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "fields"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class RecProj(_Message):
         @property
         def tycon(self) -> Type.Con: ...
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @property
         def record(self) -> Expr: ...
         @_typing.overload
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., record: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: str = ..., record: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: _builtins.str = ..., record: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: int = ..., record: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str", "record"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str", "record"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: _builtins.int = ..., record: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str", "record"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str", "record"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class RecUpd(_Message):
         @property
         def tycon(self) -> Type.Con: ...
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @property
         def record(self) -> Expr: ...
         @property
@@ -739,71 +746,71 @@ class Expr(_Message):
         @_typing.overload
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., record: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: str = ..., record: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: _builtins.str = ..., record: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: int = ..., record: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str", "record", "update"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str", "record", "update"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: _builtins.int = ..., record: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str", "record", "update"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str", "record", "update"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class VariantCon(_Message):
         @property
         def tycon(self) -> Type.Con: ...
-        variant_con_str: str
-        variant_con_interned_str: int
+        variant_con_str: _builtins.str
+        variant_con_interned_str: _builtins.int
         @property
         def variant_arg(self) -> Expr: ...
         @_typing.overload
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., variant_arg: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., variant_con_str: str = ..., variant_arg: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., variant_con_str: _builtins.str = ..., variant_arg: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., variant_con_interned_str: int = ..., variant_arg: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "variant_con", "variant_con_str", "variant_con_interned_str", "variant_arg"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "variant_con", "variant_con_str", "variant_con_interned_str", "variant_arg"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["variant_con"]) -> _typing.Literal[None, "variant_con_str", "variant_con_interned_str"]: ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., variant_con_interned_str: _builtins.int = ..., variant_arg: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["tycon", "variant_con", "variant_con_str", "variant_con_interned_str", "variant_arg"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "variant_con", "variant_con_str", "variant_con_interned_str", "variant_arg"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["variant_con"]) -> _L[None, "variant_con_str", "variant_con_interned_str"]: ...
     
     class EnumCon(_Message):
         @property
         def tycon(self) -> TypeConName: ...
-        enum_con_str: str
-        enum_con_interned_str: int
+        enum_con_str: _builtins.str
+        enum_con_interned_str: _builtins.int
         @_typing.overload
         def __init__(self, *, tycon: _typing.Optional[TypeConName] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[TypeConName] = ..., enum_con_str: str = ...): ...
+        def __init__(self, *, tycon: _typing.Optional[TypeConName] = ..., enum_con_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[TypeConName] = ..., enum_con_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "enum_con", "enum_con_str", "enum_con_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "enum_con", "enum_con_str", "enum_con_interned_str"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["enum_con"]) -> _typing.Literal[None, "enum_con_str", "enum_con_interned_str"]: ...
+        def __init__(self, *, tycon: _typing.Optional[TypeConName] = ..., enum_con_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["tycon", "enum_con", "enum_con_str", "enum_con_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "enum_con", "enum_con_str", "enum_con_interned_str"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["enum_con"]) -> _L[None, "enum_con_str", "enum_con_interned_str"]: ...
     
     class StructCon(_Message):
         @property
         def fields(self) -> RepeatedCompositeFieldContainer[FieldWithExpr]: ...
         def __init__(self, *, fields: _typing.Optional[_typing.Iterable[FieldWithExpr]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["fields"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["fields"]) -> None: ...
+        def HasField(self, field_name: _L["fields"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["fields"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class StructProj(_Message):
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @property
         def struct(self) -> Expr: ...
         @_typing.overload
         def __init__(self, *, struct: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_str: str = ..., struct: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, field_str: _builtins.str = ..., struct: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_interned_str: int = ..., struct: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "struct"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "struct"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, field_interned_str: _builtins.int = ..., struct: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["field", "field_str", "field_interned_str", "struct"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["field", "field_str", "field_interned_str", "struct"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class StructUpd(_Message):
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @property
         def struct(self) -> Expr: ...
         @property
@@ -811,12 +818,12 @@ class Expr(_Message):
         @_typing.overload
         def __init__(self, *, struct: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_str: str = ..., struct: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, field_str: _builtins.str = ..., struct: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_interned_str: int = ..., struct: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "struct", "update"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "struct", "update"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, field_interned_str: _builtins.int = ..., struct: _typing.Optional[Expr] = ..., update: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["field", "field_str", "field_interned_str", "struct", "update"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["field", "field_str", "field_interned_str", "struct", "update"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class App(_Message):
         @property
@@ -824,8 +831,8 @@ class Expr(_Message):
         @property
         def args(self) -> RepeatedCompositeFieldContainer[Expr]: ...
         def __init__(self, *, fun: _typing.Optional[Expr] = ..., args: _typing.Optional[_typing.Iterable[Expr]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["fun", "args"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["fun", "args"]) -> None: ...
+        def HasField(self, field_name: _L["fun", "args"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["fun", "args"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class TyApp(_Message):
@@ -834,8 +841,8 @@ class Expr(_Message):
         @property
         def types(self) -> RepeatedCompositeFieldContainer[Type]: ...
         def __init__(self, *, expr: _typing.Optional[Expr] = ..., types: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["expr", "types"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["expr", "types"]) -> None: ...
+        def HasField(self, field_name: _L["expr", "types"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["expr", "types"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Abs(_Message):
@@ -844,8 +851,8 @@ class Expr(_Message):
         @property
         def body(self) -> Expr: ...
         def __init__(self, *, param: _typing.Optional[_typing.Iterable[VarWithType]] = ..., body: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["param", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["param", "body"]) -> None: ...
+        def HasField(self, field_name: _L["param", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["param", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class TyAbs(_Message):
@@ -854,16 +861,16 @@ class Expr(_Message):
         @property
         def body(self) -> Expr: ...
         def __init__(self, *, param: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., body: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["param", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["param", "body"]) -> None: ...
+        def HasField(self, field_name: _L["param", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["param", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Nil(_Message):
         @property
         def type(self) -> Type: ...
         def __init__(self, *, type: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type"]) -> None: ...
+        def HasField(self, field_name: _L["type"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Cons(_Message):
@@ -874,16 +881,16 @@ class Expr(_Message):
         @property
         def tail(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., front: _typing.Optional[_typing.Iterable[Expr]] = ..., tail: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "front", "tail"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "front", "tail"]) -> None: ...
+        def HasField(self, field_name: _L["type", "front", "tail"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "front", "tail"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class OptionalNone(_Message):
         @property
         def type(self) -> Type: ...
         def __init__(self, *, type: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type"]) -> None: ...
+        def HasField(self, field_name: _L["type"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class OptionalSome(_Message):
@@ -892,8 +899,8 @@ class Expr(_Message):
         @property
         def body(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., body: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "body"]) -> None: ...
+        def HasField(self, field_name: _L["type", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class ToAny(_Message):
@@ -902,8 +909,8 @@ class Expr(_Message):
         @property
         def expr(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "expr"]) -> None: ...
+        def HasField(self, field_name: _L["type", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class FromAny(_Message):
@@ -912,8 +919,8 @@ class Expr(_Message):
         @property
         def expr(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "expr"]) -> None: ...
+        def HasField(self, field_name: _L["type", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class ToAnyException(_Message):
@@ -922,8 +929,8 @@ class Expr(_Message):
         @property
         def expr(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "expr"]) -> None: ...
+        def HasField(self, field_name: _L["type", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class FromAnyException(_Message):
@@ -932,8 +939,8 @@ class Expr(_Message):
         @property
         def expr(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "expr"]) -> None: ...
+        def HasField(self, field_name: _L["type", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Throw(_Message):
@@ -944,26 +951,28 @@ class Expr(_Message):
         @property
         def exception_expr(self) -> Expr: ...
         def __init__(self, *, return_type: _typing.Optional[Type] = ..., exception_type: _typing.Optional[Type] = ..., exception_expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["return_type", "exception_type", "exception_expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["return_type", "exception_type", "exception_expr"]) -> None: ...
+        def HasField(self, field_name: _L["return_type", "exception_type", "exception_expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["return_type", "exception_type", "exception_expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Experimental(_Message):
-        name: str
+        name: _builtins.str
         @property
         def type(self) -> Type: ...
-        def __init__(self, *, name: _typing.Optional[str] = ..., type: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["name", "type"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["name", "type"]) -> None: ...
+        def __init__(self, *, name: _typing.Optional[_builtins.str] = ..., type: _typing.Optional[Type] = ...): ...
+        def HasField(self, field_name: _L["name", "type"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["name", "type"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def location(self) -> Location: ...
-    var_str: str
-    var_interned_str: int
+    var_str: _builtins.str
+    var_interned_str: _builtins.int
     @property
     def val(self) -> ValName: ...
-    builtin: _typing.Literal[0, 1, 2, 3, 6, 107, 108, 109, 110, 111, 121, 122, 7, 8, 9, 10, 11, 12, 20, 21, 96, 97, 98, 99, 100, 101, 124, 125, 126, 127, 128, 129, 130, 23, 24, 25, 147, 33, 34, 112, 36, 37, 67, 89, 39, 40, 113, 42, 43, 68, 90, 45, 46, 114, 48, 49, 69, 91, 51, 52, 115, 54, 55, 70, 92, 57, 58, 116, 60, 61, 71, 63, 94, 95, 103, 104, 117, 136, 93, 72, 73, 74, 75, 76, 77, 118, 119, 78, 79, 80, 120, 81, 82, 83, 84, 85, 86, 87, 123, 131, 132, 133, 134, 135, 88, 102, 105, 106, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146]
-    prim_con: _typing.Literal[0, 1, 2]
+    @property
+    def builtin(self) -> _L[0, 1, 2, 3, 6, 107, 108, 109, 110, 111, 121, 122, 7, 8, 9, 10, 11, 12, 20, 21, 96, 97, 98, 99, 100, 101, 124, 125, 126, 127, 128, 129, 130, 23, 24, 25, 147, 33, 34, 112, 36, 37, 67, 89, 39, 40, 113, 42, 43, 68, 90, 45, 46, 114, 48, 49, 69, 91, 51, 52, 115, 54, 55, 70, 92, 57, 58, 116, 60, 61, 71, 63, 94, 95, 103, 104, 117, 136, 93, 72, 73, 74, 75, 76, 77, 118, 119, 78, 79, 80, 120, 81, 82, 83, 84, 85, 86, 87, 123, 131, 132, 133, 134, 135, 88, 102, 105, 106, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146]: ...
+    @property
+    def prim_con(self) -> _L[0, 1, 2]: ...
     @property
     def prim_lit(self) -> PrimLit: ...
     @property
@@ -1023,15 +1032,15 @@ class Expr(_Message):
     @_typing.overload
     def __init__(self, *, location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, location: _typing.Optional[Location] = ..., var_str: str = ...): ...
+    def __init__(self, *, location: _typing.Optional[Location] = ..., var_str: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, location: _typing.Optional[Location] = ..., var_interned_str: int = ...): ...
+    def __init__(self, *, location: _typing.Optional[Location] = ..., var_interned_str: _builtins.int = ...): ...
     @_typing.overload
     def __init__(self, *, location: _typing.Optional[Location] = ..., val: ValName = ...): ...
     @_typing.overload
-    def __init__(self, *, location: _typing.Optional[Location] = ..., builtin: _typing.Literal['ADD_DECIMAL', 0, 'SUB_DECIMAL', 1, 'MUL_DECIMAL', 2, 'DIV_DECIMAL', 3, 'ROUND_DECIMAL', 6, 'ADD_NUMERIC', 107, 'SUB_NUMERIC', 108, 'MUL_NUMERIC', 109, 'DIV_NUMERIC', 110, 'ROUND_NUMERIC', 111, 'CAST_NUMERIC', 121, 'SHIFT_NUMERIC', 122, 'ADD_INT64', 7, 'SUB_INT64', 8, 'MUL_INT64', 9, 'DIV_INT64', 10, 'MOD_INT64', 11, 'EXP_INT64', 12, 'FOLDL', 20, 'FOLDR', 21, 'TEXTMAP_EMPTY', 96, 'TEXTMAP_INSERT', 97, 'TEXTMAP_LOOKUP', 98, 'TEXTMAP_DELETE', 99, 'TEXTMAP_TO_LIST', 100, 'TEXTMAP_SIZE', 101, 'GENMAP_EMPTY', 124, 'GENMAP_INSERT', 125, 'GENMAP_LOOKUP', 126, 'GENMAP_DELETE', 127, 'GENMAP_KEYS', 128, 'GENMAP_VALUES', 129, 'GENMAP_SIZE', 130, 'EXPLODE_TEXT', 23, 'APPEND_TEXT', 24, 'ERROR', 25, 'ANY_EXCEPTION_MESSAGE', 147, 'LEQ_INT64', 33, 'LEQ_DECIMAL', 34, 'LEQ_NUMERIC', 112, 'LEQ_TEXT', 36, 'LEQ_TIMESTAMP', 37, 'LEQ_DATE', 67, 'LEQ_PARTY', 89, 'LESS_INT64', 39, 'LESS_DECIMAL', 40, 'LESS_NUMERIC', 113, 'LESS_TEXT', 42, 'LESS_TIMESTAMP', 43, 'LESS_DATE', 68, 'LESS_PARTY', 90, 'GEQ_INT64', 45, 'GEQ_DECIMAL', 46, 'GEQ_NUMERIC', 114, 'GEQ_TEXT', 48, 'GEQ_TIMESTAMP', 49, 'GEQ_DATE', 69, 'GEQ_PARTY', 91, 'GREATER_INT64', 51, 'GREATER_DECIMAL', 52, 'GREATER_NUMERIC', 115, 'GREATER_TEXT', 54, 'GREATER_TIMESTAMP', 55, 'GREATER_DATE', 70, 'GREATER_PARTY', 92, 'INT64_TO_TEXT', 57, 'DECIMAL_TO_TEXT', 58, 'NUMERIC_TO_TEXT', 116, 'TEXT_TO_TEXT', 60, 'TIMESTAMP_TO_TEXT', 61, 'DATE_TO_TEXT', 71, 'PARTY_TO_QUOTED_TEXT', 63, 'PARTY_TO_TEXT', 94, 'TEXT_TO_PARTY', 95, 'TEXT_TO_INT64', 103, 'TEXT_TO_DECIMAL', 104, 'TEXT_TO_NUMERIC', 117, 'CONTRACT_ID_TO_TEXT', 136, 'SHA256_TEXT', 93, 'DATE_TO_UNIX_DAYS', 72, 'UNIX_DAYS_TO_DATE', 73, 'TIMESTAMP_TO_UNIX_MICROSECONDS', 74, 'UNIX_MICROSECONDS_TO_TIMESTAMP', 75, 'INT64_TO_DECIMAL', 76, 'DECIMAL_TO_INT64', 77, 'INT64_TO_NUMERIC', 118, 'NUMERIC_TO_INT64', 119, 'IMPLODE_TEXT', 78, 'EQUAL_INT64', 79, 'EQUAL_DECIMAL', 80, 'EQUAL_NUMERIC', 120, 'EQUAL_TEXT', 81, 'EQUAL_TIMESTAMP', 82, 'EQUAL_DATE', 83, 'EQUAL_PARTY', 84, 'EQUAL_BOOL', 85, 'EQUAL_CONTRACT_ID', 86, 'EQUAL_LIST', 87, 'EQUAL_TYPE_REP', 123, 'EQUAL', 131, 'LESS_EQ', 132, 'LESS', 133, 'GREATER_EQ', 134, 'GREATER', 135, 'TRACE', 88, 'COERCE_CONTRACT_ID', 102, 'CODE_POINTS_TO_TEXT', 105, 'TEXT_POINTS_TO_CODE', 106, 'SCALE_BIGNUMERIC', 137, 'PRECISION_BIGNUMERIC', 138, 'ADD_BIGNUMERIC', 139, 'SUB_BIGNUMERIC', 140, 'MUL_BIGNUMERIC', 141, 'DIV_BIGNUMERIC', 142, 'SHIFT_RIGHT_BIGNUMERIC', 143, 'BIGNUMERIC_TO_NUMERIC', 144, 'NUMERIC_TO_BIGNUMERIC', 145, 'BIGNUMERIC_TO_TEXT', 146] = ...): ...
+    def __init__(self, *, location: _typing.Optional[Location] = ..., builtin: _L['ADD_DECIMAL', 0, 'SUB_DECIMAL', 1, 'MUL_DECIMAL', 2, 'DIV_DECIMAL', 3, 'ROUND_DECIMAL', 6, 'ADD_NUMERIC', 107, 'SUB_NUMERIC', 108, 'MUL_NUMERIC', 109, 'DIV_NUMERIC', 110, 'ROUND_NUMERIC', 111, 'CAST_NUMERIC', 121, 'SHIFT_NUMERIC', 122, 'ADD_INT64', 7, 'SUB_INT64', 8, 'MUL_INT64', 9, 'DIV_INT64', 10, 'MOD_INT64', 11, 'EXP_INT64', 12, 'FOLDL', 20, 'FOLDR', 21, 'TEXTMAP_EMPTY', 96, 'TEXTMAP_INSERT', 97, 'TEXTMAP_LOOKUP', 98, 'TEXTMAP_DELETE', 99, 'TEXTMAP_TO_LIST', 100, 'TEXTMAP_SIZE', 101, 'GENMAP_EMPTY', 124, 'GENMAP_INSERT', 125, 'GENMAP_LOOKUP', 126, 'GENMAP_DELETE', 127, 'GENMAP_KEYS', 128, 'GENMAP_VALUES', 129, 'GENMAP_SIZE', 130, 'EXPLODE_TEXT', 23, 'APPEND_TEXT', 24, 'ERROR', 25, 'ANY_EXCEPTION_MESSAGE', 147, 'LEQ_INT64', 33, 'LEQ_DECIMAL', 34, 'LEQ_NUMERIC', 112, 'LEQ_TEXT', 36, 'LEQ_TIMESTAMP', 37, 'LEQ_DATE', 67, 'LEQ_PARTY', 89, 'LESS_INT64', 39, 'LESS_DECIMAL', 40, 'LESS_NUMERIC', 113, 'LESS_TEXT', 42, 'LESS_TIMESTAMP', 43, 'LESS_DATE', 68, 'LESS_PARTY', 90, 'GEQ_INT64', 45, 'GEQ_DECIMAL', 46, 'GEQ_NUMERIC', 114, 'GEQ_TEXT', 48, 'GEQ_TIMESTAMP', 49, 'GEQ_DATE', 69, 'GEQ_PARTY', 91, 'GREATER_INT64', 51, 'GREATER_DECIMAL', 52, 'GREATER_NUMERIC', 115, 'GREATER_TEXT', 54, 'GREATER_TIMESTAMP', 55, 'GREATER_DATE', 70, 'GREATER_PARTY', 92, 'INT64_TO_TEXT', 57, 'DECIMAL_TO_TEXT', 58, 'NUMERIC_TO_TEXT', 116, 'TEXT_TO_TEXT', 60, 'TIMESTAMP_TO_TEXT', 61, 'DATE_TO_TEXT', 71, 'PARTY_TO_QUOTED_TEXT', 63, 'PARTY_TO_TEXT', 94, 'TEXT_TO_PARTY', 95, 'TEXT_TO_INT64', 103, 'TEXT_TO_DECIMAL', 104, 'TEXT_TO_NUMERIC', 117, 'CONTRACT_ID_TO_TEXT', 136, 'SHA256_TEXT', 93, 'DATE_TO_UNIX_DAYS', 72, 'UNIX_DAYS_TO_DATE', 73, 'TIMESTAMP_TO_UNIX_MICROSECONDS', 74, 'UNIX_MICROSECONDS_TO_TIMESTAMP', 75, 'INT64_TO_DECIMAL', 76, 'DECIMAL_TO_INT64', 77, 'INT64_TO_NUMERIC', 118, 'NUMERIC_TO_INT64', 119, 'IMPLODE_TEXT', 78, 'EQUAL_INT64', 79, 'EQUAL_DECIMAL', 80, 'EQUAL_NUMERIC', 120, 'EQUAL_TEXT', 81, 'EQUAL_TIMESTAMP', 82, 'EQUAL_DATE', 83, 'EQUAL_PARTY', 84, 'EQUAL_BOOL', 85, 'EQUAL_CONTRACT_ID', 86, 'EQUAL_LIST', 87, 'EQUAL_TYPE_REP', 123, 'EQUAL', 131, 'LESS_EQ', 132, 'LESS', 133, 'GREATER_EQ', 134, 'GREATER', 135, 'TRACE', 88, 'COERCE_CONTRACT_ID', 102, 'CODE_POINTS_TO_TEXT', 105, 'TEXT_POINTS_TO_CODE', 106, 'SCALE_BIGNUMERIC', 137, 'PRECISION_BIGNUMERIC', 138, 'ADD_BIGNUMERIC', 139, 'SUB_BIGNUMERIC', 140, 'MUL_BIGNUMERIC', 141, 'DIV_BIGNUMERIC', 142, 'SHIFT_RIGHT_BIGNUMERIC', 143, 'BIGNUMERIC_TO_NUMERIC', 144, 'NUMERIC_TO_BIGNUMERIC', 145, 'BIGNUMERIC_TO_TEXT', 146] = ...): ...
     @_typing.overload
-    def __init__(self, *, location: _typing.Optional[Location] = ..., prim_con: _typing.Literal['CON_UNIT', 0, 'CON_FALSE', 1, 'CON_TRUE', 2] = ...): ...
+    def __init__(self, *, location: _typing.Optional[Location] = ..., prim_con: _L['CON_UNIT', 0, 'CON_FALSE', 1, 'CON_TRUE', 2] = ...): ...
     @_typing.overload
     def __init__(self, *, location: _typing.Optional[Location] = ..., prim_lit: PrimLit = ...): ...
     @_typing.overload
@@ -1088,106 +1097,107 @@ class Expr(_Message):
     def __init__(self, *, location: _typing.Optional[Location] = ..., throw: Expr.Throw = ...): ...
     @_typing.overload
     def __init__(self, *, location: _typing.Optional[Location] = ..., experimental: Expr.Experimental = ...): ...
-    def HasField(self, field_name: _typing.Literal["location", "Sum", "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["location", "Sum", "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]: ...
+    def HasField(self, field_name: _L["location", "Sum", "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["location", "Sum", "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "var_str", "var_interned_str", "val", "builtin", "prim_con", "prim_lit", "rec_con", "rec_proj", "rec_upd", "variant_con", "enum_con", "struct_con", "struct_proj", "struct_upd", "app", "ty_app", "abs", "ty_abs", "case", "let", "nil", "cons", "update", "scenario", "optional_none", "optional_some", "to_any", "from_any", "type_rep", "to_any_exception", "from_any_exception", "throw", "experimental"]: ...
 
 class CaseAlt(_Message):
     
     class Variant(_Message):
         @property
         def con(self) -> TypeConName: ...
-        variant_str: str
-        variant_interned_str: int
-        binder_str: str
-        binder_interned_str: int
+        variant_str: _builtins.str
+        variant_interned_str: _builtins.int
+        binder_str: _builtins.str
+        binder_interned_str: _builtins.int
         @_typing.overload
         def __init__(self, *, con: _typing.Optional[TypeConName] = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., binder_str: str = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., binder_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., binder_interned_str: int = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., binder_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: str = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: str = ..., binder_str: str = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: _builtins.str = ..., binder_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: str = ..., binder_interned_str: int = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_str: _builtins.str = ..., binder_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: int = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: int = ..., binder_str: str = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: _builtins.int = ..., binder_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: int = ..., binder_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["con", "variant", "variant_str", "variant_interned_str", "binder", "binder_str", "binder_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["con", "variant", "variant_str", "variant_interned_str", "binder", "binder_str", "binder_interned_str"]) -> None: ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., variant_interned_str: _builtins.int = ..., binder_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["con", "variant", "variant_str", "variant_interned_str", "binder", "binder_str", "binder_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["con", "variant", "variant_str", "variant_interned_str", "binder", "binder_str", "binder_interned_str"]) -> None: ...
         @_typing.overload
-        def WhichOneof(self, oneof_group: _typing.Literal["variant"]) -> _typing.Literal[None, "variant_str", "variant_interned_str"]: ...
+        def WhichOneof(self, oneof_group: _L["variant"]) -> _L[None, "variant_str", "variant_interned_str"]: ...
         @_typing.overload
-        def WhichOneof(self, oneof_group: _typing.Literal["binder"]) -> _typing.Literal[None, "binder_str", "binder_interned_str"]: ...
+        def WhichOneof(self, oneof_group: _L["binder"]) -> _L[None, "binder_str", "binder_interned_str"]: ...
     
     class Enum(_Message):
         @property
         def con(self) -> TypeConName: ...
-        constructor_str: str
-        constructor_interned_str: int
+        constructor_str: _builtins.str
+        constructor_interned_str: _builtins.int
         @_typing.overload
         def __init__(self, *, con: _typing.Optional[TypeConName] = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., constructor_str: str = ...): ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., constructor_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., constructor_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["con", "constructor", "constructor_str", "constructor_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["con", "constructor", "constructor_str", "constructor_interned_str"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["constructor"]) -> _typing.Literal[None, "constructor_str", "constructor_interned_str"]: ...
+        def __init__(self, *, con: _typing.Optional[TypeConName] = ..., constructor_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["con", "constructor", "constructor_str", "constructor_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["con", "constructor", "constructor_str", "constructor_interned_str"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["constructor"]) -> _L[None, "constructor_str", "constructor_interned_str"]: ...
     
     class Cons(_Message):
-        var_head_str: str
-        var_head_interned_str: int
-        var_tail_str: str
-        var_tail_interned_str: int
+        var_head_str: _builtins.str
+        var_head_interned_str: _builtins.int
+        var_tail_str: _builtins.str
+        var_tail_interned_str: _builtins.int
         @_typing.overload
         def __init__(self): ...
         @_typing.overload
-        def __init__(self, *, var_tail_str: str = ...): ...
+        def __init__(self, *, var_tail_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, var_tail_interned_str: int = ...): ...
+        def __init__(self, *, var_tail_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_str: str = ...): ...
+        def __init__(self, *, var_head_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_str: str = ..., var_tail_str: str = ...): ...
+        def __init__(self, *, var_head_str: _builtins.str = ..., var_tail_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_str: str = ..., var_tail_interned_str: int = ...): ...
+        def __init__(self, *, var_head_str: _builtins.str = ..., var_tail_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_interned_str: int = ...): ...
+        def __init__(self, *, var_head_interned_str: _builtins.int = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_interned_str: int = ..., var_tail_str: str = ...): ...
+        def __init__(self, *, var_head_interned_str: _builtins.int = ..., var_tail_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, var_head_interned_str: int = ..., var_tail_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["var_head", "var_head_str", "var_head_interned_str", "var_tail", "var_tail_str", "var_tail_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["var_head", "var_head_str", "var_head_interned_str", "var_tail", "var_tail_str", "var_tail_interned_str"]) -> None: ...
+        def __init__(self, *, var_head_interned_str: _builtins.int = ..., var_tail_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["var_head", "var_head_str", "var_head_interned_str", "var_tail", "var_tail_str", "var_tail_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["var_head", "var_head_str", "var_head_interned_str", "var_tail", "var_tail_str", "var_tail_interned_str"]) -> None: ...
         @_typing.overload
-        def WhichOneof(self, oneof_group: _typing.Literal["var_head"]) -> _typing.Literal[None, "var_head_str", "var_head_interned_str"]: ...
+        def WhichOneof(self, oneof_group: _L["var_head"]) -> _L[None, "var_head_str", "var_head_interned_str"]: ...
         @_typing.overload
-        def WhichOneof(self, oneof_group: _typing.Literal["var_tail"]) -> _typing.Literal[None, "var_tail_str", "var_tail_interned_str"]: ...
+        def WhichOneof(self, oneof_group: _L["var_tail"]) -> _L[None, "var_tail_str", "var_tail_interned_str"]: ...
     
     class OptionalSome(_Message):
-        var_body_str: str
-        var_body_interned_str: int
+        var_body_str: _builtins.str
+        var_body_interned_str: _builtins.int
         @_typing.overload
         def __init__(self): ...
         @_typing.overload
-        def __init__(self, *, var_body_str: str = ...): ...
+        def __init__(self, *, var_body_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, var_body_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["var_body", "var_body_str", "var_body_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["var_body", "var_body_str", "var_body_interned_str"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["var_body"]) -> _typing.Literal[None, "var_body_str", "var_body_interned_str"]: ...
+        def __init__(self, *, var_body_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["var_body", "var_body_str", "var_body_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["var_body", "var_body_str", "var_body_interned_str"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["var_body"]) -> _L[None, "var_body_str", "var_body_interned_str"]: ...
     @property
     def default(self) -> Unit: ...
     @property
     def variant(self) -> CaseAlt.Variant: ...
-    prim_con: _typing.Literal[0, 1, 2]
+    @property
+    def prim_con(self) -> _L[0, 1, 2]: ...
     @property
     def nil(self) -> Unit: ...
     @property
@@ -1207,7 +1217,7 @@ class CaseAlt(_Message):
     @_typing.overload
     def __init__(self, *, variant: CaseAlt.Variant = ..., body: _typing.Optional[Expr] = ...): ...
     @_typing.overload
-    def __init__(self, *, prim_con: _typing.Literal['CON_UNIT', 0, 'CON_FALSE', 1, 'CON_TRUE', 2] = ..., body: _typing.Optional[Expr] = ...): ...
+    def __init__(self, *, prim_con: _L['CON_UNIT', 0, 'CON_FALSE', 1, 'CON_TRUE', 2] = ..., body: _typing.Optional[Expr] = ...): ...
     @_typing.overload
     def __init__(self, *, nil: Unit = ..., body: _typing.Optional[Expr] = ...): ...
     @_typing.overload
@@ -1218,9 +1228,9 @@ class CaseAlt(_Message):
     def __init__(self, *, optional_some: CaseAlt.OptionalSome = ..., body: _typing.Optional[Expr] = ...): ...
     @_typing.overload
     def __init__(self, *, enum: CaseAlt.Enum = ..., body: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum", "body"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum", "body"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum"]: ...
+    def HasField(self, field_name: _L["Sum", "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum", "body"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum", "body"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "default", "variant", "prim_con", "nil", "cons", "optional_none", "optional_some", "enum"]: ...
 
 class Case(_Message):
     @property
@@ -1228,8 +1238,8 @@ class Case(_Message):
     @property
     def alts(self) -> RepeatedCompositeFieldContainer[CaseAlt]: ...
     def __init__(self, *, scrut: _typing.Optional[Expr] = ..., alts: _typing.Optional[_typing.Iterable[CaseAlt]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["scrut", "alts"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["scrut", "alts"]) -> None: ...
+    def HasField(self, field_name: _L["scrut", "alts"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["scrut", "alts"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Block(_Message):
@@ -1238,8 +1248,8 @@ class Block(_Message):
     @property
     def body(self) -> Expr: ...
     def __init__(self, *, bindings: _typing.Optional[_typing.Iterable[Binding]] = ..., body: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["bindings", "body"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["bindings", "body"]) -> None: ...
+    def HasField(self, field_name: _L["bindings", "body"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["bindings", "body"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Pure(_Message):
@@ -1248,8 +1258,8 @@ class Pure(_Message):
     @property
     def expr(self) -> Expr: ...
     def __init__(self, *, type: _typing.Optional[Type] = ..., expr: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["type", "expr"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["type", "expr"]) -> None: ...
+    def HasField(self, field_name: _L["type", "expr"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["type", "expr"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Update(_Message):
@@ -1260,15 +1270,15 @@ class Update(_Message):
         @property
         def expr(self) -> Expr: ...
         def __init__(self, *, template: _typing.Optional[TypeConName] = ..., expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["template", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["template", "expr"]) -> None: ...
+        def HasField(self, field_name: _L["template", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["template", "expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Exercise(_Message):
         @property
         def template(self) -> TypeConName: ...
-        choice_str: str
-        choice_interned_str: int
+        choice_str: _builtins.str
+        choice_interned_str: _builtins.int
         @property
         def cid(self) -> Expr: ...
         @property
@@ -1276,24 +1286,24 @@ class Update(_Message):
         @_typing.overload
         def __init__(self, *, template: _typing.Optional[TypeConName] = ..., cid: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_str: str = ..., cid: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
+        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_str: _builtins.str = ..., cid: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
         @_typing.overload
-        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_interned_str: int = ..., cid: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["template", "choice", "choice_str", "choice_interned_str", "cid", "arg"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["template", "choice", "choice_str", "choice_interned_str", "cid", "arg"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["choice"]) -> _typing.Literal[None, "choice_str", "choice_interned_str"]: ...
+        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_interned_str: _builtins.int = ..., cid: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["template", "choice", "choice_str", "choice_interned_str", "cid", "arg"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["template", "choice", "choice_str", "choice_interned_str", "cid", "arg"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["choice"]) -> _L[None, "choice_str", "choice_interned_str"]: ...
     
     class ExerciseByKey(_Message):
         @property
         def template(self) -> TypeConName: ...
-        choice_interned_str: int
+        choice_interned_str: _builtins.int
         @property
         def key(self) -> Expr: ...
         @property
         def arg(self) -> Expr: ...
-        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_interned_str: _typing.Optional[int] = ..., key: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["template", "choice_interned_str", "key", "arg"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["template", "choice_interned_str", "key", "arg"]) -> None: ...
+        def __init__(self, *, template: _typing.Optional[TypeConName] = ..., choice_interned_str: _typing.Optional[_builtins.int] = ..., key: _typing.Optional[Expr] = ..., arg: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["template", "choice_interned_str", "key", "arg"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["template", "choice_interned_str", "key", "arg"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class Fetch(_Message):
@@ -1302,8 +1312,8 @@ class Update(_Message):
         @property
         def cid(self) -> Expr: ...
         def __init__(self, *, template: _typing.Optional[TypeConName] = ..., cid: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["template", "cid"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["template", "cid"]) -> None: ...
+        def HasField(self, field_name: _L["template", "cid"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["template", "cid"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class EmbedExpr(_Message):
@@ -1312,8 +1322,8 @@ class Update(_Message):
         @property
         def body(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., body: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "body"]) -> None: ...
+        def HasField(self, field_name: _L["type", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class RetrieveByKey(_Message):
@@ -1322,8 +1332,8 @@ class Update(_Message):
         @property
         def key(self) -> Expr: ...
         def __init__(self, *, template: _typing.Optional[TypeConName] = ..., key: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["template", "key"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["template", "key"]) -> None: ...
+        def HasField(self, field_name: _L["template", "key"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["template", "key"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class TryCatch(_Message):
@@ -1331,12 +1341,12 @@ class Update(_Message):
         def return_type(self) -> Type: ...
         @property
         def try_expr(self) -> Expr: ...
-        var_interned_str: int
+        var_interned_str: _builtins.int
         @property
         def catch_expr(self) -> Expr: ...
-        def __init__(self, *, return_type: _typing.Optional[Type] = ..., try_expr: _typing.Optional[Expr] = ..., var_interned_str: _typing.Optional[int] = ..., catch_expr: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["return_type", "try_expr", "var_interned_str", "catch_expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["return_type", "try_expr", "var_interned_str", "catch_expr"]) -> None: ...
+        def __init__(self, *, return_type: _typing.Optional[Type] = ..., try_expr: _typing.Optional[Expr] = ..., var_interned_str: _typing.Optional[_builtins.int] = ..., catch_expr: _typing.Optional[Expr] = ...): ...
+        def HasField(self, field_name: _L["return_type", "try_expr", "var_interned_str", "catch_expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["return_type", "try_expr", "var_interned_str", "catch_expr"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def pure(self) -> Pure: ...
@@ -1384,9 +1394,9 @@ class Update(_Message):
     def __init__(self, *, embed_expr: Update.EmbedExpr = ...): ...
     @_typing.overload
     def __init__(self, *, try_catch: Update.TryCatch = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]: ...
+    def HasField(self, field_name: _L["Sum", "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "pure", "block", "create", "exercise", "exercise_by_key", "fetch", "get_time", "lookup_by_key", "fetch_by_key", "embed_expr", "try_catch"]: ...
 
 class Scenario(_Message):
     
@@ -1398,8 +1408,8 @@ class Scenario(_Message):
         @property
         def ret_type(self) -> Type: ...
         def __init__(self, *, party: _typing.Optional[Expr] = ..., expr: _typing.Optional[Expr] = ..., ret_type: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["party", "expr", "ret_type"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["party", "expr", "ret_type"]) -> None: ...
+        def HasField(self, field_name: _L["party", "expr", "ret_type"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["party", "expr", "ret_type"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class EmbedExpr(_Message):
@@ -1408,8 +1418,8 @@ class Scenario(_Message):
         @property
         def body(self) -> Expr: ...
         def __init__(self, *, type: _typing.Optional[Type] = ..., body: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "body"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "body"]) -> None: ...
+        def HasField(self, field_name: _L["type", "body"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "body"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def pure(self) -> Pure: ...
@@ -1441,14 +1451,14 @@ class Scenario(_Message):
     def __init__(self, *, get_party: Expr = ...): ...
     @_typing.overload
     def __init__(self, *, embed_expr: Scenario.EmbedExpr = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]: ...
+    def HasField(self, field_name: _L["Sum", "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "pure", "block", "commit", "mustFailAt", "pass", "get_time", "get_party", "embed_expr"]: ...
 
 class TemplateChoice(_Message):
-    name_str: str
-    name_interned_str: int
-    consuming: bool
+    name_str: _builtins.str
+    name_interned_str: _builtins.int
+    consuming: _builtins.bool
     @property
     def controllers(self) -> Expr: ...
     @property
@@ -1459,74 +1469,74 @@ class TemplateChoice(_Message):
     def ret_type(self) -> Type: ...
     @property
     def update(self) -> Expr: ...
-    self_binder_str: str
-    self_binder_interned_str: int
+    self_binder_str: _builtins.str
+    self_binder_interned_str: _builtins.int
     @property
     def location(self) -> Location: ...
     @_typing.overload
-    def __init__(self, *, consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: str = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: _builtins.str = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: int = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: _builtins.int = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_str: str = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_str: _builtins.str = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_str: str = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: str = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_str: _builtins.str = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: _builtins.str = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_str: str = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: int = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_str: _builtins.str = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: _builtins.int = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_str: int = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_interned_str: _builtins.int = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_str: int = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: str = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_interned_str: _builtins.int = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_str: _builtins.str = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_str: int = ..., consuming: _typing.Optional[bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: int = ..., location: _typing.Optional[Location] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name", "name_str", "name_interned_str", "consuming", "controllers", "observers", "arg_binder", "ret_type", "update", "self_binder", "self_binder_str", "self_binder_interned_str", "location"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name", "name_str", "name_interned_str", "consuming", "controllers", "observers", "arg_binder", "ret_type", "update", "self_binder", "self_binder_str", "self_binder_interned_str", "location"]) -> None: ...
+    def __init__(self, *, name_interned_str: _builtins.int = ..., consuming: _typing.Optional[_builtins.bool] = ..., controllers: _typing.Optional[Expr] = ..., observers: _typing.Optional[Expr] = ..., arg_binder: _typing.Optional[VarWithType] = ..., ret_type: _typing.Optional[Type] = ..., update: _typing.Optional[Expr] = ..., self_binder_interned_str: _builtins.int = ..., location: _typing.Optional[Location] = ...): ...
+    def HasField(self, field_name: _L["name", "name_str", "name_interned_str", "consuming", "controllers", "observers", "arg_binder", "ret_type", "update", "self_binder", "self_binder_str", "self_binder_interned_str", "location"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name", "name_str", "name_interned_str", "consuming", "controllers", "observers", "arg_binder", "ret_type", "update", "self_binder", "self_binder_str", "self_binder_interned_str", "location"]) -> None: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_str", "name_interned_str"]: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_str", "name_interned_str"]: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["self_binder"]) -> _typing.Literal[None, "self_binder_str", "self_binder_interned_str"]: ...
+    def WhichOneof(self, oneof_group: _L["self_binder"]) -> _L[None, "self_binder_str", "self_binder_interned_str"]: ...
 
 class KeyExpr(_Message):
     
     class Projection(_Message):
         @property
         def tycon(self) -> Type.Con: ...
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @_typing.overload
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: str = ...): ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_str: _builtins.str = ...): ...
         @_typing.overload
-        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: int = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "field", "field_str", "field_interned_str"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., field_interned_str: _builtins.int = ...): ...
+        def HasField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "field", "field_str", "field_interned_str"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class Projections(_Message):
         @property
         def projections(self) -> RepeatedCompositeFieldContainer[KeyExpr.Projection]: ...
         def __init__(self, *, projections: _typing.Optional[_typing.Iterable[KeyExpr.Projection]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["projections"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["projections"]) -> None: ...
+        def HasField(self, field_name: _L["projections"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["projections"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class RecordField(_Message):
-        field_str: str
-        field_interned_str: int
+        field_str: _builtins.str
+        field_interned_str: _builtins.int
         @property
         def expr(self) -> KeyExpr: ...
         @_typing.overload
         def __init__(self, *, expr: _typing.Optional[KeyExpr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_str: str = ..., expr: _typing.Optional[KeyExpr] = ...): ...
+        def __init__(self, *, field_str: _builtins.str = ..., expr: _typing.Optional[KeyExpr] = ...): ...
         @_typing.overload
-        def __init__(self, *, field_interned_str: int = ..., expr: _typing.Optional[KeyExpr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "expr"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["field", "field_str", "field_interned_str", "expr"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["field"]) -> _typing.Literal[None, "field_str", "field_interned_str"]: ...
+        def __init__(self, *, field_interned_str: _builtins.int = ..., expr: _typing.Optional[KeyExpr] = ...): ...
+        def HasField(self, field_name: _L["field", "field_str", "field_interned_str", "expr"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["field", "field_str", "field_interned_str", "expr"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["field"]) -> _L[None, "field_str", "field_interned_str"]: ...
     
     class Record(_Message):
         @property
@@ -1534,8 +1544,8 @@ class KeyExpr(_Message):
         @property
         def fields(self) -> RepeatedCompositeFieldContainer[KeyExpr.RecordField]: ...
         def __init__(self, *, tycon: _typing.Optional[Type.Con] = ..., fields: _typing.Optional[_typing.Iterable[KeyExpr.RecordField]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["tycon", "fields"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["tycon", "fields"]) -> None: ...
+        def HasField(self, field_name: _L["tycon", "fields"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["tycon", "fields"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def projections(self) -> KeyExpr.Projections: ...
@@ -1547,9 +1557,9 @@ class KeyExpr(_Message):
     def __init__(self, *, projections: KeyExpr.Projections = ...): ...
     @_typing.overload
     def __init__(self, *, record: KeyExpr.Record = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "projections", "record"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "projections", "record"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "projections", "record"]: ...
+    def HasField(self, field_name: _L["Sum", "projections", "record"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "projections", "record"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "projections", "record"]: ...
 
 class DefTemplate(_Message):
     
@@ -1568,14 +1578,14 @@ class DefTemplate(_Message):
         def __init__(self, *, type: _typing.Optional[Type] = ..., key: KeyExpr = ..., maintainers: _typing.Optional[Expr] = ...): ...
         @_typing.overload
         def __init__(self, *, type: _typing.Optional[Type] = ..., complex_key: Expr = ..., maintainers: _typing.Optional[Expr] = ...): ...
-        def HasField(self, field_name: _typing.Literal["type", "key_expr", "key", "complex_key", "maintainers"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["type", "key_expr", "key", "complex_key", "maintainers"]) -> None: ...
-        def WhichOneof(self, oneof_group: _typing.Literal["key_expr"]) -> _typing.Literal[None, "key", "complex_key"]: ...
+        def HasField(self, field_name: _L["type", "key_expr", "key", "complex_key", "maintainers"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["type", "key_expr", "key", "complex_key", "maintainers"]) -> None: ...
+        def WhichOneof(self, oneof_group: _L["key_expr"]) -> _L[None, "key", "complex_key"]: ...
     @property
     def tycon_dname(self) -> DottedName: ...
-    tycon_interned_dname: int
-    param_str: str
-    param_interned_str: int
+    tycon_interned_dname: _builtins.int
+    param_str: _builtins.str
+    param_interned_str: _builtins.int
     @property
     def precond(self) -> Expr: ...
     @property
@@ -1593,37 +1603,37 @@ class DefTemplate(_Message):
     @_typing.overload
     def __init__(self, *, precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, param_str: str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, param_str: _builtins.str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, param_interned_str: int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, param_interned_str: _builtins.int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
     def __init__(self, *, tycon_dname: DottedName = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, tycon_dname: DottedName = ..., param_str: str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, tycon_dname: DottedName = ..., param_str: _builtins.str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, tycon_dname: DottedName = ..., param_interned_str: int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, tycon_dname: DottedName = ..., param_interned_str: _builtins.int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, tycon_interned_dname: int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, tycon_interned_dname: _builtins.int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, tycon_interned_dname: int = ..., param_str: str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def __init__(self, *, tycon_interned_dname: _builtins.int = ..., param_str: _builtins.str = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
     @_typing.overload
-    def __init__(self, *, tycon_interned_dname: int = ..., param_interned_str: int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
-    def HasField(self, field_name: _typing.Literal["tycon", "tycon_dname", "tycon_interned_dname", "param", "param_str", "param_interned_str", "precond", "signatories", "agreement", "choices", "observers", "location", "key"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["tycon", "tycon_dname", "tycon_interned_dname", "param", "param_str", "param_interned_str", "precond", "signatories", "agreement", "choices", "observers", "location", "key"]) -> None: ...
+    def __init__(self, *, tycon_interned_dname: _builtins.int = ..., param_interned_str: _builtins.int = ..., precond: _typing.Optional[Expr] = ..., signatories: _typing.Optional[Expr] = ..., agreement: _typing.Optional[Expr] = ..., choices: _typing.Optional[_typing.Iterable[TemplateChoice]] = ..., observers: _typing.Optional[Expr] = ..., location: _typing.Optional[Location] = ..., key: _typing.Optional[DefTemplate.DefKey] = ...): ...
+    def HasField(self, field_name: _L["tycon", "tycon_dname", "tycon_interned_dname", "param", "param_str", "param_interned_str", "precond", "signatories", "agreement", "choices", "observers", "location", "key"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["tycon", "tycon_dname", "tycon_interned_dname", "param", "param_str", "param_interned_str", "precond", "signatories", "agreement", "choices", "observers", "location", "key"]) -> None: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["tycon"]) -> _typing.Literal[None, "tycon_dname", "tycon_interned_dname"]: ...
+    def WhichOneof(self, oneof_group: _L["tycon"]) -> _L[None, "tycon_dname", "tycon_interned_dname"]: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["param"]) -> _typing.Literal[None, "param_str", "param_interned_str"]: ...
+    def WhichOneof(self, oneof_group: _L["param"]) -> _L[None, "param_str", "param_interned_str"]: ...
 
 class DefException(_Message):
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @property
     def location(self) -> Location: ...
     @property
     def message(self) -> Expr: ...
-    def __init__(self, *, name_interned_dname: _typing.Optional[int] = ..., location: _typing.Optional[Location] = ..., message: _typing.Optional[Expr] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name_interned_dname", "location", "message"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name_interned_dname", "location", "message"]) -> None: ...
+    def __init__(self, *, name_interned_dname: _typing.Optional[_builtins.int] = ..., location: _typing.Optional[Location] = ..., message: _typing.Optional[Expr] = ...): ...
+    def HasField(self, field_name: _L["name_interned_dname", "location", "message"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name_interned_dname", "location", "message"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class DefDataType(_Message):
@@ -1632,22 +1642,22 @@ class DefDataType(_Message):
         @property
         def fields(self) -> RepeatedCompositeFieldContainer[FieldWithType]: ...
         def __init__(self, *, fields: _typing.Optional[_typing.Iterable[FieldWithType]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["fields"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["fields"]) -> None: ...
+        def HasField(self, field_name: _L["fields"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["fields"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     
     class EnumConstructors(_Message):
         @property
-        def constructors_str(self) -> RepeatedScalarFieldContainer[str]: ...
+        def constructors_str(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
         @property
-        def constructors_interned_str(self) -> RepeatedScalarFieldContainer[int]: ...
-        def __init__(self, *, constructors_str: _typing.Optional[_typing.Iterable[str]] = ..., constructors_interned_str: _typing.Optional[_typing.Iterable[int]] = ...): ...
-        def HasField(self, field_name: _typing.Literal["constructors_str", "constructors_interned_str"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["constructors_str", "constructors_interned_str"]) -> None: ...
+        def constructors_interned_str(self) -> RepeatedScalarFieldContainer[_builtins.int]: ...
+        def __init__(self, *, constructors_str: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., constructors_interned_str: _typing.Optional[_typing.Iterable[_builtins.int]] = ...): ...
+        def HasField(self, field_name: _L["constructors_str", "constructors_interned_str"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["constructors_str", "constructors_interned_str"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def name_dname(self) -> DottedName: ...
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @property
     def params(self) -> RepeatedCompositeFieldContainer[TypeVarWithKind]: ...
     @property
@@ -1656,44 +1666,44 @@ class DefDataType(_Message):
     def variant(self) -> DefDataType.Fields: ...
     @property
     def enum(self) -> DefDataType.EnumConstructors: ...
-    serializable: bool
+    serializable: _builtins.bool
     @property
     def location(self) -> Location: ...
     @_typing.overload
-    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., record: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., variant: DefDataType.Fields = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "params", "DataCons", "record", "variant", "enum", "serializable", "location"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "params", "DataCons", "record", "variant", "enum", "serializable", "location"]) -> None: ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., enum: DefDataType.EnumConstructors = ..., serializable: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def HasField(self, field_name: _L["name", "name_dname", "name_interned_dname", "params", "DataCons", "record", "variant", "enum", "serializable", "location"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name", "name_dname", "name_interned_dname", "params", "DataCons", "record", "variant", "enum", "serializable", "location"]) -> None: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_dname", "name_interned_dname"]: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_dname", "name_interned_dname"]: ...
     @_typing.overload
-    def WhichOneof(self, oneof_group: _typing.Literal["DataCons"]) -> _typing.Literal[None, "record", "variant", "enum"]: ...
+    def WhichOneof(self, oneof_group: _L["DataCons"]) -> _L[None, "record", "variant", "enum"]: ...
 
 class DefTypeSyn(_Message):
     @property
     def name_dname(self) -> DottedName: ...
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @property
     def params(self) -> RepeatedCompositeFieldContainer[TypeVarWithKind]: ...
     @property
@@ -1705,49 +1715,49 @@ class DefTypeSyn(_Message):
     @_typing.overload
     def __init__(self, *, name_dname: DottedName = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., type: _typing.Optional[Type] = ..., location: _typing.Optional[Location] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., type: _typing.Optional[Type] = ..., location: _typing.Optional[Location] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "params", "type", "location"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "params", "type", "location"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_dname", "name_interned_dname"]: ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., params: _typing.Optional[_typing.Iterable[TypeVarWithKind]] = ..., type: _typing.Optional[Type] = ..., location: _typing.Optional[Location] = ...): ...
+    def HasField(self, field_name: _L["name", "name_dname", "name_interned_dname", "params", "type", "location"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name", "name_dname", "name_interned_dname", "params", "type", "location"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_dname", "name_interned_dname"]: ...
 
 class DefValue(_Message):
     
     class NameWithType(_Message):
         @property
-        def name_dname(self) -> RepeatedScalarFieldContainer[str]: ...
-        name_interned_dname: int
+        def name_dname(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+        name_interned_dname: _builtins.int
         @property
         def type(self) -> Type: ...
-        def __init__(self, *, name_dname: _typing.Optional[_typing.Iterable[str]] = ..., name_interned_dname: _typing.Optional[int] = ..., type: _typing.Optional[Type] = ...): ...
-        def HasField(self, field_name: _typing.Literal["name_dname", "name_interned_dname", "type"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["name_dname", "name_interned_dname", "type"]) -> None: ...
+        def __init__(self, *, name_dname: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., name_interned_dname: _typing.Optional[_builtins.int] = ..., type: _typing.Optional[Type] = ...): ...
+        def HasField(self, field_name: _L["name_dname", "name_interned_dname", "type"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["name_dname", "name_interned_dname", "type"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def name_with_type(self) -> DefValue.NameWithType: ...
     @property
     def expr(self) -> Expr: ...
-    no_party_literals: bool
-    is_test: bool
+    no_party_literals: _builtins.bool
+    is_test: _builtins.bool
     @property
     def location(self) -> Location: ...
-    def __init__(self, *, name_with_type: _typing.Optional[DefValue.NameWithType] = ..., expr: _typing.Optional[Expr] = ..., no_party_literals: _typing.Optional[bool] = ..., is_test: _typing.Optional[bool] = ..., location: _typing.Optional[Location] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name_with_type", "expr", "no_party_literals", "is_test", "location"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name_with_type", "expr", "no_party_literals", "is_test", "location"]) -> None: ...
+    def __init__(self, *, name_with_type: _typing.Optional[DefValue.NameWithType] = ..., expr: _typing.Optional[Expr] = ..., no_party_literals: _typing.Optional[_builtins.bool] = ..., is_test: _typing.Optional[_builtins.bool] = ..., location: _typing.Optional[Location] = ...): ...
+    def HasField(self, field_name: _L["name_with_type", "expr", "no_party_literals", "is_test", "location"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name_with_type", "expr", "no_party_literals", "is_test", "location"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class FeatureFlags(_Message):
-    forbidPartyLiterals: bool
-    dontDivulgeContractIdsInCreateArguments: bool
-    dontDiscloseNonConsumingChoicesToObservers: bool
-    def __init__(self, *, forbidPartyLiterals: _typing.Optional[bool] = ..., dontDivulgeContractIdsInCreateArguments: _typing.Optional[bool] = ..., dontDiscloseNonConsumingChoicesToObservers: _typing.Optional[bool] = ...): ...
-    def HasField(self, field_name: _typing.Literal["forbidPartyLiterals", "dontDivulgeContractIdsInCreateArguments", "dontDiscloseNonConsumingChoicesToObservers"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["forbidPartyLiterals", "dontDivulgeContractIdsInCreateArguments", "dontDiscloseNonConsumingChoicesToObservers"]) -> None: ...
+    forbidPartyLiterals: _builtins.bool
+    dontDivulgeContractIdsInCreateArguments: _builtins.bool
+    dontDiscloseNonConsumingChoicesToObservers: _builtins.bool
+    def __init__(self, *, forbidPartyLiterals: _typing.Optional[_builtins.bool] = ..., dontDivulgeContractIdsInCreateArguments: _typing.Optional[_builtins.bool] = ..., dontDiscloseNonConsumingChoicesToObservers: _typing.Optional[_builtins.bool] = ...): ...
+    def HasField(self, field_name: _L["forbidPartyLiterals", "dontDivulgeContractIdsInCreateArguments", "dontDiscloseNonConsumingChoicesToObservers"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["forbidPartyLiterals", "dontDivulgeContractIdsInCreateArguments", "dontDiscloseNonConsumingChoicesToObservers"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Module(_Message):
     @property
     def name_dname(self) -> DottedName: ...
-    name_interned_dname: int
+    name_interned_dname: _builtins.int
     @property
     def flags(self) -> FeatureFlags: ...
     @property
@@ -1765,39 +1775,39 @@ class Module(_Message):
     @_typing.overload
     def __init__(self, *, name_dname: DottedName = ..., flags: _typing.Optional[FeatureFlags] = ..., synonyms: _typing.Optional[_typing.Iterable[DefTypeSyn]] = ..., data_types: _typing.Optional[_typing.Iterable[DefDataType]] = ..., values: _typing.Optional[_typing.Iterable[DefValue]] = ..., templates: _typing.Optional[_typing.Iterable[DefTemplate]] = ..., exceptions: _typing.Optional[_typing.Iterable[DefException]] = ...): ...
     @_typing.overload
-    def __init__(self, *, name_interned_dname: int = ..., flags: _typing.Optional[FeatureFlags] = ..., synonyms: _typing.Optional[_typing.Iterable[DefTypeSyn]] = ..., data_types: _typing.Optional[_typing.Iterable[DefDataType]] = ..., values: _typing.Optional[_typing.Iterable[DefValue]] = ..., templates: _typing.Optional[_typing.Iterable[DefTemplate]] = ..., exceptions: _typing.Optional[_typing.Iterable[DefException]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "flags", "synonyms", "data_types", "values", "templates", "exceptions"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name", "name_dname", "name_interned_dname", "flags", "synonyms", "data_types", "values", "templates", "exceptions"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["name"]) -> _typing.Literal[None, "name_dname", "name_interned_dname"]: ...
+    def __init__(self, *, name_interned_dname: _builtins.int = ..., flags: _typing.Optional[FeatureFlags] = ..., synonyms: _typing.Optional[_typing.Iterable[DefTypeSyn]] = ..., data_types: _typing.Optional[_typing.Iterable[DefDataType]] = ..., values: _typing.Optional[_typing.Iterable[DefValue]] = ..., templates: _typing.Optional[_typing.Iterable[DefTemplate]] = ..., exceptions: _typing.Optional[_typing.Iterable[DefException]] = ...): ...
+    def HasField(self, field_name: _L["name", "name_dname", "name_interned_dname", "flags", "synonyms", "data_types", "values", "templates", "exceptions"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name", "name_dname", "name_interned_dname", "flags", "synonyms", "data_types", "values", "templates", "exceptions"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["name"]) -> _L[None, "name_dname", "name_interned_dname"]: ...
 
 class InternedDottedName(_Message):
     @property
-    def segments_interned_str(self) -> RepeatedScalarFieldContainer[int]: ...
-    def __init__(self, *, segments_interned_str: _typing.Optional[_typing.Iterable[int]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["segments_interned_str"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["segments_interned_str"]) -> None: ...
+    def segments_interned_str(self) -> RepeatedScalarFieldContainer[_builtins.int]: ...
+    def __init__(self, *, segments_interned_str: _typing.Optional[_typing.Iterable[_builtins.int]] = ...): ...
+    def HasField(self, field_name: _L["segments_interned_str"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["segments_interned_str"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class PackageMetadata(_Message):
-    name_interned_str: int
-    version_interned_str: int
-    def __init__(self, *, name_interned_str: _typing.Optional[int] = ..., version_interned_str: _typing.Optional[int] = ...): ...
-    def HasField(self, field_name: _typing.Literal["name_interned_str", "version_interned_str"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["name_interned_str", "version_interned_str"]) -> None: ...
+    name_interned_str: _builtins.int
+    version_interned_str: _builtins.int
+    def __init__(self, *, name_interned_str: _typing.Optional[_builtins.int] = ..., version_interned_str: _typing.Optional[_builtins.int] = ...): ...
+    def HasField(self, field_name: _L["name_interned_str", "version_interned_str"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["name_interned_str", "version_interned_str"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Package(_Message):
     @property
     def modules(self) -> RepeatedCompositeFieldContainer[Module]: ...
     @property
-    def interned_strings(self) -> RepeatedScalarFieldContainer[str]: ...
+    def interned_strings(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def interned_dotted_names(self) -> RepeatedCompositeFieldContainer[InternedDottedName]: ...
     @property
     def metadata(self) -> PackageMetadata: ...
     @property
     def interned_types(self) -> RepeatedCompositeFieldContainer[Type]: ...
-    def __init__(self, *, modules: _typing.Optional[_typing.Iterable[Module]] = ..., interned_strings: _typing.Optional[_typing.Iterable[str]] = ..., interned_dotted_names: _typing.Optional[_typing.Iterable[InternedDottedName]] = ..., metadata: _typing.Optional[PackageMetadata] = ..., interned_types: _typing.Optional[_typing.Iterable[Type]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["modules", "interned_strings", "interned_dotted_names", "metadata", "interned_types"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["modules", "interned_strings", "interned_dotted_names", "metadata", "interned_types"]) -> None: ...
+    def __init__(self, *, modules: _typing.Optional[_typing.Iterable[Module]] = ..., interned_strings: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., interned_dotted_names: _typing.Optional[_typing.Iterable[InternedDottedName]] = ..., metadata: _typing.Optional[PackageMetadata] = ..., interned_types: _typing.Optional[_typing.Iterable[Type]] = ...): ...
+    def HasField(self, field_name: _L["modules", "interned_strings", "interned_dotted_names", "metadata", "interned_types"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["modules", "interned_strings", "interned_dotted_names", "metadata", "interned_types"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_pb2.pyi b/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_pb2.pyi
index b01837c9..38aabdca 100644
--- a/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_pb2.pyi
+++ b/python/dazl/_gen/com/daml/daml_lf_1_14/daml_lf_pb2.pyi
@@ -3,13 +3,18 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.descriptor import EnumDescriptor
 from google.protobuf.message import Message as _Message
 
 from .daml_lf_1_pb2 import Package
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "ArchivePayload",
     "Archive",
@@ -17,27 +22,28 @@ __all__ = [
 
 class HashFunction:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    SHA256: _typing.ClassVar[_typing.Literal[0]] = ...
-SHA256 = _typing.Literal[0]
+    SHA256: _typing.ClassVar[_L[0]] = ...
+SHA256 = _L[0]
 
 
 class ArchivePayload(_Message):
-    minor: str
+    minor: _builtins.str
     @property
     def daml_lf_1(self) -> Package: ...
     @_typing.overload
-    def __init__(self, *, minor: _typing.Optional[str] = ...): ...
+    def __init__(self, *, minor: _typing.Optional[_builtins.str] = ...): ...
     @_typing.overload
-    def __init__(self, *, minor: _typing.Optional[str] = ..., daml_lf_1: Package = ...): ...
-    def HasField(self, field_name: _typing.Literal["minor", "Sum", "daml_lf_1"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["minor", "Sum", "daml_lf_1"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "daml_lf_1"]: ...
+    def __init__(self, *, minor: _typing.Optional[_builtins.str] = ..., daml_lf_1: Package = ...): ...
+    def HasField(self, field_name: _L["minor", "Sum", "daml_lf_1"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["minor", "Sum", "daml_lf_1"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "daml_lf_1"]: ...
 
 class Archive(_Message):
-    hash_function: _typing.Literal[0]
-    payload: bytes
-    hash: str
-    def __init__(self, *, hash_function: _typing.Optional[_typing.Literal['SHA256', 0]] = ..., payload: _typing.Optional[bytes] = ..., hash: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["hash_function", "payload", "hash"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["hash_function", "payload", "hash"]) -> None: ...
+    @property
+    def hash_function(self) -> _L[0]: ...
+    payload: _builtins.bytes
+    hash: _builtins.str
+    def __init__(self, *, hash_function: _typing.Optional[_L['SHA256', 0]] = ..., payload: _typing.Optional[_builtins.bytes] = ..., hash: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["hash_function", "payload", "hash"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["hash_function", "payload", "hash"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/__init__.py b/python/dazl/_gen/com/daml/ledger/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/com/daml/ledger/__init__.py
+++ b/python/dazl/_gen/com/daml/ledger/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/daml/ledger/api/__init__.py b/python/dazl/_gen/com/daml/ledger/api/__init__.py
index b0b19bf0..4d6fd878 100644
--- a/python/dazl/_gen/com/daml/ledger/api/__init__.py
+++ b/python/dazl/_gen/com/daml/ledger/api/__init__.py
@@ -4,5 +4,4 @@
 # isort: skip_file
 
 
-__all__ = [
-]
+__all__ = []  # type: ignore
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2.pyi
index 4d6c31ab..7555574d 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
 from google.protobuf.message import Message as _Message
@@ -12,6 +12,11 @@ from .event_pb2 import CreatedEvent
 from .trace_context_pb2 import TraceContext
 from .transaction_filter_pb2 import TransactionFilter
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetActiveContractsRequest",
     "GetActiveContractsResponse",
@@ -19,25 +24,25 @@ __all__ = [
 
 
 class GetActiveContractsRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def filter(self) -> TransactionFilter: ...
-    verbose: bool
+    verbose: _builtins.bool
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., filter: _typing.Optional[TransactionFilter] = ..., verbose: _typing.Optional[bool] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "filter", "verbose", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "filter", "verbose", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., filter: _typing.Optional[TransactionFilter] = ..., verbose: _typing.Optional[_builtins.bool] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "filter", "verbose", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "filter", "verbose", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetActiveContractsResponse(_Message):
-    offset: str
-    workflow_id: str
+    offset: _builtins.str
+    workflow_id: _builtins.str
     @property
     def active_contracts(self) -> RepeatedCompositeFieldContainer[CreatedEvent]: ...
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, offset: _typing.Optional[str] = ..., workflow_id: _typing.Optional[str] = ..., active_contracts: _typing.Optional[_typing.Iterable[CreatedEvent]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["offset", "workflow_id", "active_contracts", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["offset", "workflow_id", "active_contracts", "trace_context"]) -> None: ...
+    def __init__(self, *, offset: _typing.Optional[_builtins.str] = ..., workflow_id: _typing.Optional[_builtins.str] = ..., active_contracts: _typing.Optional[_typing.Iterable[CreatedEvent]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["offset", "workflow_id", "active_contracts", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["offset", "workflow_id", "active_contracts", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2_grpc.pyi
index fa90c9de..20deee25 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/active_contracts_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,24 +17,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class ActiveContractsServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _ActiveContractsServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _ActiveContractsServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _ActiveContractsServiceAsyncStub: ...
-    def GetActiveContracts(self, __1: GetActiveContractsRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetActiveContractsResponse], _AsyncStream[GetActiveContractsResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _ActiveContractsServiceAsyncStub: ...  # type: ignore
+    def GetActiveContracts(self, __1: GetActiveContractsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetActiveContractsResponse], _grpc_aio.UnaryStreamCall[_typing.Any, GetActiveContractsResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ActiveContractsServiceBlockingStub(ActiveContractsServiceStub):
@@ -42,4 +33,4 @@ class _ActiveContractsServiceBlockingStub(ActiveContractsServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ActiveContractsServiceAsyncStub(ActiveContractsServiceStub):
-    def GetActiveContracts(self, __1: GetActiveContractsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[GetActiveContractsResponse]: ...
+    def GetActiveContracts(self, __1: GetActiveContractsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, GetActiveContractsResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2.pyi
index 277d03d7..9ad9c452 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2.pyi
@@ -3,12 +3,17 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.duration_pb2 import Duration
 from google.protobuf.message import Message as _Message
 from google.protobuf.timestamp_pb2 import Timestamp
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetTimeModelRequest",
     "GetTimeModelResponse",
@@ -25,31 +30,31 @@ class GetTimeModelRequest(_Message):
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTimeModelResponse(_Message):
-    configuration_generation: int
+    configuration_generation: _builtins.int
     @property
     def time_model(self) -> TimeModel: ...
-    def __init__(self, *, configuration_generation: _typing.Optional[int] = ..., time_model: _typing.Optional[TimeModel] = ...): ...
-    def HasField(self, field_name: _typing.Literal["configuration_generation", "time_model"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["configuration_generation", "time_model"]) -> None: ...
+    def __init__(self, *, configuration_generation: _typing.Optional[_builtins.int] = ..., time_model: _typing.Optional[TimeModel] = ...): ...
+    def HasField(self, field_name: _L["configuration_generation", "time_model"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["configuration_generation", "time_model"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SetTimeModelRequest(_Message):
-    submission_id: str
+    submission_id: _builtins.str
     @property
     def maximum_record_time(self) -> Timestamp: ...
-    configuration_generation: int
+    configuration_generation: _builtins.int
     @property
     def new_time_model(self) -> TimeModel: ...
-    def __init__(self, *, submission_id: _typing.Optional[str] = ..., maximum_record_time: _typing.Optional[Timestamp] = ..., configuration_generation: _typing.Optional[int] = ..., new_time_model: _typing.Optional[TimeModel] = ...): ...
-    def HasField(self, field_name: _typing.Literal["submission_id", "maximum_record_time", "configuration_generation", "new_time_model"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["submission_id", "maximum_record_time", "configuration_generation", "new_time_model"]) -> None: ...
+    def __init__(self, *, submission_id: _typing.Optional[_builtins.str] = ..., maximum_record_time: _typing.Optional[Timestamp] = ..., configuration_generation: _typing.Optional[_builtins.int] = ..., new_time_model: _typing.Optional[TimeModel] = ...): ...
+    def HasField(self, field_name: _L["submission_id", "maximum_record_time", "configuration_generation", "new_time_model"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["submission_id", "maximum_record_time", "configuration_generation", "new_time_model"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SetTimeModelResponse(_Message):
-    configuration_generation: int
-    def __init__(self, *, configuration_generation: _typing.Optional[int] = ...): ...
-    def HasField(self, field_name: _typing.Literal["configuration_generation"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["configuration_generation"]) -> None: ...
+    configuration_generation: _builtins.int
+    def __init__(self, *, configuration_generation: _typing.Optional[_builtins.int] = ...): ...
+    def HasField(self, field_name: _L["configuration_generation"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["configuration_generation"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class TimeModel(_Message):
@@ -60,6 +65,6 @@ class TimeModel(_Message):
     @property
     def max_skew(self) -> Duration: ...
     def __init__(self, *, avg_transaction_latency: _typing.Optional[Duration] = ..., min_skew: _typing.Optional[Duration] = ..., max_skew: _typing.Optional[Duration] = ...): ...
-    def HasField(self, field_name: _typing.Literal["avg_transaction_latency", "min_skew", "max_skew"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["avg_transaction_latency", "min_skew", "max_skew"]) -> None: ...
+    def HasField(self, field_name: _L["avg_transaction_latency", "min_skew", "max_skew"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["avg_transaction_latency", "min_skew", "max_skew"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2_grpc.pyi
index 892206e0..9d3d6b43 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/config_management_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,25 +17,16 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class ConfigManagementServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _ConfigManagementServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _ConfigManagementServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _ConfigManagementServiceAsyncStub: ...
-    def GetTimeModel(self, __1: GetTimeModelRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTimeModelResponse, _Async[GetTimeModelResponse]]: ...
-    def SetTimeModel(self, __1: SetTimeModelRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SetTimeModelResponse, _Async[SetTimeModelResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _ConfigManagementServiceAsyncStub: ...  # type: ignore
+    def GetTimeModel(self, __1: GetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTimeModelResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetTimeModelResponse]]: ...
+    def SetTimeModel(self, __1: SetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SetTimeModelResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, SetTimeModelResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ConfigManagementServiceBlockingStub(ConfigManagementServiceStub):
@@ -44,5 +35,5 @@ class _ConfigManagementServiceBlockingStub(ConfigManagementServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ConfigManagementServiceAsyncStub(ConfigManagementServiceStub):
-    def GetTimeModel(self, __1: GetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetTimeModelResponse]: ...
-    def SetTimeModel(self, __1: SetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[SetTimeModelResponse]: ...
+    def GetTimeModel(self, __1: GetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetTimeModelResponse]: ...
+    def SetTimeModel(self, __1: SetTimeModelRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, SetTimeModelResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2.pyi
index 3808f170..4f3eab64 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2.pyi
@@ -3,12 +3,17 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
 from google.protobuf.message import Message as _Message
 from google.protobuf.timestamp_pb2 import Timestamp
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "ListKnownPackagesRequest",
     "ListKnownPackagesResponse",
@@ -28,27 +33,27 @@ class ListKnownPackagesResponse(_Message):
     @property
     def package_details(self) -> RepeatedCompositeFieldContainer[PackageDetails]: ...
     def __init__(self, *, package_details: _typing.Optional[_typing.Iterable[PackageDetails]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_details"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_details"]) -> None: ...
+    def HasField(self, field_name: _L["package_details"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_details"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class PackageDetails(_Message):
-    package_id: str
-    package_size: int
+    package_id: _builtins.str
+    package_size: _builtins.int
     @property
     def known_since(self) -> Timestamp: ...
-    source_description: str
-    def __init__(self, *, package_id: _typing.Optional[str] = ..., package_size: _typing.Optional[int] = ..., known_since: _typing.Optional[Timestamp] = ..., source_description: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_id", "package_size", "known_since", "source_description"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_id", "package_size", "known_since", "source_description"]) -> None: ...
+    source_description: _builtins.str
+    def __init__(self, *, package_id: _typing.Optional[_builtins.str] = ..., package_size: _typing.Optional[_builtins.int] = ..., known_since: _typing.Optional[Timestamp] = ..., source_description: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["package_id", "package_size", "known_since", "source_description"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_id", "package_size", "known_since", "source_description"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class UploadDarFileRequest(_Message):
-    dar_file: bytes
-    submission_id: str
-    def __init__(self, *, dar_file: _typing.Optional[bytes] = ..., submission_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["dar_file", "submission_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["dar_file", "submission_id"]) -> None: ...
+    dar_file: _builtins.bytes
+    submission_id: _builtins.str
+    def __init__(self, *, dar_file: _typing.Optional[_builtins.bytes] = ..., submission_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["dar_file", "submission_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["dar_file", "submission_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class UploadDarFileResponse(_Message):
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2_grpc.pyi
index 2fec0ad3..19457aaf 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/package_management_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,25 +17,16 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class PackageManagementServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _PackageManagementServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _PackageManagementServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _PackageManagementServiceAsyncStub: ...
-    def ListKnownPackages(self, __1: ListKnownPackagesRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListKnownPackagesResponse, _Async[ListKnownPackagesResponse]]: ...
-    def UploadDarFile(self, __1: UploadDarFileRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[UploadDarFileResponse, _Async[UploadDarFileResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _PackageManagementServiceAsyncStub: ...  # type: ignore
+    def ListKnownPackages(self, __1: ListKnownPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListKnownPackagesResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, ListKnownPackagesResponse]]: ...
+    def UploadDarFile(self, __1: UploadDarFileRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[UploadDarFileResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, UploadDarFileResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PackageManagementServiceBlockingStub(PackageManagementServiceStub):
@@ -44,5 +35,5 @@ class _PackageManagementServiceBlockingStub(PackageManagementServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PackageManagementServiceAsyncStub(PackageManagementServiceStub):
-    def ListKnownPackages(self, __1: ListKnownPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[ListKnownPackagesResponse]: ...
-    def UploadDarFile(self, __1: UploadDarFileRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[UploadDarFileResponse]: ...
+    def ListKnownPackages(self, __1: ListKnownPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, ListKnownPackagesResponse]: ...
+    def UploadDarFile(self, __1: UploadDarFileRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, UploadDarFileResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2.pyi
index d191c3ff..0a5f2f48 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2.pyi
@@ -3,10 +3,15 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "PruneRequest",
     "PruneResponse",
@@ -14,11 +19,11 @@ __all__ = [
 
 
 class PruneRequest(_Message):
-    prune_up_to: str
-    submission_id: str
-    def __init__(self, *, prune_up_to: _typing.Optional[str] = ..., submission_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["prune_up_to", "submission_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["prune_up_to", "submission_id"]) -> None: ...
+    prune_up_to: _builtins.str
+    submission_id: _builtins.str
+    def __init__(self, *, prune_up_to: _typing.Optional[_builtins.str] = ..., submission_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["prune_up_to", "submission_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["prune_up_to", "submission_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class PruneResponse(_Message):
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2_grpc.pyi
index e63c19cf..a4cbcd41 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/participant_pruning_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,24 +17,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class ParticipantPruningServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _ParticipantPruningServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _ParticipantPruningServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _ParticipantPruningServiceAsyncStub: ...
-    def Prune(self, __1: PruneRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[PruneResponse, _Async[PruneResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _ParticipantPruningServiceAsyncStub: ...  # type: ignore
+    def Prune(self, __1: PruneRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[PruneResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, PruneResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ParticipantPruningServiceBlockingStub(ParticipantPruningServiceStub):
@@ -42,4 +33,4 @@ class _ParticipantPruningServiceBlockingStub(ParticipantPruningServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ParticipantPruningServiceAsyncStub(ParticipantPruningServiceStub):
-    def Prune(self, __1: PruneRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[PruneResponse]: ...
+    def Prune(self, __1: PruneRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, PruneResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2.pyi
index 5e85fb71..1c4f81c1 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2.pyi
@@ -3,11 +3,16 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetParticipantIdRequest",
     "GetParticipantIdResponse",
@@ -28,26 +33,26 @@ class GetParticipantIdRequest(_Message):
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetParticipantIdResponse(_Message):
-    participant_id: str
-    def __init__(self, *, participant_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["participant_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["participant_id"]) -> None: ...
+    participant_id: _builtins.str
+    def __init__(self, *, participant_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["participant_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["participant_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPartiesRequest(_Message):
     @property
-    def parties(self) -> RepeatedScalarFieldContainer[str]: ...
-    def __init__(self, *, parties: _typing.Optional[_typing.Iterable[str]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["parties"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["parties"]) -> None: ...
+    def parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    def __init__(self, *, parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ...): ...
+    def HasField(self, field_name: _L["parties"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["parties"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPartiesResponse(_Message):
     @property
     def party_details(self) -> RepeatedCompositeFieldContainer[PartyDetails]: ...
     def __init__(self, *, party_details: _typing.Optional[_typing.Iterable[PartyDetails]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["party_details"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["party_details"]) -> None: ...
+    def HasField(self, field_name: _L["party_details"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["party_details"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ListKnownPartiesRequest(_Message):
@@ -60,31 +65,31 @@ class ListKnownPartiesResponse(_Message):
     @property
     def party_details(self) -> RepeatedCompositeFieldContainer[PartyDetails]: ...
     def __init__(self, *, party_details: _typing.Optional[_typing.Iterable[PartyDetails]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["party_details"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["party_details"]) -> None: ...
+    def HasField(self, field_name: _L["party_details"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["party_details"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class AllocatePartyRequest(_Message):
-    party_id_hint: str
-    display_name: str
-    def __init__(self, *, party_id_hint: _typing.Optional[str] = ..., display_name: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["party_id_hint", "display_name"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["party_id_hint", "display_name"]) -> None: ...
+    party_id_hint: _builtins.str
+    display_name: _builtins.str
+    def __init__(self, *, party_id_hint: _typing.Optional[_builtins.str] = ..., display_name: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["party_id_hint", "display_name"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["party_id_hint", "display_name"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class AllocatePartyResponse(_Message):
     @property
     def party_details(self) -> PartyDetails: ...
     def __init__(self, *, party_details: _typing.Optional[PartyDetails] = ...): ...
-    def HasField(self, field_name: _typing.Literal["party_details"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["party_details"]) -> None: ...
+    def HasField(self, field_name: _L["party_details"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["party_details"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class PartyDetails(_Message):
-    party: str
-    display_name: str
-    is_local: bool
-    def __init__(self, *, party: _typing.Optional[str] = ..., display_name: _typing.Optional[str] = ..., is_local: _typing.Optional[bool] = ...): ...
-    def HasField(self, field_name: _typing.Literal["party", "display_name", "is_local"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["party", "display_name", "is_local"]) -> None: ...
+    party: _builtins.str
+    display_name: _builtins.str
+    is_local: _builtins.bool
+    def __init__(self, *, party: _typing.Optional[_builtins.str] = ..., display_name: _typing.Optional[_builtins.str] = ..., is_local: _typing.Optional[_builtins.bool] = ...): ...
+    def HasField(self, field_name: _L["party", "display_name", "is_local"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["party", "display_name", "is_local"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2_grpc.pyi
index f8a32c11..6106db04 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/admin/party_management_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,27 +17,18 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class PartyManagementServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _PartyManagementServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _PartyManagementServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _PartyManagementServiceAsyncStub: ...
-    def GetParticipantId(self, __1: GetParticipantIdRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetParticipantIdResponse, _Async[GetParticipantIdResponse]]: ...
-    def GetParties(self, __1: GetPartiesRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPartiesResponse, _Async[GetPartiesResponse]]: ...
-    def ListKnownParties(self, __1: ListKnownPartiesRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListKnownPartiesResponse, _Async[ListKnownPartiesResponse]]: ...
-    def AllocateParty(self, __1: AllocatePartyRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AllocatePartyResponse, _Async[AllocatePartyResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _PartyManagementServiceAsyncStub: ...  # type: ignore
+    def GetParticipantId(self, __1: GetParticipantIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetParticipantIdResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetParticipantIdResponse]]: ...
+    def GetParties(self, __1: GetPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPartiesResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetPartiesResponse]]: ...
+    def ListKnownParties(self, __1: ListKnownPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListKnownPartiesResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, ListKnownPartiesResponse]]: ...
+    def AllocateParty(self, __1: AllocatePartyRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AllocatePartyResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, AllocatePartyResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PartyManagementServiceBlockingStub(PartyManagementServiceStub):
@@ -48,7 +39,7 @@ class _PartyManagementServiceBlockingStub(PartyManagementServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PartyManagementServiceAsyncStub(PartyManagementServiceStub):
-    def GetParticipantId(self, __1: GetParticipantIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetParticipantIdResponse]: ...
-    def GetParties(self, __1: GetPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetPartiesResponse]: ...
-    def ListKnownParties(self, __1: ListKnownPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[ListKnownPartiesResponse]: ...
-    def AllocateParty(self, __1: AllocatePartyRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[AllocatePartyResponse]: ...
+    def GetParticipantId(self, __1: GetParticipantIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetParticipantIdResponse]: ...
+    def GetParties(self, __1: GetPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetPartiesResponse]: ...
+    def ListKnownParties(self, __1: ListKnownPartiesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, ListKnownPartiesResponse]: ...
+    def AllocateParty(self, __1: AllocatePartyRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AllocatePartyResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2.pyi
index 3a194f89..f6ce9808 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
@@ -13,6 +13,11 @@ from .completion_pb2 import Completion
 from .ledger_offset_pb2 import LedgerOffset
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "CompletionStreamRequest",
     "CompletionStreamResponse",
@@ -23,15 +28,15 @@ __all__ = [
 
 
 class CompletionStreamRequest(_Message):
-    ledger_id: str
-    application_id: str
+    ledger_id: _builtins.str
+    application_id: _builtins.str
     @property
-    def parties(self) -> RepeatedScalarFieldContainer[str]: ...
+    def parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def offset(self) -> LedgerOffset: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., application_id: _typing.Optional[str] = ..., parties: _typing.Optional[_typing.Iterable[str]] = ..., offset: _typing.Optional[LedgerOffset] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "application_id", "parties", "offset"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "application_id", "parties", "offset"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., application_id: _typing.Optional[_builtins.str] = ..., parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., offset: _typing.Optional[LedgerOffset] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "application_id", "parties", "offset"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "application_id", "parties", "offset"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class CompletionStreamResponse(_Message):
@@ -40,8 +45,8 @@ class CompletionStreamResponse(_Message):
     @property
     def completions(self) -> RepeatedCompositeFieldContainer[Completion]: ...
     def __init__(self, *, checkpoint: _typing.Optional[Checkpoint] = ..., completions: _typing.Optional[_typing.Iterable[Completion]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["checkpoint", "completions"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["checkpoint", "completions"]) -> None: ...
+    def HasField(self, field_name: _L["checkpoint", "completions"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["checkpoint", "completions"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Checkpoint(_Message):
@@ -50,23 +55,23 @@ class Checkpoint(_Message):
     @property
     def offset(self) -> LedgerOffset: ...
     def __init__(self, *, record_time: _typing.Optional[Timestamp] = ..., offset: _typing.Optional[LedgerOffset] = ...): ...
-    def HasField(self, field_name: _typing.Literal["record_time", "offset"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["record_time", "offset"]) -> None: ...
+    def HasField(self, field_name: _L["record_time", "offset"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["record_time", "offset"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class CompletionEndRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class CompletionEndResponse(_Message):
     @property
     def offset(self) -> LedgerOffset: ...
     def __init__(self, *, offset: _typing.Optional[LedgerOffset] = ...): ...
-    def HasField(self, field_name: _typing.Literal["offset"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["offset"]) -> None: ...
+    def HasField(self, field_name: _L["offset"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["offset"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2_grpc.pyi
index c1462f4f..15f3312a 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_completion_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,25 +17,16 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class CommandCompletionServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _CommandCompletionServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _CommandCompletionServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandCompletionServiceAsyncStub: ...
-    def CompletionStream(self, __1: CompletionStreamRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[CompletionStreamResponse], _AsyncStream[CompletionStreamResponse]]: ...
-    def CompletionEnd(self, __1: CompletionEndRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[CompletionEndResponse, _Async[CompletionEndResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandCompletionServiceAsyncStub: ...  # type: ignore
+    def CompletionStream(self, __1: CompletionStreamRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[CompletionStreamResponse], _grpc_aio.UnaryStreamCall[_typing.Any, CompletionStreamResponse]]: ...
+    def CompletionEnd(self, __1: CompletionEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[CompletionEndResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, CompletionEndResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandCompletionServiceBlockingStub(CommandCompletionServiceStub):
@@ -44,5 +35,5 @@ class _CommandCompletionServiceBlockingStub(CommandCompletionServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandCompletionServiceAsyncStub(CommandCompletionServiceStub):
-    def CompletionStream(self, __1: CompletionStreamRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[CompletionStreamResponse]: ...
-    def CompletionEnd(self, __1: CompletionEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[CompletionEndResponse]: ...
+    def CompletionStream(self, __1: CompletionStreamRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, CompletionStreamResponse]: ...
+    def CompletionEnd(self, __1: CompletionEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, CompletionEndResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2.pyi
index 9e96ab3d..4bcc6978 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
@@ -11,6 +11,11 @@ from .commands_pb2 import Commands
 from .trace_context_pb2 import TraceContext
 from .transaction_pb2 import Transaction, TransactionTree
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "SubmitAndWaitRequest",
     "SubmitAndWaitForTransactionIdResponse",
@@ -25,29 +30,29 @@ class SubmitAndWaitRequest(_Message):
     @property
     def trace_context(self) -> TraceContext: ...
     def __init__(self, *, commands: _typing.Optional[Commands] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["commands", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["commands", "trace_context"]) -> None: ...
+    def HasField(self, field_name: _L["commands", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["commands", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SubmitAndWaitForTransactionIdResponse(_Message):
-    transaction_id: str
-    def __init__(self, *, transaction_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction_id"]) -> None: ...
+    transaction_id: _builtins.str
+    def __init__(self, *, transaction_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["transaction_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SubmitAndWaitForTransactionResponse(_Message):
     @property
     def transaction(self) -> Transaction: ...
     def __init__(self, *, transaction: _typing.Optional[Transaction] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction"]) -> None: ...
+    def HasField(self, field_name: _L["transaction"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SubmitAndWaitForTransactionTreeResponse(_Message):
     @property
     def transaction(self) -> TransactionTree: ...
     def __init__(self, *, transaction: _typing.Optional[TransactionTree] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction"]) -> None: ...
+    def HasField(self, field_name: _L["transaction"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2_grpc.pyi
index 1d2de11f..8f5868d2 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from google.protobuf.empty_pb2 import Empty
@@ -18,27 +18,18 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class CommandServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _CommandServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _CommandServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandServiceAsyncStub: ...
-    def SubmitAndWait(self, __1: SubmitAndWaitRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _Async[Empty]]: ...
-    def SubmitAndWaitForTransactionId(self, __1: SubmitAndWaitRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionIdResponse, _Async[SubmitAndWaitForTransactionIdResponse]]: ...
-    def SubmitAndWaitForTransaction(self, __1: SubmitAndWaitRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionResponse, _Async[SubmitAndWaitForTransactionResponse]]: ...
-    def SubmitAndWaitForTransactionTree(self, __1: SubmitAndWaitRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionTreeResponse, _Async[SubmitAndWaitForTransactionTreeResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandServiceAsyncStub: ...  # type: ignore
+    def SubmitAndWait(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]]: ...
+    def SubmitAndWaitForTransactionId(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionIdResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionIdResponse]]: ...
+    def SubmitAndWaitForTransaction(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionResponse]]: ...
+    def SubmitAndWaitForTransactionTree(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[SubmitAndWaitForTransactionTreeResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionTreeResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandServiceBlockingStub(CommandServiceStub):
@@ -49,7 +40,7 @@ class _CommandServiceBlockingStub(CommandServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandServiceAsyncStub(CommandServiceStub):
-    def SubmitAndWait(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[Empty]: ...
-    def SubmitAndWaitForTransactionId(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[SubmitAndWaitForTransactionIdResponse]: ...
-    def SubmitAndWaitForTransaction(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[SubmitAndWaitForTransactionResponse]: ...
-    def SubmitAndWaitForTransactionTree(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[SubmitAndWaitForTransactionTreeResponse]: ...
+    def SubmitAndWait(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]: ...
+    def SubmitAndWaitForTransactionId(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionIdResponse]: ...
+    def SubmitAndWaitForTransaction(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionResponse]: ...
+    def SubmitAndWaitForTransactionTree(self, __1: SubmitAndWaitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, SubmitAndWaitForTransactionTreeResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.pyi
index da356f23..fd499810 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.pyi
@@ -3,13 +3,18 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
 from .commands_pb2 import Commands
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "SubmitRequest",
 ]
@@ -21,6 +26,6 @@ class SubmitRequest(_Message):
     @property
     def trace_context(self) -> TraceContext: ...
     def __init__(self, *, commands: _typing.Optional[Commands] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["commands", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["commands", "trace_context"]) -> None: ...
+    def HasField(self, field_name: _L["commands", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["commands", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2_grpc.pyi
index c3bc0559..bf4e5876 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from google.protobuf.empty_pb2 import Empty
@@ -18,24 +18,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class CommandSubmissionServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _CommandSubmissionServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _CommandSubmissionServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandSubmissionServiceAsyncStub: ...
-    def Submit(self, __1: SubmitRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _Async[Empty]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _CommandSubmissionServiceAsyncStub: ...  # type: ignore
+    def Submit(self, __1: SubmitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandSubmissionServiceBlockingStub(CommandSubmissionServiceStub):
@@ -43,4 +34,4 @@ class _CommandSubmissionServiceBlockingStub(CommandSubmissionServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _CommandSubmissionServiceAsyncStub(CommandSubmissionServiceStub):
-    def Submit(self, __1: SubmitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[Empty]: ...
+    def Submit(self, __1: SubmitRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/commands_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/commands_pb2.pyi
index a0572869..dd369970 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/commands_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/commands_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.duration_pb2 import Duration
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
@@ -12,6 +12,11 @@ from google.protobuf.timestamp_pb2 import Timestamp
 
 from .value_pb2 import Identifier, Record, Value
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "Commands",
     "Command",
@@ -23,11 +28,11 @@ __all__ = [
 
 
 class Commands(_Message):
-    ledger_id: str
-    workflow_id: str
-    application_id: str
-    command_id: str
-    party: str
+    ledger_id: _builtins.str
+    workflow_id: _builtins.str
+    application_id: _builtins.str
+    command_id: _builtins.str
+    party: _builtins.str
     @property
     def commands(self) -> RepeatedCompositeFieldContainer[Command]: ...
     @property
@@ -37,12 +42,12 @@ class Commands(_Message):
     @property
     def min_ledger_time_rel(self) -> Duration: ...
     @property
-    def act_as(self) -> RepeatedScalarFieldContainer[str]: ...
+    def act_as(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
-    def read_as(self) -> RepeatedScalarFieldContainer[str]: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., workflow_id: _typing.Optional[str] = ..., application_id: _typing.Optional[str] = ..., command_id: _typing.Optional[str] = ..., party: _typing.Optional[str] = ..., commands: _typing.Optional[_typing.Iterable[Command]] = ..., deduplication_time: _typing.Optional[Duration] = ..., min_ledger_time_abs: _typing.Optional[Timestamp] = ..., min_ledger_time_rel: _typing.Optional[Duration] = ..., act_as: _typing.Optional[_typing.Iterable[str]] = ..., read_as: _typing.Optional[_typing.Iterable[str]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "workflow_id", "application_id", "command_id", "party", "commands", "deduplication_time", "min_ledger_time_abs", "min_ledger_time_rel", "act_as", "read_as"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "workflow_id", "application_id", "command_id", "party", "commands", "deduplication_time", "min_ledger_time_abs", "min_ledger_time_rel", "act_as", "read_as"]) -> None: ...
+    def read_as(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., workflow_id: _typing.Optional[_builtins.str] = ..., application_id: _typing.Optional[_builtins.str] = ..., command_id: _typing.Optional[_builtins.str] = ..., party: _typing.Optional[_builtins.str] = ..., commands: _typing.Optional[_typing.Iterable[Command]] = ..., deduplication_time: _typing.Optional[Duration] = ..., min_ledger_time_abs: _typing.Optional[Timestamp] = ..., min_ledger_time_rel: _typing.Optional[Duration] = ..., act_as: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., read_as: _typing.Optional[_typing.Iterable[_builtins.str]] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "workflow_id", "application_id", "command_id", "party", "commands", "deduplication_time", "min_ledger_time_abs", "min_ledger_time_rel", "act_as", "read_as"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "workflow_id", "application_id", "command_id", "party", "commands", "deduplication_time", "min_ledger_time_abs", "min_ledger_time_rel", "act_as", "read_as"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Command(_Message):
@@ -64,9 +69,9 @@ class Command(_Message):
     def __init__(self, *, exerciseByKey: ExerciseByKeyCommand = ...): ...
     @_typing.overload
     def __init__(self, *, createAndExercise: CreateAndExerciseCommand = ...): ...
-    def HasField(self, field_name: _typing.Literal["command", "create", "exercise", "exerciseByKey", "createAndExercise"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["command", "create", "exercise", "exerciseByKey", "createAndExercise"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["command"]) -> _typing.Literal[None, "create", "exercise", "exerciseByKey", "createAndExercise"]: ...
+    def HasField(self, field_name: _L["command", "create", "exercise", "exerciseByKey", "createAndExercise"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["command", "create", "exercise", "exerciseByKey", "createAndExercise"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["command"]) -> _L[None, "create", "exercise", "exerciseByKey", "createAndExercise"]: ...
 
 class CreateCommand(_Message):
     @property
@@ -74,20 +79,20 @@ class CreateCommand(_Message):
     @property
     def create_arguments(self) -> Record: ...
     def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., create_arguments: _typing.Optional[Record] = ...): ...
-    def HasField(self, field_name: _typing.Literal["template_id", "create_arguments"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["template_id", "create_arguments"]) -> None: ...
+    def HasField(self, field_name: _L["template_id", "create_arguments"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["template_id", "create_arguments"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ExerciseCommand(_Message):
     @property
     def template_id(self) -> Identifier: ...
-    contract_id: str
-    choice: str
+    contract_id: _builtins.str
+    choice: _builtins.str
     @property
     def choice_argument(self) -> Value: ...
-    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., contract_id: _typing.Optional[str] = ..., choice: _typing.Optional[str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["template_id", "contract_id", "choice", "choice_argument"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["template_id", "contract_id", "choice", "choice_argument"]) -> None: ...
+    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., contract_id: _typing.Optional[_builtins.str] = ..., choice: _typing.Optional[_builtins.str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["template_id", "contract_id", "choice", "choice_argument"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["template_id", "contract_id", "choice", "choice_argument"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ExerciseByKeyCommand(_Message):
@@ -95,12 +100,12 @@ class ExerciseByKeyCommand(_Message):
     def template_id(self) -> Identifier: ...
     @property
     def contract_key(self) -> Value: ...
-    choice: str
+    choice: _builtins.str
     @property
     def choice_argument(self) -> Value: ...
-    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., contract_key: _typing.Optional[Value] = ..., choice: _typing.Optional[str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["template_id", "contract_key", "choice", "choice_argument"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["template_id", "contract_key", "choice", "choice_argument"]) -> None: ...
+    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., contract_key: _typing.Optional[Value] = ..., choice: _typing.Optional[_builtins.str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["template_id", "contract_key", "choice", "choice_argument"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["template_id", "contract_key", "choice", "choice_argument"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class CreateAndExerciseCommand(_Message):
@@ -108,10 +113,10 @@ class CreateAndExerciseCommand(_Message):
     def template_id(self) -> Identifier: ...
     @property
     def create_arguments(self) -> Record: ...
-    choice: str
+    choice: _builtins.str
     @property
     def choice_argument(self) -> Value: ...
-    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., create_arguments: _typing.Optional[Record] = ..., choice: _typing.Optional[str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["template_id", "create_arguments", "choice", "choice_argument"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["template_id", "create_arguments", "choice", "choice_argument"]) -> None: ...
+    def __init__(self, *, template_id: _typing.Optional[Identifier] = ..., create_arguments: _typing.Optional[Record] = ..., choice: _typing.Optional[_builtins.str] = ..., choice_argument: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["template_id", "create_arguments", "choice", "choice_argument"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["template_id", "create_arguments", "choice", "choice_argument"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/completion_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/completion_pb2.pyi
index 10a2776c..0d7ef435 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/completion_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/completion_pb2.pyi
@@ -3,26 +3,31 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 from google.rpc.status_pb2 import Status
 
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "Completion",
 ]
 
 
 class Completion(_Message):
-    command_id: str
+    command_id: _builtins.str
     @property
     def status(self) -> Status: ...
-    transaction_id: str
+    transaction_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, command_id: _typing.Optional[str] = ..., status: _typing.Optional[Status] = ..., transaction_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["command_id", "status", "transaction_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["command_id", "status", "transaction_id", "trace_context"]) -> None: ...
+    def __init__(self, *, command_id: _typing.Optional[_builtins.str] = ..., status: _typing.Optional[Status] = ..., transaction_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["command_id", "status", "transaction_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["command_id", "status", "transaction_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/event_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/event_pb2.pyi
index 290be4d2..a1de5dbf 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/event_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/event_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
@@ -11,6 +11,11 @@ from google.protobuf.wrappers_pb2 import StringValue
 
 from .value_pb2 import Identifier, Record, Value
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "Event",
     "CreatedEvent",
@@ -30,13 +35,13 @@ class Event(_Message):
     def __init__(self, *, created: CreatedEvent = ...): ...
     @_typing.overload
     def __init__(self, *, archived: ArchivedEvent = ...): ...
-    def HasField(self, field_name: _typing.Literal["event", "created", "archived"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["event", "created", "archived"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["event"]) -> _typing.Literal[None, "created", "archived"]: ...
+    def HasField(self, field_name: _L["event", "created", "archived"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["event", "created", "archived"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["event"]) -> _L[None, "created", "archived"]: ...
 
 class CreatedEvent(_Message):
-    event_id: str
-    contract_id: str
+    event_id: _builtins.str
+    contract_id: _builtins.str
     @property
     def template_id(self) -> Identifier: ...
     @property
@@ -44,48 +49,48 @@ class CreatedEvent(_Message):
     @property
     def create_arguments(self) -> Record: ...
     @property
-    def witness_parties(self) -> RepeatedScalarFieldContainer[str]: ...
+    def witness_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
-    def signatories(self) -> RepeatedScalarFieldContainer[str]: ...
+    def signatories(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
-    def observers(self) -> RepeatedScalarFieldContainer[str]: ...
+    def observers(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def agreement_text(self) -> StringValue: ...
-    def __init__(self, *, event_id: _typing.Optional[str] = ..., contract_id: _typing.Optional[str] = ..., template_id: _typing.Optional[Identifier] = ..., contract_key: _typing.Optional[Value] = ..., create_arguments: _typing.Optional[Record] = ..., witness_parties: _typing.Optional[_typing.Iterable[str]] = ..., signatories: _typing.Optional[_typing.Iterable[str]] = ..., observers: _typing.Optional[_typing.Iterable[str]] = ..., agreement_text: _typing.Optional[StringValue] = ...): ...
-    def HasField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "contract_key", "create_arguments", "witness_parties", "signatories", "observers", "agreement_text"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "contract_key", "create_arguments", "witness_parties", "signatories", "observers", "agreement_text"]) -> None: ...
+    def __init__(self, *, event_id: _typing.Optional[_builtins.str] = ..., contract_id: _typing.Optional[_builtins.str] = ..., template_id: _typing.Optional[Identifier] = ..., contract_key: _typing.Optional[Value] = ..., create_arguments: _typing.Optional[Record] = ..., witness_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., signatories: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., observers: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., agreement_text: _typing.Optional[StringValue] = ...): ...
+    def HasField(self, field_name: _L["event_id", "contract_id", "template_id", "contract_key", "create_arguments", "witness_parties", "signatories", "observers", "agreement_text"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["event_id", "contract_id", "template_id", "contract_key", "create_arguments", "witness_parties", "signatories", "observers", "agreement_text"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ArchivedEvent(_Message):
-    event_id: str
-    contract_id: str
+    event_id: _builtins.str
+    contract_id: _builtins.str
     @property
     def template_id(self) -> Identifier: ...
     @property
-    def witness_parties(self) -> RepeatedScalarFieldContainer[str]: ...
-    def __init__(self, *, event_id: _typing.Optional[str] = ..., contract_id: _typing.Optional[str] = ..., template_id: _typing.Optional[Identifier] = ..., witness_parties: _typing.Optional[_typing.Iterable[str]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "witness_parties"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "witness_parties"]) -> None: ...
+    def witness_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    def __init__(self, *, event_id: _typing.Optional[_builtins.str] = ..., contract_id: _typing.Optional[_builtins.str] = ..., template_id: _typing.Optional[Identifier] = ..., witness_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ...): ...
+    def HasField(self, field_name: _L["event_id", "contract_id", "template_id", "witness_parties"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["event_id", "contract_id", "template_id", "witness_parties"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ExercisedEvent(_Message):
-    event_id: str
-    contract_id: str
+    event_id: _builtins.str
+    contract_id: _builtins.str
     @property
     def template_id(self) -> Identifier: ...
-    choice: str
+    choice: _builtins.str
     @property
     def choice_argument(self) -> Value: ...
     @property
-    def acting_parties(self) -> RepeatedScalarFieldContainer[str]: ...
-    consuming: bool
+    def acting_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    consuming: _builtins.bool
     @property
-    def witness_parties(self) -> RepeatedScalarFieldContainer[str]: ...
+    def witness_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
-    def child_event_ids(self) -> RepeatedScalarFieldContainer[str]: ...
+    def child_event_ids(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def exercise_result(self) -> Value: ...
-    def __init__(self, *, event_id: _typing.Optional[str] = ..., contract_id: _typing.Optional[str] = ..., template_id: _typing.Optional[Identifier] = ..., choice: _typing.Optional[str] = ..., choice_argument: _typing.Optional[Value] = ..., acting_parties: _typing.Optional[_typing.Iterable[str]] = ..., consuming: _typing.Optional[bool] = ..., witness_parties: _typing.Optional[_typing.Iterable[str]] = ..., child_event_ids: _typing.Optional[_typing.Iterable[str]] = ..., exercise_result: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "choice", "choice_argument", "acting_parties", "consuming", "witness_parties", "child_event_ids", "exercise_result"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["event_id", "contract_id", "template_id", "choice", "choice_argument", "acting_parties", "consuming", "witness_parties", "child_event_ids", "exercise_result"]) -> None: ...
+    def __init__(self, *, event_id: _typing.Optional[_builtins.str] = ..., contract_id: _typing.Optional[_builtins.str] = ..., template_id: _typing.Optional[Identifier] = ..., choice: _typing.Optional[_builtins.str] = ..., choice_argument: _typing.Optional[Value] = ..., acting_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., consuming: _typing.Optional[_builtins.bool] = ..., witness_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., child_event_ids: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., exercise_result: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["event_id", "contract_id", "template_id", "choice", "choice_argument", "acting_parties", "consuming", "witness_parties", "child_event_ids", "exercise_result"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["event_id", "contract_id", "template_id", "choice", "choice_argument", "acting_parties", "consuming", "witness_parties", "child_event_ids", "exercise_result"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2.pyi
index df6816fe..63b7cbe8 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2.pyi
@@ -3,13 +3,18 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.duration_pb2 import Duration
 from google.protobuf.message import Message as _Message
 
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetLedgerConfigurationRequest",
     "GetLedgerConfigurationResponse",
@@ -18,26 +23,26 @@ __all__ = [
 
 
 class GetLedgerConfigurationRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetLedgerConfigurationResponse(_Message):
     @property
     def ledger_configuration(self) -> LedgerConfiguration: ...
     def __init__(self, *, ledger_configuration: _typing.Optional[LedgerConfiguration] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_configuration"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_configuration"]) -> None: ...
+    def HasField(self, field_name: _L["ledger_configuration"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_configuration"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class LedgerConfiguration(_Message):
     @property
     def max_deduplication_time(self) -> Duration: ...
     def __init__(self, *, max_deduplication_time: _typing.Optional[Duration] = ...): ...
-    def HasField(self, field_name: _typing.Literal["max_deduplication_time"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["max_deduplication_time"]) -> None: ...
+    def HasField(self, field_name: _L["max_deduplication_time"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["max_deduplication_time"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2_grpc.pyi
index f08e5625..97928156 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_configuration_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,24 +17,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class LedgerConfigurationServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _LedgerConfigurationServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _LedgerConfigurationServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _LedgerConfigurationServiceAsyncStub: ...
-    def GetLedgerConfiguration(self, __1: GetLedgerConfigurationRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetLedgerConfigurationResponse], _AsyncStream[GetLedgerConfigurationResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _LedgerConfigurationServiceAsyncStub: ...  # type: ignore
+    def GetLedgerConfiguration(self, __1: GetLedgerConfigurationRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetLedgerConfigurationResponse], _grpc_aio.UnaryStreamCall[_typing.Any, GetLedgerConfigurationResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _LedgerConfigurationServiceBlockingStub(LedgerConfigurationServiceStub):
@@ -42,4 +33,4 @@ class _LedgerConfigurationServiceBlockingStub(LedgerConfigurationServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _LedgerConfigurationServiceAsyncStub(LedgerConfigurationServiceStub):
-    def GetLedgerConfiguration(self, __1: GetLedgerConfigurationRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[GetLedgerConfigurationResponse]: ...
+    def GetLedgerConfiguration(self, __1: GetLedgerConfigurationRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, GetLedgerConfigurationResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2.pyi
index bb22d114..9ee81ac3 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2.pyi
@@ -3,12 +3,17 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetLedgerIdentityRequest",
     "GetLedgerIdentityResponse",
@@ -19,13 +24,13 @@ class GetLedgerIdentityRequest(_Message):
     @property
     def trace_context(self) -> TraceContext: ...
     def __init__(self, *, trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["trace_context"]) -> None: ...
+    def HasField(self, field_name: _L["trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetLedgerIdentityResponse(_Message):
-    ledger_id: str
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id"]) -> None: ...
+    ledger_id: _builtins.str
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["ledger_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2_grpc.pyi
index 6fc50f48..fa2f8220 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_identity_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,24 +17,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class LedgerIdentityServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _LedgerIdentityServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _LedgerIdentityServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _LedgerIdentityServiceAsyncStub: ...
-    def GetLedgerIdentity(self, __1: GetLedgerIdentityRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerIdentityResponse, _Async[GetLedgerIdentityResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _LedgerIdentityServiceAsyncStub: ...  # type: ignore
+    def GetLedgerIdentity(self, __1: GetLedgerIdentityRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerIdentityResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerIdentityResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _LedgerIdentityServiceBlockingStub(LedgerIdentityServiceStub):
@@ -42,4 +33,4 @@ class _LedgerIdentityServiceBlockingStub(LedgerIdentityServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _LedgerIdentityServiceAsyncStub(LedgerIdentityServiceStub):
-    def GetLedgerIdentity(self, __1: GetLedgerIdentityRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetLedgerIdentityResponse]: ...
+    def GetLedgerIdentity(self, __1: GetLedgerIdentityRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerIdentityResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_offset_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_offset_pb2.pyi
index 40fc7454..ec54e240 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/ledger_offset_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/ledger_offset_pb2.pyi
@@ -3,24 +3,30 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "LedgerOffset",
 ]
 
 
 class LedgerOffset(_Message):
-    absolute: str
-    boundary: _typing.Literal[0, 1]
+    absolute: _builtins.str
+    @property
+    def boundary(self) -> _L[0, 1]: ...
     @_typing.overload
     def __init__(self): ...
     @_typing.overload
-    def __init__(self, *, absolute: str = ...): ...
+    def __init__(self, *, absolute: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, boundary: _typing.Literal['LEDGER_BEGIN', 0, 'LEDGER_END', 1] = ...): ...
-    def HasField(self, field_name: _typing.Literal["value", "absolute", "boundary"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["value", "absolute", "boundary"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["value"]) -> _typing.Literal[None, "absolute", "boundary"]: ...
+    def __init__(self, *, boundary: _L['LEDGER_BEGIN', 0, 'LEDGER_END', 1] = ...): ...
+    def HasField(self, field_name: _L["value", "absolute", "boundary"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["value", "absolute", "boundary"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["value"]) -> _L[None, "absolute", "boundary"]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2.pyi
index c42c5a57..4c189078 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.descriptor import EnumDescriptor
 from google.protobuf.internal.containers import RepeatedScalarFieldContainer
@@ -11,6 +11,11 @@ from google.protobuf.message import Message as _Message
 
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "ListPackagesRequest",
     "ListPackagesResponse",
@@ -22,66 +27,68 @@ __all__ = [
 
 class PackageStatus:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    UNKNOWN: _typing.ClassVar[_typing.Literal[0]] = ...
-    REGISTERED: _typing.ClassVar[_typing.Literal[1]] = ...
-UNKNOWN = _typing.Literal[0]
-REGISTERED = _typing.Literal[1]
+    UNKNOWN: _typing.ClassVar[_L[0]] = ...
+    REGISTERED: _typing.ClassVar[_L[1]] = ...
+UNKNOWN = _L[0]
+REGISTERED = _L[1]
 
 class HashFunction:
     DESCRIPTOR: _typing.ClassVar[EnumDescriptor] = ...
-    SHA256: _typing.ClassVar[_typing.Literal[0]] = ...
-SHA256 = _typing.Literal[0]
+    SHA256: _typing.ClassVar[_L[0]] = ...
+SHA256 = _L[0]
 
 
 class ListPackagesRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class ListPackagesResponse(_Message):
     @property
-    def package_ids(self) -> RepeatedScalarFieldContainer[str]: ...
-    def __init__(self, *, package_ids: _typing.Optional[_typing.Iterable[str]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_ids"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_ids"]) -> None: ...
+    def package_ids(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
+    def __init__(self, *, package_ids: _typing.Optional[_typing.Iterable[_builtins.str]] = ...): ...
+    def HasField(self, field_name: _L["package_ids"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_ids"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPackageRequest(_Message):
-    ledger_id: str
-    package_id: str
+    ledger_id: _builtins.str
+    package_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., package_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "package_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "package_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., package_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "package_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "package_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPackageResponse(_Message):
-    hash_function: _typing.Literal[0]
-    archive_payload: bytes
-    hash: str
-    def __init__(self, *, hash_function: _typing.Optional[_typing.Literal['SHA256', 0]] = ..., archive_payload: _typing.Optional[bytes] = ..., hash: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["hash_function", "archive_payload", "hash"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["hash_function", "archive_payload", "hash"]) -> None: ...
+    @property
+    def hash_function(self) -> _L[0]: ...
+    archive_payload: _builtins.bytes
+    hash: _builtins.str
+    def __init__(self, *, hash_function: _typing.Optional[_L['SHA256', 0]] = ..., archive_payload: _typing.Optional[_builtins.bytes] = ..., hash: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["hash_function", "archive_payload", "hash"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["hash_function", "archive_payload", "hash"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPackageStatusRequest(_Message):
-    ledger_id: str
-    package_id: str
+    ledger_id: _builtins.str
+    package_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., package_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "package_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "package_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., package_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "package_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "package_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetPackageStatusResponse(_Message):
-    package_status: _typing.Literal[0, 1]
-    def __init__(self, *, package_status: _typing.Optional[_typing.Literal['UNKNOWN', 0, 'REGISTERED', 1]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_status"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_status"]) -> None: ...
+    @property
+    def package_status(self) -> _L[0, 1]: ...
+    def __init__(self, *, package_status: _typing.Optional[_L['UNKNOWN', 0, 'REGISTERED', 1]] = ...): ...
+    def HasField(self, field_name: _L["package_status"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_status"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2_grpc.pyi
index 210131ef..95e4d1fa 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/package_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,26 +17,17 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class PackageServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _PackageServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _PackageServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _PackageServiceAsyncStub: ...
-    def ListPackages(self, __1: ListPackagesRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListPackagesResponse, _Async[ListPackagesResponse]]: ...
-    def GetPackage(self, __1: GetPackageRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPackageResponse, _Async[GetPackageResponse]]: ...
-    def GetPackageStatus(self, __1: GetPackageStatusRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPackageStatusResponse, _Async[GetPackageStatusResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _PackageServiceAsyncStub: ...  # type: ignore
+    def ListPackages(self, __1: ListPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[ListPackagesResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, ListPackagesResponse]]: ...
+    def GetPackage(self, __1: GetPackageRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPackageResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetPackageResponse]]: ...
+    def GetPackageStatus(self, __1: GetPackageStatusRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetPackageStatusResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetPackageStatusResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PackageServiceBlockingStub(PackageServiceStub):
@@ -46,6 +37,6 @@ class _PackageServiceBlockingStub(PackageServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _PackageServiceAsyncStub(PackageServiceStub):
-    def ListPackages(self, __1: ListPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[ListPackagesResponse]: ...
-    def GetPackage(self, __1: GetPackageRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetPackageResponse]: ...
-    def GetPackageStatus(self, __1: GetPackageStatusRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetPackageStatusResponse]: ...
+    def ListPackages(self, __1: ListPackagesRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, ListPackagesResponse]: ...
+    def GetPackage(self, __1: GetPackageRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetPackageResponse]: ...
+    def GetPackageStatus(self, __1: GetPackageStatusRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetPackageStatusResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/trace_context_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/trace_context_pb2.pyi
index 0f6acdc0..1d7da188 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/trace_context_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/trace_context_pb2.pyi
@@ -3,24 +3,29 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 from google.protobuf.wrappers_pb2 import UInt64Value
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "TraceContext",
 ]
 
 
 class TraceContext(_Message):
-    trace_id_high: int
-    trace_id: int
-    span_id: int
+    trace_id_high: _builtins.int
+    trace_id: _builtins.int
+    span_id: _builtins.int
     @property
     def parent_span_id(self) -> UInt64Value: ...
-    sampled: bool
-    def __init__(self, *, trace_id_high: _typing.Optional[int] = ..., trace_id: _typing.Optional[int] = ..., span_id: _typing.Optional[int] = ..., parent_span_id: _typing.Optional[UInt64Value] = ..., sampled: _typing.Optional[bool] = ...): ...
-    def HasField(self, field_name: _typing.Literal["trace_id_high", "trace_id", "span_id", "parent_span_id", "sampled"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["trace_id_high", "trace_id", "span_id", "parent_span_id", "sampled"]) -> None: ...
+    sampled: _builtins.bool
+    def __init__(self, *, trace_id_high: _typing.Optional[_builtins.int] = ..., trace_id: _typing.Optional[_builtins.int] = ..., span_id: _typing.Optional[_builtins.int] = ..., parent_span_id: _typing.Optional[UInt64Value] = ..., sampled: _typing.Optional[_builtins.bool] = ...): ...
+    def HasField(self, field_name: _L["trace_id_high", "trace_id", "span_id", "parent_span_id", "sampled"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["trace_id_high", "trace_id", "span_id", "parent_span_id", "sampled"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_filter_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_filter_pb2.pyi
index 5177e4de..66732234 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_filter_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_filter_pb2.pyi
@@ -3,13 +3,18 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import MessageMap, RepeatedCompositeFieldContainer
 from google.protobuf.message import Message as _Message
 
 from .value_pb2 import Identifier
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "TransactionFilter",
     "Filters",
@@ -19,24 +24,24 @@ __all__ = [
 
 class TransactionFilter(_Message):
     @property
-    def filters_by_party(self) -> MessageMap[str, Filters]: ...
-    def __init__(self, *, filters_by_party: _typing.Optional[_typing.Mapping[str, Filters]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["filters_by_party"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["filters_by_party"]) -> None: ...
+    def filters_by_party(self) -> MessageMap[_builtins.str, Filters]: ...
+    def __init__(self, *, filters_by_party: _typing.Optional[_typing.Mapping[_builtins.str, Filters]] = ...): ...
+    def HasField(self, field_name: _L["filters_by_party"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["filters_by_party"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Filters(_Message):
     @property
     def inclusive(self) -> InclusiveFilters: ...
     def __init__(self, *, inclusive: _typing.Optional[InclusiveFilters] = ...): ...
-    def HasField(self, field_name: _typing.Literal["inclusive"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["inclusive"]) -> None: ...
+    def HasField(self, field_name: _L["inclusive"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["inclusive"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class InclusiveFilters(_Message):
     @property
     def template_ids(self) -> RepeatedCompositeFieldContainer[Identifier]: ...
     def __init__(self, *, template_ids: _typing.Optional[_typing.Iterable[Identifier]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["template_ids"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["template_ids"]) -> None: ...
+    def HasField(self, field_name: _L["template_ids"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["template_ids"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_pb2.pyi
index 5831e3c3..d1a36c11 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import MessageMap, RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
@@ -12,6 +12,11 @@ from google.protobuf.timestamp_pb2 import Timestamp
 from .event_pb2 import CreatedEvent, Event, ExercisedEvent
 from .trace_context_pb2 import TraceContext
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "TransactionTree",
     "TreeEvent",
@@ -20,21 +25,21 @@ __all__ = [
 
 
 class TransactionTree(_Message):
-    transaction_id: str
-    command_id: str
-    workflow_id: str
+    transaction_id: _builtins.str
+    command_id: _builtins.str
+    workflow_id: _builtins.str
     @property
     def effective_at(self) -> Timestamp: ...
-    offset: str
+    offset: _builtins.str
     @property
-    def events_by_id(self) -> MessageMap[str, TreeEvent]: ...
+    def events_by_id(self) -> MessageMap[_builtins.str, TreeEvent]: ...
     @property
-    def root_event_ids(self) -> RepeatedScalarFieldContainer[str]: ...
+    def root_event_ids(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, transaction_id: _typing.Optional[str] = ..., command_id: _typing.Optional[str] = ..., workflow_id: _typing.Optional[str] = ..., effective_at: _typing.Optional[Timestamp] = ..., offset: _typing.Optional[str] = ..., events_by_id: _typing.Optional[_typing.Mapping[str, TreeEvent]] = ..., root_event_ids: _typing.Optional[_typing.Iterable[str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction_id", "command_id", "workflow_id", "effective_at", "offset", "events_by_id", "root_event_ids", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction_id", "command_id", "workflow_id", "effective_at", "offset", "events_by_id", "root_event_ids", "trace_context"]) -> None: ...
+    def __init__(self, *, transaction_id: _typing.Optional[_builtins.str] = ..., command_id: _typing.Optional[_builtins.str] = ..., workflow_id: _typing.Optional[_builtins.str] = ..., effective_at: _typing.Optional[Timestamp] = ..., offset: _typing.Optional[_builtins.str] = ..., events_by_id: _typing.Optional[_typing.Mapping[_builtins.str, TreeEvent]] = ..., root_event_ids: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["transaction_id", "command_id", "workflow_id", "effective_at", "offset", "events_by_id", "root_event_ids", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction_id", "command_id", "workflow_id", "effective_at", "offset", "events_by_id", "root_event_ids", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class TreeEvent(_Message):
@@ -48,22 +53,22 @@ class TreeEvent(_Message):
     def __init__(self, *, created: CreatedEvent = ...): ...
     @_typing.overload
     def __init__(self, *, exercised: ExercisedEvent = ...): ...
-    def HasField(self, field_name: _typing.Literal["kind", "created", "exercised"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["kind", "created", "exercised"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["kind"]) -> _typing.Literal[None, "created", "exercised"]: ...
+    def HasField(self, field_name: _L["kind", "created", "exercised"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["kind", "created", "exercised"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["kind"]) -> _L[None, "created", "exercised"]: ...
 
 class Transaction(_Message):
-    transaction_id: str
-    command_id: str
-    workflow_id: str
+    transaction_id: _builtins.str
+    command_id: _builtins.str
+    workflow_id: _builtins.str
     @property
     def effective_at(self) -> Timestamp: ...
     @property
     def events(self) -> RepeatedCompositeFieldContainer[Event]: ...
-    offset: str
+    offset: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, transaction_id: _typing.Optional[str] = ..., command_id: _typing.Optional[str] = ..., workflow_id: _typing.Optional[str] = ..., effective_at: _typing.Optional[Timestamp] = ..., events: _typing.Optional[_typing.Iterable[Event]] = ..., offset: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction_id", "command_id", "workflow_id", "effective_at", "events", "offset", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction_id", "command_id", "workflow_id", "effective_at", "events", "offset", "trace_context"]) -> None: ...
+    def __init__(self, *, transaction_id: _typing.Optional[_builtins.str] = ..., command_id: _typing.Optional[_builtins.str] = ..., workflow_id: _typing.Optional[_builtins.str] = ..., effective_at: _typing.Optional[Timestamp] = ..., events: _typing.Optional[_typing.Iterable[Event]] = ..., offset: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["transaction_id", "command_id", "workflow_id", "effective_at", "events", "offset", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction_id", "command_id", "workflow_id", "effective_at", "events", "offset", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2.pyi
index 5afef0b6..38f529a0 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
 from google.protobuf.message import Message as _Message
@@ -13,6 +13,11 @@ from .trace_context_pb2 import TraceContext
 from .transaction_filter_pb2 import TransactionFilter
 from .transaction_pb2 import Transaction, TransactionTree
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetTransactionsRequest",
     "GetTransactionsResponse",
@@ -27,90 +32,90 @@ __all__ = [
 
 
 class GetTransactionsRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def begin(self) -> LedgerOffset: ...
     @property
     def end(self) -> LedgerOffset: ...
     @property
     def filter(self) -> TransactionFilter: ...
-    verbose: bool
+    verbose: _builtins.bool
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., begin: _typing.Optional[LedgerOffset] = ..., end: _typing.Optional[LedgerOffset] = ..., filter: _typing.Optional[TransactionFilter] = ..., verbose: _typing.Optional[bool] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "begin", "end", "filter", "verbose", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "begin", "end", "filter", "verbose", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., begin: _typing.Optional[LedgerOffset] = ..., end: _typing.Optional[LedgerOffset] = ..., filter: _typing.Optional[TransactionFilter] = ..., verbose: _typing.Optional[_builtins.bool] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "begin", "end", "filter", "verbose", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "begin", "end", "filter", "verbose", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTransactionsResponse(_Message):
     @property
     def transactions(self) -> RepeatedCompositeFieldContainer[Transaction]: ...
     def __init__(self, *, transactions: _typing.Optional[_typing.Iterable[Transaction]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transactions"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transactions"]) -> None: ...
+    def HasField(self, field_name: _L["transactions"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transactions"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTransactionTreesResponse(_Message):
     @property
     def transactions(self) -> RepeatedCompositeFieldContainer[TransactionTree]: ...
     def __init__(self, *, transactions: _typing.Optional[_typing.Iterable[TransactionTree]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transactions"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transactions"]) -> None: ...
+    def HasField(self, field_name: _L["transactions"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transactions"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTransactionByEventIdRequest(_Message):
-    ledger_id: str
-    event_id: str
+    ledger_id: _builtins.str
+    event_id: _builtins.str
     @property
-    def requesting_parties(self) -> RepeatedScalarFieldContainer[str]: ...
+    def requesting_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., event_id: _typing.Optional[str] = ..., requesting_parties: _typing.Optional[_typing.Iterable[str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "event_id", "requesting_parties", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "event_id", "requesting_parties", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., event_id: _typing.Optional[_builtins.str] = ..., requesting_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "event_id", "requesting_parties", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "event_id", "requesting_parties", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTransactionByIdRequest(_Message):
-    ledger_id: str
-    transaction_id: str
+    ledger_id: _builtins.str
+    transaction_id: _builtins.str
     @property
-    def requesting_parties(self) -> RepeatedScalarFieldContainer[str]: ...
+    def requesting_parties(self) -> RepeatedScalarFieldContainer[_builtins.str]: ...
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., transaction_id: _typing.Optional[str] = ..., requesting_parties: _typing.Optional[_typing.Iterable[str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "transaction_id", "requesting_parties", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "transaction_id", "requesting_parties", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., transaction_id: _typing.Optional[_builtins.str] = ..., requesting_parties: _typing.Optional[_typing.Iterable[_builtins.str]] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "transaction_id", "requesting_parties", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "transaction_id", "requesting_parties", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTransactionResponse(_Message):
     @property
     def transaction(self) -> TransactionTree: ...
     def __init__(self, *, transaction: _typing.Optional[TransactionTree] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction"]) -> None: ...
+    def HasField(self, field_name: _L["transaction"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetFlatTransactionResponse(_Message):
     @property
     def transaction(self) -> Transaction: ...
     def __init__(self, *, transaction: _typing.Optional[Transaction] = ...): ...
-    def HasField(self, field_name: _typing.Literal["transaction"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["transaction"]) -> None: ...
+    def HasField(self, field_name: _L["transaction"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["transaction"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetLedgerEndRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def trace_context(self) -> TraceContext: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "trace_context"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., trace_context: _typing.Optional[TraceContext] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "trace_context"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "trace_context"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetLedgerEndResponse(_Message):
     @property
     def offset(self) -> LedgerOffset: ...
     def __init__(self, *, offset: _typing.Optional[LedgerOffset] = ...): ...
-    def HasField(self, field_name: _typing.Literal["offset"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["offset"]) -> None: ...
+    def HasField(self, field_name: _L["offset"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["offset"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2_grpc.pyi
index 01d912c4..ab8e4061 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/transaction_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,30 +17,21 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class TransactionServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _TransactionServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _TransactionServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _TransactionServiceAsyncStub: ...
-    def GetTransactions(self, __1: GetTransactionsRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTransactionsResponse], _AsyncStream[GetTransactionsResponse]]: ...
-    def GetTransactionTrees(self, __1: GetTransactionsRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTransactionTreesResponse], _AsyncStream[GetTransactionTreesResponse]]: ...
-    def GetTransactionByEventId(self, __1: GetTransactionByEventIdRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTransactionResponse, _Async[GetTransactionResponse]]: ...
-    def GetTransactionById(self, __1: GetTransactionByIdRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTransactionResponse, _Async[GetTransactionResponse]]: ...
-    def GetFlatTransactionByEventId(self, __1: GetTransactionByEventIdRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetFlatTransactionResponse, _Async[GetFlatTransactionResponse]]: ...
-    def GetFlatTransactionById(self, __1: GetTransactionByIdRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetFlatTransactionResponse, _Async[GetFlatTransactionResponse]]: ...
-    def GetLedgerEnd(self, __1: GetLedgerEndRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerEndResponse, _Async[GetLedgerEndResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _TransactionServiceAsyncStub: ...  # type: ignore
+    def GetTransactions(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTransactionsResponse], _grpc_aio.UnaryStreamCall[_typing.Any, GetTransactionsResponse]]: ...
+    def GetTransactionTrees(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTransactionTreesResponse], _grpc_aio.UnaryStreamCall[_typing.Any, GetTransactionTreesResponse]]: ...
+    def GetTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTransactionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetTransactionResponse]]: ...
+    def GetTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetTransactionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetTransactionResponse]]: ...
+    def GetFlatTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetFlatTransactionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetFlatTransactionResponse]]: ...
+    def GetFlatTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetFlatTransactionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetFlatTransactionResponse]]: ...
+    def GetLedgerEnd(self, __1: GetLedgerEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerEndResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerEndResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _TransactionServiceBlockingStub(TransactionServiceStub):
@@ -54,10 +45,10 @@ class _TransactionServiceBlockingStub(TransactionServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _TransactionServiceAsyncStub(TransactionServiceStub):
-    def GetTransactions(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[GetTransactionsResponse]: ...
-    def GetTransactionTrees(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[GetTransactionTreesResponse]: ...
-    def GetTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetTransactionResponse]: ...
-    def GetTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetTransactionResponse]: ...
-    def GetFlatTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetFlatTransactionResponse]: ...
-    def GetFlatTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetFlatTransactionResponse]: ...
-    def GetLedgerEnd(self, __1: GetLedgerEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetLedgerEndResponse]: ...
+    def GetTransactions(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, GetTransactionsResponse]: ...
+    def GetTransactionTrees(self, __1: GetTransactionsRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, GetTransactionTreesResponse]: ...
+    def GetTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetTransactionResponse]: ...
+    def GetTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetTransactionResponse]: ...
+    def GetFlatTransactionByEventId(self, __1: GetTransactionByEventIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetFlatTransactionResponse]: ...
+    def GetFlatTransactionById(self, __1: GetTransactionByIdRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetFlatTransactionResponse]: ...
+    def GetLedgerEnd(self, __1: GetLedgerEndRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerEndResponse]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/value_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/value_pb2.pyi
index 03002440..74339522 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/value_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/value_pb2.pyi
@@ -3,12 +3,17 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.empty_pb2 import Empty
 from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "Value",
     "Record",
@@ -28,18 +33,18 @@ class Value(_Message):
     def record(self) -> Record: ...
     @property
     def variant(self) -> Variant: ...
-    contract_id: str
+    contract_id: _builtins.str
     @property
     def list(self) -> List: ...
-    int64: int
-    numeric: str
-    text: str
-    timestamp: float
-    party: str
-    bool: bool
+    int64: _builtins.int
+    numeric: _builtins.str
+    text: _builtins.str
+    timestamp: _builtins.float
+    party: _builtins.str
+    bool: _builtins.bool
     @property
     def unit(self) -> Empty: ...
-    date: int
+    date: _builtins.int
     @property
     def optional(self) -> Optional: ...
     @property
@@ -55,25 +60,25 @@ class Value(_Message):
     @_typing.overload
     def __init__(self, *, variant: Variant = ...): ...
     @_typing.overload
-    def __init__(self, *, contract_id: str = ...): ...
+    def __init__(self, *, contract_id: _builtins.str = ...): ...
     @_typing.overload
     def __init__(self, *, list: List = ...): ...
     @_typing.overload
-    def __init__(self, *, int64: int = ...): ...
+    def __init__(self, *, int64: _builtins.int = ...): ...
     @_typing.overload
-    def __init__(self, *, numeric: str = ...): ...
+    def __init__(self, *, numeric: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, text: str = ...): ...
+    def __init__(self, *, text: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, timestamp: float = ...): ...
+    def __init__(self, *, timestamp: _builtins.float = ...): ...
     @_typing.overload
-    def __init__(self, *, party: str = ...): ...
+    def __init__(self, *, party: _builtins.str = ...): ...
     @_typing.overload
-    def __init__(self, *, bool: bool = ...): ...
+    def __init__(self, *, bool: _builtins.bool = ...): ...
     @_typing.overload
     def __init__(self, *, unit: Empty = ...): ...
     @_typing.overload
-    def __init__(self, *, date: int = ...): ...
+    def __init__(self, *, date: _builtins.int = ...): ...
     @_typing.overload
     def __init__(self, *, optional: Optional = ...): ...
     @_typing.overload
@@ -82,9 +87,9 @@ class Value(_Message):
     def __init__(self, *, enum: Enum = ...): ...
     @_typing.overload
     def __init__(self, *, gen_map: GenMap = ...): ...
-    def HasField(self, field_name: _typing.Literal["Sum", "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["Sum", "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]) -> None: ...
-    def WhichOneof(self, oneof_group: _typing.Literal["Sum"]) -> _typing.Literal[None, "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]: ...
+    def HasField(self, field_name: _L["Sum", "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["Sum", "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]) -> None: ...
+    def WhichOneof(self, oneof_group: _L["Sum"]) -> _L[None, "record", "variant", "contract_id", "list", "int64", "numeric", "text", "timestamp", "party", "bool", "unit", "date", "optional", "map", "enum", "gen_map"]: ...
 
 class Record(_Message):
     @property
@@ -92,79 +97,79 @@ class Record(_Message):
     @property
     def fields(self) -> RepeatedCompositeFieldContainer[RecordField]: ...
     def __init__(self, *, record_id: _typing.Optional[Identifier] = ..., fields: _typing.Optional[_typing.Iterable[RecordField]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["record_id", "fields"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["record_id", "fields"]) -> None: ...
+    def HasField(self, field_name: _L["record_id", "fields"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["record_id", "fields"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class RecordField(_Message):
-    label: str
+    label: _builtins.str
     @property
     def value(self) -> Value: ...
-    def __init__(self, *, label: _typing.Optional[str] = ..., value: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["label", "value"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["label", "value"]) -> None: ...
+    def __init__(self, *, label: _typing.Optional[_builtins.str] = ..., value: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["label", "value"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["label", "value"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Identifier(_Message):
-    package_id: str
-    module_name: str
-    entity_name: str
-    def __init__(self, *, package_id: _typing.Optional[str] = ..., module_name: _typing.Optional[str] = ..., entity_name: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["package_id", "module_name", "entity_name"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["package_id", "module_name", "entity_name"]) -> None: ...
+    package_id: _builtins.str
+    module_name: _builtins.str
+    entity_name: _builtins.str
+    def __init__(self, *, package_id: _typing.Optional[_builtins.str] = ..., module_name: _typing.Optional[_builtins.str] = ..., entity_name: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["package_id", "module_name", "entity_name"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["package_id", "module_name", "entity_name"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Variant(_Message):
     @property
     def variant_id(self) -> Identifier: ...
-    constructor: str
+    constructor: _builtins.str
     @property
     def value(self) -> Value: ...
-    def __init__(self, *, variant_id: _typing.Optional[Identifier] = ..., constructor: _typing.Optional[str] = ..., value: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["variant_id", "constructor", "value"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["variant_id", "constructor", "value"]) -> None: ...
+    def __init__(self, *, variant_id: _typing.Optional[Identifier] = ..., constructor: _typing.Optional[_builtins.str] = ..., value: _typing.Optional[Value] = ...): ...
+    def HasField(self, field_name: _L["variant_id", "constructor", "value"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["variant_id", "constructor", "value"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Enum(_Message):
     @property
     def enum_id(self) -> Identifier: ...
-    constructor: str
-    def __init__(self, *, enum_id: _typing.Optional[Identifier] = ..., constructor: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["enum_id", "constructor"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["enum_id", "constructor"]) -> None: ...
+    constructor: _builtins.str
+    def __init__(self, *, enum_id: _typing.Optional[Identifier] = ..., constructor: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["enum_id", "constructor"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["enum_id", "constructor"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class List(_Message):
     @property
     def elements(self) -> RepeatedCompositeFieldContainer[Value]: ...
     def __init__(self, *, elements: _typing.Optional[_typing.Iterable[Value]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["elements"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["elements"]) -> None: ...
+    def HasField(self, field_name: _L["elements"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["elements"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Optional(_Message):
     @property
     def value(self) -> Value: ...
     def __init__(self, *, value: _typing.Optional[Value] = ...): ...
-    def HasField(self, field_name: _typing.Literal["value"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["value"]) -> None: ...
+    def HasField(self, field_name: _L["value"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["value"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class Map(_Message):
     
     class Entry(_Message):
-        key: str
+        key: _builtins.str
         @property
         def value(self) -> Value: ...
-        def __init__(self, *, key: _typing.Optional[str] = ..., value: _typing.Optional[Value] = ...): ...
-        def HasField(self, field_name: _typing.Literal["key", "value"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["key", "value"]) -> None: ...
+        def __init__(self, *, key: _typing.Optional[_builtins.str] = ..., value: _typing.Optional[Value] = ...): ...
+        def HasField(self, field_name: _L["key", "value"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["key", "value"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def entries(self) -> RepeatedCompositeFieldContainer[Map.Entry]: ...
     def __init__(self, *, entries: _typing.Optional[_typing.Iterable[Map.Entry]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["entries"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["entries"]) -> None: ...
+    def HasField(self, field_name: _L["entries"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["entries"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GenMap(_Message):
@@ -175,12 +180,12 @@ class GenMap(_Message):
         @property
         def value(self) -> Value: ...
         def __init__(self, *, key: _typing.Optional[Value] = ..., value: _typing.Optional[Value] = ...): ...
-        def HasField(self, field_name: _typing.Literal["key", "value"]) -> bool: ...
-        def ClearField(self, field_name: _typing.Literal["key", "value"]) -> None: ...
+        def HasField(self, field_name: _L["key", "value"]) -> _builtins.bool: ...
+        def ClearField(self, field_name: _L["key", "value"]) -> None: ...
         def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
     @property
     def entries(self) -> RepeatedCompositeFieldContainer[GenMap.Entry]: ...
     def __init__(self, *, entries: _typing.Optional[_typing.Iterable[GenMap.Entry]] = ...): ...
-    def HasField(self, field_name: _typing.Literal["entries"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["entries"]) -> None: ...
+    def HasField(self, field_name: _L["entries"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["entries"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2.pyi
index 413cc917..4d3ac4f2 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2.pyi
@@ -3,10 +3,15 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetLedgerApiVersionRequest",
     "GetLedgerApiVersionResponse",
@@ -14,15 +19,15 @@ __all__ = [
 
 
 class GetLedgerApiVersionRequest(_Message):
-    ledger_id: str
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id"]) -> None: ...
+    ledger_id: _builtins.str
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["ledger_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetLedgerApiVersionResponse(_Message):
-    version: str
-    def __init__(self, *, version: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["version"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["version"]) -> None: ...
+    version: _builtins.str
+    def __init__(self, *, version: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["version"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["version"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2_grpc.pyi
index 7ea4cf95..e9f1be3c 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/version_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from grpc import aio as _grpc_aio
@@ -17,24 +17,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class VersionServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _VersionServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _VersionServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _VersionServiceAsyncStub: ...
-    def GetLedgerApiVersion(self, __1: GetLedgerApiVersionRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerApiVersionResponse, _Async[GetLedgerApiVersionResponse]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _VersionServiceAsyncStub: ...  # type: ignore
+    def GetLedgerApiVersion(self, __1: GetLedgerApiVersionRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[GetLedgerApiVersionResponse, _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerApiVersionResponse]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _VersionServiceBlockingStub(VersionServiceStub):
@@ -42,4 +33,4 @@ class _VersionServiceBlockingStub(VersionServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _VersionServiceAsyncStub(VersionServiceStub):
-    def GetLedgerApiVersion(self, __1: GetLedgerApiVersionRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[GetLedgerApiVersionResponse]: ...
+    def GetLedgerApiVersion(self, __1: GetLedgerApiVersionRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, GetLedgerApiVersionResponse]: ...
diff --git a/python/dazl/protocols/v1/pb_parse_event.py b/python/dazl/protocols/v1/pb_parse_event.py
index 0cb4b8ac..bad7c6de 100644
--- a/python/dazl/protocols/v1/pb_parse_event.py
+++ b/python/dazl/protocols/v1/pb_parse_event.py
@@ -239,18 +239,14 @@ def serialize_transactions_request(
     f: "TransactionFilter", ledger_id: str, party: Party
 ) -> "lapipb.GetTransactionsRequest":
     if f.current_offset is not None:
-        ledger_offset = lapipb.LedgerOffset()
-        ledger_offset.absolute = f.current_offset
+        ledger_offset = lapipb.LedgerOffset(absolute=f.current_offset)
     else:
-        ledger_offset = lapipb.LedgerOffset()
-        ledger_offset.boundary = 0
+        ledger_offset = lapipb.LedgerOffset(boundary=0)
 
     if f.destination_offset is not None:
-        final_offset = lapipb.LedgerOffset()
-        final_offset.absolute = f.destination_offset
+        final_offset = lapipb.LedgerOffset(absolute=f.destination_offset)
     else:
-        final_offset = lapipb.LedgerOffset()
-        final_offset.boundary = 1
+        final_offset = lapipb.LedgerOffset(boundary=1)
 
     return lapipb.GetTransactionsRequest(
         ledger_id=ledger_id,
@@ -432,11 +428,12 @@ def to_event(
     context: "Union[TransactionEventDeserializationContext, ActiveContractSetEventDeserializationContext]",
     evt_pb: "Union[lapipb.Event, lapipb.TreeEvent]",
 ) -> "Optional[OffsetEvent]":
+    # TODO: mypy should understand that
     try:
-        event_type = evt_pb.WhichOneof("event")
+        event_type = evt_pb.WhichOneof("event")  # type: ignore
     except ValueError:
         try:
-            event_type = evt_pb.WhichOneof("kind")
+            event_type = evt_pb.WhichOneof("kind")  # type: ignore
         except ValueError:
             LOG.error("Deserialization error into an event of %r", evt_pb)
             raise


Test patch:
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2.pyi
index 188fc7de..3126211f 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2.pyi
@@ -3,18 +3,23 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "ResetRequest",
 ]
 
 
 class ResetRequest(_Message):
-    ledger_id: str
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id"]) -> None: ...
+    ledger_id: _builtins.str
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["ledger_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2_grpc.pyi
index 9a54d1f2..5e9da180 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/testing/reset_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from google.protobuf.empty_pb2 import Empty
@@ -18,24 +18,15 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class ResetServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _ResetServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _ResetServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _ResetServiceAsyncStub: ...
-    def Reset(self, __1: ResetRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _Async[Empty]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _ResetServiceAsyncStub: ...  # type: ignore
+    def Reset(self, __1: ResetRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ResetServiceBlockingStub(ResetServiceStub):
@@ -43,4 +34,4 @@ class _ResetServiceBlockingStub(ResetServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _ResetServiceAsyncStub(ResetServiceStub):
-    def Reset(self, __1: ResetRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[Empty]: ...
+    def Reset(self, __1: ResetRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2.pyi
index fd801d20..71af5348 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2.pyi
@@ -3,11 +3,16 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, sys, typing as _typing
 
 from google.protobuf.message import Message as _Message
 from google.protobuf.timestamp_pb2 import Timestamp
 
+if sys.version_info >= (3, 8):
+    from typing import Literal as _L
+else:
+    from typing_extensions import Literal as _L
+
 __all__ = [
     "GetTimeRequest",
     "GetTimeResponse",
@@ -16,27 +21,27 @@ __all__ = [
 
 
 class GetTimeRequest(_Message):
-    ledger_id: str
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id"]) -> None: ...
+    ledger_id: _builtins.str
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ...): ...
+    def HasField(self, field_name: _L["ledger_id"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class GetTimeResponse(_Message):
     @property
     def current_time(self) -> Timestamp: ...
     def __init__(self, *, current_time: _typing.Optional[Timestamp] = ...): ...
-    def HasField(self, field_name: _typing.Literal["current_time"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["current_time"]) -> None: ...
+    def HasField(self, field_name: _L["current_time"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["current_time"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
 
 class SetTimeRequest(_Message):
-    ledger_id: str
+    ledger_id: _builtins.str
     @property
     def current_time(self) -> Timestamp: ...
     @property
     def new_time(self) -> Timestamp: ...
-    def __init__(self, *, ledger_id: _typing.Optional[str] = ..., current_time: _typing.Optional[Timestamp] = ..., new_time: _typing.Optional[Timestamp] = ...): ...
-    def HasField(self, field_name: _typing.Literal["ledger_id", "current_time", "new_time"]) -> bool: ...
-    def ClearField(self, field_name: _typing.Literal["ledger_id", "current_time", "new_time"]) -> None: ...
+    def __init__(self, *, ledger_id: _typing.Optional[_builtins.str] = ..., current_time: _typing.Optional[Timestamp] = ..., new_time: _typing.Optional[Timestamp] = ...): ...
+    def HasField(self, field_name: _L["ledger_id", "current_time", "new_time"]) -> _builtins.bool: ...
+    def ClearField(self, field_name: _L["ledger_id", "current_time", "new_time"]) -> None: ...
     def WhichOneof(self, oneof_group: _typing.NoReturn) -> _typing.NoReturn: ...
diff --git a/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2_grpc.pyi b/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2_grpc.pyi
index 0466ee2d..1e0eadcc 100644
--- a/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2_grpc.pyi
+++ b/python/dazl/_gen/com/daml/ledger/api/v1/testing/time_service_pb2_grpc.pyi
@@ -3,7 +3,7 @@
 # fmt: off
 # isort: skip_file
 
-import typing as _typing
+import builtins as _builtins, typing as _typing
 
 import grpc as _grpc
 from google.protobuf.empty_pb2 import Empty
@@ -18,25 +18,16 @@ __all__ = [
 _T = _typing.TypeVar('_T')
 
 
-# noinspection PyAbstractClass
-class _Async(_grpc_aio.UnaryUnaryCall, _typing.Awaitable[_T]):
-    pass
-
-# noinspection PyAbstractClass
-class _AsyncStream(_grpc_aio.UnaryStreamCall, _typing.AsyncIterator[_T]):
-    pass
-
-
 # noinspection PyPep8Naming,DuplicatedCode
 class TimeServiceStub:
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc.Channel) -> _TimeServiceBlockingStub: ...
+    def __new__(cls, channel: _grpc.Channel) -> _TimeServiceBlockingStub: ...  # type: ignore
     @classmethod
     @_typing.overload
-    def __new__(cls, channel: _grpc_aio.Channel) -> _TimeServiceAsyncStub: ...
-    def GetTime(self, __1: GetTimeRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTimeResponse], _AsyncStream[GetTimeResponse]]: ...
-    def SetTime(self, __1: SetTimeRequest, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _Async[Empty]]: ...
+    def __new__(cls, channel: _grpc_aio.Channel) -> _TimeServiceAsyncStub: ...  # type: ignore
+    def GetTime(self, __1: GetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[_grpc.CallIterator[GetTimeResponse], _grpc_aio.UnaryStreamCall[_typing.Any, GetTimeResponse]]: ...
+    def SetTime(self, __1: SetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[Empty, _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]]: ...
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _TimeServiceBlockingStub(TimeServiceStub):
@@ -45,5 +36,5 @@ class _TimeServiceBlockingStub(TimeServiceStub):
 
 # noinspection PyPep8Naming,DuplicatedCode
 class _TimeServiceAsyncStub(TimeServiceStub):
-    def GetTime(self, __1: GetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _AsyncStream[GetTimeResponse]: ...
-    def SetTime(self, __1: SetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _Async[Empty]: ...
+    def GetTime(self, __1: GetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryStreamCall[_typing.Any, GetTimeResponse]: ...
+    def SetTime(self, __1: SetTimeRequest, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, Empty]: ...