Classes | |
| class | _Lock |
| class | _NestedDescriptorBase |
| class | Descriptor |
| class | DescriptorBase |
| class | DescriptorMetaclass |
| class | EnumDescriptor |
| class | EnumValueDescriptor |
| class | Error |
| class | FieldDescriptor |
| class | FileDescriptor |
| class | MethodDescriptor |
| class | OneofDescriptor |
| class | ServiceDescriptor |
| class | TypeTransformationError |
Functions | |
| def | _Deprecated (name) |
| def | _OptionsOrNone (descriptor_proto) |
| def | _ParseOptions (message, string) |
| def | _ToCamelCase (name) |
| def | _ToJsonName (name) |
| def | MakeDescriptor (desc_proto, package='', build_file_if_cpp=True, syntax=None) |
Variables | |
| string | __author__ = 'robinson@google.com (Will Robinson)' |
| _internal_create_key = object() | |
| _lock = threading.Lock() | |
| bool | _USE_C_DESCRIPTORS = False |
| DescriptorMetaclass = type | |
|
private |
Definition at line 94 of file protobuf/python/google/protobuf/descriptor.py.
|
private |
Returns the value of the field `options`, or None if it is not set.
Definition at line 951 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Parses serialized options. This helper function is used to parse serialized options in generated proto2 files. It must not be used outside proto2.
Definition at line 920 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Converts name to camel-case and returns it.
Definition at line 930 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Converts name to Json name and returns it.
Definition at line 959 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
| def google.protobuf.descriptor.MakeDescriptor | ( | desc_proto, | |
package = '', |
|||
build_file_if_cpp = True, |
|||
syntax = None |
|||
| ) |
Make a protobuf Descriptor given a DescriptorProto protobuf.
Handles nested descriptors. Note that this is limited to the scope of defining
a message inside of another message. Composite fields can currently only be
resolved if the message is defined in the same scope as the field.
Args:
desc_proto: The descriptor_pb2.DescriptorProto protobuf message.
package: Optional package name for the new message Descriptor (string).
build_file_if_cpp: Update the C++ descriptor pool if api matches.
Set to False on recursion, so no duplicates are created.
syntax: The syntax/semantics that should be used. Set to "proto3" to get
proto3 field presence semantics.
Returns:
A Descriptor for protobuf messages.
Definition at line 976 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Definition at line 35 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Definition at line 110 of file protobuf/python/google/protobuf/descriptor.py.
|
private |
Definition at line 91 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
|
private |
Definition at line 42 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.
Definition at line 73 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.