2 @generated by mypy-protobuf. Do not edit manually!
6 import google.protobuf.descriptor
7 import google.protobuf.internal.containers
8 import google.protobuf.internal.enum_type_wrapper
9 import google.protobuf.message
11 import typing_extensions
13 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
15 class FileDescriptorSet(google.protobuf.message.Message):
16 """The protocol compiler can output a FileDescriptorSet containing the .proto
19 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
20 FILE_FIELD_NUMBER: builtins.int
22 def file(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FileDescriptorProto]: ...
25 file : typing.Optional[typing.Iterable[global___FileDescriptorProto]] = ...,
27 def ClearField(self, field_name: typing_extensions.Literal["file",b"file"]) -> None: ...
28 global___FileDescriptorSet = FileDescriptorSet
30 class FileDescriptorProto(google.protobuf.message.Message):
31 """Describes a complete .proto file."""
32 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
33 NAME_FIELD_NUMBER: builtins.int
34 PACKAGE_FIELD_NUMBER: builtins.int
35 DEPENDENCY_FIELD_NUMBER: builtins.int
36 PUBLIC_DEPENDENCY_FIELD_NUMBER: builtins.int
37 WEAK_DEPENDENCY_FIELD_NUMBER: builtins.int
38 MESSAGE_TYPE_FIELD_NUMBER: builtins.int
39 ENUM_TYPE_FIELD_NUMBER: builtins.int
40 SERVICE_FIELD_NUMBER: builtins.int
41 EXTENSION_FIELD_NUMBER: builtins.int
42 OPTIONS_FIELD_NUMBER: builtins.int
43 SOURCE_CODE_INFO_FIELD_NUMBER: builtins.int
44 SYNTAX_FIELD_NUMBER: builtins.int
45 name: typing.Text = ...
46 """file name, relative to root of source tree"""
48 package: typing.Text = ...
49 """e.g. "foo", "foo.bar", etc."""
52 def dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
53 """Names of files imported by this file."""
56 def public_dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
57 """Indexes of the public imported files in the dependency list above."""
60 def weak_dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
61 """Indexes of the weak imported files in the dependency list.
62 For Google-internal migration only. Do not use.
66 def message_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto]:
67 """All top-level definitions in this file."""
70 def enum_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto]: ...
72 def service(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ServiceDescriptorProto]: ...
74 def extension(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
76 def options(self) -> global___FileOptions: ...
78 def source_code_info(self) -> global___SourceCodeInfo:
79 """This field contains optional information about the original source code.
80 You may safely remove this entire field without harming runtime
81 functionality of the descriptors -- the information is needed only by
85 syntax: typing.Text = ...
86 """The syntax of the proto file.
87 The supported values are "proto2" and "proto3".
92 name : typing.Optional[typing.Text] = ...,
93 package : typing.Optional[typing.Text] = ...,
94 dependency : typing.Optional[typing.Iterable[typing.Text]] = ...,
95 public_dependency : typing.Optional[typing.Iterable[builtins.int]] = ...,
96 weak_dependency : typing.Optional[typing.Iterable[builtins.int]] = ...,
97 message_type : typing.Optional[typing.Iterable[global___DescriptorProto]] = ...,
98 enum_type : typing.Optional[typing.Iterable[global___EnumDescriptorProto]] = ...,
99 service : typing.Optional[typing.Iterable[global___ServiceDescriptorProto]] = ...,
100 extension : typing.Optional[typing.Iterable[global___FieldDescriptorProto]] = ...,
101 options : typing.Optional[global___FileOptions] = ...,
102 source_code_info : typing.Optional[global___SourceCodeInfo] = ...,
103 syntax : typing.Optional[typing.Text] = ...,
105 def HasField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options","package",b"package","source_code_info",b"source_code_info","syntax",b"syntax"]) -> builtins.bool: ...
106 def ClearField(self, field_name: typing_extensions.Literal["dependency",b"dependency","enum_type",b"enum_type","extension",b"extension","message_type",b"message_type","name",b"name","options",b"options","package",b"package","public_dependency",b"public_dependency","service",b"service","source_code_info",b"source_code_info","syntax",b"syntax","weak_dependency",b"weak_dependency"]) -> None: ...
107 global___FileDescriptorProto = FileDescriptorProto
109 class DescriptorProto(google.protobuf.message.Message):
110 """Describes a message type."""
111 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
112 class ExtensionRange(google.protobuf.message.Message):
113 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
114 START_FIELD_NUMBER: builtins.int
115 END_FIELD_NUMBER: builtins.int
116 OPTIONS_FIELD_NUMBER: builtins.int
117 start: builtins.int = ...
120 end: builtins.int = ...
124 def options(self) -> global___ExtensionRangeOptions: ...
127 start : typing.Optional[builtins.int] = ...,
128 end : typing.Optional[builtins.int] = ...,
129 options : typing.Optional[global___ExtensionRangeOptions] = ...,
131 def HasField(self, field_name: typing_extensions.Literal["end",b"end","options",b"options","start",b"start"]) -> builtins.bool: ...
132 def ClearField(self, field_name: typing_extensions.Literal["end",b"end","options",b"options","start",b"start"]) -> None: ...
134 class ReservedRange(google.protobuf.message.Message):
135 """Range of reserved tag numbers. Reserved tag numbers may not be used by
136 fields or extension ranges in the same message. Reserved ranges may
139 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
140 START_FIELD_NUMBER: builtins.int
141 END_FIELD_NUMBER: builtins.int
142 start: builtins.int = ...
145 end: builtins.int = ...
150 start : typing.Optional[builtins.int] = ...,
151 end : typing.Optional[builtins.int] = ...,
153 def HasField(self, field_name: typing_extensions.Literal["end",b"end","start",b"start"]) -> builtins.bool: ...
154 def ClearField(self, field_name: typing_extensions.Literal["end",b"end","start",b"start"]) -> None: ...
156 NAME_FIELD_NUMBER: builtins.int
157 FIELD_FIELD_NUMBER: builtins.int
158 EXTENSION_FIELD_NUMBER: builtins.int
159 NESTED_TYPE_FIELD_NUMBER: builtins.int
160 ENUM_TYPE_FIELD_NUMBER: builtins.int
161 EXTENSION_RANGE_FIELD_NUMBER: builtins.int
162 ONEOF_DECL_FIELD_NUMBER: builtins.int
163 OPTIONS_FIELD_NUMBER: builtins.int
164 RESERVED_RANGE_FIELD_NUMBER: builtins.int
165 RESERVED_NAME_FIELD_NUMBER: builtins.int
166 name: typing.Text = ...
168 def field(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
170 def extension(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
172 def nested_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto]: ...
174 def enum_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto]: ...
176 def extension_range(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto.ExtensionRange]: ...
178 def oneof_decl(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___OneofDescriptorProto]: ...
180 def options(self) -> global___MessageOptions: ...
182 def reserved_range(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto.ReservedRange]: ...
184 def reserved_name(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
185 """Reserved field names, which may not be used by fields in the same message.
186 A given name may only be reserved once.
191 name : typing.Optional[typing.Text] = ...,
192 field : typing.Optional[typing.Iterable[global___FieldDescriptorProto]] = ...,
193 extension : typing.Optional[typing.Iterable[global___FieldDescriptorProto]] = ...,
194 nested_type : typing.Optional[typing.Iterable[global___DescriptorProto]] = ...,
195 enum_type : typing.Optional[typing.Iterable[global___EnumDescriptorProto]] = ...,
196 extension_range : typing.Optional[typing.Iterable[global___DescriptorProto.ExtensionRange]] = ...,
197 oneof_decl : typing.Optional[typing.Iterable[global___OneofDescriptorProto]] = ...,
198 options : typing.Optional[global___MessageOptions] = ...,
199 reserved_range : typing.Optional[typing.Iterable[global___DescriptorProto.ReservedRange]] = ...,
200 reserved_name : typing.Optional[typing.Iterable[typing.Text]] = ...,
202 def HasField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options"]) -> builtins.bool: ...
203 def ClearField(self, field_name: typing_extensions.Literal["enum_type",b"enum_type","extension",b"extension","extension_range",b"extension_range","field",b"field","name",b"name","nested_type",b"nested_type","oneof_decl",b"oneof_decl","options",b"options","reserved_name",b"reserved_name","reserved_range",b"reserved_range"]) -> None: ...
204 global___DescriptorProto = DescriptorProto
206 class ExtensionRangeOptions(google.protobuf.message.Message):
207 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
208 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
210 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
211 """The parser stores options it doesn't recognize here. See above."""
215 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
217 def ClearField(self, field_name: typing_extensions.Literal["uninterpreted_option",b"uninterpreted_option"]) -> None: ...
218 global___ExtensionRangeOptions = ExtensionRangeOptions
220 class FieldDescriptorProto(google.protobuf.message.Message):
221 """Describes a field within a message."""
222 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
223 class Type(_Type, metaclass=_TypeEnumTypeWrapper):
226 V = typing.NewType('V', builtins.int)
227 class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Type.V], builtins.type):
228 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
229 TYPE_DOUBLE = FieldDescriptorProto.Type.V(1)
230 """0 is reserved for errors.
231 Order is weird for historical reasons.
234 TYPE_FLOAT = FieldDescriptorProto.Type.V(2)
235 TYPE_INT64 = FieldDescriptorProto.Type.V(3)
236 """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
237 negative values are likely.
240 TYPE_UINT64 = FieldDescriptorProto.Type.V(4)
241 TYPE_INT32 = FieldDescriptorProto.Type.V(5)
242 """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
243 negative values are likely.
246 TYPE_FIXED64 = FieldDescriptorProto.Type.V(6)
247 TYPE_FIXED32 = FieldDescriptorProto.Type.V(7)
248 TYPE_BOOL = FieldDescriptorProto.Type.V(8)
249 TYPE_STRING = FieldDescriptorProto.Type.V(9)
250 TYPE_GROUP = FieldDescriptorProto.Type.V(10)
251 """Tag-delimited aggregate.
252 Group type is deprecated and not supported in proto3. However, Proto3
253 implementations should still be able to parse the group wire format and
254 treat group fields as unknown fields.
257 TYPE_MESSAGE = FieldDescriptorProto.Type.V(11)
258 """Length-delimited aggregate."""
260 TYPE_BYTES = FieldDescriptorProto.Type.V(12)
261 """New in version 2."""
263 TYPE_UINT32 = FieldDescriptorProto.Type.V(13)
264 TYPE_ENUM = FieldDescriptorProto.Type.V(14)
265 TYPE_SFIXED32 = FieldDescriptorProto.Type.V(15)
266 TYPE_SFIXED64 = FieldDescriptorProto.Type.V(16)
267 TYPE_SINT32 = FieldDescriptorProto.Type.V(17)
268 """Uses ZigZag encoding."""
270 TYPE_SINT64 = FieldDescriptorProto.Type.V(18)
271 """Uses ZigZag encoding."""
274 TYPE_DOUBLE = FieldDescriptorProto.Type.V(1)
275 """0 is reserved for errors.
276 Order is weird for historical reasons.
279 TYPE_FLOAT = FieldDescriptorProto.Type.V(2)
280 TYPE_INT64 = FieldDescriptorProto.Type.V(3)
281 """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
282 negative values are likely.
285 TYPE_UINT64 = FieldDescriptorProto.Type.V(4)
286 TYPE_INT32 = FieldDescriptorProto.Type.V(5)
287 """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
288 negative values are likely.
291 TYPE_FIXED64 = FieldDescriptorProto.Type.V(6)
292 TYPE_FIXED32 = FieldDescriptorProto.Type.V(7)
293 TYPE_BOOL = FieldDescriptorProto.Type.V(8)
294 TYPE_STRING = FieldDescriptorProto.Type.V(9)
295 TYPE_GROUP = FieldDescriptorProto.Type.V(10)
296 """Tag-delimited aggregate.
297 Group type is deprecated and not supported in proto3. However, Proto3
298 implementations should still be able to parse the group wire format and
299 treat group fields as unknown fields.
302 TYPE_MESSAGE = FieldDescriptorProto.Type.V(11)
303 """Length-delimited aggregate."""
305 TYPE_BYTES = FieldDescriptorProto.Type.V(12)
306 """New in version 2."""
308 TYPE_UINT32 = FieldDescriptorProto.Type.V(13)
309 TYPE_ENUM = FieldDescriptorProto.Type.V(14)
310 TYPE_SFIXED32 = FieldDescriptorProto.Type.V(15)
311 TYPE_SFIXED64 = FieldDescriptorProto.Type.V(16)
312 TYPE_SINT32 = FieldDescriptorProto.Type.V(17)
313 """Uses ZigZag encoding."""
315 TYPE_SINT64 = FieldDescriptorProto.Type.V(18)
316 """Uses ZigZag encoding."""
319 class Label(_Label, metaclass=_LabelEnumTypeWrapper):
322 V = typing.NewType('V', builtins.int)
323 class _LabelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Label.V], builtins.type):
324 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
325 LABEL_OPTIONAL = FieldDescriptorProto.Label.V(1)
326 """0 is reserved for errors"""
328 LABEL_REQUIRED = FieldDescriptorProto.Label.V(2)
329 LABEL_REPEATED = FieldDescriptorProto.Label.V(3)
331 LABEL_OPTIONAL = FieldDescriptorProto.Label.V(1)
332 """0 is reserved for errors"""
334 LABEL_REQUIRED = FieldDescriptorProto.Label.V(2)
335 LABEL_REPEATED = FieldDescriptorProto.Label.V(3)
337 NAME_FIELD_NUMBER: builtins.int
338 NUMBER_FIELD_NUMBER: builtins.int
339 LABEL_FIELD_NUMBER: builtins.int
340 TYPE_FIELD_NUMBER: builtins.int
341 TYPE_NAME_FIELD_NUMBER: builtins.int
342 EXTENDEE_FIELD_NUMBER: builtins.int
343 DEFAULT_VALUE_FIELD_NUMBER: builtins.int
344 ONEOF_INDEX_FIELD_NUMBER: builtins.int
345 JSON_NAME_FIELD_NUMBER: builtins.int
346 OPTIONS_FIELD_NUMBER: builtins.int
347 PROTO3_OPTIONAL_FIELD_NUMBER: builtins.int
348 name: typing.Text = ...
349 number: builtins.int = ...
350 label: global___FieldDescriptorProto.Label.V = ...
351 type: global___FieldDescriptorProto.Type.V = ...
352 """If type_name is set, this need not be set. If both this and type_name
353 are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
356 type_name: typing.Text = ...
357 """For message and enum types, this is the name of the type. If the name
358 starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
359 rules are used to find the type (i.e. first the nested types within this
360 message are searched, then within the parent, on up to the root
364 extendee: typing.Text = ...
365 """For extensions, this is the name of the type being extended. It is
366 resolved in the same manner as type_name.
369 default_value: typing.Text = ...
370 """For numeric types, contains the original text representation of the value.
371 For booleans, "true" or "false".
372 For strings, contains the default text contents (not escaped in any way).
373 For bytes, contains the C escaped value. All bytes >= 128 are escaped.
374 TODO(kenton): Base-64 encode?
377 oneof_index: builtins.int = ...
378 """If set, gives the index of a oneof in the containing type's oneof_decl
379 list. This field is a member of that oneof.
382 json_name: typing.Text = ...
383 """JSON name of this field. The value is set by protocol compiler. If the
384 user has set a "json_name" option on this field, that option's value
385 will be used. Otherwise, it's deduced from the field's name by converting
390 def options(self) -> global___FieldOptions: ...
391 proto3_optional: builtins.bool = ...
392 """If true, this is a proto3 "optional". When a proto3 field is optional, it
393 tracks presence regardless of field type.
395 When proto3_optional is true, this field must be belong to a oneof to
396 signal to old proto3 clients that presence is tracked for this field. This
397 oneof is known as a "synthetic" oneof, and this field must be its sole
398 member (each proto3 optional field gets its own synthetic oneof). Synthetic
399 oneofs exist in the descriptor only, and do not generate any API. Synthetic
400 oneofs must be ordered after all "real" oneofs.
402 For message fields, proto3_optional doesn't create any semantic change,
403 since non-repeated message fields always track presence. However it still
404 indicates the semantic detail of whether the user wrote "optional" or not.
405 This can be useful for round-tripping the .proto file. For consistency we
406 give message fields a synthetic oneof also, even though it is not required
407 to track presence. This is especially important because the parser can't
408 tell if a field is a message or an enum, so it must always create a
411 Proto2 optional fields do not set this flag, because they already indicate
412 optional with `LABEL_OPTIONAL`.
417 name : typing.Optional[typing.Text] = ...,
418 number : typing.Optional[builtins.int] = ...,
419 label : typing.Optional[global___FieldDescriptorProto.Label.V] = ...,
420 type : typing.Optional[global___FieldDescriptorProto.Type.V] = ...,
421 type_name : typing.Optional[typing.Text] = ...,
422 extendee : typing.Optional[typing.Text] = ...,
423 default_value : typing.Optional[typing.Text] = ...,
424 oneof_index : typing.Optional[builtins.int] = ...,
425 json_name : typing.Optional[typing.Text] = ...,
426 options : typing.Optional[global___FieldOptions] = ...,
427 proto3_optional : typing.Optional[builtins.bool] = ...,
429 def HasField(self, field_name: typing_extensions.Literal["default_value",b"default_value","extendee",b"extendee","json_name",b"json_name","label",b"label","name",b"name","number",b"number","oneof_index",b"oneof_index","options",b"options","proto3_optional",b"proto3_optional","type",b"type","type_name",b"type_name"]) -> builtins.bool: ...
430 def ClearField(self, field_name: typing_extensions.Literal["default_value",b"default_value","extendee",b"extendee","json_name",b"json_name","label",b"label","name",b"name","number",b"number","oneof_index",b"oneof_index","options",b"options","proto3_optional",b"proto3_optional","type",b"type","type_name",b"type_name"]) -> None: ...
431 global___FieldDescriptorProto = FieldDescriptorProto
433 class OneofDescriptorProto(google.protobuf.message.Message):
434 """Describes a oneof."""
435 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
436 NAME_FIELD_NUMBER: builtins.int
437 OPTIONS_FIELD_NUMBER: builtins.int
438 name: typing.Text = ...
440 def options(self) -> global___OneofOptions: ...
443 name : typing.Optional[typing.Text] = ...,
444 options : typing.Optional[global___OneofOptions] = ...,
446 def HasField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options"]) -> builtins.bool: ...
447 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options"]) -> None: ...
448 global___OneofDescriptorProto = OneofDescriptorProto
450 class EnumDescriptorProto(google.protobuf.message.Message):
451 """Describes an enum type."""
452 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
453 class EnumReservedRange(google.protobuf.message.Message):
454 """Range of reserved numeric values. Reserved values may not be used by
455 entries in the same enum. Reserved ranges may not overlap.
457 Note that this is distinct from DescriptorProto.ReservedRange in that it
458 is inclusive such that it can appropriately represent the entire int32
461 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
462 START_FIELD_NUMBER: builtins.int
463 END_FIELD_NUMBER: builtins.int
464 start: builtins.int = ...
467 end: builtins.int = ...
472 start : typing.Optional[builtins.int] = ...,
473 end : typing.Optional[builtins.int] = ...,
475 def HasField(self, field_name: typing_extensions.Literal["end",b"end","start",b"start"]) -> builtins.bool: ...
476 def ClearField(self, field_name: typing_extensions.Literal["end",b"end","start",b"start"]) -> None: ...
478 NAME_FIELD_NUMBER: builtins.int
479 VALUE_FIELD_NUMBER: builtins.int
480 OPTIONS_FIELD_NUMBER: builtins.int
481 RESERVED_RANGE_FIELD_NUMBER: builtins.int
482 RESERVED_NAME_FIELD_NUMBER: builtins.int
483 name: typing.Text = ...
485 def value(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumValueDescriptorProto]: ...
487 def options(self) -> global___EnumOptions: ...
489 def reserved_range(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto.EnumReservedRange]:
490 """Range of reserved numeric values. Reserved numeric values may not be used
491 by enum values in the same enum declaration. Reserved ranges may not
496 def reserved_name(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
497 """Reserved enum value names, which may not be reused. A given name may only
503 name : typing.Optional[typing.Text] = ...,
504 value : typing.Optional[typing.Iterable[global___EnumValueDescriptorProto]] = ...,
505 options : typing.Optional[global___EnumOptions] = ...,
506 reserved_range : typing.Optional[typing.Iterable[global___EnumDescriptorProto.EnumReservedRange]] = ...,
507 reserved_name : typing.Optional[typing.Iterable[typing.Text]] = ...,
509 def HasField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options"]) -> builtins.bool: ...
510 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options","reserved_name",b"reserved_name","reserved_range",b"reserved_range","value",b"value"]) -> None: ...
511 global___EnumDescriptorProto = EnumDescriptorProto
513 class EnumValueDescriptorProto(google.protobuf.message.Message):
514 """Describes a value within an enum."""
515 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
516 NAME_FIELD_NUMBER: builtins.int
517 NUMBER_FIELD_NUMBER: builtins.int
518 OPTIONS_FIELD_NUMBER: builtins.int
519 name: typing.Text = ...
520 number: builtins.int = ...
522 def options(self) -> global___EnumValueOptions: ...
525 name : typing.Optional[typing.Text] = ...,
526 number : typing.Optional[builtins.int] = ...,
527 options : typing.Optional[global___EnumValueOptions] = ...,
529 def HasField(self, field_name: typing_extensions.Literal["name",b"name","number",b"number","options",b"options"]) -> builtins.bool: ...
530 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","number",b"number","options",b"options"]) -> None: ...
531 global___EnumValueDescriptorProto = EnumValueDescriptorProto
533 class ServiceDescriptorProto(google.protobuf.message.Message):
534 """Describes a service."""
535 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
536 NAME_FIELD_NUMBER: builtins.int
537 METHOD_FIELD_NUMBER: builtins.int
538 OPTIONS_FIELD_NUMBER: builtins.int
539 name: typing.Text = ...
541 def method(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MethodDescriptorProto]: ...
543 def options(self) -> global___ServiceOptions: ...
546 name : typing.Optional[typing.Text] = ...,
547 method : typing.Optional[typing.Iterable[global___MethodDescriptorProto]] = ...,
548 options : typing.Optional[global___ServiceOptions] = ...,
550 def HasField(self, field_name: typing_extensions.Literal["name",b"name","options",b"options"]) -> builtins.bool: ...
551 def ClearField(self, field_name: typing_extensions.Literal["method",b"method","name",b"name","options",b"options"]) -> None: ...
552 global___ServiceDescriptorProto = ServiceDescriptorProto
554 class MethodDescriptorProto(google.protobuf.message.Message):
555 """Describes a method of a service."""
556 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
557 NAME_FIELD_NUMBER: builtins.int
558 INPUT_TYPE_FIELD_NUMBER: builtins.int
559 OUTPUT_TYPE_FIELD_NUMBER: builtins.int
560 OPTIONS_FIELD_NUMBER: builtins.int
561 CLIENT_STREAMING_FIELD_NUMBER: builtins.int
562 SERVER_STREAMING_FIELD_NUMBER: builtins.int
563 name: typing.Text = ...
564 input_type: typing.Text = ...
565 """Input and output type names. These are resolved in the same way as
566 FieldDescriptorProto.type_name, but must refer to a message type.
569 output_type: typing.Text = ...
571 def options(self) -> global___MethodOptions: ...
572 client_streaming: builtins.bool = ...
573 """Identifies if client streams multiple client messages"""
575 server_streaming: builtins.bool = ...
576 """Identifies if server streams multiple server messages"""
580 name : typing.Optional[typing.Text] = ...,
581 input_type : typing.Optional[typing.Text] = ...,
582 output_type : typing.Optional[typing.Text] = ...,
583 options : typing.Optional[global___MethodOptions] = ...,
584 client_streaming : typing.Optional[builtins.bool] = ...,
585 server_streaming : typing.Optional[builtins.bool] = ...,
587 def HasField(self, field_name: typing_extensions.Literal["client_streaming",b"client_streaming","input_type",b"input_type","name",b"name","options",b"options","output_type",b"output_type","server_streaming",b"server_streaming"]) -> builtins.bool: ...
588 def ClearField(self, field_name: typing_extensions.Literal["client_streaming",b"client_streaming","input_type",b"input_type","name",b"name","options",b"options","output_type",b"output_type","server_streaming",b"server_streaming"]) -> None: ...
589 global___MethodDescriptorProto = MethodDescriptorProto
591 class FileOptions(google.protobuf.message.Message):
592 """===================================================================
595 Each of the definitions above may have "options" attached. These are
596 just annotations which may cause code to be generated slightly differently
597 or may contain hints for code that manipulates protocol messages.
599 Clients may define custom options as extensions of the *Options messages.
600 These extensions may not yet be known at parsing time, so the parser cannot
601 store the values in them. Instead it stores them in a field in the *Options
602 message called uninterpreted_option. This field must have the same name
603 across all *Options messages. We then use this field to populate the
604 extensions when we build a descriptor, at which point all protos have been
605 parsed and so all extensions are known.
607 Extension numbers for custom options may be chosen as follows:
608 * For options which will only be used within a single application or
609 organization, or for experimental options, use field numbers 50000
610 through 99999. It is up to you to ensure that you do not use the
611 same number for multiple options.
612 * For options which will be published and used publicly by multiple
613 independent entities, e-mail protobuf-global-extension-registry@google.com
614 to reserve extension numbers. Simply provide your project name (e.g.
615 Objective-C plugin) and your project website (if available) -- there's no
616 need to explain how you intend to use them. Usually you only need one
617 extension number. You can declare multiple options with only one extension
618 number by putting them in a sub-message. See the Custom Options section of
619 the docs for examples:
620 https://developers.google.com/protocol-buffers/docs/proto#options
621 If this turns out to be popular, a web service will be set up
622 to automatically assign option numbers.
625 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
626 class OptimizeMode(_OptimizeMode, metaclass=_OptimizeModeEnumTypeWrapper):
627 """Generated classes can be optimized for speed or code size."""
630 V = typing.NewType('V', builtins.int)
631 class _OptimizeModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_OptimizeMode.V], builtins.type):
632 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
633 SPEED = FileOptions.OptimizeMode.V(1)
634 """Generate complete code for parsing, serialization,"""
636 CODE_SIZE = FileOptions.OptimizeMode.V(2)
638 Use ReflectionOps to implement these methods.
641 LITE_RUNTIME = FileOptions.OptimizeMode.V(3)
642 """Generate code using MessageLite and the lite runtime."""
645 SPEED = FileOptions.OptimizeMode.V(1)
646 """Generate complete code for parsing, serialization,"""
648 CODE_SIZE = FileOptions.OptimizeMode.V(2)
650 Use ReflectionOps to implement these methods.
653 LITE_RUNTIME = FileOptions.OptimizeMode.V(3)
654 """Generate code using MessageLite and the lite runtime."""
657 JAVA_PACKAGE_FIELD_NUMBER: builtins.int
658 JAVA_OUTER_CLASSNAME_FIELD_NUMBER: builtins.int
659 JAVA_MULTIPLE_FILES_FIELD_NUMBER: builtins.int
660 JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER: builtins.int
661 JAVA_STRING_CHECK_UTF8_FIELD_NUMBER: builtins.int
662 OPTIMIZE_FOR_FIELD_NUMBER: builtins.int
663 GO_PACKAGE_FIELD_NUMBER: builtins.int
664 CC_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
665 JAVA_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
666 PY_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
667 PHP_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
668 DEPRECATED_FIELD_NUMBER: builtins.int
669 CC_ENABLE_ARENAS_FIELD_NUMBER: builtins.int
670 OBJC_CLASS_PREFIX_FIELD_NUMBER: builtins.int
671 CSHARP_NAMESPACE_FIELD_NUMBER: builtins.int
672 SWIFT_PREFIX_FIELD_NUMBER: builtins.int
673 PHP_CLASS_PREFIX_FIELD_NUMBER: builtins.int
674 PHP_NAMESPACE_FIELD_NUMBER: builtins.int
675 PHP_METADATA_NAMESPACE_FIELD_NUMBER: builtins.int
676 RUBY_PACKAGE_FIELD_NUMBER: builtins.int
677 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
678 java_package: typing.Text = ...
679 """Sets the Java package where classes generated from this .proto will be
680 placed. By default, the proto package is used, but this is often
681 inappropriate because proto packages do not normally start with backwards
685 java_outer_classname: typing.Text = ...
686 """Controls the name of the wrapper Java class generated for the .proto file.
687 That class will always contain the .proto file's getDescriptor() method as
688 well as any top-level extensions defined in the .proto file.
689 If java_multiple_files is disabled, then all the other classes from the
690 .proto file will be nested inside the single wrapper outer class.
693 java_multiple_files: builtins.bool = ...
694 """If enabled, then the Java code generator will generate a separate .java
695 file for each top-level message, enum, and service defined in the .proto
696 file. Thus, these types will *not* be nested inside the wrapper class
697 named by java_outer_classname. However, the wrapper class will still be
698 generated to contain the file's getDescriptor() method as well as any
699 top-level extensions defined in the file.
702 java_generate_equals_and_hash: builtins.bool = ...
703 """This option does nothing."""
705 java_string_check_utf8: builtins.bool = ...
706 """If set true, then the Java2 code generator will generate code that
707 throws an exception whenever an attempt is made to assign a non-UTF-8
708 byte sequence to a string field.
709 Message reflection will do the same.
710 However, an extension field still accepts non-UTF-8 byte sequences.
711 This option has no effect on when used with the lite runtime.
714 optimize_for: global___FileOptions.OptimizeMode.V = ...
715 go_package: typing.Text = ...
716 """Sets the Go package where structs generated from this .proto will be
717 placed. If omitted, the Go package will be derived from the following:
718 - The basename of the package import path, if provided.
719 - Otherwise, the package statement in the .proto file, if present.
720 - Otherwise, the basename of the .proto file, without extension.
723 cc_generic_services: builtins.bool = ...
724 """Should generic services be generated in each language? "Generic" services
725 are not specific to any particular RPC system. They are generated by the
726 main code generators in each language (without additional plugins).
727 Generic services were the only kind of service generation supported by
728 early versions of google.protobuf.
730 Generic services are now considered deprecated in favor of using plugins
731 that generate code specific to your particular RPC system. Therefore,
732 these default to false. Old code which depends on generic services should
733 explicitly set them to true.
736 java_generic_services: builtins.bool = ...
737 py_generic_services: builtins.bool = ...
738 php_generic_services: builtins.bool = ...
739 deprecated: builtins.bool = ...
740 """Is this file deprecated?
741 Depending on the target platform, this can emit Deprecated annotations
742 for everything in the file, or it will be completely ignored; in the very
743 least, this is a formalization for deprecating files.
746 cc_enable_arenas: builtins.bool = ...
747 """Enables the use of arenas for the proto messages in this file. This applies
748 only to generated classes for C++.
751 objc_class_prefix: typing.Text = ...
752 """Sets the objective c class prefix which is prepended to all objective c
753 generated classes from this .proto. There is no default.
756 csharp_namespace: typing.Text = ...
757 """Namespace for generated classes; defaults to the package."""
759 swift_prefix: typing.Text = ...
760 """By default Swift generators will take the proto package and CamelCase it
761 replacing '.' with underscore and use that to prefix the types/symbols
762 defined. When this options is provided, they will use this value instead
763 to prefix the types/symbols defined.
766 php_class_prefix: typing.Text = ...
767 """Sets the php class prefix which is prepended to all php generated classes
768 from this .proto. Default is empty.
771 php_namespace: typing.Text = ...
772 """Use this option to change the namespace of php generated classes. Default
773 is empty. When this option is empty, the package name will be used for
774 determining the namespace.
777 php_metadata_namespace: typing.Text = ...
778 """Use this option to change the namespace of php generated metadata classes.
779 Default is empty. When this option is empty, the proto file name will be
780 used for determining the namespace.
783 ruby_package: typing.Text = ...
784 """Use this option to change the package of ruby generated classes. Default
785 is empty. When this option is not set, the package name will be used for
786 determining the ruby package.
790 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
791 """The parser stores options it doesn't recognize here.
792 See the documentation for the "Options" section above.
797 java_package : typing.Optional[typing.Text] = ...,
798 java_outer_classname : typing.Optional[typing.Text] = ...,
799 java_multiple_files : typing.Optional[builtins.bool] = ...,
800 java_generate_equals_and_hash : typing.Optional[builtins.bool] = ...,
801 java_string_check_utf8 : typing.Optional[builtins.bool] = ...,
802 optimize_for : typing.Optional[global___FileOptions.OptimizeMode.V] = ...,
803 go_package : typing.Optional[typing.Text] = ...,
804 cc_generic_services : typing.Optional[builtins.bool] = ...,
805 java_generic_services : typing.Optional[builtins.bool] = ...,
806 py_generic_services : typing.Optional[builtins.bool] = ...,
807 php_generic_services : typing.Optional[builtins.bool] = ...,
808 deprecated : typing.Optional[builtins.bool] = ...,
809 cc_enable_arenas : typing.Optional[builtins.bool] = ...,
810 objc_class_prefix : typing.Optional[typing.Text] = ...,
811 csharp_namespace : typing.Optional[typing.Text] = ...,
812 swift_prefix : typing.Optional[typing.Text] = ...,
813 php_class_prefix : typing.Optional[typing.Text] = ...,
814 php_namespace : typing.Optional[typing.Text] = ...,
815 php_metadata_namespace : typing.Optional[typing.Text] = ...,
816 ruby_package : typing.Optional[typing.Text] = ...,
817 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
819 def HasField(self, field_name: typing_extensions.Literal["cc_enable_arenas",b"cc_enable_arenas","cc_generic_services",b"cc_generic_services","csharp_namespace",b"csharp_namespace","deprecated",b"deprecated","go_package",b"go_package","java_generate_equals_and_hash",b"java_generate_equals_and_hash","java_generic_services",b"java_generic_services","java_multiple_files",b"java_multiple_files","java_outer_classname",b"java_outer_classname","java_package",b"java_package","java_string_check_utf8",b"java_string_check_utf8","objc_class_prefix",b"objc_class_prefix","optimize_for",b"optimize_for","php_class_prefix",b"php_class_prefix","php_generic_services",b"php_generic_services","php_metadata_namespace",b"php_metadata_namespace","php_namespace",b"php_namespace","py_generic_services",b"py_generic_services","ruby_package",b"ruby_package","swift_prefix",b"swift_prefix"]) -> builtins.bool: ...
820 def ClearField(self, field_name: typing_extensions.Literal["cc_enable_arenas",b"cc_enable_arenas","cc_generic_services",b"cc_generic_services","csharp_namespace",b"csharp_namespace","deprecated",b"deprecated","go_package",b"go_package","java_generate_equals_and_hash",b"java_generate_equals_and_hash","java_generic_services",b"java_generic_services","java_multiple_files",b"java_multiple_files","java_outer_classname",b"java_outer_classname","java_package",b"java_package","java_string_check_utf8",b"java_string_check_utf8","objc_class_prefix",b"objc_class_prefix","optimize_for",b"optimize_for","php_class_prefix",b"php_class_prefix","php_generic_services",b"php_generic_services","php_metadata_namespace",b"php_metadata_namespace","php_namespace",b"php_namespace","py_generic_services",b"py_generic_services","ruby_package",b"ruby_package","swift_prefix",b"swift_prefix","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
821 global___FileOptions = FileOptions
823 class MessageOptions(google.protobuf.message.Message):
824 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
825 MESSAGE_SET_WIRE_FORMAT_FIELD_NUMBER: builtins.int
826 NO_STANDARD_DESCRIPTOR_ACCESSOR_FIELD_NUMBER: builtins.int
827 DEPRECATED_FIELD_NUMBER: builtins.int
828 MAP_ENTRY_FIELD_NUMBER: builtins.int
829 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
830 message_set_wire_format: builtins.bool = ...
831 """Set true to use the old proto1 MessageSet wire format for extensions.
832 This is provided for backwards-compatibility with the MessageSet wire
833 format. You should not use this for any other reason: It's less
834 efficient, has fewer features, and is more complicated.
836 The message must be defined exactly as follows:
838 option message_set_wire_format = true;
841 Note that the message cannot have any defined fields; MessageSets only
844 All extensions of your type must be singular messages; e.g. they cannot
845 be int32s, enums, or repeated messages.
847 Because this is an option, the above two restrictions are not enforced by
848 the protocol compiler.
851 no_standard_descriptor_accessor: builtins.bool = ...
852 """Disables the generation of the standard "descriptor()" accessor, which can
853 conflict with a field of the same name. This is meant to make migration
854 from proto1 easier; new code should avoid fields named "descriptor".
857 deprecated: builtins.bool = ...
858 """Is this message deprecated?
859 Depending on the target platform, this can emit Deprecated annotations
860 for the message, or it will be completely ignored; in the very least,
861 this is a formalization for deprecating messages.
864 map_entry: builtins.bool = ...
865 """Whether the message is an automatically generated map entry type for the
869 map<KeyType, ValueType> map_field = 1;
870 The parsed descriptor looks like:
871 message MapFieldEntry {
872 option map_entry = true;
873 optional KeyType key = 1;
874 optional ValueType value = 2;
876 repeated MapFieldEntry map_field = 1;
878 Implementations may choose not to generate the map_entry=true message, but
879 use a native map in the target language to hold the keys and values.
880 The reflection APIs in such implementations still need to work as
881 if the field is a repeated message field.
883 NOTE: Do not set the option in .proto files. Always use the maps syntax
884 instead. The option should only be implicitly set by the proto compiler
889 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
890 """The parser stores options it doesn't recognize here. See above."""
894 message_set_wire_format : typing.Optional[builtins.bool] = ...,
895 no_standard_descriptor_accessor : typing.Optional[builtins.bool] = ...,
896 deprecated : typing.Optional[builtins.bool] = ...,
897 map_entry : typing.Optional[builtins.bool] = ...,
898 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
900 def HasField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","map_entry",b"map_entry","message_set_wire_format",b"message_set_wire_format","no_standard_descriptor_accessor",b"no_standard_descriptor_accessor"]) -> builtins.bool: ...
901 def ClearField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","map_entry",b"map_entry","message_set_wire_format",b"message_set_wire_format","no_standard_descriptor_accessor",b"no_standard_descriptor_accessor","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
902 global___MessageOptions = MessageOptions
904 class FieldOptions(google.protobuf.message.Message):
905 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
906 class CType(_CType, metaclass=_CTypeEnumTypeWrapper):
909 V = typing.NewType('V', builtins.int)
910 class _CTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CType.V], builtins.type):
911 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
912 STRING = FieldOptions.CType.V(0)
915 CORD = FieldOptions.CType.V(1)
916 STRING_PIECE = FieldOptions.CType.V(2)
918 STRING = FieldOptions.CType.V(0)
921 CORD = FieldOptions.CType.V(1)
922 STRING_PIECE = FieldOptions.CType.V(2)
924 class JSType(_JSType, metaclass=_JSTypeEnumTypeWrapper):
927 V = typing.NewType('V', builtins.int)
928 class _JSTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_JSType.V], builtins.type):
929 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
930 JS_NORMAL = FieldOptions.JSType.V(0)
931 """Use the default type."""
933 JS_STRING = FieldOptions.JSType.V(1)
934 """Use JavaScript strings."""
936 JS_NUMBER = FieldOptions.JSType.V(2)
937 """Use JavaScript numbers."""
940 JS_NORMAL = FieldOptions.JSType.V(0)
941 """Use the default type."""
943 JS_STRING = FieldOptions.JSType.V(1)
944 """Use JavaScript strings."""
946 JS_NUMBER = FieldOptions.JSType.V(2)
947 """Use JavaScript numbers."""
950 CTYPE_FIELD_NUMBER: builtins.int
951 PACKED_FIELD_NUMBER: builtins.int
952 JSTYPE_FIELD_NUMBER: builtins.int
953 LAZY_FIELD_NUMBER: builtins.int
954 DEPRECATED_FIELD_NUMBER: builtins.int
955 WEAK_FIELD_NUMBER: builtins.int
956 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
957 ctype: global___FieldOptions.CType.V = ...
958 """The ctype option instructs the C++ code generator to use a different
959 representation of the field than it normally would. See the specific
960 options below. This option is not yet implemented in the open source
961 release -- sorry, we'll try to include it in a future version!
964 packed: builtins.bool = ...
965 """The packed option can be enabled for repeated primitive fields to enable
966 a more efficient representation on the wire. Rather than repeatedly
967 writing the tag and type for each element, the entire array is encoded as
968 a single length-delimited blob. In proto3, only explicit setting it to
969 false will avoid using packed encoding.
972 jstype: global___FieldOptions.JSType.V = ...
973 """The jstype option determines the JavaScript type used for values of the
974 field. The option is permitted only for 64 bit integral and fixed types
975 (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
976 is represented as JavaScript string, which avoids loss of precision that
977 can happen when a large value is converted to a floating point JavaScript.
978 Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
979 use the JavaScript "number" type. The behavior of the default option
980 JS_NORMAL is implementation dependent.
982 This option is an enum to permit additional types to be added, e.g.
986 lazy: builtins.bool = ...
987 """Should this field be parsed lazily? Lazy applies only to message-type
988 fields. It means that when the outer message is initially parsed, the
989 inner message's contents will not be parsed but instead stored in encoded
990 form. The inner message will actually be parsed when it is first accessed.
992 This is only a hint. Implementations are free to choose whether to use
993 eager or lazy parsing regardless of the value of this option. However,
994 setting this option true suggests that the protocol author believes that
995 using lazy parsing on this field is worth the additional bookkeeping
996 overhead typically needed to implement it.
998 This option does not affect the public interface of any generated code;
999 all method signatures remain the same. Furthermore, thread-safety of the
1000 interface is not affected by this option; const methods remain safe to
1001 call from multiple threads concurrently, while non-const methods continue
1002 to require exclusive access.
1005 Note that implementations may choose not to check required fields within
1006 a lazy sub-message. That is, calling IsInitialized() on the outer message
1007 may return true even if the inner message has missing required fields.
1008 This is necessary because otherwise the inner message would have to be
1009 parsed in order to perform the check, defeating the purpose of lazy
1010 parsing. An implementation which chooses not to check required fields
1011 must be consistent about it. That is, for any particular sub-message, the
1012 implementation must either *always* check its required fields, or *never*
1013 check its required fields, regardless of whether or not the message has
1017 deprecated: builtins.bool = ...
1018 """Is this field deprecated?
1019 Depending on the target platform, this can emit Deprecated annotations
1020 for accessors, or it will be completely ignored; in the very least, this
1021 is a formalization for deprecating fields.
1024 weak: builtins.bool = ...
1025 """For Google-internal migration only. Do not use."""
1028 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1029 """The parser stores options it doesn't recognize here. See above."""
1033 ctype : typing.Optional[global___FieldOptions.CType.V] = ...,
1034 packed : typing.Optional[builtins.bool] = ...,
1035 jstype : typing.Optional[global___FieldOptions.JSType.V] = ...,
1036 lazy : typing.Optional[builtins.bool] = ...,
1037 deprecated : typing.Optional[builtins.bool] = ...,
1038 weak : typing.Optional[builtins.bool] = ...,
1039 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1041 def HasField(self, field_name: typing_extensions.Literal["ctype",b"ctype","deprecated",b"deprecated","jstype",b"jstype","lazy",b"lazy","packed",b"packed","weak",b"weak"]) -> builtins.bool: ...
1042 def ClearField(self, field_name: typing_extensions.Literal["ctype",b"ctype","deprecated",b"deprecated","jstype",b"jstype","lazy",b"lazy","packed",b"packed","uninterpreted_option",b"uninterpreted_option","weak",b"weak"]) -> None: ...
1043 global___FieldOptions = FieldOptions
1045 class OneofOptions(google.protobuf.message.Message):
1046 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1047 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
1049 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1050 """The parser stores options it doesn't recognize here. See above."""
1054 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1056 def ClearField(self, field_name: typing_extensions.Literal["uninterpreted_option",b"uninterpreted_option"]) -> None: ...
1057 global___OneofOptions = OneofOptions
1059 class EnumOptions(google.protobuf.message.Message):
1060 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1061 ALLOW_ALIAS_FIELD_NUMBER: builtins.int
1062 DEPRECATED_FIELD_NUMBER: builtins.int
1063 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
1064 allow_alias: builtins.bool = ...
1065 """Set this option to true to allow mapping different tag names to the same
1069 deprecated: builtins.bool = ...
1070 """Is this enum deprecated?
1071 Depending on the target platform, this can emit Deprecated annotations
1072 for the enum, or it will be completely ignored; in the very least, this
1073 is a formalization for deprecating enums.
1077 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1078 """The parser stores options it doesn't recognize here. See above."""
1082 allow_alias : typing.Optional[builtins.bool] = ...,
1083 deprecated : typing.Optional[builtins.bool] = ...,
1084 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1086 def HasField(self, field_name: typing_extensions.Literal["allow_alias",b"allow_alias","deprecated",b"deprecated"]) -> builtins.bool: ...
1087 def ClearField(self, field_name: typing_extensions.Literal["allow_alias",b"allow_alias","deprecated",b"deprecated","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
1088 global___EnumOptions = EnumOptions
1090 class EnumValueOptions(google.protobuf.message.Message):
1091 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1092 DEPRECATED_FIELD_NUMBER: builtins.int
1093 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
1094 deprecated: builtins.bool = ...
1095 """Is this enum value deprecated?
1096 Depending on the target platform, this can emit Deprecated annotations
1097 for the enum value, or it will be completely ignored; in the very least,
1098 this is a formalization for deprecating enum values.
1102 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1103 """The parser stores options it doesn't recognize here. See above."""
1107 deprecated : typing.Optional[builtins.bool] = ...,
1108 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1110 def HasField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated"]) -> builtins.bool: ...
1111 def ClearField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
1112 global___EnumValueOptions = EnumValueOptions
1114 class ServiceOptions(google.protobuf.message.Message):
1115 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1116 DEPRECATED_FIELD_NUMBER: builtins.int
1117 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
1118 deprecated: builtins.bool = ...
1119 """Note: Field numbers 1 through 32 are reserved for Google's internal RPC
1120 framework. We apologize for hoarding these numbers to ourselves, but
1121 we were already using them long before we decided to release Protocol
1124 Is this service deprecated?
1125 Depending on the target platform, this can emit Deprecated annotations
1126 for the service, or it will be completely ignored; in the very least,
1127 this is a formalization for deprecating services.
1131 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1132 """The parser stores options it doesn't recognize here. See above."""
1136 deprecated : typing.Optional[builtins.bool] = ...,
1137 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1139 def HasField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated"]) -> builtins.bool: ...
1140 def ClearField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
1141 global___ServiceOptions = ServiceOptions
1143 class MethodOptions(google.protobuf.message.Message):
1144 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1145 class IdempotencyLevel(_IdempotencyLevel, metaclass=_IdempotencyLevelEnumTypeWrapper):
1146 """Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1147 or neither? HTTP based RPC implementation may choose GET verb for safe
1148 methods, and PUT verb for idempotent methods instead of the default POST.
1151 class _IdempotencyLevel:
1152 V = typing.NewType('V', builtins.int)
1153 class _IdempotencyLevelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IdempotencyLevel.V], builtins.type):
1154 DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
1155 IDEMPOTENCY_UNKNOWN = MethodOptions.IdempotencyLevel.V(0)
1156 NO_SIDE_EFFECTS = MethodOptions.IdempotencyLevel.V(1)
1157 """implies idempotent"""
1159 IDEMPOTENT = MethodOptions.IdempotencyLevel.V(2)
1160 """idempotent, but may have side effects"""
1163 IDEMPOTENCY_UNKNOWN = MethodOptions.IdempotencyLevel.V(0)
1164 NO_SIDE_EFFECTS = MethodOptions.IdempotencyLevel.V(1)
1165 """implies idempotent"""
1167 IDEMPOTENT = MethodOptions.IdempotencyLevel.V(2)
1168 """idempotent, but may have side effects"""
1171 DEPRECATED_FIELD_NUMBER: builtins.int
1172 IDEMPOTENCY_LEVEL_FIELD_NUMBER: builtins.int
1173 UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
1174 deprecated: builtins.bool = ...
1175 """Note: Field numbers 1 through 32 are reserved for Google's internal RPC
1176 framework. We apologize for hoarding these numbers to ourselves, but
1177 we were already using them long before we decided to release Protocol
1180 Is this method deprecated?
1181 Depending on the target platform, this can emit Deprecated annotations
1182 for the method, or it will be completely ignored; in the very least,
1183 this is a formalization for deprecating methods.
1186 idempotency_level: global___MethodOptions.IdempotencyLevel.V = ...
1188 def uninterpreted_option(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
1189 """The parser stores options it doesn't recognize here. See above."""
1193 deprecated : typing.Optional[builtins.bool] = ...,
1194 idempotency_level : typing.Optional[global___MethodOptions.IdempotencyLevel.V] = ...,
1195 uninterpreted_option : typing.Optional[typing.Iterable[global___UninterpretedOption]] = ...,
1197 def HasField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","idempotency_level",b"idempotency_level"]) -> builtins.bool: ...
1198 def ClearField(self, field_name: typing_extensions.Literal["deprecated",b"deprecated","idempotency_level",b"idempotency_level","uninterpreted_option",b"uninterpreted_option"]) -> None: ...
1199 global___MethodOptions = MethodOptions
1201 class UninterpretedOption(google.protobuf.message.Message):
1202 """A message representing a option the parser does not recognize. This only
1203 appears in options protos created by the compiler::Parser class.
1204 DescriptorPool resolves these when building Descriptor objects. Therefore,
1205 options protos in descriptor objects (e.g. returned by Descriptor::options(),
1206 or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1209 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1210 class NamePart(google.protobuf.message.Message):
1211 """The name of the uninterpreted option. Each string represents a segment in
1212 a dot-separated name. is_extension is true iff a segment represents an
1213 extension (denoted with parentheses in options specs in .proto files).
1214 E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
1215 "foo.(bar.baz).qux".
1217 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1218 NAME_PART_FIELD_NUMBER: builtins.int
1219 IS_EXTENSION_FIELD_NUMBER: builtins.int
1220 name_part: typing.Text = ...
1221 is_extension: builtins.bool = ...
1224 name_part : typing.Optional[typing.Text] = ...,
1225 is_extension : typing.Optional[builtins.bool] = ...,
1227 def HasField(self, field_name: typing_extensions.Literal["is_extension",b"is_extension","name_part",b"name_part"]) -> builtins.bool: ...
1228 def ClearField(self, field_name: typing_extensions.Literal["is_extension",b"is_extension","name_part",b"name_part"]) -> None: ...
1230 NAME_FIELD_NUMBER: builtins.int
1231 IDENTIFIER_VALUE_FIELD_NUMBER: builtins.int
1232 POSITIVE_INT_VALUE_FIELD_NUMBER: builtins.int
1233 NEGATIVE_INT_VALUE_FIELD_NUMBER: builtins.int
1234 DOUBLE_VALUE_FIELD_NUMBER: builtins.int
1235 STRING_VALUE_FIELD_NUMBER: builtins.int
1236 AGGREGATE_VALUE_FIELD_NUMBER: builtins.int
1238 def name(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption.NamePart]: ...
1239 identifier_value: typing.Text = ...
1240 """The value of the uninterpreted option, in whatever type the tokenizer
1241 identified it as during parsing. Exactly one of these should be set.
1244 positive_int_value: builtins.int = ...
1245 negative_int_value: builtins.int = ...
1246 double_value: builtins.float = ...
1247 string_value: builtins.bytes = ...
1248 aggregate_value: typing.Text = ...
1251 name : typing.Optional[typing.Iterable[global___UninterpretedOption.NamePart]] = ...,
1252 identifier_value : typing.Optional[typing.Text] = ...,
1253 positive_int_value : typing.Optional[builtins.int] = ...,
1254 negative_int_value : typing.Optional[builtins.int] = ...,
1255 double_value : typing.Optional[builtins.float] = ...,
1256 string_value : typing.Optional[builtins.bytes] = ...,
1257 aggregate_value : typing.Optional[typing.Text] = ...,
1259 def HasField(self, field_name: typing_extensions.Literal["aggregate_value",b"aggregate_value","double_value",b"double_value","identifier_value",b"identifier_value","negative_int_value",b"negative_int_value","positive_int_value",b"positive_int_value","string_value",b"string_value"]) -> builtins.bool: ...
1260 def ClearField(self, field_name: typing_extensions.Literal["aggregate_value",b"aggregate_value","double_value",b"double_value","identifier_value",b"identifier_value","name",b"name","negative_int_value",b"negative_int_value","positive_int_value",b"positive_int_value","string_value",b"string_value"]) -> None: ...
1261 global___UninterpretedOption = UninterpretedOption
1263 class SourceCodeInfo(google.protobuf.message.Message):
1264 """===================================================================
1265 Optional source code info
1267 Encapsulates information about the original source file from which a
1268 FileDescriptorProto was generated.
1270 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1271 class Location(google.protobuf.message.Message):
1272 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1273 PATH_FIELD_NUMBER: builtins.int
1274 SPAN_FIELD_NUMBER: builtins.int
1275 LEADING_COMMENTS_FIELD_NUMBER: builtins.int
1276 TRAILING_COMMENTS_FIELD_NUMBER: builtins.int
1277 LEADING_DETACHED_COMMENTS_FIELD_NUMBER: builtins.int
1279 def path(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
1280 """Identifies which part of the FileDescriptorProto was defined at this
1283 Each element is a field number or an index. They form a path from
1284 the root FileDescriptorProto to the place where the definition. For
1288 file.message_type(3) // 4, 3
1291 This is because FileDescriptorProto.message_type has field number 4:
1292 repeated DescriptorProto message_type = 4;
1293 and DescriptorProto.field has field number 2:
1294 repeated FieldDescriptorProto field = 2;
1295 and FieldDescriptorProto.name has field number 1:
1296 optional string name = 1;
1298 Thus, the above path gives the location of a field name. If we removed
1301 this path refers to the whole field declaration (from the beginning
1302 of the label to the terminating semicolon).
1306 def span(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
1307 """Always has exactly three or four elements: start line, start column,
1308 end line (optional, otherwise assumed same as start line), end column.
1309 These are packed into a single field for efficiency. Note that line
1310 and column numbers are zero-based -- typically you will want to add
1311 1 to each before displaying to a user.
1314 leading_comments: typing.Text = ...
1315 """If this SourceCodeInfo represents a complete declaration, these are any
1316 comments appearing before and after the declaration which appear to be
1317 attached to the declaration.
1319 A series of line comments appearing on consecutive lines, with no other
1320 tokens appearing on those lines, will be treated as a single comment.
1322 leading_detached_comments will keep paragraphs of comments that appear
1323 before (but not connected to) the current element. Each paragraph,
1324 separated by empty lines, will be one comment element in the repeated
1327 Only the comment content is provided; comment markers (e.g. //) are
1328 stripped out. For block comments, leading whitespace and an asterisk
1329 will be stripped from the beginning of each line other than the first.
1330 Newlines are included in the output.
1334 optional int32 foo = 1; // Comment attached to foo.
1335 // Comment attached to bar.
1336 optional int32 bar = 2;
1338 optional string baz = 3;
1339 // Comment attached to baz.
1340 // Another line attached to baz.
1342 // Comment attached to qux.
1344 // Another line attached to qux.
1345 optional double qux = 4;
1347 // Detached comment for corge. This is not leading or trailing comments
1348 // to qux or corge because there are blank lines separating it from
1351 // Detached comment for corge paragraph 2.
1353 optional string corge = 5;
1354 /* Block comment attached
1355 * to corge. Leading asterisks
1356 * will be removed. */
1357 /* Block comment attached to
1359 optional int32 grault = 6;
1361 // ignored detached comments.
1364 trailing_comments: typing.Text = ...
1366 def leading_detached_comments(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
1369 path : typing.Optional[typing.Iterable[builtins.int]] = ...,
1370 span : typing.Optional[typing.Iterable[builtins.int]] = ...,
1371 leading_comments : typing.Optional[typing.Text] = ...,
1372 trailing_comments : typing.Optional[typing.Text] = ...,
1373 leading_detached_comments : typing.Optional[typing.Iterable[typing.Text]] = ...,
1375 def HasField(self, field_name: typing_extensions.Literal["leading_comments",b"leading_comments","trailing_comments",b"trailing_comments"]) -> builtins.bool: ...
1376 def ClearField(self, field_name: typing_extensions.Literal["leading_comments",b"leading_comments","leading_detached_comments",b"leading_detached_comments","path",b"path","span",b"span","trailing_comments",b"trailing_comments"]) -> None: ...
1378 LOCATION_FIELD_NUMBER: builtins.int
1380 def location(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SourceCodeInfo.Location]:
1381 """A Location identifies a piece of source code in a .proto file which
1382 corresponds to a particular definition. This information is intended
1383 to be useful to IDEs, code indexers, documentation generators, and similar
1386 For example, say we have a file like:
1388 optional string foo = 1;
1390 Let's look at just the field definition:
1391 optional string foo = 1;
1394 We have the following locations:
1395 span path represents
1396 [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1397 [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1398 [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1399 [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1400 [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1403 - A location may refer to a repeated field itself (i.e. not to any
1404 particular index within it). This is used whenever a set of elements are
1405 logically enclosed in a single code segment. For example, an entire
1406 extend block (possibly containing multiple extension definitions) will
1407 have an outer location whose path refers to the "extensions" repeated
1408 field without an index.
1409 - Multiple locations may have the same path. This happens when a single
1410 logical declaration is spread out across multiple places. The most
1411 obvious example is the "extend" block again -- there may be multiple
1412 extend blocks in the same scope, each of which will have the same path.
1413 - A location's span is not always a subset of its parent's span. For
1414 example, the "extendee" of an extension declaration appears at the
1415 beginning of the "extend" block and is shared by all extensions within
1417 - Just because a location's span is a subset of some other location's span
1418 does not mean that it is a descendant. For example, a "group" defines
1419 both a type and a field in a single declaration. Thus, the locations
1420 corresponding to the type and field and their components will overlap.
1421 - Code which tries to interpret locations should probably be designed to
1422 ignore those that it doesn't understand, as more types of locations could
1423 be recorded in the future.
1428 location : typing.Optional[typing.Iterable[global___SourceCodeInfo.Location]] = ...,
1430 def ClearField(self, field_name: typing_extensions.Literal["location",b"location"]) -> None: ...
1431 global___SourceCodeInfo = SourceCodeInfo
1433 class GeneratedCodeInfo(google.protobuf.message.Message):
1434 """Describes the relationship between generated code and its original source
1435 file. A GeneratedCodeInfo message is associated with only one generated
1436 source file, but may contain references to different source .proto files.
1438 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1439 class Annotation(google.protobuf.message.Message):
1440 DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
1441 PATH_FIELD_NUMBER: builtins.int
1442 SOURCE_FILE_FIELD_NUMBER: builtins.int
1443 BEGIN_FIELD_NUMBER: builtins.int
1444 END_FIELD_NUMBER: builtins.int
1446 def path(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
1447 """Identifies the element in the original source .proto file. This field
1448 is formatted the same as SourceCodeInfo.Location.path.
1451 source_file: typing.Text = ...
1452 """Identifies the filesystem path to the original source .proto."""
1454 begin: builtins.int = ...
1455 """Identifies the starting offset in bytes in the generated code
1456 that relates to the identified object.
1459 end: builtins.int = ...
1460 """Identifies the ending offset in bytes in the generated code that
1461 relates to the identified offset. The end offset should be one past
1462 the last relevant byte (so the length of the text = end - begin).
1467 path : typing.Optional[typing.Iterable[builtins.int]] = ...,
1468 source_file : typing.Optional[typing.Text] = ...,
1469 begin : typing.Optional[builtins.int] = ...,
1470 end : typing.Optional[builtins.int] = ...,
1472 def HasField(self, field_name: typing_extensions.Literal["begin",b"begin","end",b"end","source_file",b"source_file"]) -> builtins.bool: ...
1473 def ClearField(self, field_name: typing_extensions.Literal["begin",b"begin","end",b"end","path",b"path","source_file",b"source_file"]) -> None: ...
1475 ANNOTATION_FIELD_NUMBER: builtins.int
1477 def annotation(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GeneratedCodeInfo.Annotation]:
1478 """An Annotation connects some span of text in generated code to an element
1479 of its generating .proto file.
1484 annotation : typing.Optional[typing.Iterable[global___GeneratedCodeInfo.Annotation]] = ...,
1486 def ClearField(self, field_name: typing_extensions.Literal["annotation",b"annotation"]) -> None: ...
1487 global___GeneratedCodeInfo = GeneratedCodeInfo