3 from .descriptor_pb2 import (
13 from .message import Message
15 class Error(Exception): ...
16 class TypeTransformationError(Error): ...
18 class DescriptorMetaclass(type):
19 def __instancecheck__(self, obj): ...
21 _internal_create_key: object
23 class DescriptorBase(metaclass=DescriptorMetaclass):
25 def __init__(self, options, serialized_options, options_class_name) -> None: ...
26 def GetOptions(self): ...
28 class _NestedDescriptorBase(DescriptorBase):
43 serialized_options=...,
45 def GetTopLevelContainingType(self): ...
46 def CopyToProto(self, proto): ...
48 class Descriptor(_NestedDescriptorBase):
60 serialized_options=...,
74 nested_types_by_name: Any
76 enum_types_by_name: Any
77 enum_values_by_name: Any
79 extensions_by_name: Any
96 serialized_options=...,
101 serialized_start=...,
106 def EnumValueName(self, enum, value): ...
107 def CopyToProto(self, proto): ...
108 def GetOptions(self) -> MessageOptions: ...
110 class FieldDescriptor(DescriptorBase):
145 MAX_FIELD_NUMBER: Any
146 FIRST_RESERVED_FIELD_NUMBER: Any
147 LAST_RESERVED_FIELD_NUMBER: Any
164 serialized_options=...,
166 has_default_value=...,
167 containing_oneof=...,
177 has_default_value: Any
184 containing_oneof: Any
201 serialized_options=...,
203 has_default_value=...,
204 containing_oneof=...,
208 def ProtoTypeToCppProtoType(proto_type): ...
209 def GetOptions(self) -> FieldOptions: ...
211 class EnumDescriptor(_NestedDescriptorBase):
220 serialized_options=...,
222 serialized_start=...,
228 values_by_number: Any
237 serialized_options=...,
239 serialized_start=...,
243 def CopyToProto(self, proto): ...
244 def GetOptions(self) -> EnumOptions: ...
246 class EnumValueDescriptor(DescriptorBase):
247 def __new__(cls, name, index, number, type=..., options=..., serialized_options=..., create_key=...): ...
252 def __init__(self, name, index, number, type=..., options=..., serialized_options=..., create_key=...) -> None: ...
253 def GetOptions(self) -> EnumValueOptions: ...
255 class OneofDescriptor:
256 def __new__(cls, name, full_name, index, containing_type, fields, options=..., serialized_options=..., create_key=...): ...
263 self, name, full_name, index, containing_type, fields, options=..., serialized_options=..., create_key=...
265 def GetOptions(self) -> OneofOptions: ...
267 class ServiceDescriptor(_NestedDescriptorBase):
275 serialized_options=...,
277 serialized_start=...,
291 serialized_options=...,
293 serialized_start=...,
297 def FindMethodByName(self, name): ...
298 def CopyToProto(self, proto): ...
299 def GetOptions(self) -> ServiceOptions: ...
301 class MethodDescriptor(DescriptorBase):
311 serialized_options=...,
317 containing_service: Any
329 serialized_options=...,
332 def GetOptions(self) -> MethodOptions: ...
334 class FileDescriptor(DescriptorBase):
340 serialized_options=...,
343 public_dependencies=...,
350 message_types_by_name: Any
355 enum_types_by_name: Any
356 extensions_by_name: Any
357 services_by_name: Any
359 public_dependencies: Any
365 serialized_options=...,
368 public_dependencies=...,
373 def CopyToProto(self, proto): ...
374 def GetOptions(self) -> FileOptions: ...
376 def MakeDescriptor(desc_proto, package=..., build_file_if_cpp=..., syntax=...): ...
377 def _ParseOptions(message: Message, string: bytes) -> Message: ...