@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.2-alpha.2

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 (138) hide show
  1. package/dist/cjs/binary-encoding.js +414 -409
  2. package/dist/cjs/binary-format.js +13 -0
  3. package/dist/cjs/descriptor-registry.js +420 -449
  4. package/dist/cjs/descriptor-set.js +429 -513
  5. package/dist/cjs/enum.js +13 -0
  6. package/dist/cjs/field-list.js +13 -0
  7. package/dist/cjs/field.js +43 -30
  8. package/dist/cjs/google/protobuf/any_pb.js +122 -140
  9. package/dist/cjs/google/protobuf/api_pb.js +177 -224
  10. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
  11. package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
  12. package/dist/cjs/google/protobuf/duration_pb.js +72 -88
  13. package/dist/cjs/google/protobuf/empty_pb.js +17 -17
  14. package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
  15. package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
  16. package/dist/cjs/google/protobuf/struct_pb.js +144 -181
  17. package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
  18. package/dist/cjs/google/protobuf/type_pb.js +406 -462
  19. package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
  20. package/dist/cjs/google/varint.js +166 -171
  21. package/dist/cjs/index.js +41 -122
  22. package/dist/cjs/json-format.js +13 -0
  23. package/dist/cjs/message-type.js +13 -0
  24. package/dist/cjs/message.js +89 -85
  25. package/dist/cjs/private/assert.js +33 -26
  26. package/dist/cjs/private/base64.js +93 -79
  27. package/dist/cjs/private/binary-format-common.js +208 -208
  28. package/dist/cjs/private/binary-format-proto2.js +88 -109
  29. package/dist/cjs/private/binary-format-proto3.js +70 -90
  30. package/dist/cjs/private/enum.js +77 -44
  31. package/dist/cjs/private/field-list.js +64 -50
  32. package/dist/cjs/private/field-wrapper.js +21 -10
  33. package/dist/cjs/private/field.js +35 -25
  34. package/dist/cjs/private/json-format-common.js +427 -440
  35. package/dist/cjs/private/json-format-proto2.js +91 -89
  36. package/dist/cjs/private/json-format-proto3.js +82 -93
  37. package/dist/cjs/private/message-type.js +39 -27
  38. package/dist/cjs/private/names.js +71 -62
  39. package/dist/cjs/private/options-map.js +13 -0
  40. package/dist/cjs/private/proto-runtime.js +25 -16
  41. package/dist/cjs/private/scalars.js +113 -103
  42. package/dist/cjs/private/util-common.js +193 -210
  43. package/dist/cjs/private/util.js +13 -0
  44. package/dist/cjs/proto-int64.js +123 -111
  45. package/dist/cjs/proto2.js +63 -63
  46. package/dist/cjs/proto3.js +74 -74
  47. package/dist/cjs/service-type.js +27 -17
  48. package/dist/cjs/type-registry.js +46 -31
  49. package/dist/esm/binary-encoding.js +414 -414
  50. package/dist/esm/binary-format.js +13 -0
  51. package/dist/esm/descriptor-registry.js +422 -458
  52. package/dist/esm/descriptor-set.js +430 -478
  53. package/dist/esm/enum.js +13 -0
  54. package/dist/esm/field-list.js +13 -0
  55. package/dist/esm/field.js +42 -29
  56. package/dist/esm/google/protobuf/any_pb.js +122 -140
  57. package/dist/esm/google/protobuf/api_pb.js +177 -197
  58. package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
  59. package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
  60. package/dist/esm/google/protobuf/duration_pb.js +72 -88
  61. package/dist/esm/google/protobuf/empty_pb.js +17 -17
  62. package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
  63. package/dist/esm/google/protobuf/source_context_pb.js +25 -25
  64. package/dist/esm/google/protobuf/struct_pb.js +143 -180
  65. package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
  66. package/dist/esm/google/protobuf/type_pb.js +401 -421
  67. package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
  68. package/dist/esm/google/varint.js +165 -164
  69. package/dist/esm/index.js +14 -1
  70. package/dist/esm/json-format.js +13 -0
  71. package/dist/esm/message-type.js +13 -0
  72. package/dist/esm/message.js +89 -85
  73. package/dist/esm/private/assert.js +32 -21
  74. package/dist/esm/private/base64.js +92 -78
  75. package/dist/esm/private/binary-format-common.js +209 -207
  76. package/dist/esm/private/binary-format-proto2.js +89 -81
  77. package/dist/esm/private/binary-format-proto3.js +71 -67
  78. package/dist/esm/private/enum.js +75 -43
  79. package/dist/esm/private/field-list.js +64 -50
  80. package/dist/esm/private/field-wrapper.js +21 -10
  81. package/dist/esm/private/field.js +35 -22
  82. package/dist/esm/private/json-format-common.js +427 -435
  83. package/dist/esm/private/json-format-proto2.js +89 -81
  84. package/dist/esm/private/json-format-proto3.js +79 -80
  85. package/dist/esm/private/message-type.js +40 -28
  86. package/dist/esm/private/names.js +70 -57
  87. package/dist/esm/private/options-map.js +13 -0
  88. package/dist/esm/private/proto-runtime.js +26 -12
  89. package/dist/esm/private/scalars.js +112 -99
  90. package/dist/esm/private/util-common.js +193 -192
  91. package/dist/esm/private/util.js +13 -0
  92. package/dist/esm/proto-int64.js +123 -111
  93. package/dist/esm/proto2.js +63 -57
  94. package/dist/esm/proto3.js +74 -68
  95. package/dist/esm/service-type.js +25 -12
  96. package/dist/esm/type-registry.js +46 -31
  97. package/dist/types/binary-encoding.d.ts +398 -398
  98. package/dist/types/binary-format.d.ts +69 -91
  99. package/dist/types/descriptor-registry.d.ts +23 -29
  100. package/dist/types/descriptor-set.d.ts +107 -128
  101. package/dist/types/enum.d.ts +21 -21
  102. package/dist/types/field-list.d.ts +21 -21
  103. package/dist/types/field.d.ts +191 -231
  104. package/dist/types/google/protobuf/any_pb.d.ts +56 -77
  105. package/dist/types/google/protobuf/api_pb.d.ts +144 -187
  106. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
  107. package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
  108. package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
  109. package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
  110. package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
  111. package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
  112. package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
  113. package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
  114. package/dist/types/google/protobuf/type_pb.d.ts +355 -422
  115. package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
  116. package/dist/types/google/varint.d.ts +6 -13
  117. package/dist/types/index.d.ts +4 -27
  118. package/dist/types/json-format.d.ts +70 -89
  119. package/dist/types/message-type.d.ts +37 -45
  120. package/dist/types/message.d.ts +62 -87
  121. package/dist/types/private/assert.d.ts +1 -4
  122. package/dist/types/private/binary-format-common.d.ts +6 -32
  123. package/dist/types/private/enum.d.ts +13 -11
  124. package/dist/types/private/field-list.d.ts +14 -21
  125. package/dist/types/private/field-wrapper.d.ts +4 -10
  126. package/dist/types/private/field.d.ts +12 -12
  127. package/dist/types/private/json-format-common.d.ts +5 -27
  128. package/dist/types/private/message-type.d.ts +12 -7
  129. package/dist/types/private/names.d.ts +1 -4
  130. package/dist/types/private/options-map.d.ts +1 -1
  131. package/dist/types/private/proto-runtime.d.ts +34 -42
  132. package/dist/types/private/scalars.d.ts +5 -12
  133. package/dist/types/private/util-common.d.ts +1 -4
  134. package/dist/types/private/util.d.ts +29 -41
  135. package/dist/types/proto-int64.d.ts +42 -42
  136. package/dist/types/service-type.d.ts +36 -56
  137. package/dist/types/type-registry.d.ts +13 -15
  138. package/package.json +2 -3
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
2
+ // @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
3
3
  // @generated from file google/protobuf/descriptor.proto (package google.protobuf, syntax proto2)
4
4
  //
5
5
  // Protocol Buffers - Google's data interchange format
@@ -46,37 +46,31 @@ import { Message, proto2 } from "../../index.js";
46
46
  * @generated from message google.protobuf.FileDescriptorSet
47
47
  */
48
48
  export class FileDescriptorSet extends Message {
49
- constructor(data) {
50
- super();
51
- /**
52
- * @generated from field: repeated google.protobuf.FileDescriptorProto file = 1;
53
- */
54
- this.file = [];
55
- proto2.util.initPartial(data, this);
56
- }
57
- static fromBinary(bytes, options) {
58
- return new FileDescriptorSet().fromBinary(bytes, options);
59
- }
60
- static fromJson(jsonValue, options) {
61
- return new FileDescriptorSet().fromJson(jsonValue, options);
62
- }
63
- static fromJsonString(jsonString, options) {
64
- return new FileDescriptorSet().fromJsonString(jsonString, options);
65
- }
66
- static equals(a, b) {
67
- return proto2.util.equals(FileDescriptorSet, a, b);
68
- }
49
+ constructor(data) {
50
+ super();
51
+ /**
52
+ * @generated from field: repeated google.protobuf.FileDescriptorProto file = 1;
53
+ */
54
+ this.file = [];
55
+ proto2.util.initPartial(data, this);
56
+ }
57
+ static fromBinary(bytes, options) {
58
+ return new FileDescriptorSet().fromBinary(bytes, options);
59
+ }
60
+ static fromJson(jsonValue, options) {
61
+ return new FileDescriptorSet().fromJson(jsonValue, options);
62
+ }
63
+ static fromJsonString(jsonString, options) {
64
+ return new FileDescriptorSet().fromJsonString(jsonString, options);
65
+ }
66
+ static equals(a, b) {
67
+ return proto2.util.equals(FileDescriptorSet, a, b);
68
+ }
69
69
  }
70
70
  FileDescriptorSet.runtime = proto2;
71
71
  FileDescriptorSet.typeName = "google.protobuf.FileDescriptorSet";
72
72
  FileDescriptorSet.fields = proto2.util.newFieldList(() => [
73
- {
74
- no: 1,
75
- name: "file",
76
- kind: "message",
77
- T: FileDescriptorProto,
78
- repeated: true,
79
- },
73
+ { no: 1, name: "file", kind: "message", T: FileDescriptorProto, repeated: true },
80
74
  ]);
81
75
  /**
82
76
  * Describes a complete .proto file.
@@ -84,141 +78,75 @@ FileDescriptorSet.fields = proto2.util.newFieldList(() => [
84
78
  * @generated from message google.protobuf.FileDescriptorProto
85
79
  */
86
80
  export class FileDescriptorProto extends Message {
87
- constructor(data) {
88
- super();
89
- /**
90
- * Names of files imported by this file.
91
- *
92
- * @generated from field: repeated string dependency = 3;
93
- */
94
- this.dependency = [];
95
- /**
96
- * Indexes of the public imported files in the dependency list above.
97
- *
98
- * @generated from field: repeated int32 public_dependency = 10;
99
- */
100
- this.publicDependency = [];
101
- /**
102
- * Indexes of the weak imported files in the dependency list.
103
- * For Google-internal migration only. Do not use.
104
- *
105
- * @generated from field: repeated int32 weak_dependency = 11;
106
- */
107
- this.weakDependency = [];
108
- /**
109
- * All top-level definitions in this file.
110
- *
111
- * @generated from field: repeated google.protobuf.DescriptorProto message_type = 4;
112
- */
113
- this.messageType = [];
114
- /**
115
- * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 5;
116
- */
117
- this.enumType = [];
118
- /**
119
- * @generated from field: repeated google.protobuf.ServiceDescriptorProto service = 6;
120
- */
121
- this.service = [];
122
- /**
123
- * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 7;
124
- */
125
- this.extension = [];
126
- proto2.util.initPartial(data, this);
127
- }
128
- static fromBinary(bytes, options) {
129
- return new FileDescriptorProto().fromBinary(bytes, options);
130
- }
131
- static fromJson(jsonValue, options) {
132
- return new FileDescriptorProto().fromJson(jsonValue, options);
133
- }
134
- static fromJsonString(jsonString, options) {
135
- return new FileDescriptorProto().fromJsonString(jsonString, options);
136
- }
137
- static equals(a, b) {
138
- return proto2.util.equals(FileDescriptorProto, a, b);
139
- }
81
+ constructor(data) {
82
+ super();
83
+ /**
84
+ * Names of files imported by this file.
85
+ *
86
+ * @generated from field: repeated string dependency = 3;
87
+ */
88
+ this.dependency = [];
89
+ /**
90
+ * Indexes of the public imported files in the dependency list above.
91
+ *
92
+ * @generated from field: repeated int32 public_dependency = 10;
93
+ */
94
+ this.publicDependency = [];
95
+ /**
96
+ * Indexes of the weak imported files in the dependency list.
97
+ * For Google-internal migration only. Do not use.
98
+ *
99
+ * @generated from field: repeated int32 weak_dependency = 11;
100
+ */
101
+ this.weakDependency = [];
102
+ /**
103
+ * All top-level definitions in this file.
104
+ *
105
+ * @generated from field: repeated google.protobuf.DescriptorProto message_type = 4;
106
+ */
107
+ this.messageType = [];
108
+ /**
109
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 5;
110
+ */
111
+ this.enumType = [];
112
+ /**
113
+ * @generated from field: repeated google.protobuf.ServiceDescriptorProto service = 6;
114
+ */
115
+ this.service = [];
116
+ /**
117
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 7;
118
+ */
119
+ this.extension = [];
120
+ proto2.util.initPartial(data, this);
121
+ }
122
+ static fromBinary(bytes, options) {
123
+ return new FileDescriptorProto().fromBinary(bytes, options);
124
+ }
125
+ static fromJson(jsonValue, options) {
126
+ return new FileDescriptorProto().fromJson(jsonValue, options);
127
+ }
128
+ static fromJsonString(jsonString, options) {
129
+ return new FileDescriptorProto().fromJsonString(jsonString, options);
130
+ }
131
+ static equals(a, b) {
132
+ return proto2.util.equals(FileDescriptorProto, a, b);
133
+ }
140
134
  }
141
135
  FileDescriptorProto.runtime = proto2;
142
136
  FileDescriptorProto.typeName = "google.protobuf.FileDescriptorProto";
