@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.1

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.
Files changed (127) hide show
  1. package/README.md +21 -1
  2. package/dist/cjs/binary-encoding.js +402 -410
  3. package/dist/cjs/descriptor-registry.js +407 -449
  4. package/dist/cjs/descriptor-set.js +416 -513
  5. package/dist/cjs/field.js +30 -30
  6. package/dist/cjs/google/protobuf/any_pb.js +122 -140
  7. package/dist/cjs/google/protobuf/api_pb.js +177 -224
  8. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
  9. package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
  10. package/dist/cjs/google/protobuf/duration_pb.js +72 -88
  11. package/dist/cjs/google/protobuf/empty_pb.js +17 -17
  12. package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
  13. package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
  14. package/dist/cjs/google/protobuf/struct_pb.js +144 -181
  15. package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
  16. package/dist/cjs/google/protobuf/type_pb.js +406 -462
  17. package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
  18. package/dist/cjs/index.js +24 -122
  19. package/dist/cjs/message.js +81 -89
  20. package/dist/cjs/private/assert.js +20 -26
  21. package/dist/cjs/private/base64.js +79 -78
  22. package/dist/cjs/private/binary-format-common.js +195 -208
  23. package/dist/cjs/private/binary-format-proto2.js +75 -109
  24. package/dist/cjs/private/binary-format-proto3.js +57 -90
  25. package/dist/cjs/private/enum.js +38 -43
  26. package/dist/cjs/private/field-list.js +51 -50
  27. package/dist/cjs/private/field-wrapper.js +8 -10
  28. package/dist/cjs/private/field.js +22 -25
  29. package/dist/cjs/private/goog-varint.js +275 -0
  30. package/dist/cjs/private/json-format-common.js +414 -440
  31. package/dist/cjs/private/json-format-proto2.js +78 -89
  32. package/dist/cjs/private/json-format-proto3.js +69 -93
  33. package/dist/cjs/private/message-type.js +26 -27
  34. package/dist/cjs/private/names.js +58 -62
  35. package/dist/cjs/private/proto-runtime.js +11 -16
  36. package/dist/cjs/private/scalars.js +100 -103
  37. package/dist/cjs/private/util-common.js +180 -210
  38. package/dist/cjs/proto-int64.js +111 -112
  39. package/dist/cjs/proto2.js +50 -63
  40. package/dist/cjs/proto3.js +61 -74
  41. package/dist/cjs/service-type.js +14 -17
  42. package/dist/cjs/type-registry.js +33 -31
  43. package/dist/esm/binary-encoding.js +401 -414
  44. package/dist/esm/descriptor-registry.js +409 -458
  45. package/dist/esm/descriptor-set.js +417 -478
  46. package/dist/esm/field.js +29 -29
  47. package/dist/esm/google/protobuf/any_pb.js +122 -140
  48. package/dist/esm/google/protobuf/api_pb.js +177 -197
  49. package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
  50. package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
  51. package/dist/esm/google/protobuf/duration_pb.js +72 -88
  52. package/dist/esm/google/protobuf/empty_pb.js +17 -17
  53. package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
  54. package/dist/esm/google/protobuf/source_context_pb.js +25 -25
  55. package/dist/esm/google/protobuf/struct_pb.js +143 -180
  56. package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
  57. package/dist/esm/google/protobuf/type_pb.js +401 -421
  58. package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
  59. package/dist/esm/index.js +1 -1
  60. package/dist/esm/message.js +81 -89
  61. package/dist/esm/private/assert.js +19 -21
  62. package/dist/esm/private/base64.js +79 -78
  63. package/dist/esm/private/binary-format-common.js +196 -207
  64. package/dist/esm/private/binary-format-proto2.js +76 -81
  65. package/dist/esm/private/binary-format-proto3.js +58 -67
  66. package/dist/esm/private/enum.js +38 -43
  67. package/dist/esm/private/field-list.js +51 -50
  68. package/dist/esm/private/field-wrapper.js +8 -10
  69. package/dist/esm/private/field.js +22 -22
  70. package/dist/esm/private/goog-varint.js +266 -0
  71. package/dist/esm/private/json-format-common.js +414 -435
  72. package/dist/esm/private/json-format-proto2.js +76 -81
  73. package/dist/esm/private/json-format-proto3.js +66 -80
  74. package/dist/esm/private/message-type.js +27 -28
  75. package/dist/esm/private/names.js +57 -57
  76. package/dist/esm/private/proto-runtime.js +11 -11
  77. package/dist/esm/private/scalars.js +99 -99
  78. package/dist/esm/private/util-common.js +180 -192
  79. package/dist/esm/proto-int64.js +111 -112
  80. package/dist/esm/proto2.js +50 -57
  81. package/dist/esm/proto3.js +61 -68
  82. package/dist/esm/service-type.js +12 -12
  83. package/dist/esm/type-registry.js +33 -31
  84. package/dist/types/binary-encoding.d.ts +398 -398
  85. package/dist/types/binary-format.d.ts +69 -91
  86. package/dist/types/descriptor-registry.d.ts +23 -29
  87. package/dist/types/descriptor-set.d.ts +107 -128
  88. package/dist/types/enum.d.ts +21 -21
  89. package/dist/types/field-list.d.ts +21 -21
  90. package/dist/types/field.d.ts +191 -231
  91. package/dist/types/google/protobuf/any_pb.d.ts +56 -77
  92. package/dist/types/google/protobuf/api_pb.d.ts +144 -187
  93. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
  94. package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
  95. package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
  96. package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
  97. package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
  98. package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
  99. package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
  100. package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
  101. package/dist/types/google/protobuf/type_pb.d.ts +355 -422
  102. package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
  103. package/dist/types/index.d.ts +4 -27
  104. package/dist/types/json-format.d.ts +70 -89
  105. package/dist/types/message-type.d.ts +38 -46
  106. package/dist/types/message.d.ts +73 -99
  107. package/dist/types/private/assert.d.ts +1 -4
  108. package/dist/types/private/binary-format-common.d.ts +6 -32
  109. package/dist/types/private/enum.d.ts +4 -11
  110. package/dist/types/private/field-list.d.ts +14 -21
  111. package/dist/types/private/field-wrapper.d.ts +5 -11
  112. package/dist/types/private/field.d.ts +12 -12
  113. package/dist/types/{google/varint.d.ts → private/goog-varint.d.ts} +6 -13
  114. package/dist/types/private/json-format-common.d.ts +5 -27
  115. package/dist/types/private/message-type.d.ts +3 -8
  116. package/dist/types/private/names.d.ts +1 -4
  117. package/dist/types/private/options-map.d.ts +1 -1
  118. package/dist/types/private/proto-runtime.d.ts +29 -42
  119. package/dist/types/private/scalars.d.ts +5 -12
  120. package/dist/types/private/util-common.d.ts +1 -4
  121. package/dist/types/private/util.d.ts +29 -41
  122. package/dist/types/proto-int64.d.ts +42 -42
  123. package/dist/types/service-type.d.ts +37 -57
  124. package/dist/types/type-registry.d.ts +13 -15
  125. package/package.json +2 -2
  126. package/dist/cjs/google/varint.js +0 -280
  127. package/dist/esm/google/varint.js +0 -265
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
4
  // @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -33,15 +33,7 @@
