CSharpFeatures
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
nullable_reference_types | 1 | bool | optional |
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
nullable_reference_types | 1 | bool | optional |
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
legacy_closed_enum | 1 | bool | optional | Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields. |
string_type | 2 | CppFeatures.StringType | optional | |
enum_name_uses_string_view | 3 | bool | optional | |
repeated_type | 4 | CppFeatures.RepeatedType | optional |
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
legacy_unmarshal_json_enum | 1 | bool | optional | Whether or not to generate the deprecated UnmarshalJSON method for enums. Can only be true for proto using the Open Struct api. |
api_level | 2 | GoFeatures.APILevel | optional | One of OPEN, HYBRID or OPAQUE. |
strip_enum_prefix | 3 | GoFeatures.StripEnumPrefix | optional | |
optimize_mode | 4 | GoFeatures.OptimizeModeFeature.OptimizeMode | optional |
Wrap the OptimizeMode enum in a message for scoping: This way, users can type shorter names (SPEED, CODE_SIZE).
No fields.
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
legacy_closed_enum | 1 | bool | optional | Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields. |
utf8_validation | 2 | JavaFeatures.Utf8Validation | optional | |
large_enum | 3 | bool | optional | Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language. |
use_old_outer_classname_default | 4 | bool | optional | Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name. Users will not be able to set this option, because we removed it in the same edition that it was introduced. But we use it to determine which naming scheme to use for outer class name defaults. |
nest_in_file_class | 5 | JavaFeatures.NestInFileClassFeature.NestInFileClass | optional | Whether to nest the generated class in the generated file class. This is only applicable to top-level messages, enums, and services. |
No fields.
| Name | Value | Description |
|---|---|---|
STRING_TYPE_UNKNOWN | 0 | |
VIEW | 1 | |
CORD | 2 | |
STRING | 3 |
| Name | Value | Description |
|---|---|---|
REPEATED_TYPE_UNKNOWN | 0 | |
LEGACY | 1 | The repeated field will be backed by proto2::Repeated(Ptr)Field, and accessors will return a reference/pointer to this type. |
PROXY | 2 | The repeated field has an opaque backing type, and accessors will return a RepeatedFieldProxy. |
The name of this enum matches OptimizeMode in descriptor.proto.
| Name | Value | Description |
|---|---|---|
OPTIMIZE_MODE_UNSPECIFIED | 0 | OPTIMIZE_MODE_UNSPECIFIED results in falling back to the default (optimize for code size), but needs to be a separate value to distinguish between an explicitly set optimize mode or a missing optimize mode. |
SPEED | 1 | |
CODE_SIZE | 2 |
| Name | Value | Description |
|---|---|---|
API_LEVEL_UNSPECIFIED | 0 | API_LEVEL_UNSPECIFIED results in selecting the OPEN API, but needs to be a separate value to distinguish between an explicitly set api level or a missing api level. |
API_OPEN | 1 | |
API_HYBRID | 2 | |
API_OPAQUE | 3 |
| Name | Value | Description |
|---|---|---|
STRIP_ENUM_PREFIX_UNSPECIFIED | 0 | |
STRIP_ENUM_PREFIX_KEEP | 1 | |
STRIP_ENUM_PREFIX_GENERATE_BOTH | 2 | |
STRIP_ENUM_PREFIX_STRIP | 3 |
| Name | Value | Description |
|---|---|---|
NEST_IN_FILE_CLASS_UNKNOWN | 0 | Invalid default, which should never be used. |
NO | 1 | Do not nest the generated class in the file class. |
YES | 2 | Nest the generated class in the file class. |
LEGACY | 3 | Fall back to the |
The UTF8 validation strategy to use.
| Name | Value | Description |
|---|---|---|
UTF8_VALIDATION_UNKNOWN | 0 | Invalid default, which should never be used. |
DEFAULT | 1 | Respect the UTF8 validation behavior specified by the global utf8_validation feature. |
VERIFY | 2 | Verifies UTF8 validity overriding the global utf8_validation feature. This represents the legacy java_string_check_utf8 option. |
Extends google.protobuf.FeatureSet
Extends google.protobuf.FeatureSet
Extends google.protobuf.FeatureSet
Extends google.protobuf.FeatureSet
Whether the generated files should have nullable reference type annotations. When enabled, the generated C# code includes
#nullable enable annotationsand annotates message-typed properties and certain parameters with?.