143
137
  FileDescriptorProto.fields = proto2.util.newFieldList(() => [
144
- {
145
- no: 1,
146
- name: "name",
147
- kind: "scalar",
148
- T: 9 /* ScalarType.STRING */,
149
- opt: true,
150
- },
151
- {
152
- no: 2,
153
- name: "package",
154
- kind: "scalar",
155
- T: 9 /* ScalarType.STRING */,
156
- opt: true,
157
- },
158
- {
159
- no: 3,
160
- name: "dependency",
161
- kind: "scalar",
162
- T: 9 /* ScalarType.STRING */,
163
- repeated: true,
164
- },
165
- {
166
- no: 10,
167
- name: "public_dependency",
168
- kind: "scalar",
169
- T: 5 /* ScalarType.INT32 */,
170
- repeated: true,
171
- },
172
- {
173
- no: 11,
174
- name: "weak_dependency",
175
- kind: "scalar",
176
- T: 5 /* ScalarType.INT32 */,
177
- repeated: true,
178
- },
179
- {
180
- no: 4,
181
- name: "message_type",
182
- kind: "message",
183
- T: DescriptorProto,
184
- repeated: true,
185
- },
186
- {
187
- no: 5,
188
- name: "enum_type",
189
- kind: "message",
190
- T: EnumDescriptorProto,
191
- repeated: true,
192
- },
193
- {
194
- no: 6,
195
- name: "service",
196
- kind: "message",
197
- T: ServiceDescriptorProto,
198
- repeated: true,
199
- },
200
- {
201
- no: 7,
202
- name: "extension",
203
- kind: "message",
204
- T: FieldDescriptorProto,
205
- repeated: true,
206
- },
207
- { no: 8, name: "options", kind: "message", T: FileOptions, opt: true },
208
- {
209
- no: 9,
210
- name: "source_code_info",
211
- kind: "message",
212
- T: SourceCodeInfo,
213
- opt: true,
214
- },
215
- {
216
- no: 12,
217
- name: "syntax",
218
- kind: "scalar",
219
- T: 9 /* ScalarType.STRING */,
220
- opt: true,
221
- },
138
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
139
+ { no: 2, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
140
+ { no: 3, name: "dependency", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
141
+ { no: 10, name: "public_dependency", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
142
+ { no: 11, name: "weak_dependency", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
143
+ { no: 4, name: "message_type", kind: "message", T: DescriptorProto, repeated: true },
144
+ { no: 5, name: "enum_type", kind: "message", T: EnumDescriptorProto, repeated: true },
145
+ { no: 6, name: "service", kind: "message", T: ServiceDescriptorProto, repeated: true },
146
+ { no: 7, name: "extension", kind: "message", T: FieldDescriptorProto, repeated: true },
147
+ { no: 8, name: "options", kind: "message", T: FileOptions, opt: true },
148
+ { no: 9, name: "source_code_info", kind: "message", T: SourceCodeInfo, opt: true },
149
+ { no: 12, name: "syntax", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
222
150
  ]);
223
151
  /**
224
152
  * Describes a message type.
@@ -226,175 +154,99 @@ FileDescriptorProto.fields = proto2.util.newFieldList(() => [
226
154
  * @generated from message google.protobuf.DescriptorProto
227
155
  */
228
156
  export class DescriptorProto extends Message {
229
- constructor(data) {
230
- super();
231
- /**
232
- * @generated from field: repeated google.protobuf.FieldDescriptorProto field = 2;
233
- */
234
- this.field = [];
235
- /**
236
- * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 6;
237
- */
238
- this.extension = [];
239
- /**
240
- * @generated from field: repeated google.protobuf.DescriptorProto nested_type = 3;
241
- */
242
- this.nestedType = [];
243
- /**
244
- * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 4;
245
- */
246
- this.enumType = [];
247
- /**
248
- * @generated from field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
249
- */
250
- this.extensionRange = [];
251
- /**
252
- * @generated from field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8;
253
- */
254
- this.oneofDecl = [];
255
- /**
256
- * @generated from field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
257
- */
258
- this.reservedRange = [];
259
- /**
260
- * Reserved field names, which may not be used by fields in the same message.
261
- * A given name may only be reserved once.
262
- *
263
- * @generated from field: repeated string reserved_name = 10;
264
- */
265
- this.reservedName = [];
266
- proto2.util.initPartial(data, this);
267
- }
268
- static fromBinary(bytes, options) {
269
- return new DescriptorProto().fromBinary(bytes, options);
270
- }
271
- static fromJson(jsonValue, options) {
272
- return new DescriptorProto().fromJson(jsonValue, options);
273
- }
274
- static fromJsonString(jsonString, options) {
275
- return new DescriptorProto().fromJsonString(jsonString, options);
276
- }
277
- static equals(a, b) {
278
- return proto2.util.equals(DescriptorProto, a, b);
279
- }
157
+ constructor(data) {
158
+ super();
159
+ /**
160
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto field = 2;
161
+ */
162
+ this.field = [];
163
+ /**
164
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 6;
165
+ */
166
+ this.extension = [];
167
+ /**
168
+ * @generated from field: repeated google.protobuf.DescriptorProto nested_type = 3;
169
+ */
170
+ this.nestedType = [];
171
+ /**
172
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 4;
173
+ */
174
+ this.enumType = [];
175
+ /**
176
+ * @generated from field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
177
+ */
178
+ this.extensionRange = [];
179
+ /**
180
+ * @generated from field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8;
181
+ */
182
+ this.oneofDecl = [];
183
+ /**
184
+ * @generated from field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
185
+ */
186
+ this.reservedRange = [];
187
+ /**
188
+ * Reserved field names, which may not be used by fields in the same message.
189
+ * A given name may only be reserved once.
190
+ *
191
+ * @generated from field: repeated string reserved_name = 10;
192
+ */
193
+ this.reservedName = [];
194
+ proto2.util.initPartial(data, this);
195
+ }
196
+ static fromBinary(bytes, options) {
197
+ return new DescriptorProto().fromBinary(bytes, options);
198
+ }
199
+ static fromJson(jsonValue, options) {
200
+ return new DescriptorProto().fromJson(jsonValue, options);
201
+ }
202
+ static fromJsonString(jsonString, options) {
203
+ return new DescriptorProto().fromJsonString(jsonString, options);
204
+ }
205
+ static equals(a, b) {
206
+ return proto2.util.equals(DescriptorProto, a, b);
207
+ }
280
208
  }
281
209
  DescriptorProto.runtime = proto2;
282
210
  DescriptorProto.typeName = "google.protobuf.DescriptorProto";
283
211
  DescriptorProto.fields = proto2.util.newFieldList(() => [
284
- {
285
- no: 1,
286
- name: "name",
287
- kind: "scalar",
288
- T: 9 /* ScalarType.STRING */,
289
- opt: true,
290
- },
291
- {
292
- no: 2,
293
- name: "field",
294
- kind: "message",
295
- T: FieldDescriptorProto,
296
- repeated: true,
297
- },
298
- {
299
- no: 6,
300
- name: "extension",
301
- kind: "message",
302
- T: FieldDescriptorProto,
303
- repeated: true,
304
- },
305
- {
306
- no: 3,
307
- name: "nested_type",
308
- kind: "message",
309
- T: DescriptorProto,
310
- repeated: true,
311
- },
312
- {
313
- no: 4,
314
- name: "enum_type",
315
- kind: "message",
316
- T: EnumDescriptorProto,
317
- repeated: true,
318
- },
319
- {
320
- no: 5,
321
- name: "extension_range",
322
- kind: "message",
323
- T: DescriptorProto_ExtensionRange,
324
- repeated: true,
325
- },
326
- {
327
- no: 8,
328
- name: "oneof_decl",
329
- kind: "message",
330
- T: OneofDescriptorProto,
331
- repeated: true,
332
- },
333
- { no: 7, name: "options", kind: "message", T: MessageOptions, opt: true },
334
- {
335
- no: 9,
336
- name: "reserved_range",
337
- kind: "message",
338
- T: DescriptorProto_ReservedRange,
339
- repeated: true,
340
- },
341
- {
342
- no: 10,
343
- name: "reserved_name",
344
- kind: "scalar",
345
- T: 9 /* ScalarType.STRING */,
346
- repeated: true,
347
- },
212
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
213
+ { no: 2, name: "field", kind: "message", T: FieldDescriptorProto, repeated: true },
214
+ { no: 6, name: "extension", kind: "message", T: FieldDescriptorProto, repeated: true },
215
+ { no: 3, name: "nested_type", kind: "message", T: DescriptorProto, repeated: true },
216
+ { no: 4, name: "enum_type", kind: "message", T: EnumDescriptorProto, repeated: true },
217
+ { no: 5, name: "extension_range", kind: "message", T: DescriptorProto_ExtensionRange, repeated: true },
218
+ { no: 8, name: "oneof_decl", kind: "message", T: OneofDescriptorProto, repeated: true },
219
+ { no: 7, name: "options", kind: "message", T: MessageOptions, opt: true },
220
+ { no: 9, name: "reserved_range", kind: "message", T: DescriptorProto_ReservedRange, repeated: true },
221
+ { no: 10, name: "reserved_name", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
348
222
  ]);
349
223
  /**
350
224
  * @generated from message google.protobuf.DescriptorProto.ExtensionRange
351
225
  */
352
226
  export class DescriptorProto_ExtensionRange extends Message {
353
- constructor(data) {
354
- super();
355
- proto2.util.initPartial(data, this);
356
- }
357
- static fromBinary(bytes, options) {
358
- return new DescriptorProto_ExtensionRange().fromBinary(bytes, options);
359
- }
360
- static fromJson(jsonValue, options) {
361
- return new DescriptorProto_ExtensionRange().fromJson(jsonValue, options);
362
- }
363
- static fromJsonString(jsonString, options) {
364
- return new DescriptorProto_ExtensionRange().fromJsonString(
365
- jsonString,
366
- options
367
- );
368
- }
369
- static equals(a, b) {
370
- return proto2.util.equals(DescriptorProto_ExtensionRange, a, b);
371
- }
227
+ constructor(data) {
228
+ super();
229
+ proto2.util.initPartial(data, this);
230
+ }
231
+ static fromBinary(bytes, options) {
232
+ return new DescriptorProto_ExtensionRange().fromBinary(bytes, options);
233
+ }
234
+ static fromJson(jsonValue, options) {
235
+ return new DescriptorProto_ExtensionRange().fromJson(jsonValue, options);
236
+ }
237
+ static fromJsonString(jsonString, options) {
238
+ return new DescriptorProto_ExtensionRange().fromJsonString(jsonString, options);
239
+ }
240
+ static equals(a, b) {
241
+ return proto2.util.equals(DescriptorProto_ExtensionRange, a, b);
242
+ }
372
243
  }
373
244
  DescriptorProto_ExtensionRange.runtime = proto2;
374
- DescriptorProto_ExtensionRange.typeName =
375
- "google.protobuf.DescriptorProto.ExtensionRange";
245
+ DescriptorProto_ExtensionRange.typeName = "google.protobuf.DescriptorProto.ExtensionRange";
376
246
  DescriptorProto_ExtensionRange.fields = proto2.util.newFieldList(() => [
377
- {
378
- no: 1,
379
- name: "start",
380
- kind: "scalar",
381
- T: 5 /* ScalarType.INT32 */,
382
- opt: true,
383
- },
384
- {
385
- no: 2,
386
- name: "end",
387
- kind: "scalar",
388
- T: 5 /* ScalarType.INT32 */,
389
- opt: true,
390
- },
391
- {
392
- no: 3,
393
- name: "options",
394
- kind: "message",
395
- T: ExtensionRangeOptions,
396
- opt: true,
397
- },
247
+ { no: 1, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
248
+ { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
249
+ { no: 3, name: "options", kind: "message", T: ExtensionRangeOptions, opt: true },
398
250
  ]);
399
251
  /**
400
252
  * Range of reserved tag numbers. Reserved tag numbers may not be used by
@@ -404,82 +256,60 @@ DescriptorProto_ExtensionRange.fields = proto2.util.newFieldList(() => [
404
256
  * @generated from message google.protobuf.DescriptorProto.ReservedRange
405
257
  */
406
258
  export class DescriptorProto_ReservedRange extends Message {
407
- constructor(data) {
408
- super();
409
- proto2.util.initPartial(data, this);
410
- }
411
- static fromBinary(bytes, options) {
412
- return new DescriptorProto_ReservedRange().fromBinary(bytes, options);
413
- }
414
- static fromJson(jsonValue, options) {
415
- return new DescriptorProto_ReservedRange().fromJson(jsonValue, options);
416
- }
417
- static fromJsonString(jsonString, options) {
418
- return new DescriptorProto_ReservedRange().fromJsonString(
419
- jsonString,
420
- options
421
- );
422
- }
423
- static equals(a, b) {
424
- return proto2.util.equals(DescriptorProto_ReservedRange, a, b);
425
- }
259
+ constructor(data) {
260
+ super();
261
+ proto2.util.initPartial(data, this);
262
+ }
263
+ static fromBinary(bytes, options) {
264
+ return new DescriptorProto_ReservedRange().fromBinary(bytes, options);
265
+ }
266
+ static fromJson(jsonValue, options) {
267
+ return new DescriptorProto_ReservedRange().fromJson(jsonValue, options);
268
+ }
269
+ static fromJsonString(jsonString, options) {
270
+ return new DescriptorProto_ReservedRange().fromJsonString(jsonString, options);
271
+ }
272
+ static equals(a, b) {
273
+ return proto2.util.equals(DescriptorProto_ReservedRange, a, b);
274
+ }
426
275
  }
427
276
  DescriptorProto_ReservedRange.runtime = proto2;
428
- DescriptorProto_ReservedRange.typeName =
429
- "google.protobuf.DescriptorProto.ReservedRange";
277
+ DescriptorProto_ReservedRange.typeName = "google.protobuf.DescriptorProto.ReservedRange";
430
278
  DescriptorProto_ReservedRange.fields = proto2.util.newFieldList(() => [
431
- {
432
- no: 1,
433
- name: "start",
434
- kind: "scalar",
435
- T: 5 /* ScalarType.INT32 */,
436
- opt: true,
437
- },
438
- {
439
- no: 2,
440
- name: "end",
441
- kind: "scalar",
442
- T: 5 /* ScalarType.INT32 */,
443
- opt: true,
444
- },
279
+ { no: 1, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
280
+ { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
445
281
  ]);
446
282
  /**
447
283
  * @generated from message google.protobuf.ExtensionRangeOptions
448
284
  */
449
285
  export class ExtensionRangeOptions extends Message {
450
- constructor(data) {
451
- super();
452
- /**
453
- * The parser stores options it doesn't recognize here. See above.
454
- *
455
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
456
- */
457
- this.uninterpretedOption = [];
458
- proto2.util.initPartial(data, this);
459
- }
460
- static fromBinary(bytes, options) {
461
- return new ExtensionRangeOptions().fromBinary(bytes, options);
462
- }
463
- static fromJson(jsonValue, options) {
464
- return new ExtensionRangeOptions().fromJson(jsonValue, options);
465
- }
466
- static fromJsonString(jsonString, options) {
467
- return new ExtensionRangeOptions().fromJsonString(jsonString, options);
468
- }
469
- static equals(a, b) {
470
- return proto2.util.equals(ExtensionRangeOptions, a, b);
471
- }
286
+ constructor(data) {
287
+ super();
288
+ /**
289
+ * The parser stores options it doesn't recognize here. See above.
290
+ *
291
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
292
+ */
293
+ this.uninterpretedOption = [];
294
+ proto2.util.initPartial(data, this);
295
+ }
296
+ static fromBinary(bytes, options) {
297
+ return new ExtensionRangeOptions().fromBinary(bytes, options);
298
+ }
299
+ static fromJson(jsonValue, options) {
300
+ return new ExtensionRangeOptions().fromJson(jsonValue, options);
301
+ }
302
+ static fromJsonString(jsonString, options) {
303
+ return new ExtensionRangeOptions().fromJsonString(jsonString, options);
304
+ }
305
+ static equals(a, b) {
306
+ return proto2.util.equals(ExtensionRangeOptions, a, b);
307
+ }
472
308
  }
473
309
  ExtensionRangeOptions.runtime = proto2;
474
310
  ExtensionRangeOptions.typeName = "google.protobuf.ExtensionRangeOptions";
475
311
  ExtensionRangeOptions.fields = proto2.util.newFieldList(() => [
476
- {
477
- no: 999,
478
- name: "uninterpreted_option",
479
- kind: "message",
480
- T: UninterpretedOption,
481
- repeated: true,
482
- },
312
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
483
313
  ]);
484
314
  /**
485
315
  * Describes a field within a message.
@@ -487,216 +317,140 @@ ExtensionRangeOptions.fields = proto2.util.newFieldList(() => [
487
317
  * @generated from message google.protobuf.FieldDescriptorProto
488
318
  */
489
319
  export class FieldDescriptorProto extends Message {
490
- constructor(data) {
491
- super();
492
- proto2.util.initPartial(data, this);
493
- }
494
- static fromBinary(bytes, options) {
495
- return new FieldDescriptorProto().fromBinary(bytes, options);
496
- }
497
- static fromJson(jsonValue, options) {
498
- return new FieldDescriptorProto().fromJson(jsonValue, options);
499
- }
500
- static fromJsonString(jsonString, options) {
501
- return new FieldDescriptorProto().fromJsonString(jsonString, options);
502
- }
503
- static equals(a, b) {
504
- return proto2.util.equals(FieldDescriptorProto, a, b);
505
- }
320
+ constructor(data) {
321
+ super();
322
+ proto2.util.initPartial(data, this);
323
+ }
324
+ static fromBinary(bytes, options) {
325
+ return new FieldDescriptorProto().fromBinary(bytes, options);
326
+ }
327
+ static fromJson(jsonValue, options) {
328
+ return new FieldDescriptorProto().fromJson(jsonValue, options);
329
+ }
330
+ static fromJsonString(jsonString, options) {
331
+ return new FieldDescriptorProto().fromJsonString(jsonString, options);
332
+ }
333
+ static equals(a, b) {
334
+ return proto2.util.equals(FieldDescriptorProto, a, b);
335
+ }
506
336
  }
507
337
  FieldDescriptorProto.runtime = proto2;
508
338
  FieldDescriptorProto.typeName = "google.protobuf.FieldDescriptorProto";
509
339
  FieldDescriptorProto.fields = proto2.util.newFieldList(() => [
510
- {
511
- no: 1,
512
- name: "name",
513
- kind: "scalar",
514
- T: 9 /* ScalarType.STRING */,
515
- opt: true,
516
- },
517
- {
518
- no: 3,
519
- name: "number",
520
- kind: "scalar",
521
- T: 5 /* ScalarType.INT32 */,
522
- opt: true,
523
- },
524
- {
525
- no: 4,
526
- name: "label",
527
- kind: "enum",
528
- T: proto2.getEnumType(FieldDescriptorProto_Label),
529
- opt: true,
530
- },
531
- {
532
- no: 5,
533
- name: "type",
534
- kind: "enum",
535
- T: proto2.getEnumType(FieldDescriptorProto_Type),
536
- opt: true,
537
- },
538
- {
539
- no: 6,
540
- name: "type_name",
541
- kind: "scalar",
542
- T: 9 /* ScalarType.STRING */,
543
- opt: true,
544
- },
545
- {
546
- no: 2,
547
- name: "extendee",
548
- kind: "scalar",
549
- T: 9 /* ScalarType.STRING */,
550
- opt: true,
551
- },
552
- {
553
- no: 7,
554
- name: "default_value",
555
- kind: "scalar",
556
- T: 9 /* ScalarType.STRING */,
557
- opt: true,
558
- },
559
- {
560
- no: 9,
561
- name: "oneof_index",
562
- kind: "scalar",
563
- T: 5 /* ScalarType.INT32 */,
564
- opt: true,
565
- },
566
- {
567
- no: 10,
568
- name: "json_name",
569
- kind: "scalar",
570
- T: 9 /* ScalarType.STRING */,
571
- opt: true,
572
- },
573
- { no: 8, name: "options", kind: "message", T: FieldOptions, opt: true },
574
- {
575
- no: 17,
576
- name: "proto3_optional",
577
- kind: "scalar",
578
- T: 8 /* ScalarType.BOOL */,
579
- opt: true,
580
- },
340
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
341
+ { no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
342
+ { no: 4, name: "label", kind: "enum", T: proto2.getEnumType(FieldDescriptorProto_Label), opt: true },
343
+ { no: 5, name: "type", kind: "enum", T: proto2.getEnumType(FieldDescriptorProto_Type), opt: true },
344
+ { no: 6, name: "type_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
345
+ { no: 2, name: "extendee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
346
+ { no: 7, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
347
+ { no: 9, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
348
+ { no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
349
+ { no: 8, name: "options", kind: "message", T: FieldOptions, opt: true },
350
+ { no: 17, name: "proto3_optional", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
581
351
  ]);
582
352
  /**
583
353
  * @generated from enum google.protobuf.FieldDescriptorProto.Type
584
354
  */
585
355
  export var FieldDescriptorProto_Type;
586
356
  (function (FieldDescriptorProto_Type) {
587
- /**
588
- * 0 is reserved for errors.
589
- * Order is weird for historical reasons.
590
- *
591
- * @generated from enum value: TYPE_DOUBLE = 1;
592
- */
593
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["DOUBLE"] = 1)] =
594
- "DOUBLE";
595
- /**
596
- * @generated from enum value: TYPE_FLOAT = 2;
597
- */
598
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FLOAT"] = 2)] = "FLOAT";
599
- /**
600
- * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
601
- * negative values are likely.
602
- *
603
- * @generated from enum value: TYPE_INT64 = 3;
604
- */
605
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["INT64"] = 3)] = "INT64";
606
- /**
607
- * @generated from enum value: TYPE_UINT64 = 4;
608
- */
609
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["UINT64"] = 4)] =
610
- "UINT64";
611
- /**
612
- * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
613
- * negative values are likely.
614
- *
615
- * @generated from enum value: TYPE_INT32 = 5;
616
- */
617
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["INT32"] = 5)] = "INT32";
618
- /**
619
- * @generated from enum value: TYPE_FIXED64 = 6;
620
- */
621
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FIXED64"] = 6)] =
622
- "FIXED64";
623
- /**
624
- * @generated from enum value: TYPE_FIXED32 = 7;
625
- */
626
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FIXED32"] = 7)] =
627
- "FIXED32";
628
- /**
629
- * @generated from enum value: TYPE_BOOL = 8;
630
- */
631
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["BOOL"] = 8)] = "BOOL";
632
- /**
633
- * @generated from enum value: TYPE_STRING = 9;
634
- */
635
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["STRING"] = 9)] =
636
- "STRING";
637
- /**
638
- * Tag-delimited aggregate.
639
- * Group type is deprecated and not supported in proto3. However, Proto3
640
- * implementations should still be able to parse the group wire format and
641
- * treat group fields as unknown fields.
642
- *
643
- * @generated from enum value: TYPE_GROUP = 10;
644
- */
645
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["GROUP"] = 10)] =
646
- "GROUP";
647
- /**
648
- * Length-delimited aggregate.
649
- *
650
- * @generated from enum value: TYPE_MESSAGE = 11;
651
- */
652
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["MESSAGE"] = 11)] =
653
- "MESSAGE";
654
- /**
655
- * New in version 2.
656
- *
657
- * @generated from enum value: TYPE_BYTES = 12;
658
- */
659
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["BYTES"] = 12)] =
660
- "BYTES";
661
- /**
662
- * @generated from enum value: TYPE_UINT32 = 13;
663
- */
664
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["UINT32"] = 13)] =
665
- "UINT32";
666
- /**
667
- * @generated from enum value: TYPE_ENUM = 14;
668
- */
669
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["ENUM"] = 14)] = "ENUM";
670
- /**
671
- * @generated from enum value: TYPE_SFIXED32 = 15;
672
- */
673
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SFIXED32"] = 15)] =
674
- "SFIXED32";
675
- /**
676
- * @generated from enum value: TYPE_SFIXED64 = 16;
677
- */
678
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SFIXED64"] = 16)] =
679
- "SFIXED64";
680
- /**
681
- * Uses ZigZag encoding.
682
- *
683
- * @generated from enum value: TYPE_SINT32 = 17;
684
- */
685
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SINT32"] = 17)] =
686
- "SINT32";
687
- /**
688
- * Uses ZigZag encoding.
689
- *
690
- * @generated from enum value: TYPE_SINT64 = 18;
691
- */
692
- FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SINT64"] = 18)] =
693
- "SINT64";
357
+ /**
358
+ * 0 is reserved for errors.
359
+ * Order is weird for historical reasons.
360
+ *
361
+ * @generated from enum value: TYPE_DOUBLE = 1;
362
+ */
363
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["DOUBLE"] = 1] = "DOUBLE";
364
+ /**
365
+ * @generated from enum value: TYPE_FLOAT = 2;
366
+ */
367
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["FLOAT"] = 2] = "FLOAT";
368
+ /**
369
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
370
+ * negative values are likely.
371
+ *
372
+ * @generated from enum value: TYPE_INT64 = 3;
373
+ */
374
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["INT64"] = 3] = "INT64";
375
+ /**
376
+ * @generated from enum value: TYPE_UINT64 = 4;
377
+ */
378
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["UINT64"] = 4] = "UINT64";
379
+ /**
380
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
381
+ * negative values are likely.
382
+ *
383
+ * @generated from enum value: TYPE_INT32 = 5;
384
+ */
385
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["INT32"] = 5] = "INT32";
386
+ /**
387
+ * @generated from enum value: TYPE_FIXED64 = 6;
388
+ */
389
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["FIXED64"] = 6] = "FIXED64";
390
+ /**
391
+ * @generated from enum value: TYPE_FIXED32 = 7;
392
+ */
393
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["FIXED32"] = 7] = "FIXED32";
394
+ /**
395
+ * @generated from enum value: TYPE_BOOL = 8;
396
+ */
397
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["BOOL"] = 8] = "BOOL";
398
+ /**
399
+ * @generated from enum value: TYPE_STRING = 9;
400
+ */
401
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["STRING"] = 9] = "STRING";
402
+ /**
403
+ * Tag-delimited aggregate.
404
+ * Group type is deprecated and not supported in proto3. However, Proto3
405
+ * implementations should still be able to parse the group wire format and
406
+ * treat group fields as unknown fields.
407
+ *
408
+ * @generated from enum value: TYPE_GROUP = 10;
409
+ */
410
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["GROUP"] = 10] = "GROUP";
411
+ /**
412
+ * Length-delimited aggregate.
413
+ *
414
+ * @generated from enum value: TYPE_MESSAGE = 11;
415
+ */
416
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["MESSAGE"] = 11] = "MESSAGE";
417
+ /**
418
+ * New in version 2.
419
+ *
420
+ * @generated from enum value: TYPE_BYTES = 12;
421
+ */
422
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["BYTES"] = 12] = "BYTES";
423
+ /**
424
+ * @generated from enum value: TYPE_UINT32 = 13;
425
+ */
426
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["UINT32"] = 13] = "UINT32";
427
+ /**
428
+ * @generated from enum value: TYPE_ENUM = 14;
429
+ */
430
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["ENUM"] = 14] = "ENUM";
431
+ /**
432
+ * @generated from enum value: TYPE_SFIXED32 = 15;
433
+ */
434
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["SFIXED32"] = 15] = "SFIXED32";
435
+ /**
436
+ * @generated from enum value: TYPE_SFIXED64 = 16;
437
+ */
438
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["SFIXED64"] = 16] = "SFIXED64";
439
+ /**
440
+ * Uses ZigZag encoding.
441
+ *
442
+ * @generated from enum value: TYPE_SINT32 = 17;
443
+ */
444
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["SINT32"] = 17] = "SINT32";
445
+ /**
446
+ * Uses ZigZag encoding.
447
+ *
448
+ * @generated from enum value: TYPE_SINT64 = 18;
449
+ */
450
+ FieldDescriptorProto_Type[FieldDescriptorProto_Type["SINT64"] = 18] = "SINT64";
694
451
  })(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {}));
