1 from google.protobuf.message import (
\r
4 from google.protobuf.unittest_no_arena_pb2 import (
\r
7 from google.protobuf.unittest_pb2 import (
\r
8 ForeignMessage as ForeignMessage1,
\r
12 from typing import (
\r
26 def Name(cls, number: int) -> bytes: ...
\r
29 def Value(cls, name: bytes) -> MapEnum: ...
\r
32 def keys(cls) -> List[bytes]: ...
\r
35 def values(cls) -> List[MapEnum]: ...
\r
38 def items(cls) -> List[Tuple[bytes, MapEnum]]: ...
\r
41 MAP_ENUM_FOO: MapEnum
\r
42 MAP_ENUM_BAR: MapEnum
\r
43 MAP_ENUM_BAZ: MapEnum
\r
46 class TestMap(Message):
\r
48 class MapInt32Int32Entry(Message):
\r
49 key = ... # type: int
\r
50 value = ... # type: int
\r
53 key: Optional[int] = ...,
\r
54 value: Optional[int] = ...,
\r
58 def FromString(cls, s: bytes) -> TestMap.MapInt32Int32Entry: ...
\r
60 class MapInt64Int64Entry(Message):
\r
61 key = ... # type: int
\r
62 value = ... # type: int
\r
65 key: Optional[int] = ...,
\r
66 value: Optional[int] = ...,
\r
70 def FromString(cls, s: bytes) -> TestMap.MapInt64Int64Entry: ...
\r
72 class MapUint32Uint32Entry(Message):
\r
73 key = ... # type: int
\r
74 value = ... # type: int
\r
77 key: Optional[int] = ...,
\r
78 value: Optional[int] = ...,
\r
82 def FromString(cls, s: bytes) -> TestMap.MapUint32Uint32Entry: ...
\r
84 class MapUint64Uint64Entry(Message):
\r
85 key = ... # type: int
\r
86 value = ... # type: int
\r
89 key: Optional[int] = ...,
\r
90 value: Optional[int] = ...,
\r
94 def FromString(cls, s: bytes) -> TestMap.MapUint64Uint64Entry: ...
\r
96 class MapSint32Sint32Entry(Message):
\r
97 key = ... # type: int
\r
98 value = ... # type: int
\r
101 key: Optional[int] = ...,
\r
102 value: Optional[int] = ...,
\r
106 def FromString(cls, s: bytes) -> TestMap.MapSint32Sint32Entry: ...
\r
108 class MapSint64Sint64Entry(Message):
\r
109 key = ... # type: int
\r
110 value = ... # type: int
\r
113 key: Optional[int] = ...,
\r
114 value: Optional[int] = ...,
\r
118 def FromString(cls, s: bytes) -> TestMap.MapSint64Sint64Entry: ...
\r
120 class MapFixed32Fixed32Entry(Message):
\r
121 key = ... # type: int
\r
122 value = ... # type: int
\r
125 key: Optional[int] = ...,
\r
126 value: Optional[int] = ...,
\r
130 def FromString(cls, s: bytes) -> TestMap.MapFixed32Fixed32Entry: ...
\r
132 class MapFixed64Fixed64Entry(Message):
\r
133 key = ... # type: int
\r
134 value = ... # type: int
\r
137 key: Optional[int] = ...,
\r
138 value: Optional[int] = ...,
\r
142 def FromString(cls, s: bytes) -> TestMap.MapFixed64Fixed64Entry: ...
\r
144 class MapSfixed32Sfixed32Entry(Message):
\r
145 key = ... # type: int
\r
146 value = ... # type: int
\r
149 key: Optional[int] = ...,
\r
150 value: Optional[int] = ...,
\r
154 def FromString(cls, s: bytes) -> TestMap.MapSfixed32Sfixed32Entry: ...
\r
156 class MapSfixed64Sfixed64Entry(Message):
\r
157 key = ... # type: int
\r
158 value = ... # type: int
\r
161 key: Optional[int] = ...,
\r
162 value: Optional[int] = ...,
\r
166 def FromString(cls, s: bytes) -> TestMap.MapSfixed64Sfixed64Entry: ...
\r
168 class MapInt32FloatEntry(Message):
\r
169 key = ... # type: int
\r
170 value = ... # type: float
\r
173 key: Optional[int] = ...,
\r
174 value: Optional[float] = ...,
\r
178 def FromString(cls, s: bytes) -> TestMap.MapInt32FloatEntry: ...
\r
180 class MapInt32DoubleEntry(Message):
\r
181 key = ... # type: int
\r
182 value = ... # type: float
\r
185 key: Optional[int] = ...,
\r
186 value: Optional[float] = ...,
\r
190 def FromString(cls, s: bytes) -> TestMap.MapInt32DoubleEntry: ...
\r
192 class MapBoolBoolEntry(Message):
\r
193 key = ... # type: bool
\r
194 value = ... # type: bool
\r
197 key: Optional[bool] = ...,
\r
198 value: Optional[bool] = ...,
\r
202 def FromString(cls, s: bytes) -> TestMap.MapBoolBoolEntry: ...
\r
204 class MapStringStringEntry(Message):
\r
205 key = ... # type: Text
\r
206 value = ... # type: Text
\r
209 key: Optional[Text] = ...,
\r
210 value: Optional[Text] = ...,
\r
214 def FromString(cls, s: bytes) -> TestMap.MapStringStringEntry: ...
\r
216 class MapInt32BytesEntry(Message):
\r
217 key = ... # type: int
\r
218 value = ... # type: bytes
\r
221 key: Optional[int] = ...,
\r
222 value: Optional[bytes] = ...,
\r
226 def FromString(cls, s: bytes) -> TestMap.MapInt32BytesEntry: ...
\r
228 class MapInt32EnumEntry(Message):
\r
229 key = ... # type: int
\r
230 value = ... # type: MapEnum
\r
233 key: Optional[int] = ...,
\r
234 value: Optional[MapEnum] = ...,
\r
238 def FromString(cls, s: bytes) -> TestMap.MapInt32EnumEntry: ...
\r
240 class MapInt32ForeignMessageEntry(Message):
\r
241 key = ... # type: int
\r
244 def value(self) -> ForeignMessage1: ...
\r
247 key: Optional[int] = ...,
\r
248 value: Optional[ForeignMessage1] = ...,
\r
252 def FromString(cls, s: bytes) -> TestMap.MapInt32ForeignMessageEntry: ...
\r
254 class MapStringForeignMessageEntry(Message):
\r
255 key = ... # type: Text
\r
258 def value(self) -> ForeignMessage1: ...
\r
261 key: Optional[Text] = ...,
\r
262 value: Optional[ForeignMessage1] = ...,
\r
267 cls, s: bytes) -> TestMap.MapStringForeignMessageEntry: ...
\r
269 class MapInt32AllTypesEntry(Message):
\r
270 key = ... # type: int
\r
273 def value(self) -> TestAllTypes: ...
\r
276 key: Optional[int] = ...,
\r
277 value: Optional[TestAllTypes] = ...,
\r
281 def FromString(cls, s: bytes) -> TestMap.MapInt32AllTypesEntry: ...
\r
284 def map_int32_int32(self) -> MutableMapping[int, int]: ...
\r
287 def map_int64_int64(self) -> MutableMapping[int, int]: ...
\r
290 def map_uint32_uint32(self) -> MutableMapping[int, int]: ...
\r
293 def map_uint64_uint64(self) -> MutableMapping[int, int]: ...
\r
296 def map_sint32_sint32(self) -> MutableMapping[int, int]: ...
\r
299 def map_sint64_sint64(self) -> MutableMapping[int, int]: ...
\r
302 def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ...
\r
305 def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ...
\r
308 def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ...
\r
311 def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ...
\r
314 def map_int32_float(self) -> MutableMapping[int, float]: ...
\r
317 def map_int32_double(self) -> MutableMapping[int, float]: ...
\r
320 def map_bool_bool(self) -> MutableMapping[bool, bool]: ...
\r
323 def map_string_string(self) -> MutableMapping[Text, Text]: ...
\r
326 def map_int32_bytes(self) -> MutableMapping[int, bytes]: ...
\r
329 def map_int32_enum(self) -> MutableMapping[int, MapEnum]: ...
\r
332 def map_int32_foreign_message(
\r
333 self) -> MutableMapping[int, ForeignMessage1]: ...
\r
336 def map_string_foreign_message(
\r
337 self) -> MutableMapping[Text, ForeignMessage1]: ...
\r
340 def map_int32_all_types(self) -> MutableMapping[int, TestAllTypes]: ...
\r
343 map_int32_int32: Optional[Mapping[int, int]]=...,
\r
344 map_int64_int64: Optional[Mapping[int, int]]=...,
\r
345 map_uint32_uint32: Optional[Mapping[int, int]]=...,
\r
346 map_uint64_uint64: Optional[Mapping[int, int]]=...,
\r
347 map_sint32_sint32: Optional[Mapping[int, int]]=...,
\r
348 map_sint64_sint64: Optional[Mapping[int, int]]=...,
\r
349 map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
\r
350 map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
\r
351 map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
\r
352 map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
\r
353 map_int32_float: Optional[Mapping[int, float]]=...,
\r
354 map_int32_double: Optional[Mapping[int, float]]=...,
\r
355 map_bool_bool: Optional[Mapping[bool, bool]]=...,
\r
356 map_string_string: Optional[Mapping[Text, Text]]=...,
\r
357 map_int32_bytes: Optional[Mapping[int, bytes]]=...,
\r
358 map_int32_enum: Optional[Mapping[int, MapEnum]]=...,
\r
359 map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]]=...,
\r
360 map_string_foreign_message: Optional[Mapping[Text, ForeignMessage1]]=...,
\r
361 map_int32_all_types: Optional[Mapping[int, TestAllTypes]]=...,
\r
365 def FromString(cls, s: bytes) -> TestMap: ...
\r
368 class TestMapSubmessage(Message):
\r
371 def test_map(self) -> TestMap: ...
\r
374 test_map: Optional[TestMap] = ...,
\r
378 def FromString(cls, s: bytes) -> TestMapSubmessage: ...
\r
381 class TestMessageMap(Message):
\r
383 class MapInt32MessageEntry(Message):
\r
384 key = ... # type: int
\r
387 def value(self) -> TestAllTypes: ...
\r
390 key: Optional[int] = ...,
\r
391 value: Optional[TestAllTypes] = ...,
\r
395 def FromString(cls, s: bytes) -> TestMessageMap.MapInt32MessageEntry: ...
\r
398 def map_int32_message(self) -> MutableMapping[int, TestAllTypes]: ...
\r
401 map_int32_message: Optional[Mapping[int, TestAllTypes]]=...,
\r
405 def FromString(cls, s: bytes) -> TestMessageMap: ...
\r
408 class TestSameTypeMap(Message):
\r
410 class Map1Entry(Message):
\r
411 key = ... # type: int
\r
412 value = ... # type: int
\r
415 key: Optional[int] = ...,
\r
416 value: Optional[int] = ...,
\r
420 def FromString(cls, s: bytes) -> TestSameTypeMap.Map1Entry: ...
\r
422 class Map2Entry(Message):
\r
423 key = ... # type: int
\r
424 value = ... # type: int
\r
427 key: Optional[int] = ...,
\r
428 value: Optional[int] = ...,
\r
432 def FromString(cls, s: bytes) -> TestSameTypeMap.Map2Entry: ...
\r
435 def map1(self) -> MutableMapping[int, int]: ...
\r
438 def map2(self) -> MutableMapping[int, int]: ...
\r
441 map1: Optional[Mapping[int, int]]=...,
\r
442 map2: Optional[Mapping[int, int]]=...,
\r
446 def FromString(cls, s: bytes) -> TestSameTypeMap: ...
\r
449 class TestRequiredMessageMap(Message):
\r
451 class MapFieldEntry(Message):
\r
452 key = ... # type: int
\r
455 def value(self) -> TestRequired: ...
\r
458 key: Optional[int] = ...,
\r
459 value: Optional[TestRequired] = ...,
\r
464 cls, s: bytes) -> TestRequiredMessageMap.MapFieldEntry: ...
\r
467 def map_field(self) -> MutableMapping[int, TestRequired]: ...
\r
470 map_field: Optional[Mapping[int, TestRequired]]=...,
\r
474 def FromString(cls, s: bytes) -> TestRequiredMessageMap: ...
\r
477 class TestArenaMap(Message):
\r
479 class MapInt32Int32Entry(Message):
\r
480 key = ... # type: int
\r
481 value = ... # type: int
\r
484 key: Optional[int] = ...,
\r
485 value: Optional[int] = ...,
\r
489 def FromString(cls, s: bytes) -> TestArenaMap.MapInt32Int32Entry: ...
\r
491 class MapInt64Int64Entry(Message):
\r
492 key = ... # type: int
\r
493 value = ... # type: int
\r
496 key: Optional[int] = ...,
\r
497 value: Optional[int] = ...,
\r
501 def FromString(cls, s: bytes) -> TestArenaMap.MapInt64Int64Entry: ...
\r
503 class MapUint32Uint32Entry(Message):
\r
504 key = ... # type: int
\r
505 value = ... # type: int
\r
508 key: Optional[int] = ...,
\r
509 value: Optional[int] = ...,
\r
513 def FromString(cls, s: bytes) -> TestArenaMap.MapUint32Uint32Entry: ...
\r
515 class MapUint64Uint64Entry(Message):
\r
516 key = ... # type: int
\r
517 value = ... # type: int
\r
520 key: Optional[int] = ...,
\r
521 value: Optional[int] = ...,
\r
525 def FromString(cls, s: bytes) -> TestArenaMap.MapUint64Uint64Entry: ...
\r
527 class MapSint32Sint32Entry(Message):
\r
528 key = ... # type: int
\r
529 value = ... # type: int
\r
532 key: Optional[int] = ...,
\r
533 value: Optional[int] = ...,
\r
537 def FromString(cls, s: bytes) -> TestArenaMap.MapSint32Sint32Entry: ...
\r
539 class MapSint64Sint64Entry(Message):
\r
540 key = ... # type: int
\r
541 value = ... # type: int
\r
544 key: Optional[int] = ...,
\r
545 value: Optional[int] = ...,
\r
549 def FromString(cls, s: bytes) -> TestArenaMap.MapSint64Sint64Entry: ...
\r
551 class MapFixed32Fixed32Entry(Message):
\r
552 key = ... # type: int
\r
553 value = ... # type: int
\r
556 key: Optional[int] = ...,
\r
557 value: Optional[int] = ...,
\r
561 def FromString(cls, s: bytes) -> TestArenaMap.MapFixed32Fixed32Entry: ...
\r
563 class MapFixed64Fixed64Entry(Message):
\r
564 key = ... # type: int
\r
565 value = ... # type: int
\r
568 key: Optional[int] = ...,
\r
569 value: Optional[int] = ...,
\r
573 def FromString(cls, s: bytes) -> TestArenaMap.MapFixed64Fixed64Entry: ...
\r
575 class MapSfixed32Sfixed32Entry(Message):
\r
576 key = ... # type: int
\r
577 value = ... # type: int
\r
580 key: Optional[int] = ...,
\r
581 value: Optional[int] = ...,
\r
586 cls, s: bytes) -> TestArenaMap.MapSfixed32Sfixed32Entry: ...
\r
588 class MapSfixed64Sfixed64Entry(Message):
\r
589 key = ... # type: int
\r
590 value = ... # type: int
\r
593 key: Optional[int] = ...,
\r
594 value: Optional[int] = ...,
\r
599 cls, s: bytes) -> TestArenaMap.MapSfixed64Sfixed64Entry: ...
\r
601 class MapInt32FloatEntry(Message):
\r
602 key = ... # type: int
\r
603 value = ... # type: float
\r
606 key: Optional[int] = ...,
\r
607 value: Optional[float] = ...,
\r
611 def FromString(cls, s: bytes) -> TestArenaMap.MapInt32FloatEntry: ...
\r
613 class MapInt32DoubleEntry(Message):
\r
614 key = ... # type: int
\r
615 value = ... # type: float
\r
618 key: Optional[int] = ...,
\r
619 value: Optional[float] = ...,
\r
623 def FromString(cls, s: bytes) -> TestArenaMap.MapInt32DoubleEntry: ...
\r
625 class MapBoolBoolEntry(Message):
\r
626 key = ... # type: bool
\r
627 value = ... # type: bool
\r
630 key: Optional[bool] = ...,
\r
631 value: Optional[bool] = ...,
\r
635 def FromString(cls, s: bytes) -> TestArenaMap.MapBoolBoolEntry: ...
\r
637 class MapStringStringEntry(Message):
\r
638 key = ... # type: Text
\r
639 value = ... # type: Text
\r
642 key: Optional[Text] = ...,
\r
643 value: Optional[Text] = ...,
\r
647 def FromString(cls, s: bytes) -> TestArenaMap.MapStringStringEntry: ...
\r
649 class MapInt32BytesEntry(Message):
\r
650 key = ... # type: int
\r
651 value = ... # type: bytes
\r
654 key: Optional[int] = ...,
\r
655 value: Optional[bytes] = ...,
\r
659 def FromString(cls, s: bytes) -> TestArenaMap.MapInt32BytesEntry: ...
\r
661 class MapInt32EnumEntry(Message):
\r
662 key = ... # type: int
\r
663 value = ... # type: MapEnum
\r
666 key: Optional[int] = ...,
\r
667 value: Optional[MapEnum] = ...,
\r
671 def FromString(cls, s: bytes) -> TestArenaMap.MapInt32EnumEntry: ...
\r
673 class MapInt32ForeignMessageEntry(Message):
\r
674 key = ... # type: int
\r
677 def value(self) -> ForeignMessage1: ...
\r
680 key: Optional[int] = ...,
\r
681 value: Optional[ForeignMessage1] = ...,
\r
686 cls, s: bytes) -> TestArenaMap.MapInt32ForeignMessageEntry: ...
\r
688 class MapInt32ForeignMessageNoArenaEntry(Message):
\r
689 key = ... # type: int
\r
692 def value(self) -> ForeignMessage: ...
\r
695 key: Optional[int] = ...,
\r
696 value: Optional[ForeignMessage] = ...,
\r
701 cls, s: bytes) -> TestArenaMap.MapInt32ForeignMessageNoArenaEntry: ...
\r
704 def map_int32_int32(self) -> MutableMapping[int, int]: ...
\r
707 def map_int64_int64(self) -> MutableMapping[int, int]: ...
\r
710 def map_uint32_uint32(self) -> MutableMapping[int, int]: ...
\r
713 def map_uint64_uint64(self) -> MutableMapping[int, int]: ...
\r
716 def map_sint32_sint32(self) -> MutableMapping[int, int]: ...
\r
719 def map_sint64_sint64(self) -> MutableMapping[int, int]: ...
\r
722 def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ...
\r
725 def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ...
\r
728 def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ...
\r
731 def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ...
\r
734 def map_int32_float(self) -> MutableMapping[int, float]: ...
\r
737 def map_int32_double(self) -> MutableMapping[int, float]: ...
\r
740 def map_bool_bool(self) -> MutableMapping[bool, bool]: ...
\r
743 def map_string_string(self) -> MutableMapping[Text, Text]: ...
\r
746 def map_int32_bytes(self) -> MutableMapping[int, bytes]: ...
\r
749 def map_int32_enum(self) -> MutableMapping[int, MapEnum]: ...
\r
752 def map_int32_foreign_message(
\r
753 self) -> MutableMapping[int, ForeignMessage1]: ...
\r
756 def map_int32_foreign_message_no_arena(
\r
757 self) -> MutableMapping[int, ForeignMessage]: ...
\r
760 map_int32_int32: Optional[Mapping[int, int]]=...,
\r
761 map_int64_int64: Optional[Mapping[int, int]]=...,
\r
762 map_uint32_uint32: Optional[Mapping[int, int]]=...,
\r
763 map_uint64_uint64: Optional[Mapping[int, int]]=...,
\r
764 map_sint32_sint32: Optional[Mapping[int, int]]=...,
\r
765 map_sint64_sint64: Optional[Mapping[int, int]]=...,
\r
766 map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
\r
767 map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
\r
768 map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
\r
769 map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
\r
770 map_int32_float: Optional[Mapping[int, float]]=...,
\r
771 map_int32_double: Optional[Mapping[int, float]]=...,
\r
772 map_bool_bool: Optional[Mapping[bool, bool]]=...,
\r
773 map_string_string: Optional[Mapping[Text, Text]]=...,
\r
774 map_int32_bytes: Optional[Mapping[int, bytes]]=...,
\r
775 map_int32_enum: Optional[Mapping[int, MapEnum]]=...,
\r
776 map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]]=...,
\r
777 map_int32_foreign_message_no_arena: Optional[Mapping[int, ForeignMessage]]=...,
\r
781 def FromString(cls, s: bytes) -> TestArenaMap: ...
\r
784 class MessageContainingEnumCalledType(Message):
\r
789 def Name(cls, number: int) -> bytes: ...
\r
792 def Value(cls, name: bytes) -> MessageContainingEnumCalledType.Type: ...
\r
795 def keys(cls) -> List[bytes]: ...
\r
798 def values(cls) -> List[MessageContainingEnumCalledType.Type]: ...
\r
801 def items(cls) -> List[Tuple[bytes,
\r
802 MessageContainingEnumCalledType.Type]]: ...
\r
805 class TypeEntry(Message):
\r
806 key = ... # type: Text
\r
809 def value(self) -> MessageContainingEnumCalledType: ...
\r
812 key: Optional[Text] = ...,
\r
813 value: Optional[MessageContainingEnumCalledType] = ...,
\r
818 cls, s: bytes) -> MessageContainingEnumCalledType.TypeEntry: ...
\r
821 def type(self) -> MutableMapping[Text,
\r
822 MessageContainingEnumCalledType]: ...
\r
825 type: Optional[Mapping[Text, MessageContainingEnumCalledType]]=...,
\r
829 def FromString(cls, s: bytes) -> MessageContainingEnumCalledType: ...
\r
832 class MessageContainingMapCalledEntry(Message):
\r
834 class EntryEntry(Message):
\r
835 key = ... # type: int
\r
836 value = ... # type: int
\r
839 key: Optional[int] = ...,
\r
840 value: Optional[int] = ...,
\r
845 cls, s: bytes) -> MessageContainingMapCalledEntry.EntryEntry: ...
\r
848 def entry(self) -> MutableMapping[int, int]: ...
\r
851 entry: Optional[Mapping[int, int]]=...,
\r
855 def FromString(cls, s: bytes) -> MessageContainingMapCalledEntry: ...
\r
858 class TestRecursiveMapMessage(Message):
\r
860 class AEntry(Message):
\r
861 key = ... # type: Text
\r
864 def value(self) -> TestRecursiveMapMessage: ...
\r
867 key: Optional[Text] = ...,
\r
868 value: Optional[TestRecursiveMapMessage] = ...,
\r
872 def FromString(cls, s: bytes) -> TestRecursiveMapMessage.AEntry: ...
\r
875 def a(self) -> MutableMapping[Text, TestRecursiveMapMessage]: ...
\r
878 a: Optional[Mapping[Text, TestRecursiveMapMessage]]=...,
\r
882 def FromString(cls, s: bytes) -> TestRecursiveMapMessage: ...
\r