@bufbuild/protobuf 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,15 @@
1
1
  export * from "./timestamp.js";
2
2
  export * from "./any.js";
3
3
  export * from "./wrappers.js";
4
- export * from "./gen/google/protobuf/api_pb.js";
5
4
  export * from "./gen/google/protobuf/any_pb.js";
5
+ export * from "./gen/google/protobuf/api_pb.js";
6
+ export * from "./gen/google/protobuf/cpp_features_pb.js";
6
7
  export * from "./gen/google/protobuf/descriptor_pb.js";
7
8
  export * from "./gen/google/protobuf/duration_pb.js";
8
9
  export * from "./gen/google/protobuf/empty_pb.js";
9
10
  export * from "./gen/google/protobuf/field_mask_pb.js";
11
+ export * from "./gen/google/protobuf/go_features_pb.js";
12
+ export * from "./gen/google/protobuf/java_features_pb.js";
10
13
  export * from "./gen/google/protobuf/source_context_pb.js";
11
14
  export * from "./gen/google/protobuf/struct_pb.js";
12
15
  export * from "./gen/google/protobuf/timestamp_pb.js";
@@ -30,12 +30,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./timestamp.js"), exports);
31
31
  __exportStar(require("./any.js"), exports);
32
32
  __exportStar(require("./wrappers.js"), exports);
33
- __exportStar(require("./gen/google/protobuf/api_pb.js"), exports);
34
33
  __exportStar(require("./gen/google/protobuf/any_pb.js"), exports);
34
+ __exportStar(require("./gen/google/protobuf/api_pb.js"), exports);
35
+ __exportStar(require("./gen/google/protobuf/cpp_features_pb.js"), exports);
35
36
  __exportStar(require("./gen/google/protobuf/descriptor_pb.js"), exports);
36
37
  __exportStar(require("./gen/google/protobuf/duration_pb.js"), exports);
37
38
  __exportStar(require("./gen/google/protobuf/empty_pb.js"), exports);
38
39
  __exportStar(require("./gen/google/protobuf/field_mask_pb.js"), exports);
40
+ __exportStar(require("./gen/google/protobuf/go_features_pb.js"), exports);
41
+ __exportStar(require("./gen/google/protobuf/java_features_pb.js"), exports);
39
42
  __exportStar(require("./gen/google/protobuf/source_context_pb.js"), exports);
40
43
  __exportStar(require("./gen/google/protobuf/struct_pb.js"), exports);
41
44
  __exportStar(require("./gen/google/protobuf/timestamp_pb.js"), exports);