33
33
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
34
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Option =
37
- exports.EnumValue =
38
- exports.Enum =
39
- exports.Field_Cardinality =
40
- exports.Field_Kind =
41
- exports.Field =
42
- exports.Type =
43
- exports.Syntax =
44
- void 0;
36
+ exports.Option = exports.EnumValue = exports.Enum = exports.Field_Cardinality = exports.Field_Kind = exports.Field = exports.Type = exports.Syntax = void 0;
45
37
  const index_js_1 = require("../../index.js");
46
38
  const source_context_pb_js_1 = require("./source_context_pb.js");
47
39
  const any_pb_js_1 = require("./any_pb.js");
@@ -52,23 +44,23 @@ const any_pb_js_1 = require("./any_pb.js");
52
44
  */
53
45
  var Syntax;
54
46
  (function (Syntax) {
55
- /**
56
- * Syntax `proto2`.
57
- *
58
- * @generated from enum value: SYNTAX_PROTO2 = 0;
59
- */
60
- Syntax[(Syntax["PROTO2"] = 0)] = "PROTO2";
61
- /**
62
- * Syntax `proto3`.
63
- *
64
- * @generated from enum value: SYNTAX_PROTO3 = 1;
65
- */
66
- Syntax[(Syntax["PROTO3"] = 1)] = "PROTO3";
67
- })((Syntax = exports.Syntax || (exports.Syntax = {})));
47
+ /**
48
+ * Syntax `proto2`.
49
+ *
50
+ * @generated from enum value: SYNTAX_PROTO2 = 0;
51
+ */
52
+ Syntax[Syntax["PROTO2"] = 0] = "PROTO2";
53
+ /**
54
+ * Syntax `proto3`.
55
+ *
56
+ * @generated from enum value: SYNTAX_PROTO3 = 1;
57
+ */
58
+ Syntax[Syntax["PROTO3"] = 1] = "PROTO3";
59
+ })(Syntax = exports.Syntax || (exports.Syntax = {}));
68
60
  // Retrieve enum metadata with: proto3.getEnumType(Syntax)
69
61
  index_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [
70
- { no: 0, name: "SYNTAX_PROTO2" },
71
- { no: 1, name: "SYNTAX_PROTO3" },
62
+ { no: 0, name: "SYNTAX_PROTO2" },
63
+ { no: 1, name: "SYNTAX_PROTO3" },
72
64
  ]);
73
65
  /**
74
66
  * A protocol buffer message type.
@@ -76,338 +68,307 @@ index_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [
76
68
  * @generated from message google.protobuf.Type
77
69
  */
