# Namespace Google.Protobuf.Reflection (3.27.1)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.27.1 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection)
- [3.23.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection)
- [3.15.8](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection)

## Classes

### [CustomOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.CustomOptions)

Container for a set of custom options specified within a message, field etc.

### [DescriptorBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase)

Base class for nearly all descriptors, providing common functionality.

### [DescriptorDeclaration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorDeclaration)

Provides additional information about the declaration of a descriptor,
such as source location and comments.

### [DescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto)

Describes a message type.

### [DescriptorProto.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto.Types)

Container for nested types declared in the DescriptorProto message type.

### [DescriptorProto.Types.ExtensionRange](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange)

### [DescriptorProto.Types.ReservedRange](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange)

Range of reserved tag numbers. Reserved tag numbers may not be used by
fields or extension ranges in the same message. Reserved ranges may
not overlap.

### [DescriptorReflection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorReflection)

Holder for reflection information generated from google/protobuf/descriptor.proto

### [DescriptorValidationException](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorValidationException)

Thrown when building descriptors fails because the source DescriptorProtos
are not valid.

### [EnumDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumDescriptor)

Descriptor for an enum type in a .proto file.

### [EnumDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumDescriptorProto)

Describes an enum type.

### [EnumDescriptorProto.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumDescriptorProto.Types)

Container for nested types declared in the EnumDescriptorProto message type.

### [EnumDescriptorProto.Types.EnumReservedRange](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange)

Range of reserved numeric values. Reserved values may not be used by
entries in the same enum. Reserved ranges may not overlap.

Note that this is distinct from DescriptorProto.ReservedRange in that it
is inclusive such that it can appropriately represent the entire int32
domain.

### [EnumOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumOptions)

### [EnumValueDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumValueDescriptor)

Descriptor for a single enum value within an enum in a .proto file.

### [EnumValueDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumValueDescriptorProto)

Describes a value within an enum.

### [EnumValueOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumValueOptions)

### [ExtensionCollection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ExtensionCollection)

A collection to simplify retrieving the descriptors of extensions in a descriptor for a message

### [ExtensionRangeOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ExtensionRangeOptions)

### [ExtensionRangeOptions.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ExtensionRangeOptions.Types)

Container for nested types declared in the ExtensionRangeOptions message type.

### [ExtensionRangeOptions.Types.Declaration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ExtensionRangeOptions.Types.Declaration)

### [FeatureSet](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet)

TODO Enums in C++ gencode (and potentially other languages) are
not well scoped. This means that each of the feature enums below can clash
with each other. The short names we've chosen maximize call-site
readability, but leave us very open to this scenario. A future feature will
be designed and implemented to handle this, hopefully before we ever hit a
conflict here.

### [FeatureSet.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types)

Container for nested types declared in the FeatureSet message type.

### [FeatureSetDefaults](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSetDefaults)

A compiled specification for the defaults of a set of features. These
messages are generated from FeatureSet extensions and can be used to seed
feature resolution. The resolution with this object becomes a simple search
for the closest matching edition, followed by proto merges.

### [FeatureSetDefaults.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSetDefaults.Types)

Container for nested types declared in the FeatureSetDefaults message type.

### [FeatureSetDefaults.Types.FeatureSetEditionDefault](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSetDefaults.Types.FeatureSetEditionDefault)

A map from every known edition with a unique set of defaults to its
defaults. Not all editions may be contained here. For a given edition,
the defaults at the closest matching edition ordered at or before it should
be used. This field must be in strict ascending order by edition.

### [FieldDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldDescriptor)

Descriptor for a field or extension within a message in a .proto file.

### [FieldDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldDescriptorProto)

Describes a field within a message.

### [FieldDescriptorProto.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldDescriptorProto.Types)

Container for nested types declared in the FieldDescriptorProto message type.

### [FieldOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions)

### [FieldOptions.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types)

Container for nested types declared in the FieldOptions message type.

### [FieldOptions.Types.EditionDefault](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.EditionDefault)

### [FieldOptions.Types.FeatureSupport](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport)

Information about the support window of a feature.

### [FileDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileDescriptor)

Describes a .proto file, including everything defined within.
IDescriptor is implemented such that the File property returns this descriptor,
and the FullName is the same as the Name.

### [FileDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileDescriptorProto)

Describes a complete .proto file.

### [FileDescriptorSet](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileDescriptorSet)

The protocol compiler can output a FileDescriptorSet containing the .proto
files it parses.

### [FileOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions)

### [FileOptions.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions.Types)

Container for nested types declared in the FileOptions message type.

### [GeneratedClrTypeInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedClrTypeInfo)

Extra information provided by generated code when initializing a message or file descriptor.
These are constructed as required, and are not long-lived. Hand-written code should
never need to use this type.

