-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy pathtest3_pb2.pyi
209 lines (186 loc) · 9.55 KB
/
test3_pb2.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
package test3"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import test.test_generated_mypy
import typing
if sys.version_info >= (3, 10):
import typing as typing_extensions
else:
import typing_extensions
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
class _OuterEnum:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _OuterEnumEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_OuterEnum.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
UNKNOWN: _OuterEnum.ValueType # 0
FOO3: _OuterEnum.ValueType # 1
BAR3: _OuterEnum.ValueType # 2
class OuterEnum(_OuterEnum, metaclass=_OuterEnumEnumTypeWrapper): ...
UNKNOWN: OuterEnum.ValueType # 0
FOO3: OuterEnum.ValueType # 1
BAR3: OuterEnum.ValueType # 2
global___OuterEnum = OuterEnum
@typing.final
class OuterMessage3(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
A_STRING_FIELD_NUMBER: builtins.int
a_string: builtins.str
def __init__(
self,
*,
a_string: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["a_string", b"a_string"]) -> None: ...
global___OuterMessage3 = OuterMessage3
@typing.final
class SimpleProto3(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class _InnerEnum:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _InnerEnumEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SimpleProto3._InnerEnum.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
INNER1: SimpleProto3._InnerEnum.ValueType # 0
INNER2: SimpleProto3._InnerEnum.ValueType # 1
class InnerEnum(_InnerEnum, metaclass=_InnerEnumEnumTypeWrapper): ...
INNER1: SimpleProto3.InnerEnum.ValueType # 0
INNER2: SimpleProto3.InnerEnum.ValueType # 1
@typing.final
class MapScalarEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.int
value: builtins.str
def __init__(
self,
*,
key: builtins.int = ...,
value: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
@typing.final
class MapMessageEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.int
@property
def value(self) -> global___OuterMessage3: ...
def __init__(
self,
*,
key: builtins.int = ...,
value: global___OuterMessage3 | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
@typing.final
class EmailByUidEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.int
value: builtins.str
def __init__(
self,
*,
key: builtins.int = ...,
value: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
A_STRING_FIELD_NUMBER: builtins.int
A_REPEATED_STRING_FIELD_NUMBER: builtins.int
A_OUTER_ENUM_FIELD_NUMBER: builtins.int
OUTER_MESSAGE_FIELD_NUMBER: builtins.int
INNER_ENUM_FIELD_NUMBER: builtins.int
A_ONEOF_1_FIELD_NUMBER: builtins.int
A_ONEOF_2_FIELD_NUMBER: builtins.int
OUTER_MESSAGE_IN_ONEOF_FIELD_NUMBER: builtins.int
OUTER_ENUM_IN_ONEOF_FIELD_NUMBER: builtins.int
INNER_ENUM_IN_ONEOF_FIELD_NUMBER: builtins.int
B_ONEOF_1_FIELD_NUMBER: builtins.int
B_ONEOF_2_FIELD_NUMBER: builtins.int
BOOL_FIELD_NUMBER: builtins.int
OUTERENUM_FIELD_NUMBER: builtins.int
OUTERMESSAGE3_FIELD_NUMBER: builtins.int
MAP_SCALAR_FIELD_NUMBER: builtins.int
MAP_MESSAGE_FIELD_NUMBER: builtins.int
AN_OPTIONAL_STRING_FIELD_NUMBER: builtins.int
USER_ID_FIELD_NUMBER: builtins.int
EMAIL_FIELD_NUMBER: builtins.int
EMAIL_BY_UID_FIELD_NUMBER: builtins.int
a_string: builtins.str
a_outer_enum: global___OuterEnum.ValueType
inner_enum: global___SimpleProto3.InnerEnum.ValueType
a_oneof_1: builtins.str
a_oneof_2: builtins.str
outer_enum_in_oneof: global___OuterEnum.ValueType
inner_enum_in_oneof: global___SimpleProto3.InnerEnum.ValueType
b_oneof_1: builtins.str
b_oneof_2: builtins.str
OuterEnum: global___OuterEnum.ValueType
"""Test having fieldname match messagename"""
an_optional_string: builtins.str
user_id: test.test_generated_mypy.UserId
email: test.test_generated_mypy.Email
@property
def a_repeated_string(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
@property
def outer_message(self) -> global___OuterMessage3: ...
@property
def outer_message_in_oneof(self) -> global___OuterMessage3: ...
@property
def bool(self) -> global___OuterMessage3: ...
@property
def OuterMessage3(self) -> global___OuterMessage3: ...
@property
def map_scalar(self) -> google.protobuf.internal.containers.ScalarMap[builtins.int, builtins.str]:
"""Test generation of map"""
@property
def map_message(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, global___OuterMessage3]: ...
@property
def email_by_uid(self) -> google.protobuf.internal.containers.ScalarMap[test.test_generated_mypy.UserId, test.test_generated_mypy.Email]: ...
def __init__(
self,
*,
a_string: builtins.str = ...,
a_repeated_string: collections.abc.Iterable[builtins.str] | None = ...,
a_outer_enum: global___OuterEnum.ValueType = ...,
outer_message: global___OuterMessage3 | None = ...,
inner_enum: global___SimpleProto3.InnerEnum.ValueType = ...,
a_oneof_1: builtins.str = ...,
a_oneof_2: builtins.str = ...,
outer_message_in_oneof: global___OuterMessage3 | None = ...,
outer_enum_in_oneof: global___OuterEnum.ValueType = ...,
inner_enum_in_oneof: global___SimpleProto3.InnerEnum.ValueType = ...,
b_oneof_1: builtins.str = ...,
b_oneof_2: builtins.str = ...,
bool: global___OuterMessage3 | None = ...,
OuterEnum: global___OuterEnum.ValueType = ...,
OuterMessage3: global___OuterMessage3 | None = ...,
map_scalar: collections.abc.Mapping[builtins.int, builtins.str] | None = ...,
map_message: collections.abc.Mapping[builtins.int, global___OuterMessage3] | None = ...,
an_optional_string: builtins.str | None = ...,
user_id: test.test_generated_mypy.UserId = ...,
email: test.test_generated_mypy.Email = ...,
email_by_uid: collections.abc.Mapping[test.test_generated_mypy.UserId, test.test_generated_mypy.Email] | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["OuterMessage3", b"OuterMessage3", "_an_optional_string", b"_an_optional_string", "a_oneof", b"a_oneof", "a_oneof_1", b"a_oneof_1", "a_oneof_2", b"a_oneof_2", "an_optional_string", b"an_optional_string", "b_oneof", b"b_oneof", "b_oneof_1", b"b_oneof_1", "b_oneof_2", b"b_oneof_2", "bool", b"bool", "inner_enum_in_oneof", b"inner_enum_in_oneof", "outer_enum_in_oneof", b"outer_enum_in_oneof", "outer_message", b"outer_message", "outer_message_in_oneof", b"outer_message_in_oneof"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["OuterEnum", b"OuterEnum", "OuterMessage3", b"OuterMessage3", "_an_optional_string", b"_an_optional_string", "a_oneof", b"a_oneof", "a_oneof_1", b"a_oneof_1", "a_oneof_2", b"a_oneof_2", "a_outer_enum", b"a_outer_enum", "a_repeated_string", b"a_repeated_string", "a_string", b"a_string", "an_optional_string", b"an_optional_string", "b_oneof", b"b_oneof", "b_oneof_1", b"b_oneof_1", "b_oneof_2", b"b_oneof_2", "bool", b"bool", "email", b"email", "email_by_uid", b"email_by_uid", "inner_enum", b"inner_enum", "inner_enum_in_oneof", b"inner_enum_in_oneof", "map_message", b"map_message", "map_scalar", b"map_scalar", "outer_enum_in_oneof", b"outer_enum_in_oneof", "outer_message", b"outer_message", "outer_message_in_oneof", b"outer_message_in_oneof", "user_id", b"user_id"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_an_optional_string", b"_an_optional_string"]) -> typing.Literal["an_optional_string"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["a_oneof", b"a_oneof"]) -> typing.Literal["a_oneof_1", "a_oneof_2", "outer_message_in_oneof", "outer_enum_in_oneof", "inner_enum_in_oneof"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["b_oneof", b"b_oneof"]) -> typing.Literal["b_oneof_1", "b_oneof_2"] | None: ...
global___SimpleProto3 = SimpleProto3