695
452
  // Retrieve enum metadata with: proto2.getEnumType(FieldDescriptorProto_Type)
696
- proto2.util.setEnumType(
697
- FieldDescriptorProto_Type,
698
- "google.protobuf.FieldDescriptorProto.Type",
699
- [
453
+ proto2.util.setEnumType(FieldDescriptorProto_Type, "google.protobuf.FieldDescriptorProto.Type", [
700
454
  { no: 1, name: "TYPE_DOUBLE" },
701
455
  { no: 2, name: "TYPE_FLOAT" },
702
456
  { no: 3, name: "TYPE_INT64" },
@@ -715,75 +469,61 @@ proto2.util.setEnumType(
715
469
  { no: 16, name: "TYPE_SFIXED64" },
716
470
  { no: 17, name: "TYPE_SINT32" },
717
471
  { no: 18, name: "TYPE_SINT64" },
718
- ]
719
- );
472
+ ]);
720
473
  /**
721
474
  * @generated from enum google.protobuf.FieldDescriptorProto.Label
722
475
  */
723
476
  export var FieldDescriptorProto_Label;
724
477
  (function (FieldDescriptorProto_Label) {
725
- /**
726
- * 0 is reserved for errors
727
- *
728
- * @generated from enum value: LABEL_OPTIONAL = 1;
729
- */
730
- FieldDescriptorProto_Label[(FieldDescriptorProto_Label["OPTIONAL"] = 1)] =
731
- "OPTIONAL";
732
- /**
733
- * @generated from enum value: LABEL_REQUIRED = 2;
734
- */
735
- FieldDescriptorProto_Label[(FieldDescriptorProto_Label["REQUIRED"] = 2)] =
736
- "REQUIRED";
737
- /**
738
- * @generated from enum value: LABEL_REPEATED = 3;
739
- */
740
- FieldDescriptorProto_Label[(FieldDescriptorProto_Label["REPEATED"] = 3)] =
741
- "REPEATED";
478
+ /**
479
+ * 0 is reserved for errors
480
+ *
481
+ * @generated from enum value: LABEL_OPTIONAL = 1;
482
+ */
483
+ FieldDescriptorProto_Label[FieldDescriptorProto_Label["OPTIONAL"] = 1] = "OPTIONAL";
484
+ /**
485
+ * @generated from enum value: LABEL_REQUIRED = 2;
486
+ */
487
+ FieldDescriptorProto_Label[FieldDescriptorProto_Label["REQUIRED"] = 2] = "REQUIRED";
488
+ /**
489
+ * @generated from enum value: LABEL_REPEATED = 3;
490
+ */
491
+ FieldDescriptorProto_Label[FieldDescriptorProto_Label["REPEATED"] = 3] = "REPEATED";
742
492
  })(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {}));
743
493
  // Retrieve enum metadata with: proto2.getEnumType(FieldDescriptorProto_Label)
744
- proto2.util.setEnumType(
745
- FieldDescriptorProto_Label,
746
- "google.protobuf.FieldDescriptorProto.Label",
747
- [
494
+ proto2.util.setEnumType(FieldDescriptorProto_Label, "google.protobuf.FieldDescriptorProto.Label", [
748
495
  { no: 1, name: "LABEL_OPTIONAL" },
749
496
  { no: 2, name: "LABEL_REQUIRED" },
750
497
  { no: 3, name: "LABEL_REPEATED" },
751
- ]
752
- );
498
+ ]);
753
499
  /**
754
500
  * Describes a oneof.
755
501
  *
756
502
  * @generated from message google.protobuf.OneofDescriptorProto
757
503
  */
758
504
  export class OneofDescriptorProto extends Message {
759
- constructor(data) {
760
- super();
761
- proto2.util.initPartial(data, this);
762
- }
763
- static fromBinary(bytes, options) {
764
- return new OneofDescriptorProto().fromBinary(bytes, options);
765
- }
766
- static fromJson(jsonValue, options) {
767
- return new OneofDescriptorProto().fromJson(jsonValue, options);
768
- }
769
- static fromJsonString(jsonString, options) {
770
- return new OneofDescriptorProto().fromJsonString(jsonString, options);
771
- }
772
- static equals(a, b) {
773
- return proto2.util.equals(OneofDescriptorProto, a, b);
774
- }
505
+ constructor(data) {
506
+ super();
507
+ proto2.util.initPartial(data, this);
508
+ }
509
+ static fromBinary(bytes, options) {
510
+ return new OneofDescriptorProto().fromBinary(bytes, options);
511
+ }
512
+ static fromJson(jsonValue, options) {
513
+ return new OneofDescriptorProto().fromJson(jsonValue, options);
514
+ }
515
+ static fromJsonString(jsonString, options) {
516
+ return new OneofDescriptorProto().fromJsonString(jsonString, options);
517
+ }
518
+ static equals(a, b) {
519
+ return proto2.util.equals(OneofDescriptorProto, a, b);
520
+ }
775
521
  }
776
522
  OneofDescriptorProto.runtime = proto2;
777
523
  OneofDescriptorProto.typeName = "google.protobuf.OneofDescriptorProto";
778
524
  OneofDescriptorProto.fields = proto2.util.newFieldList(() => [
779
- {
780
- no: 1,
781
- name: "name",
782
- kind: "scalar",
783
- T: 9 /* ScalarType.STRING */,
784
- opt: true,
785
- },
786
- { no: 2, name: "options", kind: "message", T: OneofOptions, opt: true },
525
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
526
+ { no: 2, name: "options", kind: "message", T: OneofOptions, opt: true },
787
527
  ]);
