--- /dev/null
+from google.protobuf.any_pb2 import (\r
+ Any,\r
+)\r
+from google.protobuf.duration_pb2 import (\r
+ Duration,\r
+)\r
+from google.protobuf.field_mask_pb2 import (\r
+ FieldMask,\r
+)\r
+from google.protobuf.internal.containers import (\r
+ RepeatedCompositeFieldContainer,\r
+ RepeatedScalarFieldContainer,\r
+)\r
+from google.protobuf.message import (\r
+ Message,\r
+)\r
+from google.protobuf.struct_pb2 import (\r
+ ListValue,\r
+ Struct,\r
+ Value,\r
+)\r
+from google.protobuf.timestamp_pb2 import (\r
+ Timestamp,\r
+)\r
+from google.protobuf.unittest_pb2 import (\r
+ TestAllExtensions,\r
+)\r
+from google.protobuf.wrappers_pb2 import (\r
+ BoolValue,\r
+ BytesValue,\r
+ DoubleValue,\r
+ FloatValue,\r
+ Int32Value,\r
+ Int64Value,\r
+ StringValue,\r
+ UInt32Value,\r
+ UInt64Value,\r
+)\r
+from typing import (\r
+ Iterable,\r
+ List,\r
+ Mapping,\r
+ MutableMapping,\r
+ Optional,\r
+ Text,\r
+ Tuple,\r
+ cast,\r
+)\r
+\r
+\r
+class EnumType(int):\r
+\r
+ @classmethod\r
+ def Name(cls, number: int) -> bytes: ...\r
+\r
+ @classmethod\r
+ def Value(cls, name: bytes) -> EnumType: ...\r
+\r
+ @classmethod\r
+ def keys(cls) -> List[bytes]: ...\r
+\r
+ @classmethod\r
+ def values(cls) -> List[EnumType]: ...\r
+\r
+ @classmethod\r
+ def items(cls) -> List[Tuple[bytes, EnumType]]: ...\r
+\r
+\r
+FOO: EnumType\r
+BAR: EnumType\r
+\r
+\r
+class MessageType(Message):\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> MessageType: ...\r
+\r
+\r
+class TestMessage(Message):\r
+ bool_value = ... # type: bool\r
+ int32_value = ... # type: int\r
+ int64_value = ... # type: int\r
+ uint32_value = ... # type: int\r
+ uint64_value = ... # type: int\r
+ float_value = ... # type: float\r
+ double_value = ... # type: float\r
+ string_value = ... # type: Text\r
+ bytes_value = ... # type: bytes\r
+ enum_value = ... # type: EnumType\r
+ repeated_bool_value = ... # type: RepeatedScalarFieldContainer[bool]\r
+ repeated_int32_value = ... # type: RepeatedScalarFieldContainer[int]\r
+ repeated_int64_value = ... # type: RepeatedScalarFieldContainer[int]\r
+ repeated_uint32_value = ... # type: RepeatedScalarFieldContainer[int]\r
+ repeated_uint64_value = ... # type: RepeatedScalarFieldContainer[int]\r
+ repeated_float_value = ... # type: RepeatedScalarFieldContainer[float]\r
+ repeated_double_value = ... # type: RepeatedScalarFieldContainer[float]\r
+ repeated_string_value = ... # type: RepeatedScalarFieldContainer[Text]\r
+ repeated_bytes_value = ... # type: RepeatedScalarFieldContainer[bytes]\r
+ repeated_enum_value = ... # type: RepeatedScalarFieldContainer[EnumType]\r
+\r
+ @property\r
+ def message_value(self) -> MessageType: ...\r
+\r
+ @property\r
+ def repeated_message_value(\r
+ self) -> RepeatedCompositeFieldContainer[MessageType]: ...\r
+\r
+ def __init__(self,\r
+ bool_value: Optional[bool] = ...,\r
+ int32_value: Optional[int] = ...,\r
+ int64_value: Optional[int] = ...,\r
+ uint32_value: Optional[int] = ...,\r
+ uint64_value: Optional[int] = ...,\r
+ float_value: Optional[float] = ...,\r
+ double_value: Optional[float] = ...,\r
+ string_value: Optional[Text] = ...,\r
+ bytes_value: Optional[bytes] = ...,\r
+ enum_value: Optional[EnumType] = ...,\r
+ message_value: Optional[MessageType] = ...,\r
+ repeated_bool_value: Optional[Iterable[bool]] = ...,\r
+ repeated_int32_value: Optional[Iterable[int]] = ...,\r
+ repeated_int64_value: Optional[Iterable[int]] = ...,\r
+ repeated_uint32_value: Optional[Iterable[int]] = ...,\r
+ repeated_uint64_value: Optional[Iterable[int]] = ...,\r
+ repeated_float_value: Optional[Iterable[float]] = ...,\r
+ repeated_double_value: Optional[Iterable[float]] = ...,\r
+ repeated_string_value: Optional[Iterable[Text]] = ...,\r
+ repeated_bytes_value: Optional[Iterable[bytes]] = ...,\r
+ repeated_enum_value: Optional[Iterable[EnumType]] = ...,\r
+ repeated_message_value: Optional[Iterable[MessageType]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMessage: ...\r
+\r
+\r
+class TestOneof(Message):\r
+ oneof_int32_value = ... # type: int\r
+ oneof_string_value = ... # type: Text\r
+ oneof_bytes_value = ... # type: bytes\r
+ oneof_enum_value = ... # type: EnumType\r
+\r
+ @property\r
+ def oneof_message_value(self) -> MessageType: ...\r
+\r
+ def __init__(self,\r
+ oneof_int32_value: Optional[int] = ...,\r
+ oneof_string_value: Optional[Text] = ...,\r
+ oneof_bytes_value: Optional[bytes] = ...,\r
+ oneof_enum_value: Optional[EnumType] = ...,\r
+ oneof_message_value: Optional[MessageType] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestOneof: ...\r
+\r
+\r
+class TestMap(Message):\r
+\r
+ class BoolMapEntry(Message):\r
+ key = ... # type: bool\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[bool] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.BoolMapEntry: ...\r
+\r
+ class Int32MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.Int32MapEntry: ...\r
+\r
+ class Int64MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.Int64MapEntry: ...\r
+\r
+ class Uint32MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.Uint32MapEntry: ...\r
+\r
+ class Uint64MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.Uint64MapEntry: ...\r
+\r
+ class StringMapEntry(Message):\r
+ key = ... # type: Text\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[Text] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap.StringMapEntry: ...\r
+\r
+ @property\r
+ def bool_map(self) -> MutableMapping[bool, int]: ...\r
+\r
+ @property\r
+ def int32_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def int64_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def uint32_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def uint64_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def string_map(self) -> MutableMapping[Text, int]: ...\r
+\r
+ def __init__(self,\r
+ bool_map: Optional[Mapping[bool, int]]=...,\r
+ int32_map: Optional[Mapping[int, int]]=...,\r
+ int64_map: Optional[Mapping[int, int]]=...,\r
+ uint32_map: Optional[Mapping[int, int]]=...,\r
+ uint64_map: Optional[Mapping[int, int]]=...,\r
+ string_map: Optional[Mapping[Text, int]]=...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestMap: ...\r
+\r
+\r
+class TestNestedMap(Message):\r
+\r
+ class BoolMapEntry(Message):\r
+ key = ... # type: bool\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[bool] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.BoolMapEntry: ...\r
+\r
+ class Int32MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.Int32MapEntry: ...\r
+\r
+ class Int64MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.Int64MapEntry: ...\r
+\r
+ class Uint32MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.Uint32MapEntry: ...\r
+\r
+ class Uint64MapEntry(Message):\r
+ key = ... # type: int\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[int] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.Uint64MapEntry: ...\r
+\r
+ class StringMapEntry(Message):\r
+ key = ... # type: Text\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[Text] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.StringMapEntry: ...\r
+\r
+ class MapMapEntry(Message):\r
+ key = ... # type: Text\r
+\r
+ @property\r
+ def value(self) -> TestNestedMap: ...\r
+\r
+ def __init__(self,\r
+ key: Optional[Text] = ...,\r
+ value: Optional[TestNestedMap] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap.MapMapEntry: ...\r
+\r
+ @property\r
+ def bool_map(self) -> MutableMapping[bool, int]: ...\r
+\r
+ @property\r
+ def int32_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def int64_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def uint32_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def uint64_map(self) -> MutableMapping[int, int]: ...\r
+\r
+ @property\r
+ def string_map(self) -> MutableMapping[Text, int]: ...\r
+\r
+ @property\r
+ def map_map(self) -> MutableMapping[Text, TestNestedMap]: ...\r
+\r
+ def __init__(self,\r
+ bool_map: Optional[Mapping[bool, int]]=...,\r
+ int32_map: Optional[Mapping[int, int]]=...,\r
+ int64_map: Optional[Mapping[int, int]]=...,\r
+ uint32_map: Optional[Mapping[int, int]]=...,\r
+ uint64_map: Optional[Mapping[int, int]]=...,\r
+ string_map: Optional[Mapping[Text, int]]=...,\r
+ map_map: Optional[Mapping[Text, TestNestedMap]]=...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestNestedMap: ...\r
+\r
+\r
+class TestWrapper(Message):\r
+\r
+ @property\r
+ def bool_value(self) -> BoolValue: ...\r
+\r
+ @property\r
+ def int32_value(self) -> Int32Value: ...\r
+\r
+ @property\r
+ def int64_value(self) -> Int64Value: ...\r
+\r
+ @property\r
+ def uint32_value(self) -> UInt32Value: ...\r
+\r
+ @property\r
+ def uint64_value(self) -> UInt64Value: ...\r
+\r
+ @property\r
+ def float_value(self) -> FloatValue: ...\r
+\r
+ @property\r
+ def double_value(self) -> DoubleValue: ...\r
+\r
+ @property\r
+ def string_value(self) -> StringValue: ...\r
+\r
+ @property\r
+ def bytes_value(self) -> BytesValue: ...\r
+\r
+ @property\r
+ def repeated_bool_value(\r
+ self) -> RepeatedCompositeFieldContainer[BoolValue]: ...\r
+\r
+ @property\r
+ def repeated_int32_value(\r
+ self) -> RepeatedCompositeFieldContainer[Int32Value]: ...\r
+\r
+ @property\r
+ def repeated_int64_value(\r
+ self) -> RepeatedCompositeFieldContainer[Int64Value]: ...\r
+\r
+ @property\r
+ def repeated_uint32_value(\r
+ self) -> RepeatedCompositeFieldContainer[UInt32Value]: ...\r
+\r
+ @property\r
+ def repeated_uint64_value(\r
+ self) -> RepeatedCompositeFieldContainer[UInt64Value]: ...\r
+\r
+ @property\r
+ def repeated_float_value(\r
+ self) -> RepeatedCompositeFieldContainer[FloatValue]: ...\r
+\r
+ @property\r
+ def repeated_double_value(\r
+ self) -> RepeatedCompositeFieldContainer[DoubleValue]: ...\r
+\r
+ @property\r
+ def repeated_string_value(\r
+ self) -> RepeatedCompositeFieldContainer[StringValue]: ...\r
+\r
+ @property\r
+ def repeated_bytes_value(\r
+ self) -> RepeatedCompositeFieldContainer[BytesValue]: ...\r
+\r
+ def __init__(self,\r
+ bool_value: Optional[BoolValue] = ...,\r
+ int32_value: Optional[Int32Value] = ...,\r
+ int64_value: Optional[Int64Value] = ...,\r
+ uint32_value: Optional[UInt32Value] = ...,\r
+ uint64_value: Optional[UInt64Value] = ...,\r
+ float_value: Optional[FloatValue] = ...,\r
+ double_value: Optional[DoubleValue] = ...,\r
+ string_value: Optional[StringValue] = ...,\r
+ bytes_value: Optional[BytesValue] = ...,\r
+ repeated_bool_value: Optional[Iterable[BoolValue]] = ...,\r
+ repeated_int32_value: Optional[Iterable[Int32Value]] = ...,\r
+ repeated_int64_value: Optional[Iterable[Int64Value]] = ...,\r
+ repeated_uint32_value: Optional[Iterable[UInt32Value]] = ...,\r
+ repeated_uint64_value: Optional[Iterable[UInt64Value]] = ...,\r
+ repeated_float_value: Optional[Iterable[FloatValue]] = ...,\r
+ repeated_double_value: Optional[Iterable[DoubleValue]] = ...,\r
+ repeated_string_value: Optional[Iterable[StringValue]] = ...,\r
+ repeated_bytes_value: Optional[Iterable[BytesValue]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestWrapper: ...\r
+\r
+\r
+class TestTimestamp(Message):\r
+\r
+ @property\r
+ def value(self) -> Timestamp: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[Timestamp]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[Timestamp] = ...,\r
+ repeated_value: Optional[Iterable[Timestamp]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestTimestamp: ...\r
+\r
+\r
+class TestDuration(Message):\r
+\r
+ @property\r
+ def value(self) -> Duration: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[Duration]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[Duration] = ...,\r
+ repeated_value: Optional[Iterable[Duration]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestDuration: ...\r
+\r
+\r
+class TestFieldMask(Message):\r
+\r
+ @property\r
+ def value(self) -> FieldMask: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[FieldMask] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestFieldMask: ...\r
+\r
+\r
+class TestStruct(Message):\r
+\r
+ @property\r
+ def value(self) -> Struct: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[Struct]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[Struct] = ...,\r
+ repeated_value: Optional[Iterable[Struct]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestStruct: ...\r
+\r
+\r
+class TestAny(Message):\r
+\r
+ @property\r
+ def value(self) -> Any: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[Any]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[Any] = ...,\r
+ repeated_value: Optional[Iterable[Any]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestAny: ...\r
+\r
+\r
+class TestValue(Message):\r
+\r
+ @property\r
+ def value(self) -> Value: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[Value]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[Value] = ...,\r
+ repeated_value: Optional[Iterable[Value]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestValue: ...\r
+\r
+\r
+class TestListValue(Message):\r
+\r
+ @property\r
+ def value(self) -> ListValue: ...\r
+\r
+ @property\r
+ def repeated_value(self) -> RepeatedCompositeFieldContainer[ListValue]: ...\r
+\r
+ def __init__(self,\r
+ value: Optional[ListValue] = ...,\r
+ repeated_value: Optional[Iterable[ListValue]] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestListValue: ...\r
+\r
+\r
+class TestBoolValue(Message):\r
+\r
+ class BoolMapEntry(Message):\r
+ key = ... # type: bool\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ key: Optional[bool] = ...,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestBoolValue.BoolMapEntry: ...\r
+ bool_value = ... # type: bool\r
+\r
+ @property\r
+ def bool_map(self) -> MutableMapping[bool, int]: ...\r
+\r
+ def __init__(self,\r
+ bool_value: Optional[bool] = ...,\r
+ bool_map: Optional[Mapping[bool, int]]=...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestBoolValue: ...\r
+\r
+\r
+class TestCustomJsonName(Message):\r
+ value = ... # type: int\r
+\r
+ def __init__(self,\r
+ value: Optional[int] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestCustomJsonName: ...\r
+\r
+\r
+class TestExtensions(Message):\r
+\r
+ @property\r
+ def extensions(self) -> TestAllExtensions: ...\r
+\r
+ def __init__(self,\r
+ extensions: Optional[TestAllExtensions] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestExtensions: ...\r
+\r
+\r
+class TestEnumValue(Message):\r
+ enum_value1 = ... # type: EnumType\r
+ enum_value2 = ... # type: EnumType\r
+ enum_value3 = ... # type: EnumType\r
+\r
+ def __init__(self,\r
+ enum_value1: Optional[EnumType] = ...,\r
+ enum_value2: Optional[EnumType] = ...,\r
+ enum_value3: Optional[EnumType] = ...,\r
+ ) -> None: ...\r
+\r
+ @classmethod\r
+ def FromString(cls, s: bytes) -> TestEnumValue: ...\r