### [GeneratedCodeInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedCodeInfo)

Describes the relationship between generated code and its original source
file. A GeneratedCodeInfo message is associated with only one generated
source file, but may contain references to different source .proto files.

### [GeneratedCodeInfo.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedCodeInfo.Types)

Container for nested types declared in the GeneratedCodeInfo message type.

### [GeneratedCodeInfo.Types.Annotation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation)

### [GeneratedCodeInfo.Types.Annotation.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types)

Container for nested types declared in the Annotation message type.

### [MessageDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageDescriptor)

Describes a message type.

### [MessageDescriptor.FieldCollection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageDescriptor.FieldCollection)

A collection to simplify retrieving the field accessor for a particular field.

### [MessageOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageOptions)

### [MethodDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptor)

Describes a single method in a service.

### [MethodDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptorProto)

Describes a method of a service.

### [MethodOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodOptions)

### [MethodOptions.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodOptions.Types)

Container for nested types declared in the MethodOptions message type.

### [OneofAccessor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.OneofAccessor)

Reflection access for a oneof, allowing clear and "get case" actions.

### [OneofDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.OneofDescriptor)

Describes a "oneof" field collection in a message type: a set of
fields of which at most one can be set in any particular message.

### [OneofDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.OneofDescriptorProto)

Describes a oneof.

### [OneofOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.OneofOptions)

### [OriginalNameAttribute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.OriginalNameAttribute)

Specifies the original name (in the .proto file) of a named element,
such as an enum value.

### [ServiceDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptor)

Describes a service type.

### [ServiceDescriptorProto](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptorProto)

Describes a service.

### [ServiceOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceOptions)

### [SourceCodeInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.SourceCodeInfo)

Encapsulates information about the original source file from which a
FileDescriptorProto was generated.

### [SourceCodeInfo.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.SourceCodeInfo.Types)

Container for nested types declared in the SourceCodeInfo message type.

### [SourceCodeInfo.Types.Location](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.SourceCodeInfo.Types.Location)

### [TypeRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.TypeRegistry)

An immutable registry of types which can be looked up by their full name.

### [UninterpretedOption](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.UninterpretedOption)

A message representing a option the parser does not recognize. This only
appears in options protos created by the compiler::Parser class.
DescriptorPool resolves these when building Descriptor objects. Therefore,
options protos in descriptor objects (e.g. returned by Descriptor::options(),
or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
in them.

### [UninterpretedOption.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.UninterpretedOption.Types)

Container for nested types declared in the UninterpretedOption message type.

### [UninterpretedOption.Types.NamePart](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart)

The name of the uninterpreted option. Each string represents a segment in
a dot-separated name. is_extension is true iff a segment represents an
extension (denoted with parentheses in options specs in .proto files).
E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents
"foo.(bar.baz).moo".

## Interfaces

### [IDescriptor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.IDescriptor)

Interface implemented by all descriptor types.

### [IFieldAccessor](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.IFieldAccessor)

Allows fields to be reflectively accessed.

## Enums

### [Edition](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.Edition)

The full set of known editions.

### [ExtensionRangeOptions.Types.VerificationState](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState)

The verification state of the extension range.

### [FeatureSet.Types.EnumType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.EnumType)

### [FeatureSet.Types.FieldPresence](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence)

### [FeatureSet.Types.JsonFormat](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat)

### [FeatureSet.Types.MessageEncoding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding)

### [FeatureSet.Types.RepeatedFieldEncoding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding)

### [FeatureSet.Types.Utf8Validation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation)

### [FieldDescriptorProto.Types.Label](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label)

### [FieldDescriptorProto.Types.Type](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type)

### [FieldOptions.Types.CType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.CType)

### [FieldOptions.Types.JSType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.JSType)

### [FieldOptions.Types.OptionRetention](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention)

If set to RETENTION_SOURCE, the option will be omitted from the binary.
Note: as of January 2023, support for this is in progress and does not yet
have an effect (b/264593489).

### [FieldOptions.Types.OptionTargetType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.OptionTargetType)

This indicates the types of entities that the field may apply to when used
as an option. If it is unset, then the field may be freely used as an
option on any kind of entity. Note: as of January 2023, support for this is
in progress and does not yet have an effect (b/264593489).

### [FieldType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldType)

Enumeration of all the possible field types.

### [FileOptions.Types.OptimizeMode](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode)

Generated classes can be optimized for speed or code size.

### [GeneratedCodeInfo.Types.Annotation.Types.Semantic](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic)

Represents the identified object's effect on the element in the original
.proto file.

### [MethodOptions.Types.IdempotencyLevel](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel)

Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
or neither? HTTP based RPC implementation may choose GET verb for safe
methods, and PUT verb for idempotent methods instead of the default POST.

### [Syntax](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.Syntax)

The syntax of a .proto file