1 from google.protobuf.any_pb2 import (
\r
4 from google.protobuf.duration_pb2 import (
\r
7 from google.protobuf.field_mask_pb2 import (
\r
10 from google.protobuf.internal.containers import (
\r
11 RepeatedCompositeFieldContainer,
\r
12 RepeatedScalarFieldContainer,
\r
14 from google.protobuf.message import (
\r
17 from google.protobuf.struct_pb2 import (
\r
22 from google.protobuf.timestamp_pb2 import (
\r
25 from google.protobuf.unittest_pb2 import (
\r
28 from google.protobuf.wrappers_pb2 import (
\r
39 from typing import (
\r
51 class EnumType(int):
\r
54 def Name(cls, number: int) -> bytes: ...
\r
57 def Value(cls, name: bytes) -> EnumType: ...
\r
60 def keys(cls) -> List[bytes]: ...
\r
63 def values(cls) -> List[EnumType]: ...
\r
66 def items(cls) -> List[Tuple[bytes, EnumType]]: ...
\r
73 class MessageType(Message):
\r
74 value = ... # type: int
\r
77 value: Optional[int] = ...,
\r
81 def FromString(cls, s: bytes) -> MessageType: ...
\r
84 class TestMessage(Message):
\r
85 bool_value = ... # type: bool
\r
86 int32_value = ... # type: int
\r
87 int64_value = ... # type: int
\r
88 uint32_value = ... # type: int
\r
89 uint64_value = ... # type: int
\r
90 float_value = ... # type: float
\r
91 double_value = ... # type: float
\r
92 string_value = ... # type: Text
\r
93 bytes_value = ... # type: bytes
\r
94 enum_value = ... # type: EnumType
\r
95 repeated_bool_value = ... # type: RepeatedScalarFieldContainer[bool]
\r
96 repeated_int32_value = ... # type: RepeatedScalarFieldContainer[int]
\r
97 repeated_int64_value = ... # type: RepeatedScalarFieldContainer[int]
\r
98 repeated_uint32_value = ... # type: RepeatedScalarFieldContainer[int]
\r
99 repeated_uint64_value = ... # type: RepeatedScalarFieldContainer[int]
\r
100 repeated_float_value = ... # type: RepeatedScalarFieldContainer[float]
\r
101 repeated_double_value = ... # type: RepeatedScalarFieldContainer[float]
\r
102 repeated_string_value = ... # type: RepeatedScalarFieldContainer[Text]
\r
103 repeated_bytes_value = ... # type: RepeatedScalarFieldContainer[bytes]
\r
104 repeated_enum_value = ... # type: RepeatedScalarFieldContainer[EnumType]
\r
107 def message_value(self) -> MessageType: ...
\r
110 def repeated_message_value(
\r
111 self) -> RepeatedCompositeFieldContainer[MessageType]: ...
\r
114 bool_value: Optional[bool] = ...,
\r
115 int32_value: Optional[int] = ...,
\r
116 int64_value: Optional[int] = ...,
\r
117 uint32_value: Optional[int] = ...,
\r
118 uint64_value: Optional[int] = ...,
\r
119 float_value: Optional[float] = ...,
\r
120 double_value: Optional[float] = ...,
\r
121 string_value: Optional[Text] = ...,
\r
122 bytes_value: Optional[bytes] = ...,
\r
123 enum_value: Optional[EnumType] = ...,
\r
124 message_value: Optional[MessageType] = ...,
\r
125 repeated_bool_value: Optional[Iterable[bool]] = ...,
\r
126 repeated_int32_value: Optional[Iterable[int]] = ...,
\r
127 repeated_int64_value: Optional[Iterable[int]] = ...,
\r
128 repeated_uint32_value: Optional[Iterable[int]] = ...,
\r
129 repeated_uint64_value: Optional[Iterable[int]] = ...,
\r
130 repeated_float_value: Optional[Iterable[float]] = ...,
\r
131 repeated_double_value: Optional[Iterable[float]] = ...,
\r
132 repeated_string_value: Optional[Iterable[Text]] = ...,
\r
133 repeated_bytes_value: Optional[Iterable[bytes]] = ...,
\r
134 repeated_enum_value: Optional[Iterable[EnumType]] = ...,
\r
135 repeated_message_value: Optional[Iterable[MessageType]] = ...,
\r
139 def FromString(cls, s: bytes) -> TestMessage: ...
\r
142 class TestOneof(Message):
\r
143 oneof_int32_value = ... # type: int
\r
144 oneof_string_value = ... # type: Text
\r
145 oneof_bytes_value = ... # type: bytes
\r
146 oneof_enum_value = ... # type: EnumType
\r
149 def oneof_message_value(self) -> MessageType: ...
\r
152 oneof_int32_value: Optional[int] = ...,
\r
153 oneof_string_value: Optional[Text] = ...,
\r
154 oneof_bytes_value: Optional[bytes] = ...,
\r
155 oneof_enum_value: Optional[EnumType] = ...,
\r
156 oneof_message_value: Optional[MessageType] = ...,
\r
160 def FromString(cls, s: bytes) -> TestOneof: ...
\r
163 class TestMap(Message):
\r
165 class BoolMapEntry(Message):
\r
166 key = ... # type: bool
\r
167 value = ... # type: int
\r
170 key: Optional[bool] = ...,
\r
171 value: Optional[int] = ...,
\r
175 def FromString(cls, s: bytes) -> TestMap.BoolMapEntry: ...
\r
177 class Int32MapEntry(Message):
\r
178 key = ... # type: int
\r
179 value = ... # type: int
\r
182 key: Optional[int] = ...,
\r
183 value: Optional[int] = ...,
\r
187 def FromString(cls, s: bytes) -> TestMap.Int32MapEntry: ...
\r
189 class Int64MapEntry(Message):
\r
190 key = ... # type: int
\r
191 value = ... # type: int
\r
194 key: Optional[int] = ...,
\r
195 value: Optional[int] = ...,
\r
199 def FromString(cls, s: bytes) -> TestMap.Int64MapEntry: ...
\r
201 class Uint32MapEntry(Message):
\r
202 key = ... # type: int
\r
203 value = ... # type: int
\r
206 key: Optional[int] = ...,
\r
207 value: Optional[int] = ...,
\r
211 def FromString(cls, s: bytes) -> TestMap.Uint32MapEntry: ...
\r
213 class Uint64MapEntry(Message):
\r
214 key = ... # type: int
\r
215 value = ... # type: int
\r
218 key: Optional[int] = ...,
\r
219 value: Optional[int] = ...,
\r
223 def FromString(cls, s: bytes) -> TestMap.Uint64MapEntry: ...
\r
225 class StringMapEntry(Message):
\r
226 key = ... # type: Text
\r
227 value = ... # type: int
\r
230 key: Optional[Text] = ...,
\r
231 value: Optional[int] = ...,
\r
235 def FromString(cls, s: bytes) -> TestMap.StringMapEntry: ...
\r
238 def bool_map(self) -> MutableMapping[bool, int]: ...
\r
241 def int32_map(self) -> MutableMapping[int, int]: ...
\r
244 def int64_map(self) -> MutableMapping[int, int]: ...
\r
247 def uint32_map(self) -> MutableMapping[int, int]: ...
\r
250 def uint64_map(self) -> MutableMapping[int, int]: ...
\r
253 def string_map(self) -> MutableMapping[Text, int]: ...
\r
256 bool_map: Optional[Mapping[bool, int]]=...,
\r
257 int32_map: Optional[Mapping[int, int]]=...,
\r
258 int64_map: Optional[Mapping[int, int]]=...,
\r
259 uint32_map: Optional[Mapping[int, int]]=...,
\r
260 uint64_map: Optional[Mapping[int, int]]=...,
\r
261 string_map: Optional[Mapping[Text, int]]=...,
\r
265 def FromString(cls, s: bytes) -> TestMap: ...
\r
268 class TestNestedMap(Message):
\r
270 class BoolMapEntry(Message):
\r
271 key = ... # type: bool
\r
272 value = ... # type: int
\r
275 key: Optional[bool] = ...,
\r
276 value: Optional[int] = ...,
\r
280 def FromString(cls, s: bytes) -> TestNestedMap.BoolMapEntry: ...
\r
282 class Int32MapEntry(Message):
\r
283 key = ... # type: int
\r
284 value = ... # type: int
\r
287 key: Optional[int] = ...,
\r
288 value: Optional[int] = ...,
\r
292 def FromString(cls, s: bytes) -> TestNestedMap.Int32MapEntry: ...
\r
294 class Int64MapEntry(Message):
\r
295 key = ... # type: int
\r
296 value = ... # type: int
\r
299 key: Optional[int] = ...,
\r
300 value: Optional[int] = ...,
\r
304 def FromString(cls, s: bytes) -> TestNestedMap.Int64MapEntry: ...
\r
306 class Uint32MapEntry(Message):
\r
307 key = ... # type: int
\r
308 value = ... # type: int
\r
311 key: Optional[int] = ...,
\r
312 value: Optional[int] = ...,
\r
316 def FromString(cls, s: bytes) -> TestNestedMap.Uint32MapEntry: ...
\r
318 class Uint64MapEntry(Message):
\r
319 key = ... # type: int
\r
320 value = ... # type: int
\r
323 key: Optional[int] = ...,
\r
324 value: Optional[int] = ...,
\r
328 def FromString(cls, s: bytes) -> TestNestedMap.Uint64MapEntry: ...
\r
330 class StringMapEntry(Message):
\r
331 key = ... # type: Text
\r
332 value = ... # type: int
\r
335 key: Optional[Text] = ...,
\r
336 value: Optional[int] = ...,
\r
340 def FromString(cls, s: bytes) -> TestNestedMap.StringMapEntry: ...
\r
342 class MapMapEntry(Message):
\r
343 key = ... # type: Text
\r
346 def value(self) -> TestNestedMap: ...
\r
349 key: Optional[Text] = ...,
\r
350 value: Optional[TestNestedMap] = ...,
\r
354 def FromString(cls, s: bytes) -> TestNestedMap.MapMapEntry: ...
\r
357 def bool_map(self) -> MutableMapping[bool, int]: ...
\r
360 def int32_map(self) -> MutableMapping[int, int]: ...
\r
363 def int64_map(self) -> MutableMapping[int, int]: ...
\r
366 def uint32_map(self) -> MutableMapping[int, int]: ...
\r
369 def uint64_map(self) -> MutableMapping[int, int]: ...
\r
372 def string_map(self) -> MutableMapping[Text, int]: ...
\r
375 def map_map(self) -> MutableMapping[Text, TestNestedMap]: ...
\r
378 bool_map: Optional[Mapping[bool, int]]=...,
\r
379 int32_map: Optional[Mapping[int, int]]=...,
\r
380 int64_map: Optional[Mapping[int, int]]=...,
\r
381 uint32_map: Optional[Mapping[int, int]]=...,
\r
382 uint64_map: Optional[Mapping[int, int]]=...,
\r
383 string_map: Optional[Mapping[Text, int]]=...,
\r
384 map_map: Optional[Mapping[Text, TestNestedMap]]=...,
\r
388 def FromString(cls, s: bytes) -> TestNestedMap: ...
\r
391 class TestWrapper(Message):
\r
394 def bool_value(self) -> BoolValue: ...
\r
397 def int32_value(self) -> Int32Value: ...
\r
400 def int64_value(self) -> Int64Value: ...
\r
403 def uint32_value(self) -> UInt32Value: ...
\r
406 def uint64_value(self) -> UInt64Value: ...
\r
409 def float_value(self) -> FloatValue: ...
\r
412 def double_value(self) -> DoubleValue: ...
\r
415 def string_value(self) -> StringValue: ...
\r
418 def bytes_value(self) -> BytesValue: ...
\r
421 def repeated_bool_value(
\r
422 self) -> RepeatedCompositeFieldContainer[BoolValue]: ...
\r
425 def repeated_int32_value(
\r
426 self) -> RepeatedCompositeFieldContainer[Int32Value]: ...
\r
429 def repeated_int64_value(
\r
430 self) -> RepeatedCompositeFieldContainer[Int64Value]: ...
\r
433 def repeated_uint32_value(
\r
434 self) -> RepeatedCompositeFieldContainer[UInt32Value]: ...
\r
437 def repeated_uint64_value(
\r
438 self) -> RepeatedCompositeFieldContainer[UInt64Value]: ...
\r
441 def repeated_float_value(
\r
442 self) -> RepeatedCompositeFieldContainer[FloatValue]: ...
\r
445 def repeated_double_value(
\r
446 self) -> RepeatedCompositeFieldContainer[DoubleValue]: ...
\r
449 def repeated_string_value(
\r
450 self) -> RepeatedCompositeFieldContainer[StringValue]: ...
\r
453 def repeated_bytes_value(
\r
454 self) -> RepeatedCompositeFieldContainer[BytesValue]: ...
\r
457 bool_value: Optional[BoolValue] = ...,
\r
458 int32_value: Optional[Int32Value] = ...,
\r
459 int64_value: Optional[Int64Value] = ...,
\r
460 uint32_value: Optional[UInt32Value] = ...,
\r
461 uint64_value: Optional[UInt64Value] = ...,
\r
462 float_value: Optional[FloatValue] = ...,
\r
463 double_value: Optional[DoubleValue] = ...,
\r
464 string_value: Optional[StringValue] = ...,
\r
465 bytes_value: Optional[BytesValue] = ...,
\r
466 repeated_bool_value: Optional[Iterable[BoolValue]] = ...,
\r
467 repeated_int32_value: Optional[Iterable[Int32Value]] = ...,
\r
468 repeated_int64_value: Optional[Iterable[Int64Value]] = ...,
\r
469 repeated_uint32_value: Optional[Iterable[UInt32Value]] = ...,
\r
470 repeated_uint64_value: Optional[Iterable[UInt64Value]] = ...,
\r
471 repeated_float_value: Optional[Iterable[FloatValue]] = ...,
\r
472 repeated_double_value: Optional[Iterable[DoubleValue]] = ...,
\r
473 repeated_string_value: Optional[Iterable[StringValue]] = ...,
\r
474 repeated_bytes_value: Optional[Iterable[BytesValue]] = ...,
\r
478 def FromString(cls, s: bytes) -> TestWrapper: ...
\r
481 class TestTimestamp(Message):
\r
484 def value(self) -> Timestamp: ...
\r
487 def repeated_value(self) -> RepeatedCompositeFieldContainer[Timestamp]: ...
\r
490 value: Optional[Timestamp] = ...,
\r
491 repeated_value: Optional[Iterable[Timestamp]] = ...,
\r
495 def FromString(cls, s: bytes) -> TestTimestamp: ...
\r
498 class TestDuration(Message):
\r
501 def value(self) -> Duration: ...
\r
504 def repeated_value(self) -> RepeatedCompositeFieldContainer[Duration]: ...
\r
507 value: Optional[Duration] = ...,
\r
508 repeated_value: Optional[Iterable[Duration]] = ...,
\r
512 def FromString(cls, s: bytes) -> TestDuration: ...
\r
515 class TestFieldMask(Message):
\r
518 def value(self) -> FieldMask: ...
\r
521 value: Optional[FieldMask] = ...,
\r
525 def FromString(cls, s: bytes) -> TestFieldMask: ...
\r
528 class TestStruct(Message):
\r
531 def value(self) -> Struct: ...
\r
534 def repeated_value(self) -> RepeatedCompositeFieldContainer[Struct]: ...
\r
537 value: Optional[Struct] = ...,
\r
538 repeated_value: Optional[Iterable[Struct]] = ...,
\r
542 def FromString(cls, s: bytes) -> TestStruct: ...
\r
545 class TestAny(Message):
\r
548 def value(self) -> Any: ...
\r
551 def repeated_value(self) -> RepeatedCompositeFieldContainer[Any]: ...
\r
554 value: Optional[Any] = ...,
\r
555 repeated_value: Optional[Iterable[Any]] = ...,
\r
559 def FromString(cls, s: bytes) -> TestAny: ...
\r
562 class TestValue(Message):
\r
565 def value(self) -> Value: ...
\r
568 def repeated_value(self) -> RepeatedCompositeFieldContainer[Value]: ...
\r
571 value: Optional[Value] = ...,
\r
572 repeated_value: Optional[Iterable[Value]] = ...,
\r
576 def FromString(cls, s: bytes) -> TestValue: ...
\r
579 class TestListValue(Message):
\r
582 def value(self) -> ListValue: ...
\r
585 def repeated_value(self) -> RepeatedCompositeFieldContainer[ListValue]: ...
\r
588 value: Optional[ListValue] = ...,
\r
589 repeated_value: Optional[Iterable[ListValue]] = ...,
\r
593 def FromString(cls, s: bytes) -> TestListValue: ...
\r
596 class TestBoolValue(Message):
\r
598 class BoolMapEntry(Message):
\r
599 key = ... # type: bool
\r
600 value = ... # type: int
\r
603 key: Optional[bool] = ...,
\r
604 value: Optional[int] = ...,
\r
608 def FromString(cls, s: bytes) -> TestBoolValue.BoolMapEntry: ...
\r
609 bool_value = ... # type: bool
\r
612 def bool_map(self) -> MutableMapping[bool, int]: ...
\r
615 bool_value: Optional[bool] = ...,
\r
616 bool_map: Optional[Mapping[bool, int]]=...,
\r
620 def FromString(cls, s: bytes) -> TestBoolValue: ...
\r
623 class TestCustomJsonName(Message):
\r
624 value = ... # type: int
\r
627 value: Optional[int] = ...,
\r
631 def FromString(cls, s: bytes) -> TestCustomJsonName: ...
\r
634 class TestExtensions(Message):
\r
637 def extensions(self) -> TestAllExtensions: ...
\r
640 extensions: Optional[TestAllExtensions] = ...,
\r
644 def FromString(cls, s: bytes) -> TestExtensions: ...
\r
647 class TestEnumValue(Message):
\r
648 enum_value1 = ... # type: EnumType
\r
649 enum_value2 = ... # type: EnumType
\r
650 enum_value3 = ... # type: EnumType
\r
653 enum_value1: Optional[EnumType] = ...,
\r
654 enum_value2: Optional[EnumType] = ...,
\r
655 enum_value3: Optional[EnumType] = ...,
\r
659 def FromString(cls, s: bytes) -> TestEnumValue: ...
\r