2 @generated by mypy-protobuf. Do not edit manually!
6 import google.protobuf.any_pb2
7 import google.protobuf.descriptor
8 import google.protobuf.internal.containers
9 import google.protobuf.internal.enum_type_wrapper
10 import google.protobuf.message
11 import google.protobuf.source_context_pb2
13 import typing_extensions
15 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
17 class Syntax(_Syntax, metaclass=_SyntaxEnumTypeWrapper):
18 """The syntax in which a protocol buffer element is defined."""
21 V = typing.NewType('V', builtins.int)
22 class _SyntaxEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Syntax.V], builtins.type):
23 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
24 SYNTAX_PROTO2 = Syntax.V(0)
25 """Syntax `proto2`."""
27 SYNTAX_PROTO3 = Syntax.V(1)
28 """Syntax `proto3`."""
31 SYNTAX_PROTO2 = Syntax.V(0)
32 """Syntax `proto2`."""
34 SYNTAX_PROTO3 = Syntax.V(1)
35 """Syntax `proto3`."""
37 global___Syntax = Syntax
40 class Type(google.protobuf.message.Message):
41 """A protocol buffer message type."""
42 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
43 NAME_FIELD_NUMBER: builtins.int
44 FIELDS_FIELD_NUMBER: builtins.int
45 ONEOFS_FIELD_NUMBER: builtins.int
46 OPTIONS_FIELD_NUMBER: builtins.int
47 SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
48 SYNTAX_FIELD_NUMBER: builtins.int
49 name: typing.Text = ...
50 """The fully qualified message name."""
53 def fields(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Field]:
54 """The list of fields."""
57 def oneofs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
58 """The list of types appearing in `oneof` definitions in this type."""
61 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
62 """The protocol buffer options."""
65 def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
66 """The source context."""
68 syntax: global___Syntax.V = ...
69 """The source syntax."""
73 name : typing.Text = ...,
74 fields : typing.Optional[typing.Iterable[global___Field]] = ...,
75 oneofs : typing.Optional[typing.Iterable[typing.Text]] = ...,
76 options : typing.Optional[typing.Iterable[global___Option]] = ...,
77 source_context : typing.Optional[google.protobuf.source_context_pb2.SourceContext] = ...,
78 syntax : global___Syntax.V = ...,
80 def HasField(self, field_name: typing_extensions.Literal["source_context",b"source_context"]) -> builtins.bool: ...
81 def ClearField(self, field_name: typing_extensions.Literal["fields",b"fields","name",b"name","oneofs",b"oneofs","options",b"options","source_context",b"source_context","syntax",b"syntax"]) -> None: ...
84 class Field(google.protobuf.message.Message):
85 """A single field of a message type."""
86 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
87 class Kind(_Kind, metaclass=_KindEnumTypeWrapper):
88 """Basic field types."""
91 V = typing.NewType('V', builtins.int)
92 class _KindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Kind.V], builtins.type):
93 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
94 TYPE_UNKNOWN = Field.Kind.V(0)
95 """Field type unknown."""
97 TYPE_DOUBLE = Field.Kind.V(1)
98 """Field type double."""
100 TYPE_FLOAT = Field.Kind.V(2)
101 """Field type float."""
103 TYPE_INT64 = Field.Kind.V(3)
104 """Field type int64."""
106 TYPE_UINT64 = Field.Kind.V(4)
107 """Field type uint64."""
109 TYPE_INT32 = Field.Kind.V(5)
110 """Field type int32."""
112 TYPE_FIXED64 = Field.Kind.V(6)
113 """Field type fixed64."""
115 TYPE_FIXED32 = Field.Kind.V(7)
116 """Field type fixed32."""
118 TYPE_BOOL = Field.Kind.V(8)
119 """Field type bool."""
121 TYPE_STRING = Field.Kind.V(9)
122 """Field type string."""
124 TYPE_GROUP = Field.Kind.V(10)
125 """Field type group. Proto2 syntax only, and deprecated."""
127 TYPE_MESSAGE = Field.Kind.V(11)
128 """Field type message."""
130 TYPE_BYTES = Field.Kind.V(12)
131 """Field type bytes."""
133 TYPE_UINT32 = Field.Kind.V(13)
134 """Field type uint32."""
136 TYPE_ENUM = Field.Kind.V(14)
137 """Field type enum."""
139 TYPE_SFIXED32 = Field.Kind.V(15)
140 """Field type sfixed32."""
142 TYPE_SFIXED64 = Field.Kind.V(16)
143 """Field type sfixed64."""
145 TYPE_SINT32 = Field.Kind.V(17)
146 """Field type sint32."""
148 TYPE_SINT64 = Field.Kind.V(18)
149 """Field type sint64."""
152 TYPE_UNKNOWN = Field.Kind.V(0)
153 """Field type unknown."""
155 TYPE_DOUBLE = Field.Kind.V(1)
156 """Field type double."""
158 TYPE_FLOAT = Field.Kind.V(2)
159 """Field type float."""
161 TYPE_INT64 = Field.Kind.V(3)
162 """Field type int64."""
164 TYPE_UINT64 = Field.Kind.V(4)
165 """Field type uint64."""
167 TYPE_INT32 = Field.Kind.V(5)
168 """Field type int32."""
170 TYPE_FIXED64 = Field.Kind.V(6)
171 """Field type fixed64."""
173 TYPE_FIXED32 = Field.Kind.V(7)
174 """Field type fixed32."""
176 TYPE_BOOL = Field.Kind.V(8)
177 """Field type bool."""
179 TYPE_STRING = Field.Kind.V(9)
180 """Field type string."""
182 TYPE_GROUP = Field.Kind.V(10)
183 """Field type group. Proto2 syntax only, and deprecated."""
185 TYPE_MESSAGE = Field.Kind.V(11)
186 """Field type message."""
188 TYPE_BYTES = Field.Kind.V(12)
189 """Field type bytes."""
191 TYPE_UINT32 = Field.Kind.V(13)
192 """Field type uint32."""
194 TYPE_ENUM = Field.Kind.V(14)
195 """Field type enum."""
197 TYPE_SFIXED32 = Field.Kind.V(15)
198 """Field type sfixed32."""
200 TYPE_SFIXED64 = Field.Kind.V(16)
201 """Field type sfixed64."""
203 TYPE_SINT32 = Field.Kind.V(17)
204 """Field type sint32."""
206 TYPE_SINT64 = Field.Kind.V(18)
207 """Field type sint64."""
210 class Cardinality(_Cardinality, metaclass=_CardinalityEnumTypeWrapper):
211 """Whether a field is optional, required, or repeated."""
214 V = typing.NewType('V', builtins.int)
215 class _CardinalityEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Cardinality.V], builtins.type):
216 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
217 CARDINALITY_UNKNOWN = Field.Cardinality.V(0)
218 """For fields with unknown cardinality."""
220 CARDINALITY_OPTIONAL = Field.Cardinality.V(1)
221 """For optional fields."""
223 CARDINALITY_REQUIRED = Field.Cardinality.V(2)
224 """For required fields. Proto2 syntax only."""
226 CARDINALITY_REPEATED = Field.Cardinality.V(3)
227 """For repeated fields."""
230 CARDINALITY_UNKNOWN = Field.Cardinality.V(0)
231 """For fields with unknown cardinality."""
233 CARDINALITY_OPTIONAL = Field.Cardinality.V(1)
234 """For optional fields."""
236 CARDINALITY_REQUIRED = Field.Cardinality.V(2)
237 """For required fields. Proto2 syntax only."""
239 CARDINALITY_REPEATED = Field.Cardinality.V(3)
240 """For repeated fields."""
243 KIND_FIELD_NUMBER: builtins.int
244 CARDINALITY_FIELD_NUMBER: builtins.int
245 NUMBER_FIELD_NUMBER: builtins.int
246 NAME_FIELD_NUMBER: builtins.int
247 TYPE_URL_FIELD_NUMBER: builtins.int
248 ONEOF_INDEX_FIELD_NUMBER: builtins.int
249 PACKED_FIELD_NUMBER: builtins.int
250 OPTIONS_FIELD_NUMBER: builtins.int
251 JSON_NAME_FIELD_NUMBER: builtins.int
252 DEFAULT_VALUE_FIELD_NUMBER: builtins.int
253 kind: global___Field.Kind.V = ...
254 """The field type."""
256 cardinality: global___Field.Cardinality.V = ...
257 """The field cardinality."""
259 number: builtins.int = ...
260 """The field number."""
262 name: typing.Text = ...
263 """The field name."""
265 type_url: typing.Text = ...
266 """The field type URL, without the scheme, for message or enumeration
267 types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
270 oneof_index: builtins.int = ...
271 """The index of the field type in `Type.oneofs`, for message or enumeration
272 types. The first type has index 1; zero means the type is not in the list.
275 packed: builtins.bool = ...
276 """Whether to use alternative packed wire representation."""
279 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
280 """The protocol buffer options."""
282 json_name: typing.Text = ...
283 """The field JSON name."""
285 default_value: typing.Text = ...
286 """The string value of the default value of this field. Proto2 syntax only."""
290 kind : global___Field.Kind.V = ...,
291 cardinality : global___Field.Cardinality.V = ...,
292 number : builtins.int = ...,
293 name : typing.Text = ...,
294 type_url : typing.Text = ...,
295 oneof_index : builtins.int = ...,
296 packed : builtins.bool = ...,
297 options : typing.Optional[typing.Iterable[global___Option]] = ...,
298 json_name : typing.Text = ...,
299 default_value : typing.Text = ...,
301 def ClearField(self, field_name: typing_extensions.Literal["cardinality",b"cardinality","default_value",b"default_value","json_name",b"json_name","kind",b"kind","name",b"name","number",b"number","oneof_index",b"oneof_index","options",b"options","packed",b"packed","type_url",b"type_url"]) -> None: ...
302 global___Field = Field
304 class Enum(google.protobuf.message.Message):
305 """Enum type definition."""
306 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
307 NAME_FIELD_NUMBER: builtins.int
308 ENUMVALUE_FIELD_NUMBER: builtins.int
309 OPTIONS_FIELD_NUMBER: builtins.int
310 SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
311 SYNTAX_FIELD_NUMBER: builtins.int
312 name: typing.Text = ...
313 """Enum type name."""
316 def enumvalue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumValue]:
317 """Enum value definitions."""
320 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
321 """Protocol buffer options."""
324 def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
325 """The source context."""
327 syntax: global___Syntax.V = ...
328 """The source syntax."""
332 name : typing.Text = ...,
333 enumvalue : typing.Optional[typing.Iterable[global___EnumValue]] = ...,
334 options : typing.Optional[typing.Iterable[global___Option]] = ...,
335 source_context : typing.Optional[google.protobuf.source_context_pb2.SourceContext] = ...,
336 syntax : global___Syntax.V = ...,
338 def HasField(self, field_name: typing_extensions.Literal["source_context",b"source_context"]) -> builtins.bool: ...
339 def ClearField(self, field_name: typing_extensions.Literal["enumvalue",b"enumvalue","name",b"name","options",b"options","source_context",b"source_context","syntax",b"syntax"]) -> None: ...
342 class EnumValue(google.protobuf.message.Message):
343 """Enum value definition."""
344 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
345 NAME_FIELD_NUMBER: builtins.int
346 NUMBER_FIELD_NUMBER: builtins.int
347 OPTIONS_FIELD_NUMBER: builtins.int
348 name: typing.Text = ...
349 """Enum value name."""
351 number: builtins.int = ...
352 """Enum value number."""
355 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
356 """Protocol buffer options."""
360 name : typing.Text = ...,
361 number : builtins.int = ...,
362 options : typing.Optional[typing.Iterable[global___Option]] = ...,
364 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","number",b"number","options",b"options"]) -> None: ...
365 global___EnumValue = EnumValue
367 class Option(google.protobuf.message.Message):
368 """A protocol buffer option, which can be attached to a message, field,
371 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
372 NAME_FIELD_NUMBER: builtins.int
373 VALUE_FIELD_NUMBER: builtins.int
374 name: typing.Text = ...
375 """The option's name. For protobuf built-in options (options defined in
376 descriptor.proto), this is the short name. For example, `"map_entry"`.
377 For custom options, it should be the fully-qualified name. For example,
382 def value(self) -> google.protobuf.any_pb2.Any:
383 """The option's value packed in an Any message. If the value is a primitive,
384 the corresponding wrapper type defined in google/protobuf/wrappers.proto
385 should be used. If the value is an enum, it should be stored as an int32
386 value using the google.protobuf.Int32Value type.
391 name : typing.Text = ...,
392 value : typing.Optional[google.protobuf.any_pb2.Any] = ...,
394 def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
395 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","value",b"value"]) -> None: ...
396 global___Option = Option