@@ -22,10 +22,13 @@ export const wktPublicImportPaths = {
22
22
  "google/protobuf/compiler/plugin.proto": packageName + "/wkt",
23
23
  "google/protobuf/any.proto": packageName + "/wkt",
24
24
  "google/protobuf/api.proto": packageName + "/wkt",
25
+ "google/protobuf/cpp_features.proto": packageName + "/wkt",
25
26
  "google/protobuf/descriptor.proto": packageName + "/wkt",
26
27
  "google/protobuf/duration.proto": packageName + "/wkt",
27
28
  "google/protobuf/empty.proto": packageName + "/wkt",
28
29
  "google/protobuf/field_mask.proto": packageName + "/wkt",
30
+ "google/protobuf/go_features.proto": packageName + "/wkt",
31
+ "google/protobuf/java_features.proto": packageName + "/wkt",
29
32
  "google/protobuf/source_context.proto": packageName + "/wkt",
30
33
  "google/protobuf/struct.proto": packageName + "/wkt",
31
34
  "google/protobuf/timestamp.proto": packageName + "/wkt",
@@ -4,6 +4,29 @@ import type { AnyDesc, DescEnum, DescExtension, DescFile, DescMessage, DescServi
4
4
  * and enumerations, extensions and messages nested in messages.
5
5
  */
6
6
  export declare function nestedTypes(desc: DescFile | DescMessage): Iterable<DescMessage | DescEnum | DescExtension | DescService>;
7
+ /**
8
+ * Iterate over types referenced by fields of the given message.
9
+ *
10
+ * For example:
11
+ *
12
+ * ```proto
13
+ * syntax="proto3";
14
+ *
15
+ * message Example {
16
+ * Msg singular = 1;
17
+ * repeated Level list = 2;
18
+ * }
19
+ *
20
+ * message Msg {}
21
+ *
22
+ * enum Level {
23
+ * LEVEL_UNSPECIFIED = 0;
24
+ * }
25
+ * ```
26
+ *
27
+ * The message Example references the message Msg, and the enum Level.
28
+ */
29
+ export declare function usedTypes(descMessage: DescMessage): Iterable<DescMessage | DescEnum>;
7
30
  /**
8
31
  * Returns the ancestors of a given Protobuf element, up to the file.
9
32
  */
@@ -36,6 +36,45 @@ export function* nestedTypes(desc) {
36
36
  break;
37
37
  }
38
38
  }
39
+ /**
40
+ * Iterate over types referenced by fields of the given message.
41
+ *
42
+ * For example:
43
+ *
44
+ * ```proto
45
+ * syntax="proto3";
46
+ *
47
+ * message Example {
48
+ * Msg singular = 1;
49
+ * repeated Level list = 2;
50
+ * }
51
+ *
52
+ * message Msg {}
53
+ *
54
+ * enum Level {
55
+ * LEVEL_UNSPECIFIED = 0;
56
+ * }
57
+ * ```
58
+ *
59
+ * The message Example references the message Msg, and the enum Level.
60
+ */
61
+ export function usedTypes(descMessage) {
62
+ return usedTypesInternal(descMessage, new Set());
63
+ }
64
+ function* usedTypesInternal(descMessage, seen) {
65
+ var _a, _b;
66
+ for (const field of descMessage.fields) {
67
+ const ref = (_b = (_a = field.enum) !== null && _a !== void 0 ? _a : field.message) !== null && _b !== void 0 ? _b : undefined;
68
+ if (!ref || seen.has(ref.typeName)) {
69
+ continue;
70
+ }
71
+ seen.add(ref.typeName);
72
+ yield ref;
73
+ if (ref.kind == "message") {
74
+ yield* usedTypesInternal(ref, seen);
75
+ }
76
+ }
77
+ }
39
78
  /**
40
79
  * Returns the ancestors of a given Protobuf element, up to the file.
41
80
  */
@@ -397,7 +397,7 @@ function addEnum(proto, file, parent, reg) {
397
397
  (desc.value[p.number] = {
398
398
  kind: "enum_value",
399
399
  proto: p,
400
- deprecated: (_d = (_c = proto.options) === null || _c === void 0 ? void 0 : _c.deprecated) !== null && _d !== void 0 ? _d : false,
400
+ deprecated: (_d = (_c = p.options) === null || _c === void 0 ? void 0 : _c.deprecated) !== null && _d !== void 0 ? _d : false,
401
401
  parent: desc,
402
402
  name,
403
403
  localName: safeObjectProperty(sharedPrefix == undefined
@@ -791,15 +791,17 @@ function getFieldPresence(proto, oneof, isExtension, parent) {
791
791
  // oneof is always explicit
792
792
  return EXPLICIT;
793
793
  }
794
- if (proto.type == TYPE_MESSAGE) {
795
- // singular message field cannot be implicit
796
- return EXPLICIT;
797
- }
798
794
  if (isExtension) {
799
795
  // extensions always track presence
800
796
  return EXPLICIT;
801
797
  }
802
- return resolveFeature("fieldPresence", { proto, parent });
798
+ const resolved = resolveFeature("fieldPresence", { proto, parent });
799
+ if (resolved == IMPLICIT &&
800
+ (proto.type == TYPE_MESSAGE || proto.type == TYPE_GROUP)) {
801
+ // singular message field cannot be implicit
802
+ return EXPLICIT;
803
+ }
804
+ return resolved;
803
805
  }
804
806
  /**
805
807
  * Pack this repeated field?
@@ -0,0 +1,89 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv1/types.js";
2
+ import type { FeatureSet } from "./descriptor_pb.js";
3
+ import type { Message } from "../../../../types.js";
4
+ /**
5
+ * Describes the file google/protobuf/cpp_features.proto.
6
+ */
7
+ export declare const file_google_protobuf_cpp_features: GenFile;
8
+ /**
9
+ * @generated from message pb.CppFeatures
10
+ */
11
+ export type CppFeatures = Message<"pb.CppFeatures"> & {
12
+ /**
13
+ * Whether or not to treat an enum field as closed. This option is only
14
+ * applicable to enum fields, and will be removed in the future. It is
15
+ * consistent with the legacy behavior of using proto3 enum types for proto2
16
+ * fields.
17
+ *
18
+ * @generated from field: optional bool legacy_closed_enum = 1;
19
+ */
20
+ legacyClosedEnum: boolean;
21
+ /**
22
+ * @generated from field: optional pb.CppFeatures.StringType string_type = 2;
23
+ */
24
+ stringType: CppFeatures_StringType;
25
+ /**
26
+ * @generated from field: optional bool enum_name_uses_string_view = 3;
27
+ */
28
+ enumNameUsesStringView: boolean;
29
+ };
30
+ /**
31
+ * @generated from message pb.CppFeatures
32
+ */
33
+ export type CppFeaturesJson = {
34
+ /**
35
+ * Whether or not to treat an enum field as closed. This option is only
36
+ * applicable to enum fields, and will be removed in the future. It is
37
+ * consistent with the legacy behavior of using proto3 enum types for proto2
38
+ * fields.
39
+ *
40
+ * @generated from field: optional bool legacy_closed_enum = 1;
41
+ */
42
+ legacyClosedEnum?: boolean;
43
+ /**
44
+ * @generated from field: optional pb.CppFeatures.StringType string_type = 2;
45
+ */
46
+ stringType?: CppFeatures_StringTypeJson;
47
+ /**
48
+ * @generated from field: optional bool enum_name_uses_string_view = 3;
49
+ */
50
+ enumNameUsesStringView?: boolean;
51
+ };
52
+ /**
53
+ * Describes the message pb.CppFeatures.
54
+ * Use `create(CppFeaturesSchema)` to create a new message.
55
+ */
56
+ export declare const CppFeaturesSchema: GenMessage<CppFeatures, CppFeaturesJson>;
57
+ /**
58
+ * @generated from enum pb.CppFeatures.StringType
59
+ */
60
+ export declare enum CppFeatures_StringType {
61
+ /**
62
+ * @generated from enum value: STRING_TYPE_UNKNOWN = 0;
63
+ */
64
+ STRING_TYPE_UNKNOWN = 0,
65
+ /**
66
+ * @generated from enum value: VIEW = 1;
67
+ */
68
+ VIEW = 1,
69
+ /**
70
+ * @generated from enum value: CORD = 2;
71
+ */
72
+ CORD = 2,
73
+ /**
74
+ * @generated from enum value: STRING = 3;
75
+ */
76
+ STRING = 3
77
+ }
78
+ /**
79
+ * @generated from enum pb.CppFeatures.StringType
80
+ */
81
+ export type CppFeatures_StringTypeJson = "STRING_TYPE_UNKNOWN" | "VIEW" | "CORD" | "STRING";
82
+ /**
83
+ * Describes the enum pb.CppFeatures.StringType.
84
+ */
85
+ export declare const CppFeatures_StringTypeSchema: GenEnum<CppFeatures_StringType, CppFeatures_StringTypeJson>;
86
+ /**
87
+ * @generated from extension: optional pb.CppFeatures cpp = 1000;
88
+ */
89
+ export declare const cpp: GenExtension<FeatureSet, CppFeatures>;
@@ -0,0 +1,57 @@
1
+ // Copyright 2021-2025 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { fileDesc } from "../../../../codegenv1/file.js";
15
+ import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
16
+ import { messageDesc } from "../../../../codegenv1/message.js";
17
+ import { enumDesc } from "../../../../codegenv1/enum.js";
18
+ import { extDesc } from "../../../../codegenv1/extension.js";
19
+ /**
20
+ * Describes the file google/protobuf/cpp_features.proto.
21
+ */
22
+ export const file_google_protobuf_cpp_features = /*@__PURE__*/ fileDesc("CiJnb29nbGUvcHJvdG9idWYvY3BwX2ZlYXR1cmVzLnByb3RvEgJwYiL8AwoLQ3BwRmVhdHVyZXMS+wEKEmxlZ2FjeV9jbG9zZWRfZW51bRgBIAEoCELeAYgBAZgBBJgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAbgBCOgHEOgHGq8BVGhlIGxlZ2FjeSBjbG9zZWQgZW51bSBiZWhhdmlvciBpbiBDKysgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgU2VlIGh0dHA6Ly9wcm90b2J1Zi5kZXYvcHJvZ3JhbW1pbmctZ3VpZGVzL2VudW0vI2NwcCBmb3IgbW9yZSBpbmZvcm1hdGlvbhJaCgtzdHJpbmdfdHlwZRgCIAEoDjIaLnBiLkNwcEZlYXR1cmVzLlN0cmluZ1R5cGVCKYgBAZgBBJgBAaIBCxIGU1RSSU5HGIQHogEJEgRWSUVXGOkHsgEDCOgHEkwKGmVudW1fbmFtZV91c2VzX3N0cmluZ192aWV3GAMgASgIQiiIAQKYAQaYAQGiAQoSBWZhbHNlGIQHogEJEgR0cnVlGOkHsgEDCOkHIkUKClN0cmluZ1R5cGUSFwoTU1RSSU5HX1RZUEVfVU5LTk9XThAAEggKBFZJRVcQARIICgRDT1JEEAISCgoGU1RSSU5HEAM6PwoDY3BwEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6AcgASgLMg8ucGIuQ3BwRmVhdHVyZXNSA2NwcA", [file_google_protobuf_descriptor]);
23
+ /**
24
+ * Describes the message pb.CppFeatures.
25
+ * Use `create(CppFeaturesSchema)` to create a new message.
26
+ */
27
+ export const CppFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_cpp_features, 0);
28
+ /**
29
+ * @generated from enum pb.CppFeatures.StringType
30
+ */
31
+ export var CppFeatures_StringType;
32
+ (function (CppFeatures_StringType) {
33
+ /**
34
+ * @generated from enum value: STRING_TYPE_UNKNOWN = 0;
35
+ */
36
+ CppFeatures_StringType[CppFeatures_StringType["STRING_TYPE_UNKNOWN"] = 0] = "STRING_TYPE_UNKNOWN";
37
+ /**
38
+ * @generated from enum value: VIEW = 1;
39
+ */
40
+ CppFeatures_StringType[CppFeatures_StringType["VIEW"] = 1] = "VIEW";
41
+ /**
42
+ * @generated from enum value: CORD = 2;
43
+ */
44
+ CppFeatures_StringType[CppFeatures_StringType["CORD"] = 2] = "CORD";
45
+ /**
46
+ * @generated from enum value: STRING = 3;
47
+ */
48
+ CppFeatures_StringType[CppFeatures_StringType["STRING"] = 3] = "STRING";
49
+ })(CppFeatures_StringType || (CppFeatures_StringType = {}));
50
+ /**
51
+ * Describes the enum pb.CppFeatures.StringType.
52
+ */
53
+ export const CppFeatures_StringTypeSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_cpp_features, 0, 0);
54
+ /**
55
+ * @generated from extension: optional pb.CppFeatures cpp = 1000;
56
+ */
57
+ export const cpp = /*@__PURE__*/ extDesc(file_google_protobuf_cpp_features, 0);
@@ -0,0 +1,122 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv1/types.js";
2
+ import type { FeatureSet } from "./descriptor_pb.js";
3
+ import type { Message } from "../../../../types.js";
4
+ /**
5
+ * Describes the file google/protobuf/go_features.proto.
6
+ */
7
+ export declare const file_google_protobuf_go_features: GenFile;
8
+ /**
9
+ * @generated from message pb.GoFeatures
10
+ */
11
+ export type GoFeatures = Message<"pb.GoFeatures"> & {
12
+ /**
13
+ * Whether or not to generate the deprecated UnmarshalJSON method for enums.
14
+ * Can only be true for proto using the Open Struct api.
15
+ *
16
+ * @generated from field: optional bool legacy_unmarshal_json_enum = 1;
17
+ */
18
+ legacyUnmarshalJsonEnum: boolean;
19
+ /**
20
+ * One of OPEN, HYBRID or OPAQUE.
21
+ *
22
+ * @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
23
+ */
24
+ apiLevel: GoFeatures_APILevel;
25
+ /**
26
+ * @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
27
+ */
28
+ stripEnumPrefix: GoFeatures_StripEnumPrefix;
29
+ };
30
+ /**
31
+ * @generated from message pb.GoFeatures
32
+ */
33
+ export type GoFeaturesJson = {
34
+ /**
35
+ * Whether or not to generate the deprecated UnmarshalJSON method for enums.
36
+ * Can only be true for proto using the Open Struct api.
37
+ *
38
+ * @generated from field: optional bool legacy_unmarshal_json_enum = 1;
39
+ */
40
+ legacyUnmarshalJsonEnum?: boolean;
41
+ /**
42
+ * One of OPEN, HYBRID or OPAQUE.
43
+ *
44
+ * @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
45
+ */
46
+ apiLevel?: GoFeatures_APILevelJson;
47
+ /**
48
+ * @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
49
+ */
50
+ stripEnumPrefix?: GoFeatures_StripEnumPrefixJson;
51
+ };
52
+ /**
53
+ * Describes the message pb.GoFeatures.
54
+ * Use `create(GoFeaturesSchema)` to create a new message.
55
+ */
56
+ export declare const GoFeaturesSchema: GenMessage<GoFeatures, GoFeaturesJson>;
57
+ /**
58
+ * @generated from enum pb.GoFeatures.APILevel
59
+ */
60
+ export declare enum GoFeatures_APILevel {
61
+ /**
62
+ * API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
63
+ * but needs to be a separate value to distinguish between
64
+ * an explicitly set api level or a missing api level.
65
+ *
66
+ * @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
67
+ */
68
+ API_LEVEL_UNSPECIFIED = 0,
69
+ /**
70
+ * @generated from enum value: API_OPEN = 1;
71
+ */
72
+ API_OPEN = 1,
73
+ /**
74
+ * @generated from enum value: API_HYBRID = 2;
75
+ */
76
+ API_HYBRID = 2,
77
+ /**
78
+ * @generated from enum value: API_OPAQUE = 3;
79
+ */
80
+ API_OPAQUE = 3
81
+ }
82
+ /**
83
+ * @generated from enum pb.GoFeatures.APILevel
84
+ */
85
+ export type GoFeatures_APILevelJson = "API_LEVEL_UNSPECIFIED" | "API_OPEN" | "API_HYBRID" | "API_OPAQUE";
86
+ /**
87
+ * Describes the enum pb.GoFeatures.APILevel.
88
+ */
89
+ export declare const GoFeatures_APILevelSchema: GenEnum<GoFeatures_APILevel, GoFeatures_APILevelJson>;
90
+ /**
91
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
92
+ */
93
+ export declare enum GoFeatures_StripEnumPrefix {
94
+ /**
95
+ * @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
96
+ */
97
+ UNSPECIFIED = 0,
98
+ /**
99
+ * @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
100
+ */
101
+ KEEP = 1,
102
+ /**
103
+ * @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
104
+ */
105
+ GENERATE_BOTH = 2,
106
+ /**
107
+ * @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
108
+ */
109
+ STRIP = 3
110
+ }
111
+ /**
112
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
113
+ */
114
+ export type GoFeatures_StripEnumPrefixJson = "STRIP_ENUM_PREFIX_UNSPECIFIED" | "STRIP_ENUM_PREFIX_KEEP" | "STRIP_ENUM_PREFIX_GENERATE_BOTH" | "STRIP_ENUM_PREFIX_STRIP";
115
+ /**
116
+ * Describes the enum pb.GoFeatures.StripEnumPrefix.
117
+ */
118
+ export declare const GoFeatures_StripEnumPrefixSchema: GenEnum<GoFeatures_StripEnumPrefix, GoFeatures_StripEnumPrefixJson>;
119
+ /**
120
+ * @generated from extension: optional pb.GoFeatures go = 1002;
121
+ */
122
+ export declare const go: GenExtension<FeatureSet, GoFeatures>;
@@ -0,0 +1,87 @@
1
+ // Copyright 2021-2025 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { fileDesc } from "../../../../codegenv1/file.js";
15
+ import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
16
+ import { messageDesc } from "../../../../codegenv1/message.js";
17
+ import { enumDesc } from "../../../../codegenv1/enum.js";
18
+ import { extDesc } from "../../../../codegenv1/extension.js";
19
+ /**
20
+ * Describes the file google/protobuf/go_features.proto.
21
+ */
22
+ export const file_google_protobuf_go_features = /*@__PURE__*/ fileDesc("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiIvcECgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpByJTCghBUElMZXZlbBIZChVBUElfTEVWRUxfVU5TUEVDSUZJRUQQABIMCghBUElfT1BFThABEg4KCkFQSV9IWUJSSUQQAhIOCgpBUElfT1BBUVVFEAMikgEKD1N0cmlwRW51bVByZWZpeBIhCh1TVFJJUF9FTlVNX1BSRUZJWF9VTlNQRUNJRklFRBAAEhoKFlNUUklQX0VOVU1fUFJFRklYX0tFRVAQARIjCh9TVFJJUF9FTlVNX1BSRUZJWF9HRU5FUkFURV9CT1RIEAISGwoXU1RSSVBfRU5VTV9QUkVGSVhfU1RSSVAQAzo8CgJnbxIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0GOoHIAEoCzIOLnBiLkdvRmVhdHVyZXNSAmdvQi9aLWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2dvZmVhdHVyZXNwYg", [file_google_protobuf_descriptor]);
23
+ /**
24
+ * Describes the message pb.GoFeatures.
25
+ * Use `create(GoFeaturesSchema)` to create a new message.
26
+ */
27
+ export const GoFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_go_features, 0);
28
+ /**
29
+ * @generated from enum pb.GoFeatures.APILevel
30
+ */
31
+ export var GoFeatures_APILevel;
32
+ (function (GoFeatures_APILevel) {
33
+ /**
34
+ * API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
35
+ * but needs to be a separate value to distinguish between
36
+ * an explicitly set api level or a missing api level.
37
+ *
38
+ * @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
39
+ */
40
+ GoFeatures_APILevel[GoFeatures_APILevel["API_LEVEL_UNSPECIFIED"] = 0] = "API_LEVEL_UNSPECIFIED";
41
+ /**
42
+ * @generated from enum value: API_OPEN = 1;
43
+ */
44
+ GoFeatures_APILevel[GoFeatures_APILevel["API_OPEN"] = 1] = "API_OPEN";
45
+ /**
46
+ * @generated from enum value: API_HYBRID = 2;
47
+ */
48
+ GoFeatures_APILevel[GoFeatures_APILevel["API_HYBRID"] = 2] = "API_HYBRID";
49
+ /**
50
+ * @generated from enum value: API_OPAQUE = 3;
51
+ */
52
+ GoFeatures_APILevel[GoFeatures_APILevel["API_OPAQUE"] = 3] = "API_OPAQUE";
53
+ })(GoFeatures_APILevel || (GoFeatures_APILevel = {}));
54
+ /**
55
+ * Describes the enum pb.GoFeatures.APILevel.
56
+ */
57
+ export const GoFeatures_APILevelSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 0);
58
+ /**
59
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
60
+ */
61
+ export var GoFeatures_StripEnumPrefix;
62
+ (function (GoFeatures_StripEnumPrefix) {
63
+ /**
64
+ * @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
65
+ */
66
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["UNSPECIFIED"] = 0] = "UNSPECIFIED";
67
+ /**
68
+ * @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
69
+ */
70
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["KEEP"] = 1] = "KEEP";
71
+ /**
72
+ * @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
73
+ */
74
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["GENERATE_BOTH"] = 2] = "GENERATE_BOTH";
75
+ /**
76
+ * @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
77
+ */
78
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["STRIP"] = 3] = "STRIP";
79
+ })(GoFeatures_StripEnumPrefix || (GoFeatures_StripEnumPrefix = {}));
80
+ /**
81
+ * Describes the enum pb.GoFeatures.StripEnumPrefix.
82
+ */
83
+ export const GoFeatures_StripEnumPrefixSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 1);
84
+ /**
85
+ * @generated from extension: optional pb.GoFeatures go = 1002;
86
+ */
87
+ export const go = /*@__PURE__*/ extDesc(file_google_protobuf_go_features, 0);
@@ -0,0 +1,113 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv1/types.js";
2
+ import type { FeatureSet } from "./descriptor_pb.js";
3
+ import type { Message } from "../../../../types.js";
4
+ /**
5
+ * Describes the file google/protobuf/java_features.proto.
6
+ */
7
+ export declare const file_google_protobuf_java_features: GenFile;
8
+ /**
9
+ * @generated from message pb.JavaFeatures
10
+ */
11
+ export type JavaFeatures = Message<"pb.JavaFeatures"> & {
12
+ /**
13
+ * Whether or not to treat an enum field as closed. This option is only
14
+ * applicable to enum fields, and will be removed in the future. It is
15
+ * consistent with the legacy behavior of using proto3 enum types for proto2
16
+ * fields.
17
+ *
18
+ * @generated from field: optional bool legacy_closed_enum = 1;
19
+ */
20
+ legacyClosedEnum: boolean;
21
+ /**
22
+ * @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
23
+ */
24
+ utf8Validation: JavaFeatures_Utf8Validation;
25
+ /**
26
+ * Whether to use the old default outer class name scheme, or the new feature
27
+ * which adds a "Proto" suffix to the outer class name.
28
+ *
29
+ * Users will not be able to set this option, because we removed it in the
30
+ * same edition that it was introduced. But we use it to determine which
31
+ * naming scheme to use for outer class name defaults.
32
+ *
33
+ * @generated from field: optional bool use_old_outer_classname_default = 4;
34
+ */
35
+ useOldOuterClassnameDefault: boolean;
36
+ };
37
+ /**
38
+ * @generated from message pb.JavaFeatures
39
+ */
40
+ export type JavaFeaturesJson = {
41
+ /**
42
+ * Whether or not to treat an enum field as closed. This option is only
43
+ * applicable to enum fields, and will be removed in the future. It is
44
+ * consistent with the legacy behavior of using proto3 enum types for proto2
45
+ * fields.
46
+ *
47
+ * @generated from field: optional bool legacy_closed_enum = 1;
48
+ */
49
+ legacyClosedEnum?: boolean;
50
+ /**
51
+ * @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
52
+ */
53
+ utf8Validation?: JavaFeatures_Utf8ValidationJson;
54
+ /**
55
+ * Whether to use the old default outer class name scheme, or the new feature
56
+ * which adds a "Proto" suffix to the outer class name.
57
+ *
58
+ * Users will not be able to set this option, because we removed it in the
59
+ * same edition that it was introduced. But we use it to determine which
60
+ * naming scheme to use for outer class name defaults.
61
+ *
62
+ * @generated from field: optional bool use_old_outer_classname_default = 4;
63
+ */
64
+ useOldOuterClassnameDefault?: boolean;
65
+ };
66
+ /**
67
+ * Describes the message pb.JavaFeatures.
68
+ * Use `create(JavaFeaturesSchema)` to create a new message.
69
+ */
70
+ export declare const JavaFeaturesSchema: GenMessage<JavaFeatures, JavaFeaturesJson>;
71
+ /**
72
+ * The UTF8 validation strategy to use. See go/editions-utf8-validation for
73
+ * more information on this feature.
74
+ *
75
+ * @generated from enum pb.JavaFeatures.Utf8Validation
76
+ */
77
+ export declare enum JavaFeatures_Utf8Validation {
78
+ /**
79
+ * Invalid default, which should never be used.
80
+ *
81
+ * @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0;
82
+ */
83
+ UTF8_VALIDATION_UNKNOWN = 0,
84
+ /**
85
+ * Respect the UTF8 validation behavior specified by the global
86
+ * utf8_validation feature.
87
+ *
88
+ * @generated from enum value: DEFAULT = 1;
89
+ */
90
+ DEFAULT = 1,
91
+ /**
92
+ * Verifies UTF8 validity overriding the global utf8_validation
93
+ * feature. This represents the legacy java_string_check_utf8 option.
94
+ *
95
+ * @generated from enum value: VERIFY = 2;
96
+ */
97
+ VERIFY = 2
98
+ }
99
+ /**
100
+ * The UTF8 validation strategy to use. See go/editions-utf8-validation for
101
+ * more information on this feature.
102
+ *
103
+ * @generated from enum pb.JavaFeatures.Utf8Validation
104
+ */
105
+ export type JavaFeatures_Utf8ValidationJson = "UTF8_VALIDATION_UNKNOWN" | "DEFAULT" | "VERIFY";
106
+ /**
107
+ * Describes the enum pb.JavaFeatures.Utf8Validation.
108
+ */
109
+ export declare const JavaFeatures_Utf8ValidationSchema: GenEnum<JavaFeatures_Utf8Validation, JavaFeatures_Utf8ValidationJson>;
110
+ /**
111
+ * @generated from extension: optional pb.JavaFeatures java = 1001;
112
+ */
113
+ export declare const java: GenExtension<FeatureSet, JavaFeatures>;