Home | History | Annotate | Download | only in protobuf

Lines Matching refs:Descriptor

61   # and make it return True when the descriptor is an instance of the extension
79 This class is the base of all descriptor classes. It provides common options
83 has_options: True if the descriptor has non-default options. Usually it
92 # subclasses" of this descriptor class.
96 """Initialize the descriptor given its options message and the name of the
103 # Does this descriptor have non-default options?
107 """Sets the descriptor's options
109 This function is used in generated proto2 files to update descriptor
115 # Does this descriptor have non-default options?
119 """Retrieves descriptor options.
122 descriptor.
154 containing_type: if provided, this is a nested descriptor, with this
155 descriptor as parent, otherwise None.
157 file.serialized_pb that describes this descriptor.
159 file.serialized_pb that describes this descriptor.
196 raise Error('Descriptor does not contain serialization.')
199 class Descriptor(_NestedDescriptorBase):
201 """Descriptor for a protocol message type.
203 A Descriptor instance has the following attributes:
210 containing_type: (Descriptor) Reference to the descriptor of the
225 nested_types: (list of Descriptors) Descriptor references
227 nested_types_by_name: (dict str -> Descriptor) Same Descriptor
229 in each Descriptor.
252 file: (FileDescriptor) Reference to file descriptor.
256 _C_DESCRIPTOR_CLASS = _message.Descriptor
275 of Descriptor fields above.
280 super(Descriptor, self).__init__(
289 # syntax: for f in descriptor.fields: ...
353 super(Descriptor, self).CopyToProto(proto)
362 # TODO(robinson): for this and other *Descriptor classes, we
369 """Descriptor for a single field in a .proto file.
394 containing_type: (Descriptor) Descriptor of the protocol message
395 type that contains this field. Set by the Descriptor constructor
398 descriptor of the EXTENDED message, not the descriptor
401 message_type: (Descriptor) If a composite field, a descriptor
404 descriptor of that enum. Otherwise, this is None.
407 extension_scope: (Descriptor) Only meaningful if is_extension is True.
415 union, contains its descriptor. Otherwise, None.
419 # descriptor.h.
443 # descriptor.h.
480 # descriptor.h.
489 # and kLastReservedNumber in descriptor.h
558 proto_type: the Python proto type (descriptor.FieldDescriptor.TYPE_*)
560 descriptor.FieldDescriptor.CPPTYPE_*, the C++ type.
572 """Descriptor for an enum defined in a .proto file.
586 containing_type: (Descriptor) Descriptor of the immediate containing
588 top level in a .proto file. Set by Descriptor's constructor
590 file: (FileDescriptor) Reference to file descriptor.
635 """Descriptor for a single value within an enum.
669 """Descriptor for a oneof field.
675 containing_type: (Descriptor) Descriptor of the protocol message
676 type that contains this field. Set by the Descriptor constructor
700 """Descriptor for a service.
726 """Searches for the specified method, and returns its descriptor."""
744 """Descriptor for a method in a service.
751 input_type: The descriptor of the message that this method accepts.
752 output_type: The descriptor of the message that this method returns.
774 """Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.
791 pool: the DescriptorPool this descriptor belongs to. When not passed to the
877 """Make a protobuf Descriptor given a DescriptorProto protobuf.
885 package: Optional package name for the new message Descriptor (string).
886 build_file_if_cpp: Update the C++ descriptor pool if api matches.
891 A Descriptor for protobuf messages.
895 # definition in the C++ descriptor pool. To do this, we build a
896 # FileDescriptorProto with the same definition as this descriptor and build
903 # imported ones. We need to specify a file name so the descriptor pool
969 return Descriptor(desc_proto.name, desc_name, None, None, fields,