788
528
  /**
789
529
  * Describes an enum type.
@@ -791,74 +531,50 @@ OneofDescriptorProto.fields = proto2.util.newFieldList(() => [
791
531
  * @generated from message google.protobuf.EnumDescriptorProto
792
532
  */
793
533
  export class EnumDescriptorProto extends Message {
794
- constructor(data) {
795
- super();
796
- /**
797
- * @generated from field: repeated google.protobuf.EnumValueDescriptorProto value = 2;
798
- */
799
- this.value = [];
800
- /**
801
- * Range of reserved numeric values. Reserved numeric values may not be used
802
- * by enum values in the same enum declaration. Reserved ranges may not
803
- * overlap.
804
- *
805
- * @generated from field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
806
- */
807
- this.reservedRange = [];
808
- /**
809
- * Reserved enum value names, which may not be reused. A given name may only
810
- * be reserved once.
811
- *
812
- * @generated from field: repeated string reserved_name = 5;
813
- */
814
- this.reservedName = [];
815
- proto2.util.initPartial(data, this);
816
- }
817
- static fromBinary(bytes, options) {
818
- return new EnumDescriptorProto().fromBinary(bytes, options);
819
- }
820
- static fromJson(jsonValue, options) {
821
- return new EnumDescriptorProto().fromJson(jsonValue, options);
822
- }
823
- static fromJsonString(jsonString, options) {
824
- return new EnumDescriptorProto().fromJsonString(jsonString, options);
825
- }
826
- static equals(a, b) {
827
- return proto2.util.equals(EnumDescriptorProto, a, b);
828
- }
534
+ constructor(data) {
535
+ super();
536
+ /**
537
+ * @generated from field: repeated google.protobuf.EnumValueDescriptorProto value = 2;
538
+ */
539
+ this.value = [];
540
+ /**
541
+ * Range of reserved numeric values. Reserved numeric values may not be used
542
+ * by enum values in the same enum declaration. Reserved ranges may not
543
+ * overlap.
544
+ *
545
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
546
+ */
547
+ this.reservedRange = [];
548
+ /**
549
+ * Reserved enum value names, which may not be reused. A given name may only
550
+ * be reserved once.
551
+ *
552
+ * @generated from field: repeated string reserved_name = 5;
553
+ */
554
+ this.reservedName = [];
555
+ proto2.util.initPartial(data, this);
556
+ }
557
+ static fromBinary(bytes, options) {
558
+ return new EnumDescriptorProto().fromBinary(bytes, options);
559
+ }
560
+ static fromJson(jsonValue, options) {
561
+ return new EnumDescriptorProto().fromJson(jsonValue, options);
562
+ }
563
+ static fromJsonString(jsonString, options) {
564
+ return new EnumDescriptorProto().fromJsonString(jsonString, options);
565
+ }
566
+ static equals(a, b) {
567
+ return proto2.util.equals(EnumDescriptorProto, a, b);
568
+ }
829
569
  }
830
570
  EnumDescriptorProto.runtime = proto2;
831
571
  EnumDescriptorProto.typeName = "google.protobuf.EnumDescriptorProto";
