Lines Matching refs:Descriptor
67 This class is the base of all descriptor classes. It provides common options
71 has_options: True if the descriptor has non-default options. Usually it
79 """Initialize the descriptor given its options message and the name of the
86 # Does this descriptor have non-default options?
90 """Sets the descriptor's options
92 This function is used in generated proto2 files to update descriptor
98 # Does this descriptor have non-default options?
102 """Retrieves descriptor options.
105 descriptor.
137 containing_type: if provided, this is a nested descriptor, with this
138 descriptor as parent, otherwise None.
140 file.serialized_pb that describes this descriptor.
142 file.serialized_pb that describes this descriptor.
179 raise Error('Descriptor does not contain serialization.')
182 class Descriptor(_NestedDescriptorBase):
184 """Descriptor for a protocol message type.
186 A Descriptor instance has the following attributes:
193 containing_type: (Descriptor) Reference to the descriptor of the
205 nested_types: (list of Descriptors) Descriptor references
207 nested_types_by_name: (dict str -> Descriptor) Same Descriptor
209 in each Descriptor.
235 file: (FileDescriptor) Reference to file descriptor.
246 of Descriptor fields above.
251 super(Descriptor, self).__init__(
260 # syntax: for f in descriptor.fields: ...
315 super(Descriptor, self).CopyToProto(proto)
324 # TODO(robinson): for this and other *Descriptor classes, we
331 """Descriptor for a single field in a .proto file.
355 containing_type: (Descriptor) Descriptor of the protocol message
356 type that contains this field. Set by the Descriptor constructor
359 descriptor of the EXTENDED message, not the descriptor
362 message_type: (Descriptor) If a composite field, a descriptor
365 descriptor of that enum. Otherwise, this is None.
368 extension_scope: (Descriptor) Only meaningful if is_extension is True.
376 union, contains its descriptor. Otherwise, None.
380 # descriptor.h.
404 # descriptor.h.
441 # descriptor.h.
450 # and kLastReservedNumber in descriptor.h
510 proto_type: the Python proto type (descriptor.FieldDescriptor.TYPE_*)
512 descriptor.FieldDescriptor.CPPTYPE_*, the C++ type.
524 """Descriptor for an enum defined in a .proto file.
538 containing_type: (Descriptor) Descriptor of the immediate containing
540 top level in a .proto file. Set by Descriptor's constructor
542 file: (FileDescriptor) Reference to file descriptor.
578 """Descriptor for a single value within an enum.
601 """Descriptor for a oneof field.
607 containing_type: (Descriptor) Descriptor of the protocol message
608 type that contains this field. Set by the Descriptor constructor
625 """Descriptor for a service.
651 """Searches for the specified method, and returns its descriptor."""
669 """Descriptor for a method in a service.
676 input_type: The descriptor of the message that this method accepts.
677 output_type: The descriptor of the message that this method returns.
699 """Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.
758 """Make a protobuf Descriptor given a DescriptorProto protobuf.
766 package: Optional package name for the new message Descriptor (string).
767 build_file_if_cpp: Update the C++ descriptor pool if api matches.
770 A Descriptor for protobuf messages.
774 # definition in the C++ descriptor pool. To do this, we build a
775 # FileDescriptorProto with the same definition as this descriptor and build
848 return Descriptor(desc_proto.name, desc_name, None, None, fields,