1 from google.protobuf.message import (
\r
4 from google.protobuf.unittest_import_pb2 import (
\r
18 class Proto2MapEnum(int):
\r
21 def Name(cls, number: int) -> bytes: ...
\r
24 def Value(cls, name: bytes) -> Proto2MapEnum: ...
\r
27 def keys(cls) -> List[bytes]: ...
\r
30 def values(cls) -> List[Proto2MapEnum]: ...
\r
33 def items(cls) -> List[Tuple[bytes, Proto2MapEnum]]: ...
\r
34 PROTO2_MAP_ENUM_FOO: Proto2MapEnum
\r
35 PROTO2_MAP_ENUM_BAR: Proto2MapEnum
\r
36 PROTO2_MAP_ENUM_BAZ: Proto2MapEnum
\r
39 class Proto2MapEnumPlusExtra(int):
\r
42 def Name(cls, number: int) -> bytes: ...
\r
45 def Value(cls, name: bytes) -> Proto2MapEnumPlusExtra: ...
\r
48 def keys(cls) -> List[bytes]: ...
\r
51 def values(cls) -> List[Proto2MapEnumPlusExtra]: ...
\r
54 def items(cls) -> List[Tuple[bytes, Proto2MapEnumPlusExtra]]: ...
\r
55 E_PROTO2_MAP_ENUM_FOO: Proto2MapEnumPlusExtra
\r
56 E_PROTO2_MAP_ENUM_BAR: Proto2MapEnumPlusExtra
\r
57 E_PROTO2_MAP_ENUM_BAZ: Proto2MapEnumPlusExtra
\r
58 E_PROTO2_MAP_ENUM_EXTRA: Proto2MapEnumPlusExtra
\r
61 class TestEnumMap(Message):
\r
63 class KnownMapFieldEntry(Message):
\r
64 key = ... # type: int
\r
65 value = ... # type: Proto2MapEnum
\r
68 key: Optional[int] = ...,
\r
69 value: Optional[Proto2MapEnum] = ...,
\r
73 def FromString(cls, s: bytes) -> TestEnumMap.KnownMapFieldEntry: ...
\r
75 class UnknownMapFieldEntry(Message):
\r
76 key = ... # type: int
\r
77 value = ... # type: Proto2MapEnum
\r
80 key: Optional[int] = ...,
\r
81 value: Optional[Proto2MapEnum] = ...,
\r
85 def FromString(cls, s: bytes) -> TestEnumMap.UnknownMapFieldEntry: ...
\r
88 def known_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ...
\r
91 def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ...
\r
94 known_map_field: Optional[Mapping[int, Proto2MapEnum]]=...,
\r
95 unknown_map_field: Optional[Mapping[int, Proto2MapEnum]]=...,
\r
99 def FromString(cls, s: bytes) -> TestEnumMap: ...
\r
102 class TestEnumMapPlusExtra(Message):
\r
104 class KnownMapFieldEntry(Message):
\r
105 key = ... # type: int
\r
106 value = ... # type: Proto2MapEnumPlusExtra
\r
109 key: Optional[int] = ...,
\r
110 value: Optional[Proto2MapEnumPlusExtra] = ...,
\r
114 def FromString(cls, s: bytes) -> TestEnumMapPlusExtra.KnownMapFieldEntry: ...
\r
116 class UnknownMapFieldEntry(Message):
\r
117 key = ... # type: int
\r
118 value = ... # type: Proto2MapEnumPlusExtra
\r
121 key: Optional[int] = ...,
\r
122 value: Optional[Proto2MapEnumPlusExtra] = ...,
\r
126 def FromString(cls, s: bytes) -> TestEnumMapPlusExtra.UnknownMapFieldEntry: ...
\r
129 def known_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ...
\r
132 def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ...
\r
135 known_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]]=...,
\r
136 unknown_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]]=...,
\r
140 def FromString(cls, s: bytes) -> TestEnumMapPlusExtra: ...
\r
143 class TestImportEnumMap(Message):
\r
145 class ImportEnumAmpEntry(Message):
\r
146 key = ... # type: int
\r
147 value = ... # type: ImportEnumForMap
\r
150 key: Optional[int] = ...,
\r
151 value: Optional[ImportEnumForMap] = ...,
\r
155 def FromString(cls, s: bytes) -> TestImportEnumMap.ImportEnumAmpEntry: ...
\r
158 def import_enum_amp(self) -> MutableMapping[int, ImportEnumForMap]: ...
\r
161 import_enum_amp: Optional[Mapping[int, ImportEnumForMap]]=...,
\r
165 def FromString(cls, s: bytes) -> TestImportEnumMap: ...
\r
168 class TestIntIntMap(Message):
\r
170 class MEntry(Message):
\r
171 key = ... # type: int
\r
172 value = ... # type: int
\r
175 key: Optional[int] = ...,
\r
176 value: Optional[int] = ...,
\r
180 def FromString(cls, s: bytes) -> TestIntIntMap.MEntry: ...
\r
183 def m(self) -> MutableMapping[int, int]: ...
\r
186 m: Optional[Mapping[int, int]]=...,
\r
190 def FromString(cls, s: bytes) -> TestIntIntMap: ...
\r
193 class TestMaps(Message):
\r
195 class MInt32Entry(Message):
\r
196 key = ... # type: int
\r
199 def value(self) -> TestIntIntMap: ...
\r
202 key: Optional[int] = ...,
\r
203 value: Optional[TestIntIntMap] = ...,
\r
207 def FromString(cls, s: bytes) -> TestMaps.MInt32Entry: ...
\r
209 class MInt64Entry(Message):
\r
210 key = ... # type: int
\r
213 def value(self) -> TestIntIntMap: ...
\r
216 key: Optional[int] = ...,
\r
217 value: Optional[TestIntIntMap] = ...,
\r
221 def FromString(cls, s: bytes) -> TestMaps.MInt64Entry: ...
\r
223 class MUint32Entry(Message):
\r
224 key = ... # type: int
\r
227 def value(self) -> TestIntIntMap: ...
\r
230 key: Optional[int] = ...,
\r
231 value: Optional[TestIntIntMap] = ...,
\r
235 def FromString(cls, s: bytes) -> TestMaps.MUint32Entry: ...
\r
237 class MUint64Entry(Message):
\r
238 key = ... # type: int
\r
241 def value(self) -> TestIntIntMap: ...
\r
244 key: Optional[int] = ...,
\r
245 value: Optional[TestIntIntMap] = ...,
\r
249 def FromString(cls, s: bytes) -> TestMaps.MUint64Entry: ...
\r
251 class MSint32Entry(Message):
\r
252 key = ... # type: int
\r
255 def value(self) -> TestIntIntMap: ...
\r
258 key: Optional[int] = ...,
\r
259 value: Optional[TestIntIntMap] = ...,
\r
263 def FromString(cls, s: bytes) -> TestMaps.MSint32Entry: ...
\r
265 class MSint64Entry(Message):
\r
266 key = ... # type: int
\r
269 def value(self) -> TestIntIntMap: ...
\r
272 key: Optional[int] = ...,
\r
273 value: Optional[TestIntIntMap] = ...,
\r
277 def FromString(cls, s: bytes) -> TestMaps.MSint64Entry: ...
\r
279 class MFixed32Entry(Message):
\r
280 key = ... # type: int
\r
283 def value(self) -> TestIntIntMap: ...
\r
286 key: Optional[int] = ...,
\r
287 value: Optional[TestIntIntMap] = ...,
\r
291 def FromString(cls, s: bytes) -> TestMaps.MFixed32Entry: ...
\r
293 class MFixed64Entry(Message):
\r
294 key = ... # type: int
\r
297 def value(self) -> TestIntIntMap: ...
\r
300 key: Optional[int] = ...,
\r
301 value: Optional[TestIntIntMap] = ...,
\r
305 def FromString(cls, s: bytes) -> TestMaps.MFixed64Entry: ...
\r
307 class MSfixed32Entry(Message):
\r
308 key = ... # type: int
\r
311 def value(self) -> TestIntIntMap: ...
\r
314 key: Optional[int] = ...,
\r
315 value: Optional[TestIntIntMap] = ...,
\r
319 def FromString(cls, s: bytes) -> TestMaps.MSfixed32Entry: ...
\r
321 class MSfixed64Entry(Message):
\r
322 key = ... # type: int
\r
325 def value(self) -> TestIntIntMap: ...
\r
328 key: Optional[int] = ...,
\r
329 value: Optional[TestIntIntMap] = ...,
\r
333 def FromString(cls, s: bytes) -> TestMaps.MSfixed64Entry: ...
\r
335 class MBoolEntry(Message):
\r
336 key = ... # type: bool
\r
339 def value(self) -> TestIntIntMap: ...
\r
342 key: Optional[bool] = ...,
\r
343 value: Optional[TestIntIntMap] = ...,
\r
347 def FromString(cls, s: bytes) -> TestMaps.MBoolEntry: ...
\r
349 class MStringEntry(Message):
\r
350 key = ... # type: Text
\r
353 def value(self) -> TestIntIntMap: ...
\r
356 key: Optional[Text] = ...,
\r
357 value: Optional[TestIntIntMap] = ...,
\r
361 def FromString(cls, s: bytes) -> TestMaps.MStringEntry: ...
\r
364 def m_int32(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
367 def m_int64(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
370 def m_uint32(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
373 def m_uint64(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
376 def m_sint32(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
379 def m_sint64(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
382 def m_fixed32(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
385 def m_fixed64(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
388 def m_sfixed32(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
391 def m_sfixed64(self) -> MutableMapping[int, TestIntIntMap]: ...
\r
394 def m_bool(self) -> MutableMapping[bool, TestIntIntMap]: ...
\r
397 def m_string(self) -> MutableMapping[Text, TestIntIntMap]: ...
\r
400 m_int32: Optional[Mapping[int, TestIntIntMap]]=...,
\r
401 m_int64: Optional[Mapping[int, TestIntIntMap]]=...,
\r
402 m_uint32: Optional[Mapping[int, TestIntIntMap]]=...,
\r
403 m_uint64: Optional[Mapping[int, TestIntIntMap]]=...,
\r
404 m_sint32: Optional[Mapping[int, TestIntIntMap]]=...,
\r
405 m_sint64: Optional[Mapping[int, TestIntIntMap]]=...,
\r
406 m_fixed32: Optional[Mapping[int, TestIntIntMap]]=...,
\r
407 m_fixed64: Optional[Mapping[int, TestIntIntMap]]=...,
\r
408 m_sfixed32: Optional[Mapping[int, TestIntIntMap]]=...,
\r
409 m_sfixed64: Optional[Mapping[int, TestIntIntMap]]=...,
\r
410 m_bool: Optional[Mapping[bool, TestIntIntMap]]=...,
\r
411 m_string: Optional[Mapping[Text, TestIntIntMap]]=...,
\r
415 def FromString(cls, s: bytes) -> TestMaps: ...
\r
418 class TestSubmessageMaps(Message):
\r
421 def m(self) -> TestMaps: ...
\r
424 m: Optional[TestMaps] = ...,
\r
428 def FromString(cls, s: bytes) -> TestSubmessageMaps: ...
\r