832
572
  EnumDescriptorProto.fields = proto2.util.newFieldList(() => [
833
- {
834
- no: 1,
835
- name: "name",
836
- kind: "scalar",
837
- T: 9 /* ScalarType.STRING */,
838
- opt: true,
839
- },
840
- {
841
- no: 2,
842
- name: "value",
843
- kind: "message",
844
- T: EnumValueDescriptorProto,
845
- repeated: true,
846
- },
847
- { no: 3, name: "options", kind: "message", T: EnumOptions, opt: true },
848
- {
849
- no: 4,
850
- name: "reserved_range",
851
- kind: "message",
852
- T: EnumDescriptorProto_EnumReservedRange,
853
- repeated: true,
854
- },
855
- {
856
- no: 5,
857
- name: "reserved_name",
858
- kind: "scalar",
859
- T: 9 /* ScalarType.STRING */,
860
- repeated: true,
861
- },
573
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
574
+ { no: 2, name: "value", kind: "message", T: EnumValueDescriptorProto, repeated: true },
575
+ { no: 3, name: "options", kind: "message", T: EnumOptions, opt: true },
576
+ { no: 4, name: "reserved_range", kind: "message", T: EnumDescriptorProto_EnumReservedRange, repeated: true },
577
+ { no: 5, name: "reserved_name", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
862
578
  ]);
863
579
  /**
864
580
  * Range of reserved numeric values. Reserved values may not be used by
@@ -871,50 +587,28 @@ EnumDescriptorProto.fields = proto2.util.newFieldList(() => [
871
587
  * @generated from message google.protobuf.EnumDescriptorProto.EnumReservedRange
872
588
  */
873
589
  export class EnumDescriptorProto_EnumReservedRange extends Message {
874
- constructor(data) {
875
- super();
876
- proto2.util.initPartial(data, this);
877
- }
878
- static fromBinary(bytes, options) {
879
- return new EnumDescriptorProto_EnumReservedRange().fromBinary(
880
- bytes,
881
- options
882
- );
883
- }
884
- static fromJson(jsonValue, options) {
885
- return new EnumDescriptorProto_EnumReservedRange().fromJson(
886
- jsonValue,
887
- options
888
- );
889
- }
890
- static fromJsonString(jsonString, options) {
891
- return new EnumDescriptorProto_EnumReservedRange().fromJsonString(
892
- jsonString,
893
- options
894
- );
895
- }
896
- static equals(a, b) {
897
- return proto2.util.equals(EnumDescriptorProto_EnumReservedRange, a, b);
898
- }
590
+ constructor(data) {
591
+ super();
592
+ proto2.util.initPartial(data, this);
593
+ }
594
+ static fromBinary(bytes, options) {
595
+ return new EnumDescriptorProto_EnumReservedRange().fromBinary(bytes, options);
596
+ }
597
+ static fromJson(jsonValue, options) {
598
+ return new EnumDescriptorProto_EnumReservedRange().fromJson(jsonValue, options);
599
+ }
600
+ static fromJsonString(jsonString, options) {
601
+ return new EnumDescriptorProto_EnumReservedRange().fromJsonString(jsonString, options);
602
+ }
603
+ static equals(a, b) {
604
+ return proto2.util.equals(EnumDescriptorProto_EnumReservedRange, a, b);
605
+ }
899
606
  }
900
607
  EnumDescriptorProto_EnumReservedRange.runtime = proto2;
901
- EnumDescriptorProto_EnumReservedRange.typeName =
902
- "google.protobuf.EnumDescriptorProto.EnumReservedRange";
608
+ EnumDescriptorProto_EnumReservedRange.typeName = "google.protobuf.EnumDescriptorProto.EnumReservedRange";
903
609
  EnumDescriptorProto_EnumReservedRange.fields = proto2.util.newFieldList(() => [
904
- {
905
- no: 1,
906
- name: "start",
907
- kind: "scalar",
908
- T: 5 /* ScalarType.INT32 */,
909
- opt: true,
910
- },
911
- {
912
- no: 2,
913
- name: "end",
914
- kind: "scalar",
915
- T: 5 /* ScalarType.INT32 */,
916
- opt: true,
917
- },
610
+ { no: 1, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
611
+ { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
918
612
  ]);
919
613
  /**
920
614
  * Describes a value within an enum.
@@ -922,41 +616,29 @@ EnumDescriptorProto_EnumReservedRange.fields = proto2.util.newFieldList(() => [
922
616
  * @generated from message google.protobuf.EnumValueDescriptorProto
923
617
  */
924
618
  export class EnumValueDescriptorProto extends Message {
925
- constructor(data) {
926
- super();
927
- proto2.util.initPartial(data, this);
928
- }
929
- static fromBinary(bytes, options) {
930
- return new EnumValueDescriptorProto().fromBinary(bytes, options);
931
- }
932
- static fromJson(jsonValue, options) {
933
- return new EnumValueDescriptorProto().fromJson(jsonValue, options);
934
- }
935
- static fromJsonString(jsonString, options) {
936
- return new EnumValueDescriptorProto().fromJsonString(jsonString, options);
937
- }
938
- static equals(a, b) {
939
- return proto2.util.equals(EnumValueDescriptorProto, a, b);
940
- }
619
+ constructor(data) {
620
+ super();
621
+ proto2.util.initPartial(data, this);
622
+ }
623
+ static fromBinary(bytes, options) {
624
+ return new EnumValueDescriptorProto().fromBinary(bytes, options);
625
+ }
626
+ static fromJson(jsonValue, options) {
627
+ return new EnumValueDescriptorProto().fromJson(jsonValue, options);
628
+ }
629
+ static fromJsonString(jsonString, options) {
630
+ return new EnumValueDescriptorProto().fromJsonString(jsonString, options);
631
+ }
632
+ static equals(a, b) {
633
+ return proto2.util.equals(EnumValueDescriptorProto, a, b);
634
+ }
941
635
  }
942
636
  EnumValueDescriptorProto.runtime = proto2;
943
637
  EnumValueDescriptorProto.typeName = "google.protobuf.EnumValueDescriptorProto";
944
638
  EnumValueDescriptorProto.fields = proto2.util.newFieldList(() => [
945
- {
946
- no: 1,
947
- name: "name",
948
- kind: "scalar",
949
- T: 9 /* ScalarType.STRING */,
950
- opt: true,
951
- },
952
- {
953
- no: 2,
954
- name: "number",
955
- kind: "scalar",
956
- T: 5 /* ScalarType.INT32 */,
957
- opt: true,
958
- },
959
- { no: 3, name: "options", kind: "message", T: EnumValueOptions, opt: true },
639
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
640
+ { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
641
+ { no: 3, name: "options", kind: "message", T: EnumValueOptions, opt: true },
960
642
  ]);
961
643
  /**
962
644
  * Describes a service.
@@ -964,45 +646,33 @@ EnumValueDescriptorProto.fields = proto2.util.newFieldList(() => [
964
646
  * @generated from message google.protobuf.ServiceDescriptorProto
965
647
  */
966
648
  export class ServiceDescriptorProto extends Message {
967
- constructor(data) {
968
- super();
969
- /**
970
- * @generated from field: repeated google.protobuf.MethodDescriptorProto method = 2;
971
- */
972
- this.method = [];
973
- proto2.util.initPartial(data, this);
974
- }
975
- static fromBinary(bytes, options) {
976
- return new ServiceDescriptorProto().fromBinary(bytes, options);
977
- }
978
- static fromJson(jsonValue, options) {
979
- return new ServiceDescriptorProto().fromJson(jsonValue, options);
980
- }
981
- static fromJsonString(jsonString, options) {
982
- return new ServiceDescriptorProto().fromJsonString(jsonString, options);
983
- }
984
- static equals(a, b) {
985
- return proto2.util.equals(ServiceDescriptorProto, a, b);
986
- }
649
+ constructor(data) {
650
+ super();
651
+ /**
652
+ * @generated from field: repeated google.protobuf.MethodDescriptorProto method = 2;
653
+ */
654
+ this.method = [];
655
+ proto2.util.initPartial(data, this);
656
+ }
657
+ static fromBinary(bytes, options) {
658
+ return new ServiceDescriptorProto().fromBinary(bytes, options);
659
+ }
660
+ static fromJson(jsonValue, options) {
661
+ return new ServiceDescriptorProto().fromJson(jsonValue, options);
662
+ }
663
+ static fromJsonString(jsonString, options) {
664
+ return new ServiceDescriptorProto().fromJsonString(jsonString, options);
665
+ }
666
+ static equals(a, b) {
667
+ return proto2.util.equals(ServiceDescriptorProto, a, b);
668
+ }
987
669
  }
988
670
  ServiceDescriptorProto.runtime = proto2;
989
671
  ServiceDescriptorProto.typeName = "google.protobuf.ServiceDescriptorProto";
990
672
  ServiceDescriptorProto.fields = proto2.util.newFieldList(() => [
991
- {
992
- no: 1,
993
- name: "name",
994
- kind: "scalar",
995
- T: 9 /* ScalarType.STRING */,
996
- opt: true,
997
- },
998
- {
999
- no: 2,
1000
- name: "method",
1001
- kind: "message",
1002
- T: MethodDescriptorProto,
1003
- repeated: true,
1004
- },
1005
- { no: 3, name: "options", kind: "message", T: ServiceOptions, opt: true },
673
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
674
+ { no: 2, name: "method", kind: "message", T: MethodDescriptorProto, repeated: true },
675
+ { no: 3, name: "options", kind: "message", T: ServiceOptions, opt: true },
1006
676
  ]);
1007
677
  /**
1008
678
  * Describes a method of a service.
@@ -1010,252 +680,85 @@ ServiceDescriptorProto.fields = proto2.util.newFieldList(() => [
1010
680
  * @generated from message google.protobuf.MethodDescriptorProto
1011
681
  */
1012
682
  export class MethodDescriptorProto extends Message {
1013
- constructor(data) {
1014
- super();
1015
- proto2.util.initPartial(data, this);
1016
- }
1017
- static fromBinary(bytes, options) {
1018
- return new MethodDescriptorProto().fromBinary(bytes, options);
1019
- }
1020
- static fromJson(jsonValue, options) {
1021
- return new MethodDescriptorProto().fromJson(jsonValue, options);
1022
- }
1023
- static fromJsonString(jsonString, options) {
1024
- return new MethodDescriptorProto().fromJsonString(jsonString, options);
1025
- }
1026
- static equals(a, b) {
1027
- return proto2.util.equals(MethodDescriptorProto, a, b);
1028
- }
683
+ constructor(data) {
684
+ super();
685
+ proto2.util.initPartial(data, this);
686
+ }
687
+ static fromBinary(bytes, options) {
688
+ return new MethodDescriptorProto().fromBinary(bytes, options);
689
+ }
690
+ static fromJson(jsonValue, options) {
691
+ return new MethodDescriptorProto().fromJson(jsonValue, options);
692
+ }
693
+ static fromJsonString(jsonString, options) {
694
+ return new MethodDescriptorProto().fromJsonString(jsonString, options);
695
+ }
696
+ static equals(a, b) {
697
+ return proto2.util.equals(MethodDescriptorProto, a, b);
698
+ }
1029
699
  }
1030
700
  MethodDescriptorProto.runtime = proto2;
1031
701
  MethodDescriptorProto.typeName = "google.protobuf.MethodDescriptorProto";
1032
702
  MethodDescriptorProto.fields = proto2.util.newFieldList(() => [
1033
- {
1034
- no: 1,
1035
- name: "name",
1036
- kind: "scalar",
1037
- T: 9 /* ScalarType.STRING */,
1038
- opt: true,
1039
- },
1040
- {
1041
- no: 2,
1042
- name: "input_type",
1043
- kind: "scalar",
1044
- T: 9 /* ScalarType.STRING */,
1045
- opt: true,
1046
- },
1047
- {
1048
- no: 3,
1049
- name: "output_type",
1050
- kind: "scalar",
1051
- T: 9 /* ScalarType.STRING */,
1052
- opt: true,
1053
- },
1054
- { no: 4, name: "options", kind: "message", T: MethodOptions, opt: true },
1055
- {
1056
- no: 5,
1057
- name: "client_streaming",
1058
- kind: "scalar",
1059
- T: 8 /* ScalarType.BOOL */,
1060
- opt: true,
1061
- default: false,
1062
- },
1063
- {
1064
- no: 6,
1065
- name: "server_streaming",
1066
- kind: "scalar",
1067
- T: 8 /* ScalarType.BOOL */,
1068
- opt: true,
1069
- default: false,
1070
- },
703
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
704
+ { no: 2, name: "input_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
705
+ { no: 3, name: "output_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
706
+ { no: 4, name: "options", kind: "message", T: MethodOptions, opt: true },
707
+ { no: 5, name: "client_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
708
+ { no: 6, name: "server_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1071
709
  ]);
1072
710
  /**
1073
711
  * @generated from message google.protobuf.FileOptions
1074
712
  */
1075
713
  export class FileOptions extends Message {
1076
- constructor(data) {
1077
- super();
1078
- /**
1079
- * The parser stores options it doesn't recognize here.
1080
- * See the documentation for the "Options" section above.
1081
- *
1082
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1083
- */
1084
- this.uninterpretedOption = [];
1085
- proto2.util.initPartial(data, this);
1086
- }
1087
- static fromBinary(bytes, options) {
1088
- return new FileOptions().fromBinary(bytes, options);
1089
- }
1090
- static fromJson(jsonValue, options) {
1091
- return new FileOptions().fromJson(jsonValue, options);
1092
- }
1093
- static fromJsonString(jsonString, options) {
1094
- return new FileOptions().fromJsonString(jsonString, options);
1095
- }
1096
- static equals(a, b) {
1097
- return proto2.util.equals(FileOptions, a, b);
1098
- }
714
+ constructor(data) {
715
+ super();
716
+ /**
717
+ * The parser stores options it doesn't recognize here.
718
+ * See the documentation for the "Options" section above.
719
+ *
720
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
721
+ */
722
+ this.uninterpretedOption = [];
723
+ proto2.util.initPartial(data, this);
724
+ }
725
+ static fromBinary(bytes, options) {
726
+ return new FileOptions().fromBinary(bytes, options);
727
+ }
728
+ static fromJson(jsonValue, options) {
729
+ return new FileOptions().fromJson(jsonValue, options);
730
+ }
731
+ static fromJsonString(jsonString, options) {
732
+ return new FileOptions().fromJsonString(jsonString, options);
733
+ }
734
+ static equals(a, b) {
735
+ return proto2.util.equals(FileOptions, a, b);
736
+ }
1099
737
  }
1100
738
  FileOptions.runtime = proto2;
1101
739
  FileOptions.typeName = "google.protobuf.FileOptions";
1102
740
  FileOptions.fields = proto2.util.newFieldList(() => [
1103
- {
1104
- no: 1,
1105
- name: "java_package",
1106
- kind: "scalar",
1107
- T: 9 /* ScalarType.STRING */,
1108
- opt: true,
1109
- },
1110
- {
1111
- no: 8,
1112
- name: "java_outer_classname",
1113
- kind: "scalar",
1114
- T: 9 /* ScalarType.STRING */,
1115
- opt: true,
1116
- },
1117
- {
1118
- no: 10,
1119
- name: "java_multiple_files",
1120
- kind: "scalar",
1121
- T: 8 /* ScalarType.BOOL */,
1122
- opt: true,
1123
- default: false,
1124
- },
1125
- {
1126
- no: 20,
1127
- name: "java_generate_equals_and_hash",
1128
- kind: "scalar",
1129
- T: 8 /* ScalarType.BOOL */,
1130
- opt: true,
1131
- },
1132
- {
1133
- no: 27,
1134
- name: "java_string_check_utf8",
1135
- kind: "scalar",
1136
- T: 8 /* ScalarType.BOOL */,
1137
- opt: true,
1138
- default: false,
1139
- },
1140
- {
1141
- no: 9,
1142
- name: "optimize_for",
1143
- kind: "enum",
1144
- T: proto2.getEnumType(FileOptions_OptimizeMode),
1145
- opt: true,
1146
- default: FileOptions_OptimizeMode.SPEED,
1147
- },
1148
- {
1149
- no: 11,
1150
- name: "go_package",
1151
- kind: "scalar",
1152
- T: 9 /* ScalarType.STRING */,
1153
- opt: true,
1154
- },
1155
- {
1156
- no: 16,
1157
- name: "cc_generic_services",
1158
- kind: "scalar",
1159
- T: 8 /* ScalarType.BOOL */,
1160
- opt: true,
1161
- default: false,
1162
- },
1163
- {
1164
- no: 17,
1165
- name: "java_generic_services",
1166
- kind: "scalar",
1167
- T: 8 /* ScalarType.BOOL */,
1168
- opt: true,
1169
- default: false,
1170
- },
1171
- {
1172
- no: 18,
1173
- name: "py_generic_services",
1174
- kind: "scalar",
1175
- T: 8 /* ScalarType.BOOL */,
1176
- opt: true,
1177
- default: false,
1178
- },
1179
- {
1180
- no: 42,
1181
- name: "php_generic_services",
1182
- kind: "scalar",
1183
- T: 8 /* ScalarType.BOOL */,
1184
- opt: true,
1185
- default: false,
1186
- },
1187
- {
1188
- no: 23,
1189
- name: "deprecated",
1190
- kind: "scalar",
1191
- T: 8 /* ScalarType.BOOL */,
1192
- opt: true,
1193
- default: false,
1194
- },
1195
- {
1196
- no: 31,
1197
- name: "cc_enable_arenas",
1198
- kind: "scalar",
1199
- T: 8 /* ScalarType.BOOL */,
1200
- opt: true,
1201
- default: true,
1202
- },
1203
- {
1204
- no: 36,
1205
- name: "objc_class_prefix",
1206
- kind: "scalar",
1207
- T: 9 /* ScalarType.STRING */,
1208
- opt: true,
1209
- },
1210
- {
1211
- no: 37,
1212
- name: "csharp_namespace",
1213
- kind: "scalar",
1214
- T: 9 /* ScalarType.STRING */,
1215
- opt: true,
1216
- },
1217
- {
1218
- no: 39,
1219
- name: "swift_prefix",
1220
- kind: "scalar",
1221
- T: 9 /* ScalarType.STRING */,
1222
- opt: true,
1223
- },
1224
- {
1225
- no: 40,
1226
- name: "php_class_prefix",
1227
- kind: "scalar",
1228
- T: 9 /* ScalarType.STRING */,
1229
- opt: true,
1230
- },
1231
- {
1232
- no: 41,
1233
- name: "php_namespace",
1234
- kind: "scalar",
1235
- T: 9 /* ScalarType.STRING */,
1236
- opt: true,
1237
- },
1238
- {
1239
- no: 44,
1240
- name: "php_metadata_namespace",
1241
- kind: "scalar",
1242
- T: 9 /* ScalarType.STRING */,
1243
- opt: true,
1244
- },
1245
- {
1246
- no: 45,
1247
- name: "ruby_package",
1248
- kind: "scalar",
1249
- T: 9 /* ScalarType.STRING */,
1250
- opt: true,
1251
- },
1252
- {
1253
- no: 999,
1254
- name: "uninterpreted_option",
1255
- kind: "message",
1256
- T: UninterpretedOption,
1257
- repeated: true,
1258
- },
741
+ { no: 1, name: "java_package", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
742
+ { no: 8, name: "java_outer_classname", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
743
+ { no: 10, name: "java_multiple_files", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
744
+ { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
745
+ { no: 27, name: "java_string_check_utf8", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
746
+ { no: 9, name: "optimize_for", kind: "enum", T: proto2.getEnumType(FileOptions_OptimizeMode), opt: true, default: FileOptions_OptimizeMode.SPEED },
747
+ { no: 11, name: "go_package", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
748
+ { no: 16, name: "cc_generic_services", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
749
+ { no: 17, name: "java_generic_services", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
750
+ { no: 18, name: "py_generic_services", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
751
+ { no: 42, name: "php_generic_services", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
752
+ { no: 23, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
753
+ { no: 31, name: "cc_enable_arenas", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: true },
754
+ { no: 36, name: "objc_class_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
755
+ { no: 37, name: "csharp_namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
756
+ { no: 39, name: "swift_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
757
+ { no: 40, name: "php_class_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
758
+ { no: 41, name: "php_namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
759
+ { no: 44, name: "php_metadata_namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
760
+ { no: 45, name: "ruby_package", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
761
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1259
762
  ]);
1260
763
  /**
1261
764
  * Generated classes can be optimized for speed or code size.
@@ -1264,493 +767,328 @@ FileOptions.fields = proto2.util.newFieldList(() => [
1264
767
  */
1265
768
  export var FileOptions_OptimizeMode;
1266
769
  (function (FileOptions_OptimizeMode) {
1267
- /**
1268
- * Generate complete code for parsing, serialization,
1269
- *
1270
- * @generated from enum value: SPEED = 1;
1271
- */
1272
- FileOptions_OptimizeMode[(FileOptions_OptimizeMode["SPEED"] = 1)] = "SPEED";
1273
- /**
1274
- * etc.
1275
- *
1276
- * Use ReflectionOps to implement these methods.
1277
- *
1278
- * @generated from enum value: CODE_SIZE = 2;
1279
- */
1280
- FileOptions_OptimizeMode[(FileOptions_OptimizeMode["CODE_SIZE"] = 2)] =
1281
- "CODE_SIZE";
1282
- /**
1283
- * Generate code using MessageLite and the lite runtime.
1284
- *
1285
- * @generated from enum value: LITE_RUNTIME = 3;
1286
- */
1287
- FileOptions_OptimizeMode[(FileOptions_OptimizeMode["LITE_RUNTIME"] = 3)] =
1288
- "LITE_RUNTIME";
770
+ /**
771
+ * Generate complete code for parsing, serialization,
772
+ *
773
+ * @generated from enum value: SPEED = 1;
774
+ */
775
+ FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED";
776
+ /**
777
+ * etc.
778
+ *
779
+ * Use ReflectionOps to implement these methods.
780
+ *
781
+ * @generated from enum value: CODE_SIZE = 2;
782
+ */
783
+ FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE";
784
+ /**
785
+ * Generate code using MessageLite and the lite runtime.
786
+ *
787
+ * @generated from enum value: LITE_RUNTIME = 3;
788
+ */
789
+ FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME";
1289
790
  })(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {}));
1290
791
  // Retrieve enum metadata with: proto2.getEnumType(FileOptions_OptimizeMode)
1291
- proto2.util.setEnumType(
1292
- FileOptions_OptimizeMode,
1293
- "google.protobuf.FileOptions.OptimizeMode",
1294
- [
792
+ proto2.util.setEnumType(FileOptions_OptimizeMode, "google.protobuf.FileOptions.OptimizeMode", [
1295
793
  { no: 1, name: "SPEED" },
1296
794
  { no: 2, name: "CODE_SIZE" },
1297
795
  { no: 3, name: "LITE_RUNTIME" },
1298
- ]
1299
- );
796
+ ]);
1300
797
  /**
1301
798
  * @generated from message google.protobuf.MessageOptions
1302
799
  */
1303
800
  export class MessageOptions extends Message {
1304
- constructor(data) {
1305
- super();
1306
- /**
1307
- * The parser stores options it doesn't recognize here. See above.
1308
- *
1309
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1310
- */
1311
- this.uninterpretedOption = [];
1312
- proto2.util.initPartial(data, this);
1313
- }
1314
- static fromBinary(bytes, options) {
1315
- return new MessageOptions().fromBinary(bytes, options);
1316
- }
1317
- static fromJson(jsonValue, options) {
1318
- return new MessageOptions().fromJson(jsonValue, options);
1319
- }
1320
- static fromJsonString(jsonString, options) {
1321
- return new MessageOptions().fromJsonString(jsonString, options);
1322
- }
1323
- static equals(a, b) {
1324
- return proto2.util.equals(MessageOptions, a, b);
1325
- }
801
+ constructor(data) {
802
+ super();
803
+ /**
804
+ * The parser stores options it doesn't recognize here. See above.
805
+ *
806
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
807
+ */
808
+ this.uninterpretedOption = [];
809
+ proto2.util.initPartial(data, this);
810
+ }
811
+ static fromBinary(bytes, options) {
812
+ return new MessageOptions().fromBinary(bytes, options);
813
+ }
814
+ static fromJson(jsonValue, options) {
815
+ return new MessageOptions().fromJson(jsonValue, options);
816
+ }
817
+ static fromJsonString(jsonString, options) {
818
+ return new MessageOptions().fromJsonString(jsonString, options);
819
+ }
820
+ static equals(a, b) {
821
+ return proto2.util.equals(MessageOptions, a, b);
822
+ }
1326
823
  }
1327
824
  MessageOptions.runtime = proto2;
1328
825
  MessageOptions.typeName = "google.protobuf.MessageOptions";
1329
826
  MessageOptions.fields = proto2.util.newFieldList(() => [
1330
- {
1331
- no: 1,
1332
- name: "message_set_wire_format",
1333
- kind: "scalar",
1334
- T: 8 /* ScalarType.BOOL */,
1335
- opt: true,
1336
- default: false,
1337
- },
1338
- {
1339
- no: 2,
1340
- name: "no_standard_descriptor_accessor",
1341
- kind: "scalar",
1342
- T: 8 /* ScalarType.BOOL */,
1343
- opt: true,
1344
- default: false,
1345
- },
1346
- {
1347
- no: 3,
1348
- name: "deprecated",
1349
- kind: "scalar",
1350
- T: 8 /* ScalarType.BOOL */,
1351
- opt: true,
1352
- default: false,
1353
- },
1354
- {
1355
- no: 7,
1356
- name: "map_entry",
1357
- kind: "scalar",
1358
- T: 8 /* ScalarType.BOOL */,
1359
- opt: true,
1360
- },
1361
- {
1362
- no: 999,
1363
- name: "uninterpreted_option",
1364
- kind: "message",
1365
- T: UninterpretedOption,
1366
- repeated: true,
1367
- },
827
+ { no: 1, name: "message_set_wire_format", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
828
+ { no: 2, name: "no_standard_descriptor_accessor", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
829
+ { no: 3, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
830
+ { no: 7, name: "map_entry", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
831
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1368
832
  ]);
1369
833
  /**
1370
834
  * @generated from message google.protobuf.FieldOptions
1371
835
  */
1372
836
  export class FieldOptions extends Message {
1373
- constructor(data) {
1374
- super();
1375
- /**
1376
- * The parser stores options it doesn't recognize here. See above.
1377
- *
1378
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1379
- */
1380
- this.uninterpretedOption = [];
1381
- proto2.util.initPartial(data, this);
1382
- }
1383
- static fromBinary(bytes, options) {
1384
- return new FieldOptions().fromBinary(bytes, options);
1385
- }
1386
- static fromJson(jsonValue, options) {
1387
- return new FieldOptions().fromJson(jsonValue, options);
1388
- }
1389
- static fromJsonString(jsonString, options) {
1390
- return new FieldOptions().fromJsonString(jsonString, options);
1391
- }
1392
- static equals(a, b) {
1393
- return proto2.util.equals(FieldOptions, a, b);
1394
- }
837
+ constructor(data) {
838
+ super();
839
+ /**
840
+ * The parser stores options it doesn't recognize here. See above.
841
+ *
842
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
843
+ */
844
+ this.uninterpretedOption = [];
845
+ proto2.util.initPartial(data, this);
846
+ }
847
+ static fromBinary(bytes, options) {
848
+ return new FieldOptions().fromBinary(bytes, options);
849
+ }
850
+ static fromJson(jsonValue, options) {
851
+ return new FieldOptions().fromJson(jsonValue, options);
852
+ }
853
+ static fromJsonString(jsonString, options) {
854
+ return new FieldOptions().fromJsonString(jsonString, options);
855
+ }
856
+ static equals(a, b) {
857
+ return proto2.util.equals(FieldOptions, a, b);
858
+ }
1395
859
  }
1396
860
  FieldOptions.runtime = proto2;
1397
861
  FieldOptions.typeName = "google.protobuf.FieldOptions";
1398
862
  FieldOptions.fields = proto2.util.newFieldList(() => [
1399
- {
1400
- no: 1,
1401
- name: "ctype",
1402
- kind: "enum",
1403
- T: proto2.getEnumType(FieldOptions_CType),
1404
- opt: true,
1405
- default: FieldOptions_CType.STRING,
1406
- },
1407
- {
1408
- no: 2,
1409
- name: "packed",
1410
- kind: "scalar",
1411
- T: 8 /* ScalarType.BOOL */,
1412
- opt: true,
1413
- },
1414
- {
1415
- no: 6,
1416
- name: "jstype",
1417
- kind: "enum",
1418
- T: proto2.getEnumType(FieldOptions_JSType),
1419
- opt: true,
1420
- default: FieldOptions_JSType.JS_NORMAL,
1421
- },
1422
- {
1423
- no: 5,
1424
- name: "lazy",
1425
- kind: "scalar",
1426
- T: 8 /* ScalarType.BOOL */,
1427
- opt: true,
1428
- default: false,
1429
- },
1430
- {
1431
- no: 3,
1432
- name: "deprecated",
1433
- kind: "scalar",
1434
- T: 8 /* ScalarType.BOOL */,
1435
- opt: true,
1436
- default: false,
1437
- },
1438
- {
1439
- no: 10,
1440
- name: "weak",
1441
- kind: "scalar",
1442
- T: 8 /* ScalarType.BOOL */,
1443
- opt: true,
1444
- default: false,
1445
- },
1446
- {
1447
- no: 999,
1448
- name: "uninterpreted_option",
1449
- kind: "message",
1450
- T: UninterpretedOption,
1451
- repeated: true,
1452
- },
863
+ { no: 1, name: "ctype", kind: "enum", T: proto2.getEnumType(FieldOptions_CType), opt: true, default: FieldOptions_CType.STRING },
864
+ { no: 2, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
865
+ { no: 6, name: "jstype", kind: "enum", T: proto2.getEnumType(FieldOptions_JSType), opt: true, default: FieldOptions_JSType.JS_NORMAL },
866
+ { no: 5, name: "lazy", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
867
+ { no: 3, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
868
+ { no: 10, name: "weak", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
869
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1453
870
  ]);
1454
871
  /**
1455
872
  * @generated from enum google.protobuf.FieldOptions.CType
1456
873
  */
1457
874
  export var FieldOptions_CType;
1458
875
  (function (FieldOptions_CType) {
1459
- /**
1460
- * Default mode.
1461
- *
1462
- * @generated from enum value: STRING = 0;
1463
- */
1464
- FieldOptions_CType[(FieldOptions_CType["STRING"] = 0)] = "STRING";
1465
- /**
1466
- * @generated from enum value: CORD = 1;
1467
- */
1468
- FieldOptions_CType[(FieldOptions_CType["CORD"] = 1)] = "CORD";
1469
- /**
1470
- * @generated from enum value: STRING_PIECE = 2;
1471
- */
1472
- FieldOptions_CType[(FieldOptions_CType["STRING_PIECE"] = 2)] = "STRING_PIECE";
876
+ /**
877
+ * Default mode.
878
+ *
879
+ * @generated from enum value: STRING = 0;
880
+ */
881
+ FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING";
882
+ /**
883
+ * @generated from enum value: CORD = 1;
884
+ */
885
+ FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD";
886
+ /**
887
+ * @generated from enum value: STRING_PIECE = 2;
888
+ */
889
+ FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE";
1473
890
  })(FieldOptions_CType || (FieldOptions_CType = {}));
1474
891
  // Retrieve enum metadata with: proto2.getEnumType(FieldOptions_CType)
1475
- proto2.util.setEnumType(
1476
- FieldOptions_CType,
1477
- "google.protobuf.FieldOptions.CType",
1478
- [
892
+ proto2.util.setEnumType(FieldOptions_CType, "google.protobuf.FieldOptions.CType", [
1479
893
  { no: 0, name: "STRING" },
1480
894
  { no: 1, name: "CORD" },
1481
895
  { no: 2, name: "STRING_PIECE" },
1482
- ]
1483
- );
896
+ ]);
1484
897
  /**
1485
898
  * @generated from enum google.protobuf.FieldOptions.JSType
1486
899
  */
1487
900
  export var FieldOptions_JSType;
1488
901
  (function (FieldOptions_JSType) {
1489
- /**
1490
- * Use the default type.
1491
- *
1492
- * @generated from enum value: JS_NORMAL = 0;
1493
- */
1494
- FieldOptions_JSType[(FieldOptions_JSType["JS_NORMAL"] = 0)] = "JS_NORMAL";
1495
- /**
1496
- * Use JavaScript strings.
1497
- *
1498
- * @generated from enum value: JS_STRING = 1;
1499
- */
1500
- FieldOptions_JSType[(FieldOptions_JSType["JS_STRING"] = 1)] = "JS_STRING";
1501
- /**
1502
- * Use JavaScript numbers.
1503
- *
1504
- * @generated from enum value: JS_NUMBER = 2;
1505
- */
1506
- FieldOptions_JSType[(FieldOptions_JSType["JS_NUMBER"] = 2)] = "JS_NUMBER";
902
+ /**
903
+ * Use the default type.
904
+ *
905
+ * @generated from enum value: JS_NORMAL = 0;
906
+ */
907
+ FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL";
908
+ /**
909
+ * Use JavaScript strings.
910
+ *
911
+ * @generated from enum value: JS_STRING = 1;
912
+ */
913
+ FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING";
914
+ /**
915
+ * Use JavaScript numbers.
916
+ *
917
+ * @generated from enum value: JS_NUMBER = 2;
918
+ */
919
+ FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER";
1507
920
  })(FieldOptions_JSType || (FieldOptions_JSType = {}));
1508
921
  // Retrieve enum metadata with: proto2.getEnumType(FieldOptions_JSType)
1509
- proto2.util.setEnumType(
1510
- FieldOptions_JSType,
1511
- "google.protobuf.FieldOptions.JSType",
1512
- [
922
+ proto2.util.setEnumType(FieldOptions_JSType, "google.protobuf.FieldOptions.JSType", [
1513
923
  { no: 0, name: "JS_NORMAL" },
1514
924
  { no: 1, name: "JS_STRING" },
1515
925
  { no: 2, name: "JS_NUMBER" },
1516
- ]
1517
- );
926
+ ]);
1518
927
  /**
1519
928
  * @generated from message google.protobuf.OneofOptions
1520
929
  */
1521
930
  export class OneofOptions extends Message {
1522
- constructor(data) {
1523
- super();
1524
- /**
1525
- * The parser stores options it doesn't recognize here. See above.
1526
- *
1527
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1528
- */
1529
- this.uninterpretedOption = [];
1530
- proto2.util.initPartial(data, this);
1531
- }
1532
- static fromBinary(bytes, options) {
1533
- return new OneofOptions().fromBinary(bytes, options);
1534
- }
1535
- static fromJson(jsonValue, options) {
1536
- return new OneofOptions().fromJson(jsonValue, options);
1537
- }
1538
- static fromJsonString(jsonString, options) {
1539
- return new OneofOptions().fromJsonString(jsonString, options);
1540
- }
1541
- static equals(a, b) {
1542
- return proto2.util.equals(OneofOptions, a, b);
1543
- }
931
+ constructor(data) {
932
+ super();
933
+ /**
934
+ * The parser stores options it doesn't recognize here. See above.
935
+ *
936
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
937
+ */
938
+ this.uninterpretedOption = [];
939
+ proto2.util.initPartial(data, this);
940
+ }
941
+ static fromBinary(bytes, options) {
942
+ return new OneofOptions().fromBinary(bytes, options);
943
+ }
944
+ static fromJson(jsonValue, options) {
945
+ return new OneofOptions().fromJson(jsonValue, options);
946
+ }
947
+ static fromJsonString(jsonString, options) {
948
+ return new OneofOptions().fromJsonString(jsonString, options);
949
+ }
950
+ static equals(a, b) {
951
+ return proto2.util.equals(OneofOptions, a, b);
952
+ }
1544
953
  }
1545
954
  OneofOptions.runtime = proto2;
1546
955
  OneofOptions.typeName = "google.protobuf.OneofOptions";
1547
956
  OneofOptions.fields = proto2.util.newFieldList(() => [
1548
- {
1549
- no: 999,
1550
- name: "uninterpreted_option",
1551
- kind: "message",
1552
- T: UninterpretedOption,
1553
- repeated: true,
1554
- },
957
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1555
958
  ]);
1556
959
  /**
1557
960
  * @generated from message google.protobuf.EnumOptions
1558
961
  */
1559
962
  export class EnumOptions extends Message {
1560
- constructor(data) {
1561
- super();
1562
- /**
1563
- * The parser stores options it doesn't recognize here. See above.
1564
- *
1565
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1566
- */
1567
- this.uninterpretedOption = [];
1568
- proto2.util.initPartial(data, this);
1569
- }
1570
- static fromBinary(bytes, options) {
1571
- return new EnumOptions().fromBinary(bytes, options);
1572
- }
1573
- static fromJson(jsonValue, options) {
1574
- return new EnumOptions().fromJson(jsonValue, options);
1575
- }
1576
- static fromJsonString(jsonString, options) {
1577
- return new EnumOptions().fromJsonString(jsonString, options);
1578
- }
1579
- static equals(a, b) {
1580
- return proto2.util.equals(EnumOptions, a, b);
1581
- }
963
+ constructor(data) {
964
+ super();
965
+ /**
966
+ * The parser stores options it doesn't recognize here. See above.
967
+ *
968
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
969
+ */
970
+ this.uninterpretedOption = [];
971
+ proto2.util.initPartial(data, this);
972
+ }
973
+ static fromBinary(bytes, options) {
974
+ return new EnumOptions().fromBinary(bytes, options);
975
+ }
976
+ static fromJson(jsonValue, options) {
977
+ return new EnumOptions().fromJson(jsonValue, options);
978
+ }
979
+ static fromJsonString(jsonString, options) {
980
+ return new EnumOptions().fromJsonString(jsonString, options);
981
+ }
982
+ static equals(a, b) {
983
+ return proto2.util.equals(EnumOptions, a, b);
984
+ }
1582
985
  }
1583
986
  EnumOptions.runtime = proto2;
1584
987
  EnumOptions.typeName = "google.protobuf.EnumOptions";
1585
988
  EnumOptions.fields = proto2.util.newFieldList(() => [
1586
- {
1587
- no: 2,
1588
- name: "allow_alias",
1589
- kind: "scalar",
1590
- T: 8 /* ScalarType.BOOL */,
1591
- opt: true,
1592
- },
1593
- {
1594
- no: 3,
1595
- name: "deprecated",
1596
- kind: "scalar",
1597
- T: 8 /* ScalarType.BOOL */,
1598
- opt: true,
1599
- default: false,
1600
- },
1601
- {
1602
- no: 999,
1603
- name: "uninterpreted_option",
1604
- kind: "message",
1605
- T: UninterpretedOption,
1606
- repeated: true,
1607
- },
989
+ { no: 2, name: "allow_alias", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
990
+ { no: 3, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
991
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1608
992
  ]);
1609
993
  /**
1610
994
  * @generated from message google.protobuf.EnumValueOptions
1611
995
  */
1612
996
  export class EnumValueOptions extends Message {
1613
- constructor(data) {
1614
- super();
1615
- /**
1616
- * The parser stores options it doesn't recognize here. See above.
1617
- *
1618
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1619
- */
1620
- this.uninterpretedOption = [];
1621
- proto2.util.initPartial(data, this);
1622
- }
1623
- static fromBinary(bytes, options) {
1624
- return new EnumValueOptions().fromBinary(bytes, options);
1625
- }
1626
- static fromJson(jsonValue, options) {
1627
- return new EnumValueOptions().fromJson(jsonValue, options);
1628
- }
1629
- static fromJsonString(jsonString, options) {
1630
- return new EnumValueOptions().fromJsonString(jsonString, options);
1631
- }
1632
- static equals(a, b) {
1633
- return proto2.util.equals(EnumValueOptions, a, b);
1634
- }
997
+ constructor(data) {
998
+ super();
999
+ /**
1000
+ * The parser stores options it doesn't recognize here. See above.
1001
+ *
1002
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1003
+ */
1004
+ this.uninterpretedOption = [];
1005
+ proto2.util.initPartial(data, this);
1006
+ }
1007
+ static fromBinary(bytes, options) {
1008
+ return new EnumValueOptions().fromBinary(bytes, options);
1009
+ }
1010
+ static fromJson(jsonValue, options) {
1011
+ return new EnumValueOptions().fromJson(jsonValue, options);
1012
+ }
1013
+ static fromJsonString(jsonString, options) {
1014
+ return new EnumValueOptions().fromJsonString(jsonString, options);
1015
+ }
1016
+ static equals(a, b) {
1017
+ return proto2.util.equals(EnumValueOptions, a, b);
1018
+ }
1635
1019
  }
1636
1020
  EnumValueOptions.runtime = proto2;
1637
1021
  EnumValueOptions.typeName = "google.protobuf.EnumValueOptions";
1638
1022
  EnumValueOptions.fields = proto2.util.newFieldList(() => [
1639
- {
1640
- no: 1,
1641
- name: "deprecated",
1642
- kind: "scalar",
1643
- T: 8 /* ScalarType.BOOL */,
1644
- opt: true,
1645
- default: false,
1646
- },
1647
- {
1648
- no: 999,
1649
- name: "uninterpreted_option",
1650
- kind: "message",
1651
- T: UninterpretedOption,
1652
- repeated: true,
1653
- },
1023
+ { no: 1, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1024
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1654
1025
  ]);
1655
1026
  /**
1656
1027
  * @generated from message google.protobuf.ServiceOptions
1657
1028
  */
1658
1029
  export class ServiceOptions extends Message {
1659
- constructor(data) {
1660
- super();
1661
- /**
1662
- * The parser stores options it doesn't recognize here. See above.
1663
- *
1664
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1665
- */
1666
- this.uninterpretedOption = [];
1667
- proto2.util.initPartial(data, this);
1668
- }
1669
- static fromBinary(bytes, options) {
1670
- return new ServiceOptions().fromBinary(bytes, options);
1671
- }
1672
- static fromJson(jsonValue, options) {
1673
- return new ServiceOptions().fromJson(jsonValue, options);
1674
- }
1675
- static fromJsonString(jsonString, options) {
1676
- return new ServiceOptions().fromJsonString(jsonString, options);
1677
- }
1678
- static equals(a, b) {
1679
- return proto2.util.equals(ServiceOptions, a, b);
1680
- }
1030
+ constructor(data) {
1031
+ super();
1032
+ /**
1033
+ * The parser stores options it doesn't recognize here. See above.
1034
+ *
1035
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1036
+ */
1037
+ this.uninterpretedOption = [];
1038
+ proto2.util.initPartial(data, this);
1039
+ }
1040
+ static fromBinary(bytes, options) {
1041
+ return new ServiceOptions().fromBinary(bytes, options);
1042
+ }
1043
+ static fromJson(jsonValue, options) {
1044
+ return new ServiceOptions().fromJson(jsonValue, options);
1045
+ }
1046
+ static fromJsonString(jsonString, options) {
1047
+ return new ServiceOptions().fromJsonString(jsonString, options);
1048
+ }
1049
+ static equals(a, b) {
1050
+ return proto2.util.equals(ServiceOptions, a, b);
1051
+ }
1681
1052
  }
1682
1053
  ServiceOptions.runtime = proto2;
1683
1054
  ServiceOptions.typeName = "google.protobuf.ServiceOptions";
1684
1055
  ServiceOptions.fields = proto2.util.newFieldList(() => [
1685
- {
1686
- no: 33,
1687
- name: "deprecated",
1688
- kind: "scalar",
1689
- T: 8 /* ScalarType.BOOL */,
1690
- opt: true,
1691
- default: false,
1692
- },
1693
- {
1694
- no: 999,
1695
- name: "uninterpreted_option",
1696
- kind: "message",
1697
- T: UninterpretedOption,
1698
- repeated: true,
1699
- },
1056
+ { no: 33, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1057
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1700
1058
  ]);
1701
1059
  /**
1702
1060
  * @generated from message google.protobuf.MethodOptions
1703
1061
  */
1704
1062
  export class MethodOptions extends Message {
1705
- constructor(data) {
1706
- super();
1707
- /**
1708
- * The parser stores options it doesn't recognize here. See above.
1709
- *
1710
- * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1711
- */
1712
- this.uninterpretedOption = [];
1713
- proto2.util.initPartial(data, this);
1714
- }
1715
- static fromBinary(bytes, options) {
1716
- return new MethodOptions().fromBinary(bytes, options);
1717
- }
1718
- static fromJson(jsonValue, options) {
1719
- return new MethodOptions().fromJson(jsonValue, options);
1720
- }
1721
- static fromJsonString(jsonString, options) {
1722
- return new MethodOptions().fromJsonString(jsonString, options);
1723
- }
1724
- static equals(a, b) {
1725
- return proto2.util.equals(MethodOptions, a, b);
1726
- }
1063
+ constructor(data) {
1064
+ super();
1065
+ /**
1066
+ * The parser stores options it doesn't recognize here. See above.
1067
+ *
1068
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1069
+ */
1070
+ this.uninterpretedOption = [];
1071
+ proto2.util.initPartial(data, this);
1072
+ }
1073
+ static fromBinary(bytes, options) {
1074
+ return new MethodOptions().fromBinary(bytes, options);
1075
+ }
1076
+ static fromJson(jsonValue, options) {
1077
+ return new MethodOptions().fromJson(jsonValue, options);
1078
+ }
1079
+ static fromJsonString(jsonString, options) {
1080
+ return new MethodOptions().fromJsonString(jsonString, options);
1081
+ }
1082
+ static equals(a, b) {
1083
+ return proto2.util.equals(MethodOptions, a, b);
1084
+ }
1727
1085
  }
1728
1086
  MethodOptions.runtime = proto2;
1729
1087
  MethodOptions.typeName = "google.protobuf.MethodOptions";
1730
1088
  MethodOptions.fields = proto2.util.newFieldList(() => [
1731
- {
1732
- no: 33,
1733
- name: "deprecated",
1734
- kind: "scalar",
1735
- T: 8 /* ScalarType.BOOL */,
1736
- opt: true,
1737
- default: false,
1738
- },
1739
- {
1740
- no: 34,
1741
- name: "idempotency_level",
1742
- kind: "enum",
1743
- T: proto2.getEnumType(MethodOptions_IdempotencyLevel),
1744
- opt: true,
1745
- default: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
1746
- },
1747
- {
1748
- no: 999,
1749
- name: "uninterpreted_option",
1750
- kind: "message",
1751
- T: UninterpretedOption,
1752
- repeated: true,
1753
- },
1089
+ { no: 33, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1090
+ { no: 34, name: "idempotency_level", kind: "enum", T: proto2.getEnumType(MethodOptions_IdempotencyLevel), opt: true, default: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN },
1091
+ { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1754
1092
  ]);
1755
1093
  /**
1756
1094
  * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
@@ -1761,39 +1099,29 @@ MethodOptions.fields = proto2.util.newFieldList(() => [
1761
1099
  */
1762
1100
  export var MethodOptions_IdempotencyLevel;
1763
1101
  (function (MethodOptions_IdempotencyLevel) {
1764
- /**
1765
- * @generated from enum value: IDEMPOTENCY_UNKNOWN = 0;
1766
- */
1767
- MethodOptions_IdempotencyLevel[
1768
- (MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0)
1769
- ] = "IDEMPOTENCY_UNKNOWN";
1770
- /**
1771
- * implies idempotent
1772
- *
1773
- * @generated from enum value: NO_SIDE_EFFECTS = 1;
1774
- */
1775
- MethodOptions_IdempotencyLevel[
1776
- (MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1)
1777
- ] = "NO_SIDE_EFFECTS";
1778
- /**
1779
- * idempotent, but may have side effects
1780
- *
1781
- * @generated from enum value: IDEMPOTENT = 2;
1782
- */
1783
- MethodOptions_IdempotencyLevel[
1784
- (MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2)
1785
- ] = "IDEMPOTENT";
1102
+ /**
1103
+ * @generated from enum value: IDEMPOTENCY_UNKNOWN = 0;
1104
+ */
1105
+ MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN";
1106
+ /**
1107
+ * implies idempotent
1108
+ *
1109
+ * @generated from enum value: NO_SIDE_EFFECTS = 1;
1110
+ */
1111
+ MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS";
1112
+ /**
1113
+ * idempotent, but may have side effects
1114
+ *
1115
+ * @generated from enum value: IDEMPOTENT = 2;
1116
+ */
1117
+ MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT";
1786
1118
  })(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {}));
1787
1119
  // Retrieve enum metadata with: proto2.getEnumType(MethodOptions_IdempotencyLevel)
1788
- proto2.util.setEnumType(
1789
- MethodOptions_IdempotencyLevel,
1790
- "google.protobuf.MethodOptions.IdempotencyLevel",
1791
- [
1120
+ proto2.util.setEnumType(MethodOptions_IdempotencyLevel, "google.protobuf.MethodOptions.IdempotencyLevel", [
1792
1121
  { no: 0, name: "IDEMPOTENCY_UNKNOWN" },
1793
1122
  { no: 1, name: "NO_SIDE_EFFECTS" },
1794
1123
  { no: 2, name: "IDEMPOTENT" },
1795
- ]
1796
- );
1124
+ ]);
1797
1125
  /**
1798
1126
  * A message representing a option the parser does not recognize. This only
1799
1127
  * appears in options protos created by the compiler::Parser class.
@@ -1805,79 +1133,37 @@ proto2.util.setEnumType(
1805
1133
  * @generated from message google.protobuf.UninterpretedOption
1806
1134
  */
1807
1135
  export class UninterpretedOption extends Message {
1808
- constructor(data) {
1809
- super();
1810
- /**
1811
- * @generated from field: repeated google.protobuf.UninterpretedOption.NamePart name = 2;
1812
- */
1813
- this.name = [];
1814
- proto2.util.initPartial(data, this);
1815
- }
1816
- static fromBinary(bytes, options) {
1817
- return new UninterpretedOption().fromBinary(bytes, options);
1818
- }
1819
- static fromJson(jsonValue, options) {
1820
- return new UninterpretedOption().fromJson(jsonValue, options);
1821
- }
1822
- static fromJsonString(jsonString, options) {
1823
- return new UninterpretedOption().fromJsonString(jsonString, options);
1824
- }
1825
- static equals(a, b) {
1826
- return proto2.util.equals(UninterpretedOption, a, b);
1827
- }
1136
+ constructor(data) {
1137
+ super();
1138
+ /**
1139
+ * @generated from field: repeated google.protobuf.UninterpretedOption.NamePart name = 2;
1140
+ */
1141
+ this.name = [];
1142
+ proto2.util.initPartial(data, this);
1143
+ }
1144
+ static fromBinary(bytes, options) {
1145
+ return new UninterpretedOption().fromBinary(bytes, options);
1146
+ }
1147
+ static fromJson(jsonValue, options) {
1148
+ return new UninterpretedOption().fromJson(jsonValue, options);
1149
+ }
1150
+ static fromJsonString(jsonString, options) {
1151
+ return new UninterpretedOption().fromJsonString(jsonString, options);
1152
+ }
1153
+ static equals(a, b) {
1154
+ return proto2.util.equals(UninterpretedOption, a, b);
1155
+ }
1828
1156
  }
1829
1157
  UninterpretedOption.runtime = proto2;
1830
1158
  UninterpretedOption.typeName = "google.protobuf.UninterpretedOption";
1831
1159
  UninterpretedOption.fields = proto2.util.newFieldList(() => [
1832
- {
1833
- no: 2,
1834
- name: "name",
1835
- kind: "message",
1836
- T: UninterpretedOption_NamePart,
1837
- repeated: true,
1838
- },
1839
- {
1840
- no: 3,
1841
- name: "identifier_value",
1842
- kind: "scalar",
1843
- T: 9 /* ScalarType.STRING */,
1844
- opt: true,
1845
- },
1846
- {
1847
- no: 4,
1848
- name: "positive_int_value",
1849
- kind: "scalar",
1850
- T: 4 /* ScalarType.UINT64 */,
1851
- opt: true,
1852
- },
1853
- {
1854
- no: 5,
1855
- name: "negative_int_value",
1856
- kind: "scalar",
1857
- T: 3 /* ScalarType.INT64 */,
1858
- opt: true,
1859
- },
1860
- {
1861
- no: 6,
1862
- name: "double_value",
1863
- kind: "scalar",
1864
- T: 1 /* ScalarType.DOUBLE */,
1865
- opt: true,
1866
- },
1867
- {
1868
- no: 7,
1869
- name: "string_value",
1870
- kind: "scalar",
1871
- T: 12 /* ScalarType.BYTES */,
1872
- opt: true,
1873
- },
1874
- {
1875
- no: 8,
1876
- name: "aggregate_value",
1877
- kind: "scalar",
1878
- T: 9 /* ScalarType.STRING */,
1879
- opt: true,
1880
- },
1160
+ { no: 2, name: "name", kind: "message", T: UninterpretedOption_NamePart, repeated: true },
1161
+ { no: 3, name: "identifier_value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1162
+ { no: 4, name: "positive_int_value", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
1163
+ { no: 5, name: "negative_int_value", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
1164
+ { no: 6, name: "double_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1165
+ { no: 7, name: "string_value", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
1166
+ { no: 8, name: "aggregate_value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1881
1167
  ]);
1882
1168
  /**
1883
1169
  * The name of the uninterpreted option. Each string represents a segment in
@@ -1889,32 +1175,28 @@ UninterpretedOption.fields = proto2.util.newFieldList(() => [
1889
1175
  * @generated from message google.protobuf.UninterpretedOption.NamePart
1890
1176
  */
1891
1177
  export class UninterpretedOption_NamePart extends Message {
1892
- constructor(data) {
1893
- super();
1894
- proto2.util.initPartial(data, this);
1895
- }
1896
- static fromBinary(bytes, options) {
1897
- return new UninterpretedOption_NamePart().fromBinary(bytes, options);
1898
- }
1899
- static fromJson(jsonValue, options) {
1900
- return new UninterpretedOption_NamePart().fromJson(jsonValue, options);
1901
- }
1902
- static fromJsonString(jsonString, options) {
1903
- return new UninterpretedOption_NamePart().fromJsonString(
1904
- jsonString,
1905
- options
1906
- );
1907
- }
1908
- static equals(a, b) {
1909
- return proto2.util.equals(UninterpretedOption_NamePart, a, b);
1910
- }
1178
+ constructor(data) {
1179
+ super();
1180
+ proto2.util.initPartial(data, this);
1181
+ }
1182
+ static fromBinary(bytes, options) {
1183
+ return new UninterpretedOption_NamePart().fromBinary(bytes, options);
1184
+ }
1185
+ static fromJson(jsonValue, options) {
1186
+ return new UninterpretedOption_NamePart().fromJson(jsonValue, options);
1187
+ }
1188
+ static fromJsonString(jsonString, options) {
1189
+ return new UninterpretedOption_NamePart().fromJsonString(jsonString, options);
1190
+ }
1191
+ static equals(a, b) {
1192
+ return proto2.util.equals(UninterpretedOption_NamePart, a, b);
1193
+ }
1911
1194
  }
1912
1195
  UninterpretedOption_NamePart.runtime = proto2;
1913
- UninterpretedOption_NamePart.typeName =
1914
- "google.protobuf.UninterpretedOption.NamePart";
1196
+ UninterpretedOption_NamePart.typeName = "google.protobuf.UninterpretedOption.NamePart";
1915
1197
  UninterpretedOption_NamePart.fields = proto2.util.newFieldList(() => [
1916
- { no: 1, name: "name_part", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1917
- { no: 2, name: "is_extension", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1198
+ { no: 1, name: "name_part", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1199
+ { no: 2, name: "is_extension", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1918
1200
  ]);
1919
1201
  /**
1920
1202
  * Encapsulates information about the original source file from which a
@@ -1923,185 +1205,147 @@ UninterpretedOption_NamePart.fields = proto2.util.newFieldList(() => [
1923
1205
  * @generated from message google.protobuf.SourceCodeInfo
1924
1206
  */
1925
1207
  export class SourceCodeInfo extends Message {
1926
- constructor(data) {
1927
- super();
1928
- /**
1929
- * A Location identifies a piece of source code in a .proto file which
1930
- * corresponds to a particular definition. This information is intended
1931
- * to be useful to IDEs, code indexers, documentation generators, and similar
1932
- * tools.
1933
- *
1934
- * For example, say we have a file like:
1935
- * message Foo {
1936
- * optional string foo = 1;
1937
- * }
1938
- * Let's look at just the field definition:
1939
- * optional string foo = 1;
1940
- * ^ ^^ ^^ ^ ^^^
1941
- * a bc de f ghi
1942
- * We have the following locations:
1943
- * span path represents
1944
- * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1945
- * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1946
- * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1947
- * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1948
- * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1949
- *
1950
- * Notes:
1951
- * - A location may refer to a repeated field itself (i.e. not to any
1952
- * particular index within it). This is used whenever a set of elements are
1953
- * logically enclosed in a single code segment. For example, an entire
1954
- * extend block (possibly containing multiple extension definitions) will
1955
- * have an outer location whose path refers to the "extensions" repeated
1956
- * field without an index.
1957
- * - Multiple locations may have the same path. This happens when a single
1958
- * logical declaration is spread out across multiple places. The most
1959
- * obvious example is the "extend" block again -- there may be multiple
1960
- * extend blocks in the same scope, each of which will have the same path.
1961
- * - A location's span is not always a subset of its parent's span. For
1962
- * example, the "extendee" of an extension declaration appears at the
1963
- * beginning of the "extend" block and is shared by all extensions within
1964
- * the block.
1965
- * - Just because a location's span is a subset of some other location's span
1966
- * does not mean that it is a descendant. For example, a "group" defines
1967
- * both a type and a field in a single declaration. Thus, the locations
1968
- * corresponding to the type and field and their components will overlap.
1969
- * - Code which tries to interpret locations should probably be designed to
1970
- * ignore those that it doesn't understand, as more types of locations could
1971
- * be recorded in the future.
1972
- *
1973
- * @generated from field: repeated google.protobuf.SourceCodeInfo.Location location = 1;
1974
- */
1975
- this.location = [];
1976
- proto2.util.initPartial(data, this);
1977
- }
1978
- static fromBinary(bytes, options) {
1979
- return new SourceCodeInfo().fromBinary(bytes, options);
1980
- }
1981
- static fromJson(jsonValue, options) {
1982
- return new SourceCodeInfo().fromJson(jsonValue, options);
1983
- }
1984
- static fromJsonString(jsonString, options) {
1985
- return new SourceCodeInfo().fromJsonString(jsonString, options);
1986
- }
1987
- static equals(a, b) {
1988
- return proto2.util.equals(SourceCodeInfo, a, b);
1989
- }
1208
+ constructor(data) {
1209
+ super();
1210
+ /**
1211
+ * A Location identifies a piece of source code in a .proto file which
1212
+ * corresponds to a particular definition. This information is intended
1213
+ * to be useful to IDEs, code indexers, documentation generators, and similar
1214
+ * tools.
1215
+ *
1216
+ * For example, say we have a file like:
1217
+ * message Foo {
1218
+ * optional string foo = 1;
1219
+ * }
1220
+ * Let's look at just the field definition:
1221
+ * optional string foo = 1;
1222
+ * ^ ^^ ^^ ^ ^^^
1223
+ * a bc de f ghi
1224
+ * We have the following locations:
1225
+ * span path represents
1226
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1227
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1228
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1229
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1230
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1231
+ *
1232
+ * Notes:
1233
+ * - A location may refer to a repeated field itself (i.e. not to any
1234
+ * particular index within it). This is used whenever a set of elements are
1235
+ * logically enclosed in a single code segment. For example, an entire
1236
+ * extend block (possibly containing multiple extension definitions) will
1237
+ * have an outer location whose path refers to the "extensions" repeated
1238
+ * field without an index.
1239
+ * - Multiple locations may have the same path. This happens when a single
1240
+ * logical declaration is spread out across multiple places. The most
1241
+ * obvious example is the "extend" block again -- there may be multiple
1242
+ * extend blocks in the same scope, each of which will have the same path.
1243
+ * - A location's span is not always a subset of its parent's span. For
1244
+ * example, the "extendee" of an extension declaration appears at the
1245
+ * beginning of the "extend" block and is shared by all extensions within
1246
+ * the block.
1247
+ * - Just because a location's span is a subset of some other location's span
1248
+ * does not mean that it is a descendant. For example, a "group" defines
1249
+ * both a type and a field in a single declaration. Thus, the locations
1250
+ * corresponding to the type and field and their components will overlap.
1251
+ * - Code which tries to interpret locations should probably be designed to
1252
+ * ignore those that it doesn't understand, as more types of locations could
1253
+ * be recorded in the future.
1254
+ *
1255
+ * @generated from field: repeated google.protobuf.SourceCodeInfo.Location location = 1;
1256
+ */
1257
+ this.location = [];
1258
+ proto2.util.initPartial(data, this);
1259
+ }
1260
+ static fromBinary(bytes, options) {
1261
+ return new SourceCodeInfo().fromBinary(bytes, options);
1262
+ }
1263
+ static fromJson(jsonValue, options) {
1264
+ return new SourceCodeInfo().fromJson(jsonValue, options);
1265
+ }
1266
+ static fromJsonString(jsonString, options) {
1267
+ return new SourceCodeInfo().fromJsonString(jsonString, options);
1268
+ }
1269
+ static equals(a, b) {
1270
+ return proto2.util.equals(SourceCodeInfo, a, b);
1271
+ }
1990
1272
  }
1991
1273
  SourceCodeInfo.runtime = proto2;
1992
1274
  SourceCodeInfo.typeName = "google.protobuf.SourceCodeInfo";
1993
1275
  SourceCodeInfo.fields = proto2.util.newFieldList(() => [
1994
- {
1995
- no: 1,
1996
- name: "location",
1997
- kind: "message",
1998
- T: SourceCodeInfo_Location,
1999
- repeated: true,
2000
- },
1276
+ { no: 1, name: "location", kind: "message", T: SourceCodeInfo_Location, repeated: true },
2001
1277
  ]);
2002
1278
  /**
2003
1279
  * @generated from message google.protobuf.SourceCodeInfo.Location
2004
1280
  */
2005
1281
  export class SourceCodeInfo_Location extends Message {
2006
- constructor(data) {
2007
- super();
2008
- /**
2009
- * Identifies which part of the FileDescriptorProto was defined at this
2010
- * location.
2011
- *
2012
- * Each element is a field number or an index. They form a path from
2013
- * the root FileDescriptorProto to the place where the definition. For
2014
- * example, this path:
2015
- * [ 4, 3, 2, 7, 1 ]
2016
- * refers to:
2017
- * file.message_type(3) // 4, 3
2018
- * .field(7) // 2, 7
2019
- * .name() // 1
2020
- * This is because FileDescriptorProto.message_type has field number 4:
2021
- * repeated DescriptorProto message_type = 4;
2022
- * and DescriptorProto.field has field number 2:
2023
- * repeated FieldDescriptorProto field = 2;
2024
- * and FieldDescriptorProto.name has field number 1:
2025
- * optional string name = 1;
2026
- *
2027
- * Thus, the above path gives the location of a field name. If we removed
2028
- * the last element:
2029
- * [ 4, 3, 2, 7 ]
2030
- * this path refers to the whole field declaration (from the beginning
2031
- * of the label to the terminating semicolon).
2032
- *
2033
- * @generated from field: repeated int32 path = 1 [packed = true];
2034
- */
2035
- this.path = [];
2036
- /**
2037
- * Always has exactly three or four elements: start line, start column,
2038
- * end line (optional, otherwise assumed same as start line), end column.
2039
- * These are packed into a single field for efficiency. Note that line
2040
- * and column numbers are zero-based -- typically you will want to add
2041
- * 1 to each before displaying to a user.
2042
- *
2043
- * @generated from field: repeated int32 span = 2 [packed = true];
2044
- */
2045
- this.span = [];
2046
- /**
2047
- * @generated from field: repeated string leading_detached_comments = 6;
2048
- */
2049
- this.leadingDetachedComments = [];
2050
- proto2.util.initPartial(data, this);
2051
- }
2052
- static fromBinary(bytes, options) {
2053
- return new SourceCodeInfo_Location().fromBinary(bytes, options);
2054
- }
2055
- static fromJson(jsonValue, options) {
2056
- return new SourceCodeInfo_Location().fromJson(jsonValue, options);
2057
- }
2058
- static fromJsonString(jsonString, options) {
2059
- return new SourceCodeInfo_Location().fromJsonString(jsonString, options);
2060
- }
2061
- static equals(a, b) {
2062
- return proto2.util.equals(SourceCodeInfo_Location, a, b);
2063
- }
1282
+ constructor(data) {
1283
+ super();
1284
+ /**
1285
+ * Identifies which part of the FileDescriptorProto was defined at this
1286
+ * location.
1287
+ *
1288
+ * Each element is a field number or an index. They form a path from
1289
+ * the root FileDescriptorProto to the place where the definition. For
1290
+ * example, this path:
1291
+ * [ 4, 3, 2, 7, 1 ]
1292
+ * refers to:
1293
+ * file.message_type(3) // 4, 3
1294
+ * .field(7) // 2, 7
1295
+ * .name() // 1
1296
+ * This is because FileDescriptorProto.message_type has field number 4:
1297
+ * repeated DescriptorProto message_type = 4;
1298
+ * and DescriptorProto.field has field number 2:
1299
+ * repeated FieldDescriptorProto field = 2;
1300
+ * and FieldDescriptorProto.name has field number 1:
1301
+ * optional string name = 1;
1302
+ *
1303
+ * Thus, the above path gives the location of a field name. If we removed
1304
+ * the last element:
1305
+ * [ 4, 3, 2, 7 ]
1306
+ * this path refers to the whole field declaration (from the beginning
1307
+ * of the label to the terminating semicolon).
1308
+ *
1309
+ * @generated from field: repeated int32 path = 1 [packed = true];
1310
+ */
1311
+ this.path = [];
1312
+ /**
1313
+ * Always has exactly three or four elements: start line, start column,
1314
+ * end line (optional, otherwise assumed same as start line), end column.
1315
+ * These are packed into a single field for efficiency. Note that line
1316
+ * and column numbers are zero-based -- typically you will want to add
1317
+ * 1 to each before displaying to a user.
1318
+ *
1319
+ * @generated from field: repeated int32 span = 2 [packed = true];
1320
+ */
1321
+ this.span = [];
1322
+ /**
1323
+ * @generated from field: repeated string leading_detached_comments = 6;
1324
+ */
1325
+ this.leadingDetachedComments = [];
1326
+ proto2.util.initPartial(data, this);
1327
+ }
1328
+ static fromBinary(bytes, options) {
1329
+ return new SourceCodeInfo_Location().fromBinary(bytes, options);
1330
+ }
1331
+ static fromJson(jsonValue, options) {
1332
+ return new SourceCodeInfo_Location().fromJson(jsonValue, options);
1333
+ }
1334
+ static fromJsonString(jsonString, options) {
1335
+ return new SourceCodeInfo_Location().fromJsonString(jsonString, options);
1336
+ }
1337
+ static equals(a, b) {
1338
+ return proto2.util.equals(SourceCodeInfo_Location, a, b);
1339
+ }
2064
1340
  }
2065
1341
  SourceCodeInfo_Location.runtime = proto2;
2066
1342
  SourceCodeInfo_Location.typeName = "google.protobuf.SourceCodeInfo.Location";
2067
1343
  SourceCodeInfo_Location.fields = proto2.util.newFieldList(() => [
2068
- {
2069
- no: 1,
2070
- name: "path",
2071
- kind: "scalar",
2072
- T: 5 /* ScalarType.INT32 */,
2073
- repeated: true,
2074
- packed: true,
2075
- },
2076
- {
2077
- no: 2,
2078
- name: "span",
2079
- kind: "scalar",
2080
- T: 5 /* ScalarType.INT32 */,
2081
- repeated: true,
2082
- packed: true,
2083
- },
2084
- {
2085
- no: 3,
2086
- name: "leading_comments",
2087
- kind: "scalar",
2088
- T: 9 /* ScalarType.STRING */,
2089
- opt: true,
2090
- },
2091
- {
2092
- no: 4,
2093
- name: "trailing_comments",
2094
- kind: "scalar",
2095
- T: 9 /* ScalarType.STRING */,
2096
- opt: true,
2097
- },
2098
- {
2099
- no: 6,
2100
- name: "leading_detached_comments",
2101
- kind: "scalar",
2102
- T: 9 /* ScalarType.STRING */,
2103
- repeated: true,
2104
- },
1344
+ { no: 1, name: "path", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true, packed: true },
1345
+ { no: 2, name: "span", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true, packed: true },
1346
+ { no: 3, name: "leading_comments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1347
+ { no: 4, name: "trailing_comments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1348
+ { no: 6, name: "leading_detached_comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2105
1349
  ]);
2106
1350
  /**
2107
1351
  * Describes the relationship between generated code and its original source
@@ -2111,103 +1355,68 @@ SourceCodeInfo_Location.fields = proto2.util.newFieldList(() => [
2111
1355
  * @generated from message google.protobuf.GeneratedCodeInfo
2112
1356
  */
2113
1357
  export class GeneratedCodeInfo extends Message {
2114
- constructor(data) {
2115
- super();
2116
- /**
2117
- * An Annotation connects some span of text in generated code to an element
2118
- * of its generating .proto file.
2119
- *
2120
- * @generated from field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
2121
- */
2122
- this.annotation = [];
2123
- proto2.util.initPartial(data, this);
2124
- }
2125
- static fromBinary(bytes, options) {
2126
- return new GeneratedCodeInfo().fromBinary(bytes, options);
2127
- }
2128
- static fromJson(jsonValue, options) {
2129
- return new GeneratedCodeInfo().fromJson(jsonValue, options);
2130
- }
2131
- static fromJsonString(jsonString, options) {
2132
- return new GeneratedCodeInfo().fromJsonString(jsonString, options);
2133
- }
2134
- static equals(a, b) {
2135
- return proto2.util.equals(GeneratedCodeInfo, a, b);
2136
- }
1358
+ constructor(data) {
1359
+ super();
1360
+ /**
1361
+ * An Annotation connects some span of text in generated code to an element
1362
+ * of its generating .proto file.
1363
+ *
1364
+ * @generated from field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
1365
+ */
1366
+ this.annotation = [];
1367
+ proto2.util.initPartial(data, this);
1368
+ }
1369
+ static fromBinary(bytes, options) {
1370
+ return new GeneratedCodeInfo().fromBinary(bytes, options);
1371
+ }
1372
+ static fromJson(jsonValue, options) {
1373
+ return new GeneratedCodeInfo().fromJson(jsonValue, options);
1374
+ }
1375
+ static fromJsonString(jsonString, options) {
1376
+ return new GeneratedCodeInfo().fromJsonString(jsonString, options);
1377
+ }
1378
+ static equals(a, b) {
1379
+ return proto2.util.equals(GeneratedCodeInfo, a, b);
1380
+ }
2137
1381
  }
2138
1382
  GeneratedCodeInfo.runtime = proto2;
2139
1383
  GeneratedCodeInfo.typeName = "google.protobuf.GeneratedCodeInfo";
2140
1384
  GeneratedCodeInfo.fields = proto2.util.newFieldList(() => [
2141
- {
2142
- no: 1,
2143
- name: "annotation",
2144
- kind: "message",
2145
- T: GeneratedCodeInfo_Annotation,
2146
- repeated: true,
2147
- },
1385
+ { no: 1, name: "annotation", kind: "message", T: GeneratedCodeInfo_Annotation, repeated: true },
2148
1386
  ]);
2149
1387
  /**
2150
1388
  * @generated from message google.protobuf.GeneratedCodeInfo.Annotation
2151
1389
  */
2152
1390
  export class GeneratedCodeInfo_Annotation extends Message {
2153
- constructor(data) {
2154
- super();
2155
- /**
2156
- * Identifies the element in the original source .proto file. This field
2157
- * is formatted the same as SourceCodeInfo.Location.path.
2158
- *
2159
- * @generated from field: repeated int32 path = 1 [packed = true];
2160
- */
2161
- this.path = [];
2162
- proto2.util.initPartial(data, this);
2163
- }
2164
- static fromBinary(bytes, options) {
2165
- return new GeneratedCodeInfo_Annotation().fromBinary(bytes, options);
2166
- }
2167
- static fromJson(jsonValue, options) {
2168
- return new GeneratedCodeInfo_Annotation().fromJson(jsonValue, options);
2169
- }
2170
- static fromJsonString(jsonString, options) {
2171
- return new GeneratedCodeInfo_Annotation().fromJsonString(
2172
- jsonString,
2173
- options
2174
- );
2175
- }
2176
- static equals(a, b) {
2177
- return proto2.util.equals(GeneratedCodeInfo_Annotation, a, b);
2178
- }
1391
+ constructor(data) {
1392
+ super();
1393
+ /**
1394
+ * Identifies the element in the original source .proto file. This field
1395
+ * is formatted the same as SourceCodeInfo.Location.path.
1396
+ *
1397
+ * @generated from field: repeated int32 path = 1 [packed = true];
1398
+ */
1399
+ this.path = [];
1400
+ proto2.util.initPartial(data, this);
1401
+ }
1402
+ static fromBinary(bytes, options) {
1403
+ return new GeneratedCodeInfo_Annotation().fromBinary(bytes, options);
1404
+ }
1405
+ static fromJson(jsonValue, options) {
1406
+ return new GeneratedCodeInfo_Annotation().fromJson(jsonValue, options);
1407
+ }
1408
+ static fromJsonString(jsonString, options) {
1409
+ return new GeneratedCodeInfo_Annotation().fromJsonString(jsonString, options);
1410
+ }
1411
+ static equals(a, b) {
1412
+ return proto2.util.equals(GeneratedCodeInfo_Annotation, a, b);
1413
+ }
2179
1414
  }
2180
1415
  GeneratedCodeInfo_Annotation.runtime = proto2;
2181
- GeneratedCodeInfo_Annotation.typeName =
2182
- "google.protobuf.GeneratedCodeInfo.Annotation";
1416
+ GeneratedCodeInfo_Annotation.typeName = "google.protobuf.GeneratedCodeInfo.Annotation";
2183
1417
  GeneratedCodeInfo_Annotation.fields = proto2.util.newFieldList(() => [
2184
- {
2185
- no: 1,
2186
- name: "path",
2187
- kind: "scalar",
2188
- T: 5 /* ScalarType.INT32 */,
2189
- repeated: true,
2190
- packed: true,
2191
- },
2192
- {
2193
- no: 2,
2194
- name: "source_file",
2195
- kind: "scalar",
2196
- T: 9 /* ScalarType.STRING */,
2197
- opt: true,
2198
- },
2199
- {
2200
- no: 3,
2201
- name: "begin",
2202
- kind: "scalar",
2203
- T: 5 /* ScalarType.INT32 */,
2204
- opt: true,
2205
- },
2206
- {
2207
- no: 4,
2208
- name: "end",
2209
- kind: "scalar",
2210
- T: 5 /* ScalarType.INT32 */,
2211
- opt: true,
2212
- },
1418
+ { no: 1, name: "path", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true, packed: true },
1419
+ { no: 2, name: "source_file", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1420
+ { no: 3, name: "begin", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
1421
+ { no: 4, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
2213
1422
  ]);