78
70
  class Type extends index_js_1.Message {
79
- constructor(data) {
80
- super();
71
+ constructor(data) {
72
+ super();
73
+ /**
74
+ * The fully qualified message name.
75
+ *
76
+ * @generated from field: string name = 1;
77
+ */
78
+ this.name = "";
79
+ /**
80
+ * The list of fields.
81
+ *
82
+ * @generated from field: repeated google.protobuf.Field fields = 2;
83
+ */
84
+ this.fields = [];
85
+ /**
86
+ * The list of types appearing in `oneof` definitions in this type.
87
+ *
88
+ * @generated from field: repeated string oneofs = 3;
89
+ */
90
+ this.oneofs = [];
91
+ /**
92
+ * The protocol buffer options.
93
+ *
94
+ * @generated from field: repeated google.protobuf.Option options = 4;
95
+ */
96
+ this.options = [];
97
+ /**
98
+ * The source syntax.
99
+ *
100
+ * @generated from field: google.protobuf.Syntax syntax = 6;
101
+ */
102
+ this.syntax = Syntax.PROTO2;
103
+ index_js_1.proto3.util.initPartial(data, this);
104
+ }
105
+ static fromBinary(bytes, options) {
106
+ return new Type().fromBinary(bytes, options);
107
+ }
108
+ static fromJson(jsonValue, options) {
109
+ return new Type().fromJson(jsonValue, options);
110
+ }
111
+ static fromJsonString(jsonString, options) {
112
+ return new Type().fromJsonString(jsonString, options);
113
+ }
114
+ static equals(a, b) {
115
+ return index_js_1.proto3.util.equals(Type, a, b);
116
+ }
117
+ }
118
+ exports.Type = Type;
119
+ Type.runtime = index_js_1.proto3;
120
+ Type.typeName = "google.protobuf.Type";
121
+ Type.fields = index_js_1.proto3.util.newFieldList(() => [
122
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
123
+ { no: 2, name: "fields", kind: "message", T: Field, repeated: true },
124
+ { no: 3, name: "oneofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
125
+ { no: 4, name: "options", kind: "message", T: Option, repeated: true },
126
+ { no: 5, name: "source_context", kind: "message", T: source_context_pb_js_1.SourceContext },
127
+ { no: 6, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(Syntax) },
128
+ ]);
129
+ /**
130
+ * A single field of a message type.
131
+ *
132
+ * @generated from message google.protobuf.Field
133
+ */
134
+ class Field extends index_js_1.Message {
135
+ constructor(data) {
136
+ super();
137
+ /**
138
+ * The field type.
139
+ *
140
+ * @generated from field: google.protobuf.Field.Kind kind = 1;
141
+ */
142
+ this.kind = Field_Kind.TYPE_UNKNOWN;
143
+ /**
144
+ * The field cardinality.
145
+ *
146
+ * @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
147
+ */
148
+ this.cardinality = Field_Cardinality.UNKNOWN;
149
+ /**
150
+ * The field number.
151
+ *
152
+ * @generated from field: int32 number = 3;
153
+ */
154
+ this.number = 0;
155
+ /**
156
+ * The field name.
157
+ *
158
+ * @generated from field: string name = 4;
159
+ */
160
+ this.name = "";
161
+ /**
162
+ * The field type URL, without the scheme, for message or enumeration
163
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
164
+ *
165
+ * @generated from field: string type_url = 6;
166
+ */
167
+ this.typeUrl = "";
168
+ /**
169
+ * The index of the field type in `Type.oneofs`, for message or enumeration
170
+ * types. The first type has index 1; zero means the type is not in the list.
171
+ *
172
+ * @generated from field: int32 oneof_index = 7;
173
+ */
174
+ this.oneofIndex = 0;
175
+ /**
176
+ * Whether to use alternative packed wire representation.
177
+ *
178
+ * @generated from field: bool packed = 8;
179
+ */
180
+ this.packed = false;
181
+ /**
182
+ * The protocol buffer options.
183
+ *
184
+ * @generated from field: repeated google.protobuf.Option options = 9;
185
+ */
186
+ this.options = [];
187
+ /**
188
+ * The field JSON name.
189
+ *
190
+ * @generated from field: string json_name = 10;
191
+ */
192
+ this.jsonName = "";
193
+ /**
194
+ * The string value of the default value of this field. Proto2 syntax only.
195
+ *
196
+ * @generated from field: string default_value = 11;
197
+ */
198
+ this.defaultValue = "";
199
+ index_js_1.proto3.util.initPartial(data, this);
200
+ }
201
+ static fromBinary(bytes, options) {
202
+ return new Field().fromBinary(bytes, options);
203
+ }
204
+ static fromJson(jsonValue, options) {
205
+ return new Field().fromJson(jsonValue, options);
206
+ }
207
+ static fromJsonString(jsonString, options) {
208
+ return new Field().fromJsonString(jsonString, options);
209
+ }
210
+ static equals(a, b) {
211
+ return index_js_1.proto3.util.equals(Field, a, b);
212
+ }
213
+ }
214
+ exports.Field = Field;
215
+ Field.runtime = index_js_1.proto3;
216
+ Field.typeName = "google.protobuf.Field";
217
+ Field.fields = index_js_1.proto3.util.newFieldList(() => [
218
+ { no: 1, name: "kind", kind: "enum", T: index_js_1.proto3.getEnumType(Field_Kind) },
219
+ { no: 2, name: "cardinality", kind: "enum", T: index_js_1.proto3.getEnumType(Field_Cardinality) },
220
+ { no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
221
+ { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
222
+ { no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
223
+ { no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
224
+ { no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
225
+ { no: 9, name: "options", kind: "message", T: Option, repeated: true },
226
+ { no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
227
+ { no: 11, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
228
+ ]);
229
+ /**
230
+ * Basic field types.
231
+ *
232
+ * @generated from enum google.protobuf.Field.Kind
233
+ */
234
+ var Field_Kind;
235
+ (function (Field_Kind) {
81
236
  /**
82
- * The fully qualified message name.
237
+ * Field type unknown.
83
238
  *
84
- * @generated from field: string name = 1;
239
+ * @generated from enum value: TYPE_UNKNOWN = 0;
85
240
  */
86
- this.name = "";
241
+ Field_Kind[Field_Kind["TYPE_UNKNOWN"] = 0] = "TYPE_UNKNOWN";
87
242
  /**
88
- * The list of fields.
243
+ * Field type double.
89
244
  *
90
- * @generated from field: repeated google.protobuf.Field fields = 2;
245
+ * @generated from enum value: TYPE_DOUBLE = 1;
91
246
  */
92
- this.fields = [];
247
+ Field_Kind[Field_Kind["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE";
93
248
  /**
94
- * The list of types appearing in `oneof` definitions in this type.
249
+ * Field type float.
95
250
  *
96
- * @generated from field: repeated string oneofs = 3;
251
+ * @generated from enum value: TYPE_FLOAT = 2;
97
252
  */
98
- this.oneofs = [];
253
+ Field_Kind[Field_Kind["TYPE_FLOAT"] = 2] = "TYPE_FLOAT";
99
254
  /**
100
- * The protocol buffer options.
255
+ * Field type int64.
101
256
  *
102
- * @generated from field: repeated google.protobuf.Option options = 4;
257
+ * @generated from enum value: TYPE_INT64 = 3;
103
258
  */
104
- this.options = [];
259
+ Field_Kind[Field_Kind["TYPE_INT64"] = 3] = "TYPE_INT64";
105
260
  /**
106
- * The source syntax.
261
+ * Field type uint64.
107
262
  *
108
- * @generated from field: google.protobuf.Syntax syntax = 6;
263
+ * @generated from enum value: TYPE_UINT64 = 4;
109
264
  */
110
- this.syntax = Syntax.PROTO2;
111
- index_js_1.proto3.util.initPartial(data, this);
112
- }
113
- static fromBinary(bytes, options) {
114
- return new Type().fromBinary(bytes, options);
115
- }
116
- static fromJson(jsonValue, options) {
117
- return new Type().fromJson(jsonValue, options);
118
- }
119
- static fromJsonString(jsonString, options) {
120
- return new Type().fromJsonString(jsonString, options);
121
- }
122
- static equals(a, b) {
123
- return index_js_1.proto3.util.equals(Type, a, b);
124
- }
125
- }
126
- exports.Type = Type;
127
- Type.runtime = index_js_1.proto3;
128
- Type.typeName = "google.protobuf.Type";
129
- Type.fields = index_js_1.proto3.util.newFieldList(() => [
130
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
131
- { no: 2, name: "fields", kind: "message", T: Field, repeated: true },
132
- {
133
- no: 3,
134
- name: "oneofs",
135
- kind: "scalar",
136
- T: 9 /* ScalarType.STRING */,
137
- repeated: true,
138
- },
139
- { no: 4, name: "options", kind: "message", T: Option, repeated: true },
140
- {
141
- no: 5,
142
- name: "source_context",
143
- kind: "message",
144
- T: source_context_pb_js_1.SourceContext,
145
- },
146
- {
147
- no: 6,
148
- name: "syntax",
149
- kind: "enum",
150
- T: index_js_1.proto3.getEnumType(Syntax),
151
- },
152
- ]);
153
- /**
154
- * A single field of a message type.
155
- *
156
- * @generated from message google.protobuf.Field
157
- */
158
- class Field extends index_js_1.Message {
159
- constructor(data) {
160
- super();
265
+ Field_Kind[Field_Kind["TYPE_UINT64"] = 4] = "TYPE_UINT64";
161
266
  /**
162
- * The field type.
267
+ * Field type int32.
163
268
  *
164
- * @generated from field: google.protobuf.Field.Kind kind = 1;
269
+ * @generated from enum value: TYPE_INT32 = 5;
165
270
  */
166
- this.kind = Field_Kind.TYPE_UNKNOWN;
271
+ Field_Kind[Field_Kind["TYPE_INT32"] = 5] = "TYPE_INT32";
167
272
  /**
168
- * The field cardinality.
273
+ * Field type fixed64.
169
274
  *
170
- * @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
275
+ * @generated from enum value: TYPE_FIXED64 = 6;
171
276
  */
172
- this.cardinality = Field_Cardinality.UNKNOWN;
277
+ Field_Kind[Field_Kind["TYPE_FIXED64"] = 6] = "TYPE_FIXED64";
173
278
  /**
174
- * The field number.
279
+ * Field type fixed32.
175
280
  *
176
- * @generated from field: int32 number = 3;
281
+ * @generated from enum value: TYPE_FIXED32 = 7;
177
282
  */
178
- this.number = 0;
283
+ Field_Kind[Field_Kind["TYPE_FIXED32"] = 7] = "TYPE_FIXED32";
179
284
  /**
180
- * The field name.
285
+ * Field type bool.
181
286
  *
182
- * @generated from field: string name = 4;
287
+ * @generated from enum value: TYPE_BOOL = 8;
183
288
  */
184
- this.name = "";
289
+ Field_Kind[Field_Kind["TYPE_BOOL"] = 8] = "TYPE_BOOL";
185
290
  /**
186
- * The field type URL, without the scheme, for message or enumeration
187
- * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
291
+ * Field type string.
188
292
  *
189
- * @generated from field: string type_url = 6;
293
+ * @generated from enum value: TYPE_STRING = 9;
190
294
  */
191
- this.typeUrl = "";
295
+ Field_Kind[Field_Kind["TYPE_STRING"] = 9] = "TYPE_STRING";
192
296
  /**
193
- * The index of the field type in `Type.oneofs`, for message or enumeration
194
- * types. The first type has index 1; zero means the type is not in the list.
297
+ * Field type group. Proto2 syntax only, and deprecated.
195
298
  *
196
- * @generated from field: int32 oneof_index = 7;
299
+ * @generated from enum value: TYPE_GROUP = 10;
197
300
  */
198
- this.oneofIndex = 0;
301
+ Field_Kind[Field_Kind["TYPE_GROUP"] = 10] = "TYPE_GROUP";
199
302
  /**
200
- * Whether to use alternative packed wire representation.
303
+ * Field type message.
201
304
  *
202
- * @generated from field: bool packed = 8;
305
+ * @generated from enum value: TYPE_MESSAGE = 11;
203
306
  */
204
- this.packed = false;
307
+ Field_Kind[Field_Kind["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE";
205
308
  /**
206
- * The protocol buffer options.
309
+ * Field type bytes.
207
310
  *
208
- * @generated from field: repeated google.protobuf.Option options = 9;
311
+ * @generated from enum value: TYPE_BYTES = 12;
209
312
  */
210
- this.options = [];
313
+ Field_Kind[Field_Kind["TYPE_BYTES"] = 12] = "TYPE_BYTES";
211
314
  /**
212
- * The field JSON name.
315
+ * Field type uint32.
213
316
  *
214
- * @generated from field: string json_name = 10;
317
+ * @generated from enum value: TYPE_UINT32 = 13;
215
318
  */
216
- this.jsonName = "";
319
+ Field_Kind[Field_Kind["TYPE_UINT32"] = 13] = "TYPE_UINT32";
217
320
  /**
218
- * The string value of the default value of this field. Proto2 syntax only.
321
+ * Field type enum.
219
322
  *
220
- * @generated from field: string default_value = 11;
323
+ * @generated from enum value: TYPE_ENUM = 14;
221
324
  */
222
- this.defaultValue = "";
223
- index_js_1.proto3.util.initPartial(data, this);
224
- }
225
- static fromBinary(bytes, options) {
226
- return new Field().fromBinary(bytes, options);
227
- }
228
- static fromJson(jsonValue, options) {
229
- return new Field().fromJson(jsonValue, options);
230
- }
231
- static fromJsonString(jsonString, options) {
232
- return new Field().fromJsonString(jsonString, options);
233
- }
234
- static equals(a, b) {
235
- return index_js_1.proto3.util.equals(Field, a, b);
236
- }
237
- }
238
- exports.Field = Field;
239
- Field.runtime = index_js_1.proto3;
240
- Field.typeName = "google.protobuf.Field";
241
- Field.fields = index_js_1.proto3.util.newFieldList(() => [
242
- {
243
- no: 1,
244
- name: "kind",
245
- kind: "enum",
246
- T: index_js_1.proto3.getEnumType(Field_Kind),
247
- },
248
- {
249
- no: 2,
250
- name: "cardinality",
251
- kind: "enum",
252
- T: index_js_1.proto3.getEnumType(Field_Cardinality),
253
- },
254
- { no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
255
- { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
256
- { no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
257
- { no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
258
- { no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
259
- { no: 9, name: "options", kind: "message", T: Option, repeated: true },
260
- { no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
261
- {
262
- no: 11,
263
- name: "default_value",
264
- kind: "scalar",
265
- T: 9 /* ScalarType.STRING */,
266
- },
267
- ]);
268
- /**
269
- * Basic field types.
270
- *
271
- * @generated from enum google.protobuf.Field.Kind
272
- */
273
- var Field_Kind;
274
- (function (Field_Kind) {
275
- /**
276
- * Field type unknown.
277
- *
278
- * @generated from enum value: TYPE_UNKNOWN = 0;
279
- */
280
- Field_Kind[(Field_Kind["TYPE_UNKNOWN"] = 0)] = "TYPE_UNKNOWN";
281
- /**
282
- * Field type double.
283
- *
284
- * @generated from enum value: TYPE_DOUBLE = 1;
285
- */
286
- Field_Kind[(Field_Kind["TYPE_DOUBLE"] = 1)] = "TYPE_DOUBLE";
287
- /**
288
- * Field type float.
289
- *
290
- * @generated from enum value: TYPE_FLOAT = 2;
291
- */
292
- Field_Kind[(Field_Kind["TYPE_FLOAT"] = 2)] = "TYPE_FLOAT";
293
- /**
294
- * Field type int64.
295
- *
296
- * @generated from enum value: TYPE_INT64 = 3;
297
- */
298
- Field_Kind[(Field_Kind["TYPE_INT64"] = 3)] = "TYPE_INT64";
299
- /**
300
- * Field type uint64.
301
- *
302
- * @generated from enum value: TYPE_UINT64 = 4;
303
- */
304
- Field_Kind[(Field_Kind["TYPE_UINT64"] = 4)] = "TYPE_UINT64";
305
- /**
306
- * Field type int32.
307
- *
308
- * @generated from enum value: TYPE_INT32 = 5;
309
- */
310
- Field_Kind[(Field_Kind["TYPE_INT32"] = 5)] = "TYPE_INT32";
311
- /**
312
- * Field type fixed64.
313
- *
314
- * @generated from enum value: TYPE_FIXED64 = 6;
315
- */
316
- Field_Kind[(Field_Kind["TYPE_FIXED64"] = 6)] = "TYPE_FIXED64";
317
- /**
318
- * Field type fixed32.
319
- *
320
- * @generated from enum value: TYPE_FIXED32 = 7;
321
- */
322
- Field_Kind[(Field_Kind["TYPE_FIXED32"] = 7)] = "TYPE_FIXED32";
323
- /**
324
- * Field type bool.
325
- *
326
- * @generated from enum value: TYPE_BOOL = 8;
327
- */
328
- Field_Kind[(Field_Kind["TYPE_BOOL"] = 8)] = "TYPE_BOOL";
329
- /**
330
- * Field type string.
331
- *
332
- * @generated from enum value: TYPE_STRING = 9;
333
- */
334
- Field_Kind[(Field_Kind["TYPE_STRING"] = 9)] = "TYPE_STRING";
335
- /**
336
- * Field type group. Proto2 syntax only, and deprecated.
337
- *
338
- * @generated from enum value: TYPE_GROUP = 10;
339
- */
340
- Field_Kind[(Field_Kind["TYPE_GROUP"] = 10)] = "TYPE_GROUP";
341
- /**
342
- * Field type message.
343
- *
344
- * @generated from enum value: TYPE_MESSAGE = 11;
345
- */
346
- Field_Kind[(Field_Kind["TYPE_MESSAGE"] = 11)] = "TYPE_MESSAGE";
347
- /**
348
- * Field type bytes.
349
- *
350
- * @generated from enum value: TYPE_BYTES = 12;
351
- */
352
- Field_Kind[(Field_Kind["TYPE_BYTES"] = 12)] = "TYPE_BYTES";
353
- /**
354
- * Field type uint32.
355
- *
356
- * @generated from enum value: TYPE_UINT32 = 13;
357
- */
358
- Field_Kind[(Field_Kind["TYPE_UINT32"] = 13)] = "TYPE_UINT32";
359
- /**
360
- * Field type enum.
361
- *
362
- * @generated from enum value: TYPE_ENUM = 14;
363
- */
364
- Field_Kind[(Field_Kind["TYPE_ENUM"] = 14)] = "TYPE_ENUM";
365
- /**
366
- * Field type sfixed32.
367
- *
368
- * @generated from enum value: TYPE_SFIXED32 = 15;
369
- */
370
- Field_Kind[(Field_Kind["TYPE_SFIXED32"] = 15)] = "TYPE_SFIXED32";
371
- /**
372
- * Field type sfixed64.
373
- *
374
- * @generated from enum value: TYPE_SFIXED64 = 16;
375
- */
376
- Field_Kind[(Field_Kind["TYPE_SFIXED64"] = 16)] = "TYPE_SFIXED64";
377
- /**
378
- * Field type sint32.
379
- *
380
- * @generated from enum value: TYPE_SINT32 = 17;
381
- */
382
- Field_Kind[(Field_Kind["TYPE_SINT32"] = 17)] = "TYPE_SINT32";
383
- /**
384
- * Field type sint64.
385
- *
386
- * @generated from enum value: TYPE_SINT64 = 18;
387
- */
388
- Field_Kind[(Field_Kind["TYPE_SINT64"] = 18)] = "TYPE_SINT64";
389
- })((Field_Kind = exports.Field_Kind || (exports.Field_Kind = {})));
325
+ Field_Kind[Field_Kind["TYPE_ENUM"] = 14] = "TYPE_ENUM";
326
+ /**
327
+ * Field type sfixed32.
328
+ *
329
+ * @generated from enum value: TYPE_SFIXED32 = 15;
330
+ */
331
+ Field_Kind[Field_Kind["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32";
332
+ /**
333
+ * Field type sfixed64.
334
+ *
335
+ * @generated from enum value: TYPE_SFIXED64 = 16;
336
+ */
337
+ Field_Kind[Field_Kind["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64";
338
+ /**
339
+ * Field type sint32.
340
+ *
341
+ * @generated from enum value: TYPE_SINT32 = 17;
342
+ */
343
+ Field_Kind[Field_Kind["TYPE_SINT32"] = 17] = "TYPE_SINT32";
344
+ /**
345
+ * Field type sint64.
346
+ *
347
+ * @generated from enum value: TYPE_SINT64 = 18;
348
+ */
349
+ Field_Kind[Field_Kind["TYPE_SINT64"] = 18] = "TYPE_SINT64";
350
+ })(Field_Kind = exports.Field_Kind || (exports.Field_Kind = {}));
390
351
  // Retrieve enum metadata with: proto3.getEnumType(Field_Kind)
391
352
  index_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [
392
- { no: 0, name: "TYPE_UNKNOWN" },
393
- { no: 1, name: "TYPE_DOUBLE" },
394
- { no: 2, name: "TYPE_FLOAT" },
395
- { no: 3, name: "TYPE_INT64" },
396
- { no: 4, name: "TYPE_UINT64" },
397
- { no: 5, name: "TYPE_INT32" },
398
- { no: 6, name: "TYPE_FIXED64" },
399
- { no: 7, name: "TYPE_FIXED32" },
400
- { no: 8, name: "TYPE_BOOL" },
401
- { no: 9, name: "TYPE_STRING" },
402
- { no: 10, name: "TYPE_GROUP" },
403
- { no: 11, name: "TYPE_MESSAGE" },
404
- { no: 12, name: "TYPE_BYTES" },
405
- { no: 13, name: "TYPE_UINT32" },
406
- { no: 14, name: "TYPE_ENUM" },
407
- { no: 15, name: "TYPE_SFIXED32" },
408
- { no: 16, name: "TYPE_SFIXED64" },
409
- { no: 17, name: "TYPE_SINT32" },
410
- { no: 18, name: "TYPE_SINT64" },
353
+ { no: 0, name: "TYPE_UNKNOWN" },
354
+ { no: 1, name: "TYPE_DOUBLE" },
355
+ { no: 2, name: "TYPE_FLOAT" },
356
+ { no: 3, name: "TYPE_INT64" },
357
+ { no: 4, name: "TYPE_UINT64" },
358
+ { no: 5, name: "TYPE_INT32" },
359
+ { no: 6, name: "TYPE_FIXED64" },
360
+ { no: 7, name: "TYPE_FIXED32" },
361
+ { no: 8, name: "TYPE_BOOL" },
362
+ { no: 9, name: "TYPE_STRING" },
363
+ { no: 10, name: "TYPE_GROUP" },
364
+ { no: 11, name: "TYPE_MESSAGE" },
365
+ { no: 12, name: "TYPE_BYTES" },
366
+ { no: 13, name: "TYPE_UINT32" },
367
+ { no: 14, name: "TYPE_ENUM" },
368
+ { no: 15, name: "TYPE_SFIXED32" },
369
+ { no: 16, name: "TYPE_SFIXED64" },
370
+ { no: 17, name: "TYPE_SINT32" },
371
+ { no: 18, name: "TYPE_SINT64" },
411
372
  ]);
412
373
  /**
413
374
  * Whether a field is optional, required, or repeated.
@@ -416,111 +377,94 @@ index_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [
416
377
  */
417
378
  var Field_Cardinality;
418
379
  (function (Field_Cardinality) {
419
- /**
420
- * For fields with unknown cardinality.
421
- *
422
- * @generated from enum value: CARDINALITY_UNKNOWN = 0;
423
- */
424
- Field_Cardinality[(Field_Cardinality["UNKNOWN"] = 0)] = "UNKNOWN";
425
- /**
426
- * For optional fields.
427
- *
428
- * @generated from enum value: CARDINALITY_OPTIONAL = 1;
429
- */
430
- Field_Cardinality[(Field_Cardinality["OPTIONAL"] = 1)] = "OPTIONAL";
431
- /**
432
- * For required fields. Proto2 syntax only.
433
- *
434
- * @generated from enum value: CARDINALITY_REQUIRED = 2;
435
- */
436
- Field_Cardinality[(Field_Cardinality["REQUIRED"] = 2)] = "REQUIRED";
437
- /**
438
- * For repeated fields.
439
- *
440
- * @generated from enum value: CARDINALITY_REPEATED = 3;
441
- */
442
- Field_Cardinality[(Field_Cardinality["REPEATED"] = 3)] = "REPEATED";
443
- })(
444
- (Field_Cardinality =
445
- exports.Field_Cardinality || (exports.Field_Cardinality = {}))
446
- );
447
- // Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality)
448
- index_js_1.proto3.util.setEnumType(
449
- Field_Cardinality,
450
- "google.protobuf.Field.Cardinality",
451
- [
452
- { no: 0, name: "CARDINALITY_UNKNOWN" },
453
- { no: 1, name: "CARDINALITY_OPTIONAL" },
454
- { no: 2, name: "CARDINALITY_REQUIRED" },
455
- { no: 3, name: "CARDINALITY_REPEATED" },
456
- ]
457
- );
458
- /**
459
- * Enum type definition.
460
- *
461
- * @generated from message google.protobuf.Enum
462
- */
463
- class Enum extends index_js_1.Message {
464
- constructor(data) {
465
- super();
466
380
  /**
467
- * Enum type name.
381
+ * For fields with unknown cardinality.
468
382
  *
469
- * @generated from field: string name = 1;
383
+ * @generated from enum value: CARDINALITY_UNKNOWN = 0;
470
384
  */
471
- this.name = "";
385
+ Field_Cardinality[Field_Cardinality["UNKNOWN"] = 0] = "UNKNOWN";
472
386
  /**
473
- * Enum value definitions.
387
+ * For optional fields.
474
388
  *
475
- * @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
389
+ * @generated from enum value: CARDINALITY_OPTIONAL = 1;
476
390
  */
477
- this.enumvalue = [];
391
+ Field_Cardinality[Field_Cardinality["OPTIONAL"] = 1] = "OPTIONAL";
478
392
  /**
479
- * Protocol buffer options.
393
+ * For required fields. Proto2 syntax only.
480
394
  *
481
- * @generated from field: repeated google.protobuf.Option options = 3;
395
+ * @generated from enum value: CARDINALITY_REQUIRED = 2;
482
396
  */
483
- this.options = [];
397
+ Field_Cardinality[Field_Cardinality["REQUIRED"] = 2] = "REQUIRED";
484
398
  /**
485
- * The source syntax.
399
+ * For repeated fields.
486
400
  *
487
- * @generated from field: google.protobuf.Syntax syntax = 5;
401
+ * @generated from enum value: CARDINALITY_REPEATED = 3;
488
402
  */
489
- this.syntax = Syntax.PROTO2;
490
- index_js_1.proto3.util.initPartial(data, this);
491
- }
492
- static fromBinary(bytes, options) {
493
- return new Enum().fromBinary(bytes, options);
494
- }
495
- static fromJson(jsonValue, options) {
496
- return new Enum().fromJson(jsonValue, options);
497
- }
498
- static fromJsonString(jsonString, options) {
499
- return new Enum().fromJsonString(jsonString, options);
500
- }
501
- static equals(a, b) {
502
- return index_js_1.proto3.util.equals(Enum, a, b);
503
- }
403
+ Field_Cardinality[Field_Cardinality["REPEATED"] = 3] = "REPEATED";
404
+ })(Field_Cardinality = exports.Field_Cardinality || (exports.Field_Cardinality = {}));
405
+ // Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality)
406
+ index_js_1.proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [
407
+ { no: 0, name: "CARDINALITY_UNKNOWN" },
408
+ { no: 1, name: "CARDINALITY_OPTIONAL" },
409
+ { no: 2, name: "CARDINALITY_REQUIRED" },
410
+ { no: 3, name: "CARDINALITY_REPEATED" },
411
+ ]);
412
+ /**
413
+ * Enum type definition.
414
+ *
415
+ * @generated from message google.protobuf.Enum
416
+ */
417
+ class Enum extends index_js_1.Message {
418
+ constructor(data) {
419
+ super();
420
+ /**
421
+ * Enum type name.
422
+ *
423
+ * @generated from field: string name = 1;
424
+ */
425
+ this.name = "";
426
+ /**
427
+ * Enum value definitions.
428
+ *
429
+ * @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
430
+ */
431
+ this.enumvalue = [];
432
+ /**
433
+ * Protocol buffer options.
434
+ *
435
+ * @generated from field: repeated google.protobuf.Option options = 3;
436
+ */
437
+ this.options = [];
438
+ /**
439
+ * The source syntax.
440
+ *
441
+ * @generated from field: google.protobuf.Syntax syntax = 5;
442
+ */
443
+ this.syntax = Syntax.PROTO2;
444
+ index_js_1.proto3.util.initPartial(data, this);
445
+ }
446
+ static fromBinary(bytes, options) {
447
+ return new Enum().fromBinary(bytes, options);
448
+ }
449
+ static fromJson(jsonValue, options) {
450
+ return new Enum().fromJson(jsonValue, options);
451
+ }
452
+ static fromJsonString(jsonString, options) {
453
+ return new Enum().fromJsonString(jsonString, options);
454
+ }
455
+ static equals(a, b) {
456
+ return index_js_1.proto3.util.equals(Enum, a, b);
457
+ }
504
458
  }
505
459
  exports.Enum = Enum;
506
460
  Enum.runtime = index_js_1.proto3;
507
461
  Enum.typeName = "google.protobuf.Enum";
508
462
  Enum.fields = index_js_1.proto3.util.newFieldList(() => [
509
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
510
- { no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true },
511
- { no: 3, name: "options", kind: "message", T: Option, repeated: true },
512
- {
513
- no: 4,
514
- name: "source_context",
515
- kind: "message",
516
- T: source_context_pb_js_1.SourceContext,
517
- },
518
- {
519
- no: 5,
520
- name: "syntax",
521
- kind: "enum",
522
- T: index_js_1.proto3.getEnumType(Syntax),
523
- },
463
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
464
+ { no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true },
465
+ { no: 3, name: "options", kind: "message", T: Option, repeated: true },
466
+ { no: 4, name: "source_context", kind: "message", T: source_context_pb_js_1.SourceContext },
467
+ { no: 5, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(Syntax) },
524
468
  ]);
525
469
  /**
526
470
  * Enum value definition.
@@ -528,48 +472,48 @@ Enum.fields = index_js_1.proto3.util.newFieldList(() => [
528
472
  * @generated from message google.protobuf.EnumValue
529
473
  */
530
474
  class EnumValue extends index_js_1.Message {
531
- constructor(data) {
532
- super();
533
- /**
534
- * Enum value name.
535
- *
536
- * @generated from field: string name = 1;
537
- */
538
- this.name = "";
539
- /**
540
- * Enum value number.
541
- *
542
- * @generated from field: int32 number = 2;
543
- */
544
- this.number = 0;
545
- /**
546
- * Protocol buffer options.
547
- *
548
- * @generated from field: repeated google.protobuf.Option options = 3;
549
- */
550
- this.options = [];
551
- index_js_1.proto3.util.initPartial(data, this);
552
- }
553
- static fromBinary(bytes, options) {
554
- return new EnumValue().fromBinary(bytes, options);
555
- }
556
- static fromJson(jsonValue, options) {
557
- return new EnumValue().fromJson(jsonValue, options);
558
- }
559
- static fromJsonString(jsonString, options) {
560
- return new EnumValue().fromJsonString(jsonString, options);
561
- }
562
- static equals(a, b) {
563
- return index_js_1.proto3.util.equals(EnumValue, a, b);
564
- }
475
+ constructor(data) {
476
+ super();
477
+ /**
478
+ * Enum value name.
479
+ *
480
+ * @generated from field: string name = 1;
481
+ */
482
+ this.name = "";
483
+ /**
484
+ * Enum value number.
485
+ *
486
+ * @generated from field: int32 number = 2;
487
+ */
488
+ this.number = 0;
489
+ /**
490
+ * Protocol buffer options.
491
+ *
492
+ * @generated from field: repeated google.protobuf.Option options = 3;
493
+ */
494
+ this.options = [];
495
+ index_js_1.proto3.util.initPartial(data, this);
496
+ }
497
+ static fromBinary(bytes, options) {
498
+ return new EnumValue().fromBinary(bytes, options);
499
+ }
500
+ static fromJson(jsonValue, options) {
501
+ return new EnumValue().fromJson(jsonValue, options);
502
+ }
503
+ static fromJsonString(jsonString, options) {
504
+ return new EnumValue().fromJsonString(jsonString, options);
505
+ }
506
+ static equals(a, b) {
507
+ return index_js_1.proto3.util.equals(EnumValue, a, b);
508
+ }
565
509
  }
566
510
  exports.EnumValue = EnumValue;
567
511
  EnumValue.runtime = index_js_1.proto3;
568
512
  EnumValue.typeName = "google.protobuf.EnumValue";
569
513
  EnumValue.fields = index_js_1.proto3.util.newFieldList(() => [
570
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
571
- { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
572
- { no: 3, name: "options", kind: "message", T: Option, repeated: true },
514
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
515
+ { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
516
+ { no: 3, name: "options", kind: "message", T: Option, repeated: true },
573
517
  ]);
574
518
  /**
575
519
  * A protocol buffer option, which can be attached to a message, field,
@@ -578,36 +522,36 @@ EnumValue.fields = index_js_1.proto3.util.newFieldList(() => [
578
522
  * @generated from message google.protobuf.Option
579
523
  */
580
524
  class Option extends index_js_1.Message {
581
- constructor(data) {
582
- super();
583
- /**
584
- * The option's name. For protobuf built-in options (options defined in
585
- * descriptor.proto), this is the short name. For example, `"map_entry"`.
586
- * For custom options, it should be the fully-qualified name. For example,
587
- * `"google.api.http"`.
588
- *
589
- * @generated from field: string name = 1;
590
- */
591
- this.name = "";
592
- index_js_1.proto3.util.initPartial(data, this);
593
- }
594
- static fromBinary(bytes, options) {
595
- return new Option().fromBinary(bytes, options);
596
- }
597
- static fromJson(jsonValue, options) {
598
- return new Option().fromJson(jsonValue, options);
599
- }
600
- static fromJsonString(jsonString, options) {
601
- return new Option().fromJsonString(jsonString, options);
602
- }
603
- static equals(a, b) {
604
- return index_js_1.proto3.util.equals(Option, a, b);
605
- }
525
+ constructor(data) {
526
+ super();
527
+ /**
528
+ * The option's name. For protobuf built-in options (options defined in
529
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
530
+ * For custom options, it should be the fully-qualified name. For example,
531
+ * `"google.api.http"`.
532
+ *
533
+ * @generated from field: string name = 1;
534
+ */
535
+ this.name = "";
536
+ index_js_1.proto3.util.initPartial(data, this);
537
+ }
538
+ static fromBinary(bytes, options) {
539
+ return new Option().fromBinary(bytes, options);
540
+ }
541
+ static fromJson(jsonValue, options) {
542
+ return new Option().fromJson(jsonValue, options);
543
+ }
544
+ static fromJsonString(jsonString, options) {
545
+ return new Option().fromJsonString(jsonString, options);
546
+ }
547
+ static equals(a, b) {
548
+ return index_js_1.proto3.util.equals(Option, a, b);
549
+ }
606
550
  }
607
551
  exports.Option = Option;
608
552
  Option.runtime = index_js_1.proto3;
609
553
  Option.typeName = "google.protobuf.Option";
610
554
  Option.fields = index_js_1.proto3.util.newFieldList(() => [
611
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
612
- { no: 2, name: "value", kind: "message", T: any_pb_js_1.Any },
555
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
556
+ { no: 2, name: "value", kind: "message", T: any_pb_js_1.Any },
613
557
  ]);