Stubs

Module

stubs/wellknowntypes

The Protobuf well-known types (google/protobuf/*.proto), from Google's protobuf releases.

OfficialPublic

Message in google.protobuf

FeatureSet

google.protobuf.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.

Fields

FieldTypeNumberDescription
field_presenceoptionalFieldPresence1
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "EXPLICIT" edition: EDITION_LEGACY }, { value: "IMPLICIT" edition: EDITION_PROTO3 }, { value: "EXPLICIT" edition: EDITION_2023 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
enum_typeoptionalEnumType2
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_ENUM, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "CLOSED" edition: EDITION_LEGACY }, { value: "OPEN" edition: EDITION_PROTO3 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
repeated_field_encodingoptionalRepeatedFieldEncoding3
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "EXPANDED" edition: EDITION_LEGACY }, { value: "PACKED" edition: EDITION_PROTO3 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
utf8_validationoptionalUtf8Validation4
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "NONE" edition: EDITION_LEGACY }, { value: "VERIFY" edition: EDITION_PROTO3 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
message_encodingoptionalMessageEncoding5
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "LENGTH_PREFIXED" edition: EDITION_LEGACY }];
  • option feature_support = { edition_introduced: EDITION_2023 };
json_formatoptionalJsonFormat6
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_MESSAGE, TARGET_TYPE_ENUM, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "LEGACY_BEST_EFFORT" edition: EDITION_LEGACY }, { value: "ALLOW" edition: EDITION_PROTO3 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
enforce_naming_styleoptionalEnforceNamingStyle7
  • option retention = RETENTION_SOURCE;
  • option targets = [TARGET_TYPE_FILE, TARGET_TYPE_EXTENSION_RANGE, TARGET_TYPE_MESSAGE, TARGET_TYPE_FIELD, TARGET_TYPE_ONEOF, TARGET_TYPE_ENUM, TARGET_TYPE_ENUM_ENTRY, TARGET_TYPE_SERVICE, TARGET_TYPE_METHOD];
  • option edition_defaults = [{ value: "STYLE_LEGACY" edition: EDITION_LEGACY }, { value: "STYLE2024" edition: EDITION_2024 }, { value: "STYLE2026" edition: EDITION_2026 }];
  • option feature_support = { edition_introduced: EDITION_2024 };
default_symbol_visibilityoptionalDefaultSymbolVisibility8
  • option retention = RETENTION_SOURCE;
  • option targets = [TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "EXPORT_ALL" edition: EDITION_LEGACY }, { value: "EXPORT_TOP_LEVEL" edition: EDITION_2024 }, { value: "STRICT" edition: EDITION_2026 }];
  • option feature_support = { edition_introduced: EDITION_2024 };
enforce_proto_limitsoptionalEnforceProtoLimits9
  • option retention = RETENTION_SOURCE;
  • option targets = [TARGET_TYPE_ENUM, TARGET_TYPE_MESSAGE, TARGET_TYPE_FIELD, TARGET_TYPE_ONEOF];
  • option edition_defaults = [{ value: "LEGACY_NO_EXPLICIT_LIMITS" edition: EDITION_LEGACY }, { value: "PROTO_LIMITS2026" edition: EDITION_2026 }];
  • option feature_support = { edition_introduced: EDITION_2026 };

Nested messages

Nested enums

Reserved numbers: 999

Extension ranges: 1000 to 9994, 9995 to 9999, 10000

Used by

Defined in google/protobuf/descriptor.proto