Classes | Functions | Variables
google.protobuf.descriptor Namespace Reference

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
 

Function Documentation

◆ _Deprecated()

def google.protobuf.descriptor._Deprecated (   name)
private

◆ _OptionsOrNone()

def google.protobuf.descriptor._OptionsOrNone (   descriptor_proto)
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.

◆ _ParseOptions()

def google.protobuf.descriptor._ParseOptions (   message,
  string 
)
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.

◆ _ToCamelCase()

def google.protobuf.descriptor._ToCamelCase (   name)
private
Converts name to camel-case and returns it.

Definition at line 930 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

◆ _ToJsonName()

def google.protobuf.descriptor._ToJsonName (   name)
private
Converts name to Json name and returns it.

Definition at line 959 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

◆ MakeDescriptor()

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.

Variable Documentation

◆ __author__

string google.protobuf.descriptor.__author__ = 'robinson@google.com (Will Robinson)'
private

◆ _internal_create_key

google.protobuf.descriptor._internal_create_key = object()
private

◆ _lock

google.protobuf.descriptor._lock = threading.Lock()
private

◆ _USE_C_DESCRIPTORS

bool google.protobuf.descriptor._USE_C_DESCRIPTORS = False
private

◆ DescriptorMetaclass



grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:23