@stream-io/video-client 0.0.1-alpha.7

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 (157) hide show
  1. package/LICENSE +219 -0
  2. package/README.md +14 -0
  3. package/dist/index.d.ts +23 -0
  4. package/dist/index.js +14663 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/src/Batcher.d.ts +12 -0
  7. package/dist/src/CallDropScheduler.d.ts +44 -0
  8. package/dist/src/StreamSfuClient.d.ts +25 -0
  9. package/dist/src/StreamVideoClient.d.ts +145 -0
  10. package/dist/src/__tests__/StreamVideoClient.test.d.ts +1 -0
  11. package/dist/src/config/defaultConfigs.d.ts +2 -0
  12. package/dist/src/config/types.d.ts +29 -0
  13. package/dist/src/coordinator/StreamCoordinatorClient.d.ts +19 -0
  14. package/dist/src/coordinator/connection/base64.d.ts +2 -0
  15. package/dist/src/coordinator/connection/client.d.ts +174 -0
  16. package/dist/src/coordinator/connection/connection.d.ts +139 -0
  17. package/dist/src/coordinator/connection/connection_fallback.d.ts +38 -0
  18. package/dist/src/coordinator/connection/errors.d.ts +16 -0
  19. package/dist/src/coordinator/connection/events.d.ts +7 -0
  20. package/dist/src/coordinator/connection/insights.d.ts +58 -0
  21. package/dist/src/coordinator/connection/signing.d.ts +30 -0
  22. package/dist/src/coordinator/connection/token_manager.d.ts +39 -0
  23. package/dist/src/coordinator/connection/types.d.ts +96 -0
  24. package/dist/src/coordinator/connection/utils.d.ts +25 -0
  25. package/dist/src/devices.d.ts +79 -0
  26. package/dist/src/events/call.d.ts +26 -0
  27. package/dist/src/events/internal.d.ts +8 -0
  28. package/dist/src/events/participant.d.ts +21 -0
  29. package/dist/src/events/speaker.d.ts +10 -0
  30. package/dist/src/gen/coordinator/index.d.ts +1664 -0
  31. package/dist/src/gen/google/protobuf/descriptor.d.ts +1650 -0
  32. package/dist/src/gen/google/protobuf/duration.d.ts +113 -0
  33. package/dist/src/gen/google/protobuf/struct.d.ts +184 -0
  34. package/dist/src/gen/google/protobuf/timestamp.d.ts +158 -0
  35. package/dist/src/gen/video/coordinator/broadcast_v1/broadcast.d.ts +66 -0
  36. package/dist/src/gen/video/coordinator/call_v1/call.d.ts +254 -0
  37. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.d.ts +351 -0
  38. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.d.ts +1488 -0
  39. package/dist/src/gen/video/coordinator/client_v1_rpc/envelopes.d.ts +143 -0
  40. package/dist/src/gen/video/coordinator/client_v1_rpc/websocket.d.ts +292 -0
  41. package/dist/src/gen/video/coordinator/edge_v1/edge.d.ts +183 -0
  42. package/dist/src/gen/video/coordinator/event_v1/event.d.ts +411 -0
  43. package/dist/src/gen/video/coordinator/geofence_v1/geofence.d.ts +63 -0
  44. package/dist/src/gen/video/coordinator/member_v1/member.d.ts +59 -0
  45. package/dist/src/gen/video/coordinator/participant_v1/participant.d.ts +103 -0
  46. package/dist/src/gen/video/coordinator/push_v1/push.d.ts +240 -0
  47. package/dist/src/gen/video/coordinator/stat_v1/stat.d.ts +308 -0
  48. package/dist/src/gen/video/coordinator/user_v1/user.d.ts +112 -0
  49. package/dist/src/gen/video/coordinator/utils_v1/utils.d.ts +47 -0
  50. package/dist/src/gen/video/sfu/event/events.d.ts +736 -0
  51. package/dist/src/gen/video/sfu/models/models.d.ts +460 -0
  52. package/dist/src/gen/video/sfu/signal_rpc/signal.client.d.ts +89 -0
  53. package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +320 -0
  54. package/dist/src/helpers/browsers.d.ts +8 -0
  55. package/dist/src/helpers/sound-detector.d.ts +34 -0
  56. package/dist/src/rpc/createClient.d.ts +10 -0
  57. package/dist/src/rpc/index.d.ts +2 -0
  58. package/dist/src/rpc/latency.d.ts +9 -0
  59. package/dist/src/rtc/Call.d.ts +180 -0
  60. package/dist/src/rtc/CallMetadata.d.ts +9 -0
  61. package/dist/src/rtc/Dispatcher.d.ts +9 -0
  62. package/dist/src/rtc/IceTrickleBuffer.d.ts +11 -0
  63. package/dist/src/rtc/callEventHandlers.d.ts +5 -0
  64. package/dist/src/rtc/codecs.d.ts +2 -0
  65. package/dist/src/rtc/helpers/iceCandidate.d.ts +2 -0
  66. package/dist/src/rtc/helpers/tracks.d.ts +3 -0
  67. package/dist/src/rtc/publisher.d.ts +53 -0
  68. package/dist/src/rtc/signal.d.ts +5 -0
  69. package/dist/src/rtc/subscriber.d.ts +7 -0
  70. package/dist/src/rtc/types.d.ts +84 -0
  71. package/dist/src/rtc/videoLayers.d.ts +17 -0
  72. package/dist/src/stats/coordinator-stats-reporter.d.ts +10 -0
  73. package/dist/src/stats/state-store-stats-reporter.d.ts +57 -0
  74. package/dist/src/stats/types.d.ts +42 -0
  75. package/dist/src/store/index.d.ts +2 -0
  76. package/dist/src/store/rxUtils.d.ts +18 -0
  77. package/dist/src/store/stateStore.d.ts +182 -0
  78. package/generate-openapi.sh +32 -0
  79. package/index.ts +30 -0
  80. package/openapitools.json +7 -0
  81. package/package.json +54 -0
  82. package/rollup.config.mjs +48 -0
  83. package/src/Batcher.ts +43 -0
  84. package/src/CallDropScheduler.ts +192 -0
  85. package/src/StreamSfuClient.ts +185 -0
  86. package/src/StreamVideoClient.ts +487 -0
  87. package/src/__tests__/StreamVideoClient.test.ts +83 -0
  88. package/src/config/defaultConfigs.ts +15 -0
  89. package/src/config/types.ts +30 -0
  90. package/src/coordinator/StreamCoordinatorClient.ts +111 -0
  91. package/src/coordinator/connection/base64.ts +80 -0
  92. package/src/coordinator/connection/client.ts +815 -0
  93. package/src/coordinator/connection/connection.ts +750 -0
  94. package/src/coordinator/connection/connection_fallback.ts +239 -0
  95. package/src/coordinator/connection/errors.ts +70 -0
  96. package/src/coordinator/connection/events.ts +10 -0
  97. package/src/coordinator/connection/insights.ts +88 -0
  98. package/src/coordinator/connection/signing.ts +104 -0
  99. package/src/coordinator/connection/token_manager.ts +160 -0
  100. package/src/coordinator/connection/types.ts +120 -0
  101. package/src/coordinator/connection/utils.ts +148 -0
  102. package/src/devices.ts +266 -0
  103. package/src/events/call.ts +166 -0
  104. package/src/events/internal.ts +47 -0
  105. package/src/events/participant.ts +97 -0
  106. package/src/events/speaker.ts +62 -0
  107. package/src/gen/coordinator/index.ts +1653 -0
  108. package/src/gen/google/protobuf/descriptor.ts +3466 -0
  109. package/src/gen/google/protobuf/duration.ts +232 -0
  110. package/src/gen/google/protobuf/struct.ts +481 -0
  111. package/src/gen/google/protobuf/timestamp.ts +291 -0
  112. package/src/gen/video/coordinator/broadcast_v1/broadcast.ts +154 -0
  113. package/src/gen/video/coordinator/call_v1/call.ts +651 -0
  114. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.ts +463 -0
  115. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.ts +3819 -0
  116. package/src/gen/video/coordinator/client_v1_rpc/envelopes.ts +424 -0
  117. package/src/gen/video/coordinator/client_v1_rpc/websocket.ts +719 -0
  118. package/src/gen/video/coordinator/edge_v1/edge.ts +532 -0
  119. package/src/gen/video/coordinator/event_v1/event.ts +1171 -0
  120. package/src/gen/video/coordinator/geofence_v1/geofence.ts +128 -0
  121. package/src/gen/video/coordinator/member_v1/member.ts +138 -0
  122. package/src/gen/video/coordinator/participant_v1/participant.ts +261 -0
  123. package/src/gen/video/coordinator/push_v1/push.ts +651 -0
  124. package/src/gen/video/coordinator/stat_v1/stat.ts +656 -0
  125. package/src/gen/video/coordinator/user_v1/user.ts +277 -0
  126. package/src/gen/video/coordinator/utils_v1/utils.ts +98 -0
  127. package/src/gen/video/sfu/event/events.ts +1962 -0
  128. package/src/gen/video/sfu/models/models.ts +1062 -0
  129. package/src/gen/video/sfu/signal_rpc/signal.client.ts +108 -0
  130. package/src/gen/video/sfu/signal_rpc/signal.ts +906 -0
  131. package/src/helpers/browsers.ts +13 -0
  132. package/src/helpers/sound-detector.ts +85 -0
  133. package/src/rpc/createClient.ts +50 -0
  134. package/src/rpc/index.ts +2 -0
  135. package/src/rpc/latency.ts +43 -0
  136. package/src/rtc/Call.ts +585 -0
  137. package/src/rtc/CallMetadata.ts +24 -0
  138. package/src/rtc/Dispatcher.ts +46 -0
  139. package/src/rtc/IceTrickleBuffer.ts +21 -0
  140. package/src/rtc/callEventHandlers.ts +37 -0
  141. package/src/rtc/codecs.ts +61 -0
  142. package/src/rtc/helpers/iceCandidate.ts +16 -0
  143. package/src/rtc/helpers/tracks.ts +18 -0
  144. package/src/rtc/publisher.ts +305 -0
  145. package/src/rtc/signal.ts +34 -0
  146. package/src/rtc/subscriber.ts +85 -0
  147. package/src/rtc/types.ts +105 -0
  148. package/src/rtc/videoLayers.ts +103 -0
  149. package/src/stats/coordinator-stats-reporter.ts +167 -0
  150. package/src/stats/state-store-stats-reporter.ts +364 -0
  151. package/src/stats/types.ts +46 -0
  152. package/src/store/index.ts +2 -0
  153. package/src/store/rxUtils.ts +42 -0
  154. package/src/store/stateStore.ts +341 -0
  155. package/tsconfig.json +25 -0
  156. package/typedoc.json +11 -0
  157. package/vite.config.ts +11 -0
@@ -0,0 +1,3466 @@
1
+ /* eslint-disable */
2
+ // @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
3
+ // @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2)
4
+ // tslint:disable
5
+ //
6
+ // Protocol Buffers - Google's data interchange format
7
+ // Copyright 2008 Google Inc. All rights reserved.
8
+ // https://developers.google.com/protocol-buffers/
9
+ //
10
+ // Redistribution and use in source and binary forms, with or without
11
+ // modification, are permitted provided that the following conditions are
12
+ // met:
13
+ //
14
+ // * Redistributions of source code must retain the above copyright
15
+ // notice, this list of conditions and the following disclaimer.
16
+ // * Redistributions in binary form must reproduce the above
17
+ // copyright notice, this list of conditions and the following disclaimer
18
+ // in the documentation and/or other materials provided with the
19
+ // distribution.
20
+ // * Neither the name of Google Inc. nor the names of its
21
+ // contributors may be used to endorse or promote products derived from
22
+ // this software without specific prior written permission.
23
+ //
24
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ //
36
+ //
37
+ // Author: kenton@google.com (Kenton Varda)
38
+ // Based on original Protocol Buffers design by
39
+ // Sanjay Ghemawat, Jeff Dean, and others.
40
+ //
41
+ // The messages in this file describe the definitions found in .proto files.
42
+ // A valid .proto file can be translated directly to a FileDescriptorProto
43
+ // without any other information (e.g. without reading its imports).
44
+ //
45
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
46
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
47
+ import { WireType } from "@protobuf-ts/runtime";
48
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
49
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
50
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
51
+ import type { PartialMessage } from "@protobuf-ts/runtime";
52
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
53
+ import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
54
+ import { MessageType } from "@protobuf-ts/runtime";
55
+ /**
56
+ * The protocol compiler can output a FileDescriptorSet containing the .proto
57
+ * files it parses.
58
+ *
59
+ * @generated from protobuf message google.protobuf.FileDescriptorSet
60
+ */
61
+ export interface FileDescriptorSet {
62
+ /**
63
+ * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1;
64
+ */
65
+ file: FileDescriptorProto[];
66
+ }
67
+ /**
68
+ * Describes a complete .proto file.
69
+ *
70
+ * @generated from protobuf message google.protobuf.FileDescriptorProto
71
+ */
72
+ export interface FileDescriptorProto {
73
+ /**
74
+ * @generated from protobuf field: optional string name = 1;
75
+ */
76
+ name?: string; // file name, relative to root of source tree
77
+ /**
78
+ * @generated from protobuf field: optional string package = 2;
79
+ */
80
+ package?: string; // e.g. "foo", "foo.bar", etc.
81
+ /**
82
+ * Names of files imported by this file.
83
+ *
84
+ * @generated from protobuf field: repeated string dependency = 3;
85
+ */
86
+ dependency: string[];
87
+ /**
88
+ * Indexes of the public imported files in the dependency list above.
89
+ *
90
+ * @generated from protobuf field: repeated int32 public_dependency = 10;
91
+ */
92
+ publicDependency: number[];
93
+ /**
94
+ * Indexes of the weak imported files in the dependency list.
95
+ * For Google-internal migration only. Do not use.
96
+ *
97
+ * @generated from protobuf field: repeated int32 weak_dependency = 11;
98
+ */
99
+ weakDependency: number[];
100
+ /**
101
+ * All top-level definitions in this file.
102
+ *
103
+ * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4;
104
+ */
105
+ messageType: DescriptorProto[];
106
+ /**
107
+ * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5;
108
+ */
109
+ enumType: EnumDescriptorProto[];
110
+ /**
111
+ * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6;
112
+ */
113
+ service: ServiceDescriptorProto[];
114
+ /**
115
+ * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7;
116
+ */
117
+ extension: FieldDescriptorProto[];
118
+ /**
119
+ * @generated from protobuf field: optional google.protobuf.FileOptions options = 8;
120
+ */
121
+ options?: FileOptions;
122
+ /**
123
+ * This field contains optional information about the original source code.
124
+ * You may safely remove this entire field without harming runtime
125
+ * functionality of the descriptors -- the information is needed only by
126
+ * development tools.
127
+ *
128
+ * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9;
129
+ */
130
+ sourceCodeInfo?: SourceCodeInfo;
131
+ /**
132
+ * The syntax of the proto file.
133
+ * The supported values are "proto2" and "proto3".
134
+ *
135
+ * @generated from protobuf field: optional string syntax = 12;
136
+ */
137
+ syntax?: string;
138
+ }
139
+ /**
140
+ * Describes a message type.
141
+ *
142
+ * @generated from protobuf message google.protobuf.DescriptorProto
143
+ */
144
+ export interface DescriptorProto {
145
+ /**
146
+ * @generated from protobuf field: optional string name = 1;
147
+ */
148
+ name?: string;
149
+ /**
150
+ * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2;
151
+ */
152
+ field: FieldDescriptorProto[];
153
+ /**
154
+ * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6;
155
+ */
156
+ extension: FieldDescriptorProto[];
157
+ /**
158
+ * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3;
159
+ */
160
+ nestedType: DescriptorProto[];
161
+ /**
162
+ * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4;
163
+ */
164
+ enumType: EnumDescriptorProto[];
165
+ /**
166
+ * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
167
+ */
168
+ extensionRange: DescriptorProto_ExtensionRange[];
169
+ /**
170
+ * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8;
171
+ */
172
+ oneofDecl: OneofDescriptorProto[];
173
+ /**
174
+ * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7;
175
+ */
176
+ options?: MessageOptions;
177
+ /**
178
+ * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
179
+ */
180
+ reservedRange: DescriptorProto_ReservedRange[];
181
+ /**
182
+ * Reserved field names, which may not be used by fields in the same message.
183
+ * A given name may only be reserved once.
184
+ *
185
+ * @generated from protobuf field: repeated string reserved_name = 10;
186
+ */
187
+ reservedName: string[];
188
+ }
189
+ /**
190
+ * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange
191
+ */
192
+ export interface DescriptorProto_ExtensionRange {
193
+ /**
194
+ * @generated from protobuf field: optional int32 start = 1;
195
+ */
196
+ start?: number; // Inclusive.
197
+ /**
198
+ * @generated from protobuf field: optional int32 end = 2;
199
+ */
200
+ end?: number; // Exclusive.
201
+ /**
202
+ * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3;
203
+ */
204
+ options?: ExtensionRangeOptions;
205
+ }
206
+ /**
207
+ * Range of reserved tag numbers. Reserved tag numbers may not be used by
208
+ * fields or extension ranges in the same message. Reserved ranges may
209
+ * not overlap.
210
+ *
211
+ * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange
212
+ */
213
+ export interface DescriptorProto_ReservedRange {
214
+ /**
215
+ * @generated from protobuf field: optional int32 start = 1;
216
+ */
217
+ start?: number; // Inclusive.
218
+ /**
219
+ * @generated from protobuf field: optional int32 end = 2;
220
+ */
221
+ end?: number; // Exclusive.
222
+ }
223
+ /**
224
+ * @generated from protobuf message google.protobuf.ExtensionRangeOptions
225
+ */
226
+ export interface ExtensionRangeOptions {
227
+ /**
228
+ * The parser stores options it doesn't recognize here. See above.
229
+ *
230
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
231
+ */
232
+ uninterpretedOption: UninterpretedOption[];
233
+ }
234
+ /**
235
+ * Describes a field within a message.
236
+ *
237
+ * @generated from protobuf message google.protobuf.FieldDescriptorProto
238
+ */
239
+ export interface FieldDescriptorProto {
240
+ /**
241
+ * @generated from protobuf field: optional string name = 1;
242
+ */
243
+ name?: string;
244
+ /**
245
+ * @generated from protobuf field: optional int32 number = 3;
246
+ */
247
+ number?: number;
248
+ /**
249
+ * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4;
250
+ */
251
+ label?: FieldDescriptorProto_Label;
252
+ /**
253
+ * If type_name is set, this need not be set. If both this and type_name
254
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
255
+ *
256
+ * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5;
257
+ */
258
+ type?: FieldDescriptorProto_Type;
259
+ /**
260
+ * For message and enum types, this is the name of the type. If the name
261
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
262
+ * rules are used to find the type (i.e. first the nested types within this
263
+ * message are searched, then within the parent, on up to the root
264
+ * namespace).
265
+ *
266
+ * @generated from protobuf field: optional string type_name = 6;
267
+ */
268
+ typeName?: string;
269
+ /**
270
+ * For extensions, this is the name of the type being extended. It is
271
+ * resolved in the same manner as type_name.
272
+ *
273
+ * @generated from protobuf field: optional string extendee = 2;
274
+ */
275
+ extendee?: string;
276
+ /**
277
+ * For numeric types, contains the original text representation of the value.
278
+ * For booleans, "true" or "false".
279
+ * For strings, contains the default text contents (not escaped in any way).
280
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
281
+ *
282
+ * @generated from protobuf field: optional string default_value = 7;
283
+ */
284
+ defaultValue?: string;
285
+ /**
286
+ * If set, gives the index of a oneof in the containing type's oneof_decl
287
+ * list. This field is a member of that oneof.
288
+ *
289
+ * @generated from protobuf field: optional int32 oneof_index = 9;
290
+ */
291
+ oneofIndex?: number;
292
+ /**
293
+ * JSON name of this field. The value is set by protocol compiler. If the
294
+ * user has set a "json_name" option on this field, that option's value
295
+ * will be used. Otherwise, it's deduced from the field's name by converting
296
+ * it to camelCase.
297
+ *
298
+ * @generated from protobuf field: optional string json_name = 10;
299
+ */
300
+ jsonName?: string;
301
+ /**
302
+ * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8;
303
+ */
304
+ options?: FieldOptions;
305
+ /**
306
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
307
+ * tracks presence regardless of field type.
308
+ *
309
+ * When proto3_optional is true, this field must be belong to a oneof to
310
+ * signal to old proto3 clients that presence is tracked for this field. This
311
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
312
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
313
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
314
+ * oneofs must be ordered after all "real" oneofs.
315
+ *
316
+ * For message fields, proto3_optional doesn't create any semantic change,
317
+ * since non-repeated message fields always track presence. However it still
318
+ * indicates the semantic detail of whether the user wrote "optional" or not.
319
+ * This can be useful for round-tripping the .proto file. For consistency we
320
+ * give message fields a synthetic oneof also, even though it is not required
321
+ * to track presence. This is especially important because the parser can't
322
+ * tell if a field is a message or an enum, so it must always create a
323
+ * synthetic oneof.
324
+ *
325
+ * Proto2 optional fields do not set this flag, because they already indicate
326
+ * optional with `LABEL_OPTIONAL`.
327
+ *
328
+ * @generated from protobuf field: optional bool proto3_optional = 17;
329
+ */
330
+ proto3Optional?: boolean;
331
+ }
332
+ /**
333
+ * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type
334
+ */
335
+ export enum FieldDescriptorProto_Type {
336
+ /**
337
+ * @generated synthetic value - protobuf-ts requires all enums to have a 0 value
338
+ */
339
+ UNSPECIFIED$ = 0,
340
+ /**
341
+ * 0 is reserved for errors.
342
+ * Order is weird for historical reasons.
343
+ *
344
+ * @generated from protobuf enum value: TYPE_DOUBLE = 1;
345
+ */
346
+ DOUBLE = 1,
347
+ /**
348
+ * @generated from protobuf enum value: TYPE_FLOAT = 2;
349
+ */
350
+ FLOAT = 2,
351
+ /**
352
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
353
+ * negative values are likely.
354
+ *
355
+ * @generated from protobuf enum value: TYPE_INT64 = 3;
356
+ */
357
+ INT64 = 3,
358
+ /**
359
+ * @generated from protobuf enum value: TYPE_UINT64 = 4;
360
+ */
361
+ UINT64 = 4,
362
+ /**
363
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
364
+ * negative values are likely.
365
+ *
366
+ * @generated from protobuf enum value: TYPE_INT32 = 5;
367
+ */
368
+ INT32 = 5,
369
+ /**
370
+ * @generated from protobuf enum value: TYPE_FIXED64 = 6;
371
+ */
372
+ FIXED64 = 6,
373
+ /**
374
+ * @generated from protobuf enum value: TYPE_FIXED32 = 7;
375
+ */
376
+ FIXED32 = 7,
377
+ /**
378
+ * @generated from protobuf enum value: TYPE_BOOL = 8;
379
+ */
380
+ BOOL = 8,
381
+ /**
382
+ * @generated from protobuf enum value: TYPE_STRING = 9;
383
+ */
384
+ STRING = 9,
385
+ /**
386
+ * Tag-delimited aggregate.
387
+ * Group type is deprecated and not supported in proto3. However, Proto3
388
+ * implementations should still be able to parse the group wire format and
389
+ * treat group fields as unknown fields.
390
+ *
391
+ * @generated from protobuf enum value: TYPE_GROUP = 10;
392
+ */
393
+ GROUP = 10,
394
+ /**
395
+ * Length-delimited aggregate.
396
+ *
397
+ * @generated from protobuf enum value: TYPE_MESSAGE = 11;
398
+ */
399
+ MESSAGE = 11,
400
+ /**
401
+ * New in version 2.
402
+ *
403
+ * @generated from protobuf enum value: TYPE_BYTES = 12;
404
+ */
405
+ BYTES = 12,
406
+ /**
407
+ * @generated from protobuf enum value: TYPE_UINT32 = 13;
408
+ */
409
+ UINT32 = 13,
410
+ /**
411
+ * @generated from protobuf enum value: TYPE_ENUM = 14;
412
+ */
413
+ ENUM = 14,
414
+ /**
415
+ * @generated from protobuf enum value: TYPE_SFIXED32 = 15;
416
+ */
417
+ SFIXED32 = 15,
418
+ /**
419
+ * @generated from protobuf enum value: TYPE_SFIXED64 = 16;
420
+ */
421
+ SFIXED64 = 16,
422
+ /**
423
+ * Uses ZigZag encoding.
424
+ *
425
+ * @generated from protobuf enum value: TYPE_SINT32 = 17;
426
+ */
427
+ SINT32 = 17,
428
+ /**
429
+ * Uses ZigZag encoding.
430
+ *
431
+ * @generated from protobuf enum value: TYPE_SINT64 = 18;
432
+ */
433
+ SINT64 = 18
434
+ }
435
+ /**
436
+ * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label
437
+ */
438
+ export enum FieldDescriptorProto_Label {
439
+ /**
440
+ * @generated synthetic value - protobuf-ts requires all enums to have a 0 value
441
+ */
442
+ UNSPECIFIED$ = 0,
443
+ /**
444
+ * 0 is reserved for errors
445
+ *
446
+ * @generated from protobuf enum value: LABEL_OPTIONAL = 1;
447
+ */
448
+ OPTIONAL = 1,
449
+ /**
450
+ * @generated from protobuf enum value: LABEL_REQUIRED = 2;
451
+ */
452
+ REQUIRED = 2,
453
+ /**
454
+ * @generated from protobuf enum value: LABEL_REPEATED = 3;
455
+ */
456
+ REPEATED = 3
457
+ }
458
+ /**
459
+ * Describes a oneof.
460
+ *
461
+ * @generated from protobuf message google.protobuf.OneofDescriptorProto
462
+ */
463
+ export interface OneofDescriptorProto {
464
+ /**
465
+ * @generated from protobuf field: optional string name = 1;
466
+ */
467
+ name?: string;
468
+ /**
469
+ * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2;
470
+ */
471
+ options?: OneofOptions;
472
+ }
473
+ /**
474
+ * Describes an enum type.
475
+ *
476
+ * @generated from protobuf message google.protobuf.EnumDescriptorProto
477
+ */
478
+ export interface EnumDescriptorProto {
479
+ /**
480
+ * @generated from protobuf field: optional string name = 1;
481
+ */
482
+ name?: string;
483
+ /**
484
+ * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2;
485
+ */
486
+ value: EnumValueDescriptorProto[];
487
+ /**
488
+ * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3;
489
+ */
490
+ options?: EnumOptions;
491
+ /**
492
+ * Range of reserved numeric values. Reserved numeric values may not be used
493
+ * by enum values in the same enum declaration. Reserved ranges may not
494
+ * overlap.
495
+ *
496
+ * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
497
+ */
498
+ reservedRange: EnumDescriptorProto_EnumReservedRange[];
499
+ /**
500
+ * Reserved enum value names, which may not be reused. A given name may only
501
+ * be reserved once.
502
+ *
503
+ * @generated from protobuf field: repeated string reserved_name = 5;
504
+ */
505
+ reservedName: string[];
506
+ }
507
+ /**
508
+ * Range of reserved numeric values. Reserved values may not be used by
509
+ * entries in the same enum. Reserved ranges may not overlap.
510
+ *
511
+ * Note that this is distinct from DescriptorProto.ReservedRange in that it
512
+ * is inclusive such that it can appropriately represent the entire int32
513
+ * domain.
514
+ *
515
+ * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange
516
+ */
517
+ export interface EnumDescriptorProto_EnumReservedRange {
518
+ /**
519
+ * @generated from protobuf field: optional int32 start = 1;
520
+ */
521
+ start?: number; // Inclusive.
522
+ /**
523
+ * @generated from protobuf field: optional int32 end = 2;
524
+ */
525
+ end?: number; // Inclusive.
526
+ }
527
+ /**
528
+ * Describes a value within an enum.
529
+ *
530
+ * @generated from protobuf message google.protobuf.EnumValueDescriptorProto
531
+ */
532
+ export interface EnumValueDescriptorProto {
533
+ /**
534
+ * @generated from protobuf field: optional string name = 1;
535
+ */
536
+ name?: string;
537
+ /**
538
+ * @generated from protobuf field: optional int32 number = 2;
539
+ */
540
+ number?: number;
541
+ /**
542
+ * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3;
543
+ */
544
+ options?: EnumValueOptions;
545
+ }
546
+ /**
547
+ * Describes a service.
548
+ *
549
+ * @generated from protobuf message google.protobuf.ServiceDescriptorProto
550
+ */
551
+ export interface ServiceDescriptorProto {
552
+ /**
553
+ * @generated from protobuf field: optional string name = 1;
554
+ */
555
+ name?: string;
556
+ /**
557
+ * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2;
558
+ */
559
+ method: MethodDescriptorProto[];
560
+ /**
561
+ * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3;
562
+ */
563
+ options?: ServiceOptions;
564
+ }
565
+ /**
566
+ * Describes a method of a service.
567
+ *
568
+ * @generated from protobuf message google.protobuf.MethodDescriptorProto
569
+ */
570
+ export interface MethodDescriptorProto {
571
+ /**
572
+ * @generated from protobuf field: optional string name = 1;
573
+ */
574
+ name?: string;
575
+ /**
576
+ * Input and output type names. These are resolved in the same way as
577
+ * FieldDescriptorProto.type_name, but must refer to a message type.
578
+ *
579
+ * @generated from protobuf field: optional string input_type = 2;
580
+ */
581
+ inputType?: string;
582
+ /**
583
+ * @generated from protobuf field: optional string output_type = 3;
584
+ */
585
+ outputType?: string;
586
+ /**
587
+ * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4;
588
+ */
589
+ options?: MethodOptions;
590
+ /**
591
+ * Identifies if client streams multiple client messages
592
+ *
593
+ * @generated from protobuf field: optional bool client_streaming = 5;
594
+ */
595
+ clientStreaming?: boolean;
596
+ /**
597
+ * Identifies if server streams multiple server messages
598
+ *
599
+ * @generated from protobuf field: optional bool server_streaming = 6;
600
+ */
601
+ serverStreaming?: boolean;
602
+ }
603
+ // ===================================================================
604
+ // Options
605
+
606
+ // Each of the definitions above may have "options" attached. These are
607
+ // just annotations which may cause code to be generated slightly differently
608
+ // or may contain hints for code that manipulates protocol messages.
609
+ //
610
+ // Clients may define custom options as extensions of the *Options messages.
611
+ // These extensions may not yet be known at parsing time, so the parser cannot
612
+ // store the values in them. Instead it stores them in a field in the *Options
613
+ // message called uninterpreted_option. This field must have the same name
614
+ // across all *Options messages. We then use this field to populate the
615
+ // extensions when we build a descriptor, at which point all protos have been
616
+ // parsed and so all extensions are known.
617
+ //
618
+ // Extension numbers for custom options may be chosen as follows:
619
+ // * For options which will only be used within a single application or
620
+ // organization, or for experimental options, use field numbers 50000
621
+ // through 99999. It is up to you to ensure that you do not use the
622
+ // same number for multiple options.
623
+ // * For options which will be published and used publicly by multiple
624
+ // independent entities, e-mail protobuf-global-extension-registry@google.com
625
+ // to reserve extension numbers. Simply provide your project name (e.g.
626
+ // Objective-C plugin) and your project website (if available) -- there's no
627
+ // need to explain how you intend to use them. Usually you only need one
628
+ // extension number. You can declare multiple options with only one extension
629
+ // number by putting them in a sub-message. See the Custom Options section of
630
+ // the docs for examples:
631
+ // https://developers.google.com/protocol-buffers/docs/proto#options
632
+ // If this turns out to be popular, a web service will be set up
633
+ // to automatically assign option numbers.
634
+
635
+ /**
636
+ * @generated from protobuf message google.protobuf.FileOptions
637
+ */
638
+ export interface FileOptions {
639
+ /**
640
+ * Sets the Java package where classes generated from this .proto will be
641
+ * placed. By default, the proto package is used, but this is often
642
+ * inappropriate because proto packages do not normally start with backwards
643
+ * domain names.
644
+ *
645
+ * @generated from protobuf field: optional string java_package = 1;
646
+ */
647
+ javaPackage?: string;
648
+ /**
649
+ * Controls the name of the wrapper Java class generated for the .proto file.
650
+ * That class will always contain the .proto file's getDescriptor() method as
651
+ * well as any top-level extensions defined in the .proto file.
652
+ * If java_multiple_files is disabled, then all the other classes from the
653
+ * .proto file will be nested inside the single wrapper outer class.
654
+ *
655
+ * @generated from protobuf field: optional string java_outer_classname = 8;
656
+ */
657
+ javaOuterClassname?: string;
658
+ /**
659
+ * If enabled, then the Java code generator will generate a separate .java
660
+ * file for each top-level message, enum, and service defined in the .proto
661
+ * file. Thus, these types will *not* be nested inside the wrapper class
662
+ * named by java_outer_classname. However, the wrapper class will still be
663
+ * generated to contain the file's getDescriptor() method as well as any
664
+ * top-level extensions defined in the file.
665
+ *
666
+ * @generated from protobuf field: optional bool java_multiple_files = 10;
667
+ */
668
+ javaMultipleFiles?: boolean;
669
+ /**
670
+ * This option does nothing.
671
+ *
672
+ * @deprecated
673
+ * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true];
674
+ */
675
+ javaGenerateEqualsAndHash?: boolean;
676
+ /**
677
+ * If set true, then the Java2 code generator will generate code that
678
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
679
+ * byte sequence to a string field.
680
+ * Message reflection will do the same.
681
+ * However, an extension field still accepts non-UTF-8 byte sequences.
682
+ * This option has no effect on when used with the lite runtime.
683
+ *
684
+ * @generated from protobuf field: optional bool java_string_check_utf8 = 27;
685
+ */
686
+ javaStringCheckUtf8?: boolean;
687
+ /**
688
+ * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9;
689
+ */
690
+ optimizeFor?: FileOptions_OptimizeMode;
691
+ /**
692
+ * Sets the Go package where structs generated from this .proto will be
693
+ * placed. If omitted, the Go package will be derived from the following:
694
+ * - The basename of the package import path, if provided.
695
+ * - Otherwise, the package statement in the .proto file, if present.
696
+ * - Otherwise, the basename of the .proto file, without extension.
697
+ *
698
+ * @generated from protobuf field: optional string go_package = 11;
699
+ */
700
+ goPackage?: string;
701
+ /**
702
+ * Should generic services be generated in each language? "Generic" services
703
+ * are not specific to any particular RPC system. They are generated by the
704
+ * main code generators in each language (without additional plugins).
705
+ * Generic services were the only kind of service generation supported by
706
+ * early versions of google.protobuf.
707
+ *
708
+ * Generic services are now considered deprecated in favor of using plugins
709
+ * that generate code specific to your particular RPC system. Therefore,
710
+ * these default to false. Old code which depends on generic services should
711
+ * explicitly set them to true.
712
+ *
713
+ * @generated from protobuf field: optional bool cc_generic_services = 16;
714
+ */
715
+ ccGenericServices?: boolean;
716
+ /**
717
+ * @generated from protobuf field: optional bool java_generic_services = 17;
718
+ */
719
+ javaGenericServices?: boolean;
720
+ /**
721
+ * @generated from protobuf field: optional bool py_generic_services = 18;
722
+ */
723
+ pyGenericServices?: boolean;
724
+ /**
725
+ * @generated from protobuf field: optional bool php_generic_services = 42;
726
+ */
727
+ phpGenericServices?: boolean;
728
+ /**
729
+ * Is this file deprecated?
730
+ * Depending on the target platform, this can emit Deprecated annotations
731
+ * for everything in the file, or it will be completely ignored; in the very
732
+ * least, this is a formalization for deprecating files.
733
+ *
734
+ * @generated from protobuf field: optional bool deprecated = 23;
735
+ */
736
+ deprecated?: boolean;
737
+ /**
738
+ * Enables the use of arenas for the proto messages in this file. This applies
739
+ * only to generated classes for C++.
740
+ *
741
+ * @generated from protobuf field: optional bool cc_enable_arenas = 31;
742
+ */
743
+ ccEnableArenas?: boolean;
744
+ /**
745
+ * Sets the objective c class prefix which is prepended to all objective c
746
+ * generated classes from this .proto. There is no default.
747
+ *
748
+ * @generated from protobuf field: optional string objc_class_prefix = 36;
749
+ */
750
+ objcClassPrefix?: string;
751
+ /**
752
+ * Namespace for generated classes; defaults to the package.
753
+ *
754
+ * @generated from protobuf field: optional string csharp_namespace = 37;
755
+ */
756
+ csharpNamespace?: string;
757
+ /**
758
+ * By default Swift generators will take the proto package and CamelCase it
759
+ * replacing '.' with underscore and use that to prefix the types/symbols
760
+ * defined. When this options is provided, they will use this value instead
761
+ * to prefix the types/symbols defined.
762
+ *
763
+ * @generated from protobuf field: optional string swift_prefix = 39;
764
+ */
765
+ swiftPrefix?: string;
766
+ /**
767
+ * Sets the php class prefix which is prepended to all php generated classes
768
+ * from this .proto. Default is empty.
769
+ *
770
+ * @generated from protobuf field: optional string php_class_prefix = 40;
771
+ */
772
+ phpClassPrefix?: string;
773
+ /**
774
+ * Use this option to change the namespace of php generated classes. Default
775
+ * is empty. When this option is empty, the package name will be used for
776
+ * determining the namespace.
777
+ *
778
+ * @generated from protobuf field: optional string php_namespace = 41;
779
+ */
780
+ phpNamespace?: string;
781
+ /**
782
+ * Use this option to change the namespace of php generated metadata classes.
783
+ * Default is empty. When this option is empty, the proto file name will be
784
+ * used for determining the namespace.
785
+ *
786
+ * @generated from protobuf field: optional string php_metadata_namespace = 44;
787
+ */
788
+ phpMetadataNamespace?: string;
789
+ /**
790
+ * Use this option to change the package of ruby generated classes. Default
791
+ * is empty. When this option is not set, the package name will be used for
792
+ * determining the ruby package.
793
+ *
794
+ * @generated from protobuf field: optional string ruby_package = 45;
795
+ */
796
+ rubyPackage?: string;
797
+ /**
798
+ * The parser stores options it doesn't recognize here.
799
+ * See the documentation for the "Options" section above.
800
+ *
801
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
802
+ */
803
+ uninterpretedOption: UninterpretedOption[];
804
+ }
805
+ /**
806
+ * Generated classes can be optimized for speed or code size.
807
+ *
808
+ * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode
809
+ */
810
+ export enum FileOptions_OptimizeMode {
811
+ /**
812
+ * @generated synthetic value - protobuf-ts requires all enums to have a 0 value
813
+ */
814
+ UNSPECIFIED$ = 0,
815
+ /**
816
+ * Generate complete code for parsing, serialization,
817
+ *
818
+ * @generated from protobuf enum value: SPEED = 1;
819
+ */
820
+ SPEED = 1,
821
+ /**
822
+ * etc.
823
+ *
824
+ * Use ReflectionOps to implement these methods.
825
+ *
826
+ * @generated from protobuf enum value: CODE_SIZE = 2;
827
+ */
828
+ CODE_SIZE = 2,
829
+ /**
830
+ * Generate code using MessageLite and the lite runtime.
831
+ *
832
+ * @generated from protobuf enum value: LITE_RUNTIME = 3;
833
+ */
834
+ LITE_RUNTIME = 3
835
+ }
836
+ /**
837
+ * @generated from protobuf message google.protobuf.MessageOptions
838
+ */
839
+ export interface MessageOptions {
840
+ /**
841
+ * Set true to use the old proto1 MessageSet wire format for extensions.
842
+ * This is provided for backwards-compatibility with the MessageSet wire
843
+ * format. You should not use this for any other reason: It's less
844
+ * efficient, has fewer features, and is more complicated.
845
+ *
846
+ * The message must be defined exactly as follows:
847
+ * message Foo {
848
+ * option message_set_wire_format = true;
849
+ * extensions 4 to max;
850
+ * }
851
+ * Note that the message cannot have any defined fields; MessageSets only
852
+ * have extensions.
853
+ *
854
+ * All extensions of your type must be singular messages; e.g. they cannot
855
+ * be int32s, enums, or repeated messages.
856
+ *
857
+ * Because this is an option, the above two restrictions are not enforced by
858
+ * the protocol compiler.
859
+ *
860
+ * @generated from protobuf field: optional bool message_set_wire_format = 1;
861
+ */
862
+ messageSetWireFormat?: boolean;
863
+ /**
864
+ * Disables the generation of the standard "descriptor()" accessor, which can
865
+ * conflict with a field of the same name. This is meant to make migration
866
+ * from proto1 easier; new code should avoid fields named "descriptor".
867
+ *
868
+ * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2;
869
+ */
870
+ noStandardDescriptorAccessor?: boolean;
871
+ /**
872
+ * Is this message deprecated?
873
+ * Depending on the target platform, this can emit Deprecated annotations
874
+ * for the message, or it will be completely ignored; in the very least,
875
+ * this is a formalization for deprecating messages.
876
+ *
877
+ * @generated from protobuf field: optional bool deprecated = 3;
878
+ */
879
+ deprecated?: boolean;
880
+ /**
881
+ * Whether the message is an automatically generated map entry type for the
882
+ * maps field.
883
+ *
884
+ * For maps fields:
885
+ * map<KeyType, ValueType> map_field = 1;
886
+ * The parsed descriptor looks like:
887
+ * message MapFieldEntry {
888
+ * option map_entry = true;
889
+ * optional KeyType key = 1;
890
+ * optional ValueType value = 2;
891
+ * }
892
+ * repeated MapFieldEntry map_field = 1;
893
+ *
894
+ * Implementations may choose not to generate the map_entry=true message, but
895
+ * use a native map in the target language to hold the keys and values.
896
+ * The reflection APIs in such implementations still need to work as
897
+ * if the field is a repeated message field.
898
+ *
899
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
900
+ * instead. The option should only be implicitly set by the proto compiler
901
+ * parser.
902
+ *
903
+ * @generated from protobuf field: optional bool map_entry = 7;
904
+ */
905
+ mapEntry?: boolean;
906
+ /**
907
+ * The parser stores options it doesn't recognize here. See above.
908
+ *
909
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
910
+ */
911
+ uninterpretedOption: UninterpretedOption[];
912
+ }
913
+ /**
914
+ * @generated from protobuf message google.protobuf.FieldOptions
915
+ */
916
+ export interface FieldOptions {
917
+ /**
918
+ * The ctype option instructs the C++ code generator to use a different
919
+ * representation of the field than it normally would. See the specific
920
+ * options below. This option is not yet implemented in the open source
921
+ * release -- sorry, we'll try to include it in a future version!
922
+ *
923
+ * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1;
924
+ */
925
+ ctype?: FieldOptions_CType;
926
+ /**
927
+ * The packed option can be enabled for repeated primitive fields to enable
928
+ * a more efficient representation on the wire. Rather than repeatedly
929
+ * writing the tag and type for each element, the entire array is encoded as
930
+ * a single length-delimited blob. In proto3, only explicit setting it to
931
+ * false will avoid using packed encoding.
932
+ *
933
+ * @generated from protobuf field: optional bool packed = 2;
934
+ */
935
+ packed?: boolean;
936
+ /**
937
+ * The jstype option determines the JavaScript type used for values of the
938
+ * field. The option is permitted only for 64 bit integral and fixed types
939
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
940
+ * is represented as JavaScript string, which avoids loss of precision that
941
+ * can happen when a large value is converted to a floating point JavaScript.
942
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
943
+ * use the JavaScript "number" type. The behavior of the default option
944
+ * JS_NORMAL is implementation dependent.
945
+ *
946
+ * This option is an enum to permit additional types to be added, e.g.
947
+ * goog.math.Integer.
948
+ *
949
+ * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6;
950
+ */
951
+ jstype?: FieldOptions_JSType;
952
+ /**
953
+ * Should this field be parsed lazily? Lazy applies only to message-type
954
+ * fields. It means that when the outer message is initially parsed, the
955
+ * inner message's contents will not be parsed but instead stored in encoded
956
+ * form. The inner message will actually be parsed when it is first accessed.
957
+ *
958
+ * This is only a hint. Implementations are free to choose whether to use
959
+ * eager or lazy parsing regardless of the value of this option. However,
960
+ * setting this option true suggests that the protocol author believes that
961
+ * using lazy parsing on this field is worth the additional bookkeeping
962
+ * overhead typically needed to implement it.
963
+ *
964
+ * This option does not affect the public interface of any generated code;
965
+ * all method signatures remain the same. Furthermore, thread-safety of the
966
+ * interface is not affected by this option; const methods remain safe to
967
+ * call from multiple threads concurrently, while non-const methods continue
968
+ * to require exclusive access.
969
+ *
970
+ *
971
+ * Note that implementations may choose not to check required fields within
972
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
973
+ * may return true even if the inner message has missing required fields.
974
+ * This is necessary because otherwise the inner message would have to be
975
+ * parsed in order to perform the check, defeating the purpose of lazy
976
+ * parsing. An implementation which chooses not to check required fields
977
+ * must be consistent about it. That is, for any particular sub-message, the
978
+ * implementation must either *always* check its required fields, or *never*
979
+ * check its required fields, regardless of whether or not the message has
980
+ * been parsed.
981
+ *
982
+ * As of 2021, lazy does no correctness checks on the byte stream during
983
+ * parsing. This may lead to crashes if and when an invalid byte stream is
984
+ * finally parsed upon access.
985
+ *
986
+ * TODO(b/211906113): Enable validation on lazy fields.
987
+ *
988
+ * @generated from protobuf field: optional bool lazy = 5;
989
+ */
990
+ lazy?: boolean;
991
+ /**
992
+ * unverified_lazy does no correctness checks on the byte stream. This should
993
+ * only be used where lazy with verification is prohibitive for performance
994
+ * reasons.
995
+ *
996
+ * @generated from protobuf field: optional bool unverified_lazy = 15;
997
+ */
998
+ unverifiedLazy?: boolean;
999
+ /**
1000
+ * Is this field deprecated?
1001
+ * Depending on the target platform, this can emit Deprecated annotations
1002
+ * for accessors, or it will be completely ignored; in the very least, this
1003
+ * is a formalization for deprecating fields.
1004
+ *
1005
+ * @generated from protobuf field: optional bool deprecated = 3;
1006
+ */
1007
+ deprecated?: boolean;
1008
+ /**
1009
+ * For Google-internal migration only. Do not use.
1010
+ *
1011
+ * @generated from protobuf field: optional bool weak = 10;
1012
+ */
1013
+ weak?: boolean;
1014
+ /**
1015
+ * The parser stores options it doesn't recognize here. See above.
1016
+ *
1017
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1018
+ */
1019
+ uninterpretedOption: UninterpretedOption[];
1020
+ }
1021
+ /**
1022
+ * @generated from protobuf enum google.protobuf.FieldOptions.CType
1023
+ */
1024
+ export enum FieldOptions_CType {
1025
+ /**
1026
+ * Default mode.
1027
+ *
1028
+ * @generated from protobuf enum value: STRING = 0;
1029
+ */
1030
+ STRING = 0,
1031
+ /**
1032
+ * @generated from protobuf enum value: CORD = 1;
1033
+ */
1034
+ CORD = 1,
1035
+ /**
1036
+ * @generated from protobuf enum value: STRING_PIECE = 2;
1037
+ */
1038
+ STRING_PIECE = 2
1039
+ }
1040
+ /**
1041
+ * @generated from protobuf enum google.protobuf.FieldOptions.JSType
1042
+ */
1043
+ export enum FieldOptions_JSType {
1044
+ /**
1045
+ * Use the default type.
1046
+ *
1047
+ * @generated from protobuf enum value: JS_NORMAL = 0;
1048
+ */
1049
+ JS_NORMAL = 0,
1050
+ /**
1051
+ * Use JavaScript strings.
1052
+ *
1053
+ * @generated from protobuf enum value: JS_STRING = 1;
1054
+ */
1055
+ JS_STRING = 1,
1056
+ /**
1057
+ * Use JavaScript numbers.
1058
+ *
1059
+ * @generated from protobuf enum value: JS_NUMBER = 2;
1060
+ */
1061
+ JS_NUMBER = 2
1062
+ }
1063
+ /**
1064
+ * @generated from protobuf message google.protobuf.OneofOptions
1065
+ */
1066
+ export interface OneofOptions {
1067
+ /**
1068
+ * The parser stores options it doesn't recognize here. See above.
1069
+ *
1070
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1071
+ */
1072
+ uninterpretedOption: UninterpretedOption[];
1073
+ }
1074
+ /**
1075
+ * @generated from protobuf message google.protobuf.EnumOptions
1076
+ */
1077
+ export interface EnumOptions {
1078
+ /**
1079
+ * Set this option to true to allow mapping different tag names to the same
1080
+ * value.
1081
+ *
1082
+ * @generated from protobuf field: optional bool allow_alias = 2;
1083
+ */
1084
+ allowAlias?: boolean;
1085
+ /**
1086
+ * Is this enum deprecated?
1087
+ * Depending on the target platform, this can emit Deprecated annotations
1088
+ * for the enum, or it will be completely ignored; in the very least, this
1089
+ * is a formalization for deprecating enums.
1090
+ *
1091
+ * @generated from protobuf field: optional bool deprecated = 3;
1092
+ */
1093
+ deprecated?: boolean;
1094
+ /**
1095
+ * The parser stores options it doesn't recognize here. See above.
1096
+ *
1097
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1098
+ */
1099
+ uninterpretedOption: UninterpretedOption[];
1100
+ }
1101
+ /**
1102
+ * @generated from protobuf message google.protobuf.EnumValueOptions
1103
+ */
1104
+ export interface EnumValueOptions {
1105
+ /**
1106
+ * Is this enum value deprecated?
1107
+ * Depending on the target platform, this can emit Deprecated annotations
1108
+ * for the enum value, or it will be completely ignored; in the very least,
1109
+ * this is a formalization for deprecating enum values.
1110
+ *
1111
+ * @generated from protobuf field: optional bool deprecated = 1;
1112
+ */
1113
+ deprecated?: boolean;
1114
+ /**
1115
+ * The parser stores options it doesn't recognize here. See above.
1116
+ *
1117
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1118
+ */
1119
+ uninterpretedOption: UninterpretedOption[];
1120
+ }
1121
+ /**
1122
+ * @generated from protobuf message google.protobuf.ServiceOptions
1123
+ */
1124
+ export interface ServiceOptions {
1125
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
1126
+ // framework. We apologize for hoarding these numbers to ourselves, but
1127
+ // we were already using them long before we decided to release Protocol
1128
+ // Buffers.
1129
+
1130
+ /**
1131
+ * Is this service deprecated?
1132
+ * Depending on the target platform, this can emit Deprecated annotations
1133
+ * for the service, or it will be completely ignored; in the very least,
1134
+ * this is a formalization for deprecating services.
1135
+ *
1136
+ * @generated from protobuf field: optional bool deprecated = 33;
1137
+ */
1138
+ deprecated?: boolean;
1139
+ /**
1140
+ * The parser stores options it doesn't recognize here. See above.
1141
+ *
1142
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1143
+ */
1144
+ uninterpretedOption: UninterpretedOption[];
1145
+ }
1146
+ /**
1147
+ * @generated from protobuf message google.protobuf.MethodOptions
1148
+ */
1149
+ export interface MethodOptions {
1150
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
1151
+ // framework. We apologize for hoarding these numbers to ourselves, but
1152
+ // we were already using them long before we decided to release Protocol
1153
+ // Buffers.
1154
+
1155
+ /**
1156
+ * Is this method deprecated?
1157
+ * Depending on the target platform, this can emit Deprecated annotations
1158
+ * for the method, or it will be completely ignored; in the very least,
1159
+ * this is a formalization for deprecating methods.
1160
+ *
1161
+ * @generated from protobuf field: optional bool deprecated = 33;
1162
+ */
1163
+ deprecated?: boolean;
1164
+ /**
1165
+ * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34;
1166
+ */
1167
+ idempotencyLevel?: MethodOptions_IdempotencyLevel;
1168
+ /**
1169
+ * The parser stores options it doesn't recognize here. See above.
1170
+ *
1171
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1172
+ */
1173
+ uninterpretedOption: UninterpretedOption[];
1174
+ }
1175
+ /**
1176
+ * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1177
+ * or neither? HTTP based RPC implementation may choose GET verb for safe
1178
+ * methods, and PUT verb for idempotent methods instead of the default POST.
1179
+ *
1180
+ * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel
1181
+ */
1182
+ export enum MethodOptions_IdempotencyLevel {
1183
+ /**
1184
+ * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0;
1185
+ */
1186
+ IDEMPOTENCY_UNKNOWN = 0,
1187
+ /**
1188
+ * implies idempotent
1189
+ *
1190
+ * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1;
1191
+ */
1192
+ NO_SIDE_EFFECTS = 1,
1193
+ /**
1194
+ * idempotent, but may have side effects
1195
+ *
1196
+ * @generated from protobuf enum value: IDEMPOTENT = 2;
1197
+ */
1198
+ IDEMPOTENT = 2
1199
+ }
1200
+ /**
1201
+ * A message representing a option the parser does not recognize. This only
1202
+ * appears in options protos created by the compiler::Parser class.
1203
+ * DescriptorPool resolves these when building Descriptor objects. Therefore,
1204
+ * options protos in descriptor objects (e.g. returned by Descriptor::options(),
1205
+ * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1206
+ * in them.
1207
+ *
1208
+ * @generated from protobuf message google.protobuf.UninterpretedOption
1209
+ */
1210
+ export interface UninterpretedOption {
1211
+ /**
1212
+ * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2;
1213
+ */
1214
+ name: UninterpretedOption_NamePart[];
1215
+ /**
1216
+ * The value of the uninterpreted option, in whatever type the tokenizer
1217
+ * identified it as during parsing. Exactly one of these should be set.
1218
+ *
1219
+ * @generated from protobuf field: optional string identifier_value = 3;
1220
+ */
1221
+ identifierValue?: string;
1222
+ /**
1223
+ * @generated from protobuf field: optional uint64 positive_int_value = 4;
1224
+ */
1225
+ positiveIntValue?: string;
1226
+ /**
1227
+ * @generated from protobuf field: optional int64 negative_int_value = 5;
1228
+ */
1229
+ negativeIntValue?: string;
1230
+ /**
1231
+ * @generated from protobuf field: optional double double_value = 6;
1232
+ */
1233
+ doubleValue?: number;
1234
+ /**
1235
+ * @generated from protobuf field: optional bytes string_value = 7;
1236
+ */
1237
+ stringValue?: Uint8Array;
1238
+ /**
1239
+ * @generated from protobuf field: optional string aggregate_value = 8;
1240
+ */
1241
+ aggregateValue?: string;
1242
+ }
1243
+ /**
1244
+ * The name of the uninterpreted option. Each string represents a segment in
1245
+ * a dot-separated name. is_extension is true iff a segment represents an
1246
+ * extension (denoted with parentheses in options specs in .proto files).
1247
+ * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
1248
+ * "foo.(bar.baz).moo".
1249
+ *
1250
+ * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart
1251
+ */
1252
+ export interface UninterpretedOption_NamePart {
1253
+ /**
1254
+ * @generated from protobuf field: string name_part = 1;
1255
+ */
1256
+ namePart: string;
1257
+ /**
1258
+ * @generated from protobuf field: bool is_extension = 2;
1259
+ */
1260
+ isExtension: boolean;
1261
+ }
1262
+ // ===================================================================
1263
+ // Optional source code info
1264
+
1265
+ /**
1266
+ * Encapsulates information about the original source file from which a
1267
+ * FileDescriptorProto was generated.
1268
+ *
1269
+ * @generated from protobuf message google.protobuf.SourceCodeInfo
1270
+ */
1271
+ export interface SourceCodeInfo {
1272
+ /**
1273
+ * A Location identifies a piece of source code in a .proto file which
1274
+ * corresponds to a particular definition. This information is intended
1275
+ * to be useful to IDEs, code indexers, documentation generators, and similar
1276
+ * tools.
1277
+ *
1278
+ * For example, say we have a file like:
1279
+ * message Foo {
1280
+ * optional string foo = 1;
1281
+ * }
1282
+ * Let's look at just the field definition:
1283
+ * optional string foo = 1;
1284
+ * ^ ^^ ^^ ^ ^^^
1285
+ * a bc de f ghi
1286
+ * We have the following locations:
1287
+ * span path represents
1288
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1289
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1290
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1291
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1292
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1293
+ *
1294
+ * Notes:
1295
+ * - A location may refer to a repeated field itself (i.e. not to any
1296
+ * particular index within it). This is used whenever a set of elements are
1297
+ * logically enclosed in a single code segment. For example, an entire
1298
+ * extend block (possibly containing multiple extension definitions) will
1299
+ * have an outer location whose path refers to the "extensions" repeated
1300
+ * field without an index.
1301
+ * - Multiple locations may have the same path. This happens when a single
1302
+ * logical declaration is spread out across multiple places. The most
1303
+ * obvious example is the "extend" block again -- there may be multiple
1304
+ * extend blocks in the same scope, each of which will have the same path.
1305
+ * - A location's span is not always a subset of its parent's span. For
1306
+ * example, the "extendee" of an extension declaration appears at the
1307
+ * beginning of the "extend" block and is shared by all extensions within
1308
+ * the block.
1309
+ * - Just because a location's span is a subset of some other location's span
1310
+ * does not mean that it is a descendant. For example, a "group" defines
1311
+ * both a type and a field in a single declaration. Thus, the locations
1312
+ * corresponding to the type and field and their components will overlap.
1313
+ * - Code which tries to interpret locations should probably be designed to
1314
+ * ignore those that it doesn't understand, as more types of locations could
1315
+ * be recorded in the future.
1316
+ *
1317
+ * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1;
1318
+ */
1319
+ location: SourceCodeInfo_Location[];
1320
+ }
1321
+ /**
1322
+ * @generated from protobuf message google.protobuf.SourceCodeInfo.Location
1323
+ */
1324
+ export interface SourceCodeInfo_Location {
1325
+ /**
1326
+ * Identifies which part of the FileDescriptorProto was defined at this
1327
+ * location.
1328
+ *
1329
+ * Each element is a field number or an index. They form a path from
1330
+ * the root FileDescriptorProto to the place where the definition occurs.
1331
+ * For example, this path:
1332
+ * [ 4, 3, 2, 7, 1 ]
1333
+ * refers to:
1334
+ * file.message_type(3) // 4, 3
1335
+ * .field(7) // 2, 7
1336
+ * .name() // 1
1337
+ * This is because FileDescriptorProto.message_type has field number 4:
1338
+ * repeated DescriptorProto message_type = 4;
1339
+ * and DescriptorProto.field has field number 2:
1340
+ * repeated FieldDescriptorProto field = 2;
1341
+ * and FieldDescriptorProto.name has field number 1:
1342
+ * optional string name = 1;
1343
+ *
1344
+ * Thus, the above path gives the location of a field name. If we removed
1345
+ * the last element:
1346
+ * [ 4, 3, 2, 7 ]
1347
+ * this path refers to the whole field declaration (from the beginning
1348
+ * of the label to the terminating semicolon).
1349
+ *
1350
+ * @generated from protobuf field: repeated int32 path = 1 [packed = true];
1351
+ */
1352
+ path: number[];
1353
+ /**
1354
+ * Always has exactly three or four elements: start line, start column,
1355
+ * end line (optional, otherwise assumed same as start line), end column.
1356
+ * These are packed into a single field for efficiency. Note that line
1357
+ * and column numbers are zero-based -- typically you will want to add
1358
+ * 1 to each before displaying to a user.
1359
+ *
1360
+ * @generated from protobuf field: repeated int32 span = 2 [packed = true];
1361
+ */
1362
+ span: number[];
1363
+ /**
1364
+ * If this SourceCodeInfo represents a complete declaration, these are any
1365
+ * comments appearing before and after the declaration which appear to be
1366
+ * attached to the declaration.
1367
+ *
1368
+ * A series of line comments appearing on consecutive lines, with no other
1369
+ * tokens appearing on those lines, will be treated as a single comment.
1370
+ *
1371
+ * leading_detached_comments will keep paragraphs of comments that appear
1372
+ * before (but not connected to) the current element. Each paragraph,
1373
+ * separated by empty lines, will be one comment element in the repeated
1374
+ * field.
1375
+ *
1376
+ * Only the comment content is provided; comment markers (e.g. //) are
1377
+ * stripped out. For block comments, leading whitespace and an asterisk
1378
+ * will be stripped from the beginning of each line other than the first.
1379
+ * Newlines are included in the output.
1380
+ *
1381
+ * Examples:
1382
+ *
1383
+ * optional int32 foo = 1; // Comment attached to foo.
1384
+ * // Comment attached to bar.
1385
+ * optional int32 bar = 2;
1386
+ *
1387
+ * optional string baz = 3;
1388
+ * // Comment attached to baz.
1389
+ * // Another line attached to baz.
1390
+ *
1391
+ * // Comment attached to moo.
1392
+ * //
1393
+ * // Another line attached to moo.
1394
+ * optional double moo = 4;
1395
+ *
1396
+ * // Detached comment for corge. This is not leading or trailing comments
1397
+ * // to moo or corge because there are blank lines separating it from
1398
+ * // both.
1399
+ *
1400
+ * // Detached comment for corge paragraph 2.
1401
+ *
1402
+ * optional string corge = 5;
1403
+ * /* Block comment attached
1404
+ * * to corge. Leading asterisks
1405
+ * * will be removed. *\/
1406
+ * /* Block comment attached to
1407
+ * * grault. *\/
1408
+ * optional int32 grault = 6;
1409
+ *
1410
+ * // ignored detached comments.
1411
+ *
1412
+ * @generated from protobuf field: optional string leading_comments = 3;
1413
+ */
1414
+ leadingComments?: string;
1415
+ /**
1416
+ * @generated from protobuf field: optional string trailing_comments = 4;
1417
+ */
1418
+ trailingComments?: string;
1419
+ /**
1420
+ * @generated from protobuf field: repeated string leading_detached_comments = 6;
1421
+ */
1422
+ leadingDetachedComments: string[];
1423
+ }
1424
+ /**
1425
+ * Describes the relationship between generated code and its original source
1426
+ * file. A GeneratedCodeInfo message is associated with only one generated
1427
+ * source file, but may contain references to different source .proto files.
1428
+ *
1429
+ * @generated from protobuf message google.protobuf.GeneratedCodeInfo
1430
+ */
1431
+ export interface GeneratedCodeInfo {
1432
+ /**
1433
+ * An Annotation connects some span of text in generated code to an element
1434
+ * of its generating .proto file.
1435
+ *
1436
+ * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
1437
+ */
1438
+ annotation: GeneratedCodeInfo_Annotation[];
1439
+ }
1440
+ /**
1441
+ * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation
1442
+ */
1443
+ export interface GeneratedCodeInfo_Annotation {
1444
+ /**
1445
+ * Identifies the element in the original source .proto file. This field
1446
+ * is formatted the same as SourceCodeInfo.Location.path.
1447
+ *
1448
+ * @generated from protobuf field: repeated int32 path = 1 [packed = true];
1449
+ */
1450
+ path: number[];
1451
+ /**
1452
+ * Identifies the filesystem path to the original source .proto.
1453
+ *
1454
+ * @generated from protobuf field: optional string source_file = 2;
1455
+ */
1456
+ sourceFile?: string;
1457
+ /**
1458
+ * Identifies the starting offset in bytes in the generated code
1459
+ * that relates to the identified object.
1460
+ *
1461
+ * @generated from protobuf field: optional int32 begin = 3;
1462
+ */
1463
+ begin?: number;
1464
+ /**
1465
+ * Identifies the ending offset in bytes in the generated code that
1466
+ * relates to the identified offset. The end offset should be one past
1467
+ * the last relevant byte (so the length of the text = end - begin).
1468
+ *
1469
+ * @generated from protobuf field: optional int32 end = 4;
1470
+ */
1471
+ end?: number;
1472
+ }
1473
+ // @generated message type with reflection information, may provide speed optimized methods
1474
+ class FileDescriptorSet$Type extends MessageType<FileDescriptorSet> {
1475
+ constructor() {
1476
+ super("google.protobuf.FileDescriptorSet", [
1477
+ { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto }
1478
+ ]);
1479
+ }
1480
+ create(value?: PartialMessage<FileDescriptorSet>): FileDescriptorSet {
1481
+ const message = { file: [] };
1482
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1483
+ if (value !== undefined)
1484
+ reflectionMergePartial<FileDescriptorSet>(this, message, value);
1485
+ return message;
1486
+ }
1487
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet {
1488
+ let message = target ?? this.create(), end = reader.pos + length;
1489
+ while (reader.pos < end) {
1490
+ let [fieldNo, wireType] = reader.tag();
1491
+ switch (fieldNo) {
1492
+ case /* repeated google.protobuf.FileDescriptorProto file */ 1:
1493
+ message.file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1494
+ break;
1495
+ default:
1496
+ let u = options.readUnknownField;
1497
+ if (u === "throw")
1498
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1499
+ let d = reader.skip(wireType);
1500
+ if (u !== false)
1501
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1502
+ }
1503
+ }
1504
+ return message;
1505
+ }
1506
+ internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1507
+ /* repeated google.protobuf.FileDescriptorProto file = 1; */
1508
+ for (let i = 0; i < message.file.length; i++)
1509
+ FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1510
+ let u = options.writeUnknownFields;
1511
+ if (u !== false)
1512
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1513
+ return writer;
1514
+ }
1515
+ }
1516
+ /**
1517
+ * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet
1518
+ */
1519
+ export const FileDescriptorSet = new FileDescriptorSet$Type();
1520
+ // @generated message type with reflection information, may provide speed optimized methods
1521
+ class FileDescriptorProto$Type extends MessageType<FileDescriptorProto> {
1522
+ constructor() {
1523
+ super("google.protobuf.FileDescriptorProto", [
1524
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1525
+ { no: 2, name: "package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1526
+ { no: 3, name: "dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
1527
+ { no: 10, name: "public_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ },
1528
+ { no: 11, name: "weak_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ },
1529
+ { no: 4, name: "message_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto },
1530
+ { no: 5, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto },
1531
+ { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ServiceDescriptorProto },
1532
+ { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto },
1533
+ { no: 8, name: "options", kind: "message", T: () => FileOptions },
1534
+ { no: 9, name: "source_code_info", kind: "message", T: () => SourceCodeInfo },
1535
+ { no: 12, name: "syntax", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
1536
+ ]);
1537
+ }
1538
+ create(value?: PartialMessage<FileDescriptorProto>): FileDescriptorProto {
1539
+ const message = { dependency: [], publicDependency: [], weakDependency: [], messageType: [], enumType: [], service: [], extension: [] };
1540
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1541
+ if (value !== undefined)
1542
+ reflectionMergePartial<FileDescriptorProto>(this, message, value);
1543
+ return message;
1544
+ }
1545
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto {
1546
+ let message = target ?? this.create(), end = reader.pos + length;
1547
+ while (reader.pos < end) {
1548
+ let [fieldNo, wireType] = reader.tag();
1549
+ switch (fieldNo) {
1550
+ case /* optional string name */ 1:
1551
+ message.name = reader.string();
1552
+ break;
1553
+ case /* optional string package */ 2:
1554
+ message.package = reader.string();
1555
+ break;
1556
+ case /* repeated string dependency */ 3:
1557
+ message.dependency.push(reader.string());
1558
+ break;
1559
+ case /* repeated int32 public_dependency */ 10:
1560
+ if (wireType === WireType.LengthDelimited)
1561
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
1562
+ message.publicDependency.push(reader.int32());
1563
+ else
1564
+ message.publicDependency.push(reader.int32());
1565
+ break;
1566
+ case /* repeated int32 weak_dependency */ 11:
1567
+ if (wireType === WireType.LengthDelimited)
1568
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
1569
+ message.weakDependency.push(reader.int32());
1570
+ else
1571
+ message.weakDependency.push(reader.int32());
1572
+ break;
1573
+ case /* repeated google.protobuf.DescriptorProto message_type */ 4:
1574
+ message.messageType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1575
+ break;
1576
+ case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 5:
1577
+ message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1578
+ break;
1579
+ case /* repeated google.protobuf.ServiceDescriptorProto service */ 6:
1580
+ message.service.push(ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1581
+ break;
1582
+ case /* repeated google.protobuf.FieldDescriptorProto extension */ 7:
1583
+ message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1584
+ break;
1585
+ case /* optional google.protobuf.FileOptions options */ 8:
1586
+ message.options = FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
1587
+ break;
1588
+ case /* optional google.protobuf.SourceCodeInfo source_code_info */ 9:
1589
+ message.sourceCodeInfo = SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.sourceCodeInfo);
1590
+ break;
1591
+ case /* optional string syntax */ 12:
1592
+ message.syntax = reader.string();
1593
+ break;
1594
+ default:
1595
+ let u = options.readUnknownField;
1596
+ if (u === "throw")
1597
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1598
+ let d = reader.skip(wireType);
1599
+ if (u !== false)
1600
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1601
+ }
1602
+ }
1603
+ return message;
1604
+ }
1605
+ internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1606
+ /* optional string name = 1; */
1607
+ if (message.name !== undefined)
1608
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
1609
+ /* optional string package = 2; */
1610
+ if (message.package !== undefined)
1611
+ writer.tag(2, WireType.LengthDelimited).string(message.package);
1612
+ /* repeated string dependency = 3; */
1613
+ for (let i = 0; i < message.dependency.length; i++)
1614
+ writer.tag(3, WireType.LengthDelimited).string(message.dependency[i]);
1615
+ /* repeated int32 public_dependency = 10; */
1616
+ for (let i = 0; i < message.publicDependency.length; i++)
1617
+ writer.tag(10, WireType.Varint).int32(message.publicDependency[i]);
1618
+ /* repeated int32 weak_dependency = 11; */
1619
+ for (let i = 0; i < message.weakDependency.length; i++)
1620
+ writer.tag(11, WireType.Varint).int32(message.weakDependency[i]);
1621
+ /* repeated google.protobuf.DescriptorProto message_type = 4; */
1622
+ for (let i = 0; i < message.messageType.length; i++)
1623
+ DescriptorProto.internalBinaryWrite(message.messageType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1624
+ /* repeated google.protobuf.EnumDescriptorProto enum_type = 5; */
1625
+ for (let i = 0; i < message.enumType.length; i++)
1626
+ EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1627
+ /* repeated google.protobuf.ServiceDescriptorProto service = 6; */
1628
+ for (let i = 0; i < message.service.length; i++)
1629
+ ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1630
+ /* repeated google.protobuf.FieldDescriptorProto extension = 7; */
1631
+ for (let i = 0; i < message.extension.length; i++)
1632
+ FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1633
+ /* optional google.protobuf.FileOptions options = 8; */
1634
+ if (message.options)
1635
+ FileOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1636
+ /* optional google.protobuf.SourceCodeInfo source_code_info = 9; */
1637
+ if (message.sourceCodeInfo)
1638
+ SourceCodeInfo.internalBinaryWrite(message.sourceCodeInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
1639
+ /* optional string syntax = 12; */
1640
+ if (message.syntax !== undefined)
1641
+ writer.tag(12, WireType.LengthDelimited).string(message.syntax);
1642
+ let u = options.writeUnknownFields;
1643
+ if (u !== false)
1644
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1645
+ return writer;
1646
+ }
1647
+ }
1648
+ /**
1649
+ * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto
1650
+ */
1651
+ export const FileDescriptorProto = new FileDescriptorProto$Type();
1652
+ // @generated message type with reflection information, may provide speed optimized methods
1653
+ class DescriptorProto$Type extends MessageType<DescriptorProto> {
1654
+ constructor() {
1655
+ super("google.protobuf.DescriptorProto", [
1656
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1657
+ { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto },
1658
+ { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto },
1659
+ { no: 3, name: "nested_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto },
1660
+ { no: 4, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto },
1661
+ { no: 5, name: "extension_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ExtensionRange },
1662
+ { no: 8, name: "oneof_decl", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OneofDescriptorProto },
1663
+ { no: 7, name: "options", kind: "message", T: () => MessageOptions },
1664
+ { no: 9, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ReservedRange },
1665
+ { no: 10, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
1666
+ ]);
1667
+ }
1668
+ create(value?: PartialMessage<DescriptorProto>): DescriptorProto {
1669
+ const message = { field: [], extension: [], nestedType: [], enumType: [], extensionRange: [], oneofDecl: [], reservedRange: [], reservedName: [] };
1670
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1671
+ if (value !== undefined)
1672
+ reflectionMergePartial<DescriptorProto>(this, message, value);
1673
+ return message;
1674
+ }
1675
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto {
1676
+ let message = target ?? this.create(), end = reader.pos + length;
1677
+ while (reader.pos < end) {
1678
+ let [fieldNo, wireType] = reader.tag();
1679
+ switch (fieldNo) {
1680
+ case /* optional string name */ 1:
1681
+ message.name = reader.string();
1682
+ break;
1683
+ case /* repeated google.protobuf.FieldDescriptorProto field */ 2:
1684
+ message.field.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1685
+ break;
1686
+ case /* repeated google.protobuf.FieldDescriptorProto extension */ 6:
1687
+ message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1688
+ break;
1689
+ case /* repeated google.protobuf.DescriptorProto nested_type */ 3:
1690
+ message.nestedType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1691
+ break;
1692
+ case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 4:
1693
+ message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1694
+ break;
1695
+ case /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range */ 5:
1696
+ message.extensionRange.push(DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options));
1697
+ break;
1698
+ case /* repeated google.protobuf.OneofDescriptorProto oneof_decl */ 8:
1699
+ message.oneofDecl.push(OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
1700
+ break;
1701
+ case /* optional google.protobuf.MessageOptions options */ 7:
1702
+ message.options = MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
1703
+ break;
1704
+ case /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range */ 9:
1705
+ message.reservedRange.push(DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options));
1706
+ break;
1707
+ case /* repeated string reserved_name */ 10:
1708
+ message.reservedName.push(reader.string());
1709
+ break;
1710
+ default:
1711
+ let u = options.readUnknownField;
1712
+ if (u === "throw")
1713
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1714
+ let d = reader.skip(wireType);
1715
+ if (u !== false)
1716
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1717
+ }
1718
+ }
1719
+ return message;
1720
+ }
1721
+ internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1722
+ /* optional string name = 1; */
1723
+ if (message.name !== undefined)
1724
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
1725
+ /* repeated google.protobuf.FieldDescriptorProto field = 2; */
1726
+ for (let i = 0; i < message.field.length; i++)
1727
+ FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1728
+ /* repeated google.protobuf.FieldDescriptorProto extension = 6; */
1729
+ for (let i = 0; i < message.extension.length; i++)
1730
+ FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1731
+ /* repeated google.protobuf.DescriptorProto nested_type = 3; */
1732
+ for (let i = 0; i < message.nestedType.length; i++)
1733
+ DescriptorProto.internalBinaryWrite(message.nestedType[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1734
+ /* repeated google.protobuf.EnumDescriptorProto enum_type = 4; */
1735
+ for (let i = 0; i < message.enumType.length; i++)
1736
+ EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1737
+ /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; */
1738
+ for (let i = 0; i < message.extensionRange.length; i++)
1739
+ DescriptorProto_ExtensionRange.internalBinaryWrite(message.extensionRange[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1740
+ /* repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; */
1741
+ for (let i = 0; i < message.oneofDecl.length; i++)
1742
+ OneofDescriptorProto.internalBinaryWrite(message.oneofDecl[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1743
+ /* optional google.protobuf.MessageOptions options = 7; */
1744
+ if (message.options)
1745
+ MessageOptions.internalBinaryWrite(message.options, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1746
+ /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; */
1747
+ for (let i = 0; i < message.reservedRange.length; i++)
1748
+ DescriptorProto_ReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
1749
+ /* repeated string reserved_name = 10; */
1750
+ for (let i = 0; i < message.reservedName.length; i++)
1751
+ writer.tag(10, WireType.LengthDelimited).string(message.reservedName[i]);
1752
+ let u = options.writeUnknownFields;
1753
+ if (u !== false)
1754
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1755
+ return writer;
1756
+ }
1757
+ }
1758
+ /**
1759
+ * @generated MessageType for protobuf message google.protobuf.DescriptorProto
1760
+ */
1761
+ export const DescriptorProto = new DescriptorProto$Type();
1762
+ // @generated message type with reflection information, may provide speed optimized methods
1763
+ class DescriptorProto_ExtensionRange$Type extends MessageType<DescriptorProto_ExtensionRange> {
1764
+ constructor() {
1765
+ super("google.protobuf.DescriptorProto.ExtensionRange", [
1766
+ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
1767
+ { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
1768
+ { no: 3, name: "options", kind: "message", T: () => ExtensionRangeOptions }
1769
+ ]);
1770
+ }
1771
+ create(value?: PartialMessage<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange {
1772
+ const message = {};
1773
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1774
+ if (value !== undefined)
1775
+ reflectionMergePartial<DescriptorProto_ExtensionRange>(this, message, value);
1776
+ return message;
1777
+ }
1778
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange {
1779
+ let message = target ?? this.create(), end = reader.pos + length;
1780
+ while (reader.pos < end) {
1781
+ let [fieldNo, wireType] = reader.tag();
1782
+ switch (fieldNo) {
1783
+ case /* optional int32 start */ 1:
1784
+ message.start = reader.int32();
1785
+ break;
1786
+ case /* optional int32 end */ 2:
1787
+ message.end = reader.int32();
1788
+ break;
1789
+ case /* optional google.protobuf.ExtensionRangeOptions options */ 3:
1790
+ message.options = ExtensionRangeOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
1791
+ break;
1792
+ default:
1793
+ let u = options.readUnknownField;
1794
+ if (u === "throw")
1795
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1796
+ let d = reader.skip(wireType);
1797
+ if (u !== false)
1798
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1799
+ }
1800
+ }
1801
+ return message;
1802
+ }
1803
+ internalBinaryWrite(message: DescriptorProto_ExtensionRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1804
+ /* optional int32 start = 1; */
1805
+ if (message.start !== undefined)
1806
+ writer.tag(1, WireType.Varint).int32(message.start);
1807
+ /* optional int32 end = 2; */
1808
+ if (message.end !== undefined)
1809
+ writer.tag(2, WireType.Varint).int32(message.end);
1810
+ /* optional google.protobuf.ExtensionRangeOptions options = 3; */
1811
+ if (message.options)
1812
+ ExtensionRangeOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1813
+ let u = options.writeUnknownFields;
1814
+ if (u !== false)
1815
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1816
+ return writer;
1817
+ }
1818
+ }
1819
+ /**
1820
+ * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ExtensionRange
1821
+ */
1822
+ export const DescriptorProto_ExtensionRange = new DescriptorProto_ExtensionRange$Type();
1823
+ // @generated message type with reflection information, may provide speed optimized methods
1824
+ class DescriptorProto_ReservedRange$Type extends MessageType<DescriptorProto_ReservedRange> {
1825
+ constructor() {
1826
+ super("google.protobuf.DescriptorProto.ReservedRange", [
1827
+ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
1828
+ { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
1829
+ ]);
1830
+ }
1831
+ create(value?: PartialMessage<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange {
1832
+ const message = {};
1833
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1834
+ if (value !== undefined)
1835
+ reflectionMergePartial<DescriptorProto_ReservedRange>(this, message, value);
1836
+ return message;
1837
+ }
1838
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange {
1839
+ let message = target ?? this.create(), end = reader.pos + length;
1840
+ while (reader.pos < end) {
1841
+ let [fieldNo, wireType] = reader.tag();
1842
+ switch (fieldNo) {
1843
+ case /* optional int32 start */ 1:
1844
+ message.start = reader.int32();
1845
+ break;
1846
+ case /* optional int32 end */ 2:
1847
+ message.end = reader.int32();
1848
+ break;
1849
+ default:
1850
+ let u = options.readUnknownField;
1851
+ if (u === "throw")
1852
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1853
+ let d = reader.skip(wireType);
1854
+ if (u !== false)
1855
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1856
+ }
1857
+ }
1858
+ return message;
1859
+ }
1860
+ internalBinaryWrite(message: DescriptorProto_ReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1861
+ /* optional int32 start = 1; */
1862
+ if (message.start !== undefined)
1863
+ writer.tag(1, WireType.Varint).int32(message.start);
1864
+ /* optional int32 end = 2; */
1865
+ if (message.end !== undefined)
1866
+ writer.tag(2, WireType.Varint).int32(message.end);
1867
+ let u = options.writeUnknownFields;
1868
+ if (u !== false)
1869
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1870
+ return writer;
1871
+ }
1872
+ }
1873
+ /**
1874
+ * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ReservedRange
1875
+ */
1876
+ export const DescriptorProto_ReservedRange = new DescriptorProto_ReservedRange$Type();
1877
+ // @generated message type with reflection information, may provide speed optimized methods
1878
+ class ExtensionRangeOptions$Type extends MessageType<ExtensionRangeOptions> {
1879
+ constructor() {
1880
+ super("google.protobuf.ExtensionRangeOptions", [
1881
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
1882
+ ]);
1883
+ }
1884
+ create(value?: PartialMessage<ExtensionRangeOptions>): ExtensionRangeOptions {
1885
+ const message = { uninterpretedOption: [] };
1886
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1887
+ if (value !== undefined)
1888
+ reflectionMergePartial<ExtensionRangeOptions>(this, message, value);
1889
+ return message;
1890
+ }
1891
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions {
1892
+ let message = target ?? this.create(), end = reader.pos + length;
1893
+ while (reader.pos < end) {
1894
+ let [fieldNo, wireType] = reader.tag();
1895
+ switch (fieldNo) {
1896
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
1897
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
1898
+ break;
1899
+ default:
1900
+ let u = options.readUnknownField;
1901
+ if (u === "throw")
1902
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1903
+ let d = reader.skip(wireType);
1904
+ if (u !== false)
1905
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1906
+ }
1907
+ }
1908
+ return message;
1909
+ }
1910
+ internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1911
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
1912
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
1913
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
1914
+ let u = options.writeUnknownFields;
1915
+ if (u !== false)
1916
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1917
+ return writer;
1918
+ }
1919
+ }
1920
+ /**
1921
+ * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions
1922
+ */
1923
+ export const ExtensionRangeOptions = new ExtensionRangeOptions$Type();
1924
+ // @generated message type with reflection information, may provide speed optimized methods
1925
+ class FieldDescriptorProto$Type extends MessageType<FieldDescriptorProto> {
1926
+ constructor() {
1927
+ super("google.protobuf.FieldDescriptorProto", [
1928
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1929
+ { no: 3, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
1930
+ { no: 4, name: "label", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Label", FieldDescriptorProto_Label, "LABEL_"] },
1931
+ { no: 5, name: "type", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Type", FieldDescriptorProto_Type, "TYPE_"] },
1932
+ { no: 6, name: "type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1933
+ { no: 2, name: "extendee", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1934
+ { no: 7, name: "default_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1935
+ { no: 9, name: "oneof_index", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
1936
+ { no: 10, name: "json_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1937
+ { no: 8, name: "options", kind: "message", T: () => FieldOptions },
1938
+ { no: 17, name: "proto3_optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
1939
+ ]);
1940
+ }
1941
+ create(value?: PartialMessage<FieldDescriptorProto>): FieldDescriptorProto {
1942
+ const message = {};
1943
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1944
+ if (value !== undefined)
1945
+ reflectionMergePartial<FieldDescriptorProto>(this, message, value);
1946
+ return message;
1947
+ }
1948
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto {
1949
+ let message = target ?? this.create(), end = reader.pos + length;
1950
+ while (reader.pos < end) {
1951
+ let [fieldNo, wireType] = reader.tag();
1952
+ switch (fieldNo) {
1953
+ case /* optional string name */ 1:
1954
+ message.name = reader.string();
1955
+ break;
1956
+ case /* optional int32 number */ 3:
1957
+ message.number = reader.int32();
1958
+ break;
1959
+ case /* optional google.protobuf.FieldDescriptorProto.Label label */ 4:
1960
+ message.label = reader.int32();
1961
+ break;
1962
+ case /* optional google.protobuf.FieldDescriptorProto.Type type */ 5:
1963
+ message.type = reader.int32();
1964
+ break;
1965
+ case /* optional string type_name */ 6:
1966
+ message.typeName = reader.string();
1967
+ break;
1968
+ case /* optional string extendee */ 2:
1969
+ message.extendee = reader.string();
1970
+ break;
1971
+ case /* optional string default_value */ 7:
1972
+ message.defaultValue = reader.string();
1973
+ break;
1974
+ case /* optional int32 oneof_index */ 9:
1975
+ message.oneofIndex = reader.int32();
1976
+ break;
1977
+ case /* optional string json_name */ 10:
1978
+ message.jsonName = reader.string();
1979
+ break;
1980
+ case /* optional google.protobuf.FieldOptions options */ 8:
1981
+ message.options = FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
1982
+ break;
1983
+ case /* optional bool proto3_optional */ 17:
1984
+ message.proto3Optional = reader.bool();
1985
+ break;
1986
+ default:
1987
+ let u = options.readUnknownField;
1988
+ if (u === "throw")
1989
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1990
+ let d = reader.skip(wireType);
1991
+ if (u !== false)
1992
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1993
+ }
1994
+ }
1995
+ return message;
1996
+ }
1997
+ internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1998
+ /* optional string name = 1; */
1999
+ if (message.name !== undefined)
2000
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2001
+ /* optional int32 number = 3; */
2002
+ if (message.number !== undefined)
2003
+ writer.tag(3, WireType.Varint).int32(message.number);
2004
+ /* optional google.protobuf.FieldDescriptorProto.Label label = 4; */
2005
+ if (message.label !== undefined)
2006
+ writer.tag(4, WireType.Varint).int32(message.label);
2007
+ /* optional google.protobuf.FieldDescriptorProto.Type type = 5; */
2008
+ if (message.type !== undefined)
2009
+ writer.tag(5, WireType.Varint).int32(message.type);
2010
+ /* optional string type_name = 6; */
2011
+ if (message.typeName !== undefined)
2012
+ writer.tag(6, WireType.LengthDelimited).string(message.typeName);
2013
+ /* optional string extendee = 2; */
2014
+ if (message.extendee !== undefined)
2015
+ writer.tag(2, WireType.LengthDelimited).string(message.extendee);
2016
+ /* optional string default_value = 7; */
2017
+ if (message.defaultValue !== undefined)
2018
+ writer.tag(7, WireType.LengthDelimited).string(message.defaultValue);
2019
+ /* optional int32 oneof_index = 9; */
2020
+ if (message.oneofIndex !== undefined)
2021
+ writer.tag(9, WireType.Varint).int32(message.oneofIndex);
2022
+ /* optional string json_name = 10; */
2023
+ if (message.jsonName !== undefined)
2024
+ writer.tag(10, WireType.LengthDelimited).string(message.jsonName);
2025
+ /* optional google.protobuf.FieldOptions options = 8; */
2026
+ if (message.options)
2027
+ FieldOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
2028
+ /* optional bool proto3_optional = 17; */
2029
+ if (message.proto3Optional !== undefined)
2030
+ writer.tag(17, WireType.Varint).bool(message.proto3Optional);
2031
+ let u = options.writeUnknownFields;
2032
+ if (u !== false)
2033
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2034
+ return writer;
2035
+ }
2036
+ }
2037
+ /**
2038
+ * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto
2039
+ */
2040
+ export const FieldDescriptorProto = new FieldDescriptorProto$Type();
2041
+ // @generated message type with reflection information, may provide speed optimized methods
2042
+ class OneofDescriptorProto$Type extends MessageType<OneofDescriptorProto> {
2043
+ constructor() {
2044
+ super("google.protobuf.OneofDescriptorProto", [
2045
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2046
+ { no: 2, name: "options", kind: "message", T: () => OneofOptions }
2047
+ ]);
2048
+ }
2049
+ create(value?: PartialMessage<OneofDescriptorProto>): OneofDescriptorProto {
2050
+ const message = {};
2051
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2052
+ if (value !== undefined)
2053
+ reflectionMergePartial<OneofDescriptorProto>(this, message, value);
2054
+ return message;
2055
+ }
2056
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto {
2057
+ let message = target ?? this.create(), end = reader.pos + length;
2058
+ while (reader.pos < end) {
2059
+ let [fieldNo, wireType] = reader.tag();
2060
+ switch (fieldNo) {
2061
+ case /* optional string name */ 1:
2062
+ message.name = reader.string();
2063
+ break;
2064
+ case /* optional google.protobuf.OneofOptions options */ 2:
2065
+ message.options = OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
2066
+ break;
2067
+ default:
2068
+ let u = options.readUnknownField;
2069
+ if (u === "throw")
2070
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2071
+ let d = reader.skip(wireType);
2072
+ if (u !== false)
2073
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2074
+ }
2075
+ }
2076
+ return message;
2077
+ }
2078
+ internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2079
+ /* optional string name = 1; */
2080
+ if (message.name !== undefined)
2081
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2082
+ /* optional google.protobuf.OneofOptions options = 2; */
2083
+ if (message.options)
2084
+ OneofOptions.internalBinaryWrite(message.options, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2085
+ let u = options.writeUnknownFields;
2086
+ if (u !== false)
2087
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2088
+ return writer;
2089
+ }
2090
+ }
2091
+ /**
2092
+ * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto
2093
+ */
2094
+ export const OneofDescriptorProto = new OneofDescriptorProto$Type();
2095
+ // @generated message type with reflection information, may provide speed optimized methods
2096
+ class EnumDescriptorProto$Type extends MessageType<EnumDescriptorProto> {
2097
+ constructor() {
2098
+ super("google.protobuf.EnumDescriptorProto", [
2099
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2100
+ { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValueDescriptorProto },
2101
+ { no: 3, name: "options", kind: "message", T: () => EnumOptions },
2102
+ { no: 4, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto_EnumReservedRange },
2103
+ { no: 5, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
2104
+ ]);
2105
+ }
2106
+ create(value?: PartialMessage<EnumDescriptorProto>): EnumDescriptorProto {
2107
+ const message = { value: [], reservedRange: [], reservedName: [] };
2108
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2109
+ if (value !== undefined)
2110
+ reflectionMergePartial<EnumDescriptorProto>(this, message, value);
2111
+ return message;
2112
+ }
2113
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto {
2114
+ let message = target ?? this.create(), end = reader.pos + length;
2115
+ while (reader.pos < end) {
2116
+ let [fieldNo, wireType] = reader.tag();
2117
+ switch (fieldNo) {
2118
+ case /* optional string name */ 1:
2119
+ message.name = reader.string();
2120
+ break;
2121
+ case /* repeated google.protobuf.EnumValueDescriptorProto value */ 2:
2122
+ message.value.push(EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
2123
+ break;
2124
+ case /* optional google.protobuf.EnumOptions options */ 3:
2125
+ message.options = EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
2126
+ break;
2127
+ case /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range */ 4:
2128
+ message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options));
2129
+ break;
2130
+ case /* repeated string reserved_name */ 5:
2131
+ message.reservedName.push(reader.string());
2132
+ break;
2133
+ default:
2134
+ let u = options.readUnknownField;
2135
+ if (u === "throw")
2136
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2137
+ let d = reader.skip(wireType);
2138
+ if (u !== false)
2139
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2140
+ }
2141
+ }
2142
+ return message;
2143
+ }
2144
+ internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2145
+ /* optional string name = 1; */
2146
+ if (message.name !== undefined)
2147
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2148
+ /* repeated google.protobuf.EnumValueDescriptorProto value = 2; */
2149
+ for (let i = 0; i < message.value.length; i++)
2150
+ EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2151
+ /* optional google.protobuf.EnumOptions options = 3; */
2152
+ if (message.options)
2153
+ EnumOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2154
+ /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; */
2155
+ for (let i = 0; i < message.reservedRange.length; i++)
2156
+ EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
2157
+ /* repeated string reserved_name = 5; */
2158
+ for (let i = 0; i < message.reservedName.length; i++)
2159
+ writer.tag(5, WireType.LengthDelimited).string(message.reservedName[i]);
2160
+ let u = options.writeUnknownFields;
2161
+ if (u !== false)
2162
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2163
+ return writer;
2164
+ }
2165
+ }
2166
+ /**
2167
+ * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto
2168
+ */
2169
+ export const EnumDescriptorProto = new EnumDescriptorProto$Type();
2170
+ // @generated message type with reflection information, may provide speed optimized methods
2171
+ class EnumDescriptorProto_EnumReservedRange$Type extends MessageType<EnumDescriptorProto_EnumReservedRange> {
2172
+ constructor() {
2173
+ super("google.protobuf.EnumDescriptorProto.EnumReservedRange", [
2174
+ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
2175
+ { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
2176
+ ]);
2177
+ }
2178
+ create(value?: PartialMessage<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange {
2179
+ const message = {};
2180
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2181
+ if (value !== undefined)
2182
+ reflectionMergePartial<EnumDescriptorProto_EnumReservedRange>(this, message, value);
2183
+ return message;
2184
+ }
2185
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange {
2186
+ let message = target ?? this.create(), end = reader.pos + length;
2187
+ while (reader.pos < end) {
2188
+ let [fieldNo, wireType] = reader.tag();
2189
+ switch (fieldNo) {
2190
+ case /* optional int32 start */ 1:
2191
+ message.start = reader.int32();
2192
+ break;
2193
+ case /* optional int32 end */ 2:
2194
+ message.end = reader.int32();
2195
+ break;
2196
+ default:
2197
+ let u = options.readUnknownField;
2198
+ if (u === "throw")
2199
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2200
+ let d = reader.skip(wireType);
2201
+ if (u !== false)
2202
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2203
+ }
2204
+ }
2205
+ return message;
2206
+ }
2207
+ internalBinaryWrite(message: EnumDescriptorProto_EnumReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2208
+ /* optional int32 start = 1; */
2209
+ if (message.start !== undefined)
2210
+ writer.tag(1, WireType.Varint).int32(message.start);
2211
+ /* optional int32 end = 2; */
2212
+ if (message.end !== undefined)
2213
+ writer.tag(2, WireType.Varint).int32(message.end);
2214
+ let u = options.writeUnknownFields;
2215
+ if (u !== false)
2216
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2217
+ return writer;
2218
+ }
2219
+ }
2220
+ /**
2221
+ * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange
2222
+ */
2223
+ export const EnumDescriptorProto_EnumReservedRange = new EnumDescriptorProto_EnumReservedRange$Type();
2224
+ // @generated message type with reflection information, may provide speed optimized methods
2225
+ class EnumValueDescriptorProto$Type extends MessageType<EnumValueDescriptorProto> {
2226
+ constructor() {
2227
+ super("google.protobuf.EnumValueDescriptorProto", [
2228
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2229
+ { no: 2, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
2230
+ { no: 3, name: "options", kind: "message", T: () => EnumValueOptions }
2231
+ ]);
2232
+ }
2233
+ create(value?: PartialMessage<EnumValueDescriptorProto>): EnumValueDescriptorProto {
2234
+ const message = {};
2235
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2236
+ if (value !== undefined)
2237
+ reflectionMergePartial<EnumValueDescriptorProto>(this, message, value);
2238
+ return message;
2239
+ }
2240
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto {
2241
+ let message = target ?? this.create(), end = reader.pos + length;
2242
+ while (reader.pos < end) {
2243
+ let [fieldNo, wireType] = reader.tag();
2244
+ switch (fieldNo) {
2245
+ case /* optional string name */ 1:
2246
+ message.name = reader.string();
2247
+ break;
2248
+ case /* optional int32 number */ 2:
2249
+ message.number = reader.int32();
2250
+ break;
2251
+ case /* optional google.protobuf.EnumValueOptions options */ 3:
2252
+ message.options = EnumValueOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
2253
+ break;
2254
+ default:
2255
+ let u = options.readUnknownField;
2256
+ if (u === "throw")
2257
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2258
+ let d = reader.skip(wireType);
2259
+ if (u !== false)
2260
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2261
+ }
2262
+ }
2263
+ return message;
2264
+ }
2265
+ internalBinaryWrite(message: EnumValueDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2266
+ /* optional string name = 1; */
2267
+ if (message.name !== undefined)
2268
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2269
+ /* optional int32 number = 2; */
2270
+ if (message.number !== undefined)
2271
+ writer.tag(2, WireType.Varint).int32(message.number);
2272
+ /* optional google.protobuf.EnumValueOptions options = 3; */
2273
+ if (message.options)
2274
+ EnumValueOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2275
+ let u = options.writeUnknownFields;
2276
+ if (u !== false)
2277
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2278
+ return writer;
2279
+ }
2280
+ }
2281
+ /**
2282
+ * @generated MessageType for protobuf message google.protobuf.EnumValueDescriptorProto
2283
+ */
2284
+ export const EnumValueDescriptorProto = new EnumValueDescriptorProto$Type();
2285
+ // @generated message type with reflection information, may provide speed optimized methods
2286
+ class ServiceDescriptorProto$Type extends MessageType<ServiceDescriptorProto> {
2287
+ constructor() {
2288
+ super("google.protobuf.ServiceDescriptorProto", [
2289
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2290
+ { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MethodDescriptorProto },
2291
+ { no: 3, name: "options", kind: "message", T: () => ServiceOptions }
2292
+ ]);
2293
+ }
2294
+ create(value?: PartialMessage<ServiceDescriptorProto>): ServiceDescriptorProto {
2295
+ const message = { method: [] };
2296
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2297
+ if (value !== undefined)
2298
+ reflectionMergePartial<ServiceDescriptorProto>(this, message, value);
2299
+ return message;
2300
+ }
2301
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto {
2302
+ let message = target ?? this.create(), end = reader.pos + length;
2303
+ while (reader.pos < end) {
2304
+ let [fieldNo, wireType] = reader.tag();
2305
+ switch (fieldNo) {
2306
+ case /* optional string name */ 1:
2307
+ message.name = reader.string();
2308
+ break;
2309
+ case /* repeated google.protobuf.MethodDescriptorProto method */ 2:
2310
+ message.method.push(MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
2311
+ break;
2312
+ case /* optional google.protobuf.ServiceOptions options */ 3:
2313
+ message.options = ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
2314
+ break;
2315
+ default:
2316
+ let u = options.readUnknownField;
2317
+ if (u === "throw")
2318
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2319
+ let d = reader.skip(wireType);
2320
+ if (u !== false)
2321
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2322
+ }
2323
+ }
2324
+ return message;
2325
+ }
2326
+ internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2327
+ /* optional string name = 1; */
2328
+ if (message.name !== undefined)
2329
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2330
+ /* repeated google.protobuf.MethodDescriptorProto method = 2; */
2331
+ for (let i = 0; i < message.method.length; i++)
2332
+ MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2333
+ /* optional google.protobuf.ServiceOptions options = 3; */
2334
+ if (message.options)
2335
+ ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2336
+ let u = options.writeUnknownFields;
2337
+ if (u !== false)
2338
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2339
+ return writer;
2340
+ }
2341
+ }
2342
+ /**
2343
+ * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto
2344
+ */
2345
+ export const ServiceDescriptorProto = new ServiceDescriptorProto$Type();
2346
+ // @generated message type with reflection information, may provide speed optimized methods
2347
+ class MethodDescriptorProto$Type extends MessageType<MethodDescriptorProto> {
2348
+ constructor() {
2349
+ super("google.protobuf.MethodDescriptorProto", [
2350
+ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2351
+ { no: 2, name: "input_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2352
+ { no: 3, name: "output_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2353
+ { no: 4, name: "options", kind: "message", T: () => MethodOptions },
2354
+ { no: 5, name: "client_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2355
+ { no: 6, name: "server_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
2356
+ ]);
2357
+ }
2358
+ create(value?: PartialMessage<MethodDescriptorProto>): MethodDescriptorProto {
2359
+ const message = {};
2360
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2361
+ if (value !== undefined)
2362
+ reflectionMergePartial<MethodDescriptorProto>(this, message, value);
2363
+ return message;
2364
+ }
2365
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto {
2366
+ let message = target ?? this.create(), end = reader.pos + length;
2367
+ while (reader.pos < end) {
2368
+ let [fieldNo, wireType] = reader.tag();
2369
+ switch (fieldNo) {
2370
+ case /* optional string name */ 1:
2371
+ message.name = reader.string();
2372
+ break;
2373
+ case /* optional string input_type */ 2:
2374
+ message.inputType = reader.string();
2375
+ break;
2376
+ case /* optional string output_type */ 3:
2377
+ message.outputType = reader.string();
2378
+ break;
2379
+ case /* optional google.protobuf.MethodOptions options */ 4:
2380
+ message.options = MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options);
2381
+ break;
2382
+ case /* optional bool client_streaming */ 5:
2383
+ message.clientStreaming = reader.bool();
2384
+ break;
2385
+ case /* optional bool server_streaming */ 6:
2386
+ message.serverStreaming = reader.bool();
2387
+ break;
2388
+ default:
2389
+ let u = options.readUnknownField;
2390
+ if (u === "throw")
2391
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2392
+ let d = reader.skip(wireType);
2393
+ if (u !== false)
2394
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2395
+ }
2396
+ }
2397
+ return message;
2398
+ }
2399
+ internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2400
+ /* optional string name = 1; */
2401
+ if (message.name !== undefined)
2402
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
2403
+ /* optional string input_type = 2; */
2404
+ if (message.inputType !== undefined)
2405
+ writer.tag(2, WireType.LengthDelimited).string(message.inputType);
2406
+ /* optional string output_type = 3; */
2407
+ if (message.outputType !== undefined)
2408
+ writer.tag(3, WireType.LengthDelimited).string(message.outputType);
2409
+ /* optional google.protobuf.MethodOptions options = 4; */
2410
+ if (message.options)
2411
+ MethodOptions.internalBinaryWrite(message.options, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
2412
+ /* optional bool client_streaming = 5; */
2413
+ if (message.clientStreaming !== undefined)
2414
+ writer.tag(5, WireType.Varint).bool(message.clientStreaming);
2415
+ /* optional bool server_streaming = 6; */
2416
+ if (message.serverStreaming !== undefined)
2417
+ writer.tag(6, WireType.Varint).bool(message.serverStreaming);
2418
+ let u = options.writeUnknownFields;
2419
+ if (u !== false)
2420
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2421
+ return writer;
2422
+ }
2423
+ }
2424
+ /**
2425
+ * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto
2426
+ */
2427
+ export const MethodDescriptorProto = new MethodDescriptorProto$Type();
2428
+ // @generated message type with reflection information, may provide speed optimized methods
2429
+ class FileOptions$Type extends MessageType<FileOptions> {
2430
+ constructor() {
2431
+ super("google.protobuf.FileOptions", [
2432
+ { no: 1, name: "java_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2433
+ { no: 8, name: "java_outer_classname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2434
+ { no: 10, name: "java_multiple_files", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2435
+ { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2436
+ { no: 27, name: "java_string_check_utf8", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2437
+ { no: 9, name: "optimize_for", kind: "enum", opt: true, T: () => ["google.protobuf.FileOptions.OptimizeMode", FileOptions_OptimizeMode] },
2438
+ { no: 11, name: "go_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2439
+ { no: 16, name: "cc_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2440
+ { no: 17, name: "java_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2441
+ { no: 18, name: "py_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2442
+ { no: 42, name: "php_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2443
+ { no: 23, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2444
+ { no: 31, name: "cc_enable_arenas", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2445
+ { no: 36, name: "objc_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2446
+ { no: 37, name: "csharp_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2447
+ { no: 39, name: "swift_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2448
+ { no: 40, name: "php_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2449
+ { no: 41, name: "php_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2450
+ { no: 44, name: "php_metadata_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2451
+ { no: 45, name: "ruby_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
2452
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2453
+ ]);
2454
+ }
2455
+ create(value?: PartialMessage<FileOptions>): FileOptions {
2456
+ const message = { uninterpretedOption: [] };
2457
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2458
+ if (value !== undefined)
2459
+ reflectionMergePartial<FileOptions>(this, message, value);
2460
+ return message;
2461
+ }
2462
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions {
2463
+ let message = target ?? this.create(), end = reader.pos + length;
2464
+ while (reader.pos < end) {
2465
+ let [fieldNo, wireType] = reader.tag();
2466
+ switch (fieldNo) {
2467
+ case /* optional string java_package */ 1:
2468
+ message.javaPackage = reader.string();
2469
+ break;
2470
+ case /* optional string java_outer_classname */ 8:
2471
+ message.javaOuterClassname = reader.string();
2472
+ break;
2473
+ case /* optional bool java_multiple_files */ 10:
2474
+ message.javaMultipleFiles = reader.bool();
2475
+ break;
2476
+ case /* optional bool java_generate_equals_and_hash = 20 [deprecated = true];*/ 20:
2477
+ message.javaGenerateEqualsAndHash = reader.bool();
2478
+ break;
2479
+ case /* optional bool java_string_check_utf8 */ 27:
2480
+ message.javaStringCheckUtf8 = reader.bool();
2481
+ break;
2482
+ case /* optional google.protobuf.FileOptions.OptimizeMode optimize_for */ 9:
2483
+ message.optimizeFor = reader.int32();
2484
+ break;
2485
+ case /* optional string go_package */ 11:
2486
+ message.goPackage = reader.string();
2487
+ break;
2488
+ case /* optional bool cc_generic_services */ 16:
2489
+ message.ccGenericServices = reader.bool();
2490
+ break;
2491
+ case /* optional bool java_generic_services */ 17:
2492
+ message.javaGenericServices = reader.bool();
2493
+ break;
2494
+ case /* optional bool py_generic_services */ 18:
2495
+ message.pyGenericServices = reader.bool();
2496
+ break;
2497
+ case /* optional bool php_generic_services */ 42:
2498
+ message.phpGenericServices = reader.bool();
2499
+ break;
2500
+ case /* optional bool deprecated */ 23:
2501
+ message.deprecated = reader.bool();
2502
+ break;
2503
+ case /* optional bool cc_enable_arenas */ 31:
2504
+ message.ccEnableArenas = reader.bool();
2505
+ break;
2506
+ case /* optional string objc_class_prefix */ 36:
2507
+ message.objcClassPrefix = reader.string();
2508
+ break;
2509
+ case /* optional string csharp_namespace */ 37:
2510
+ message.csharpNamespace = reader.string();
2511
+ break;
2512
+ case /* optional string swift_prefix */ 39:
2513
+ message.swiftPrefix = reader.string();
2514
+ break;
2515
+ case /* optional string php_class_prefix */ 40:
2516
+ message.phpClassPrefix = reader.string();
2517
+ break;
2518
+ case /* optional string php_namespace */ 41:
2519
+ message.phpNamespace = reader.string();
2520
+ break;
2521
+ case /* optional string php_metadata_namespace */ 44:
2522
+ message.phpMetadataNamespace = reader.string();
2523
+ break;
2524
+ case /* optional string ruby_package */ 45:
2525
+ message.rubyPackage = reader.string();
2526
+ break;
2527
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2528
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2529
+ break;
2530
+ default:
2531
+ let u = options.readUnknownField;
2532
+ if (u === "throw")
2533
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2534
+ let d = reader.skip(wireType);
2535
+ if (u !== false)
2536
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2537
+ }
2538
+ }
2539
+ return message;
2540
+ }
2541
+ internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2542
+ /* optional string java_package = 1; */
2543
+ if (message.javaPackage !== undefined)
2544
+ writer.tag(1, WireType.LengthDelimited).string(message.javaPackage);
2545
+ /* optional string java_outer_classname = 8; */
2546
+ if (message.javaOuterClassname !== undefined)
2547
+ writer.tag(8, WireType.LengthDelimited).string(message.javaOuterClassname);
2548
+ /* optional bool java_multiple_files = 10; */
2549
+ if (message.javaMultipleFiles !== undefined)
2550
+ writer.tag(10, WireType.Varint).bool(message.javaMultipleFiles);
2551
+ /* optional bool java_generate_equals_and_hash = 20 [deprecated = true]; */
2552
+ if (message.javaGenerateEqualsAndHash !== undefined)
2553
+ writer.tag(20, WireType.Varint).bool(message.javaGenerateEqualsAndHash);
2554
+ /* optional bool java_string_check_utf8 = 27; */
2555
+ if (message.javaStringCheckUtf8 !== undefined)
2556
+ writer.tag(27, WireType.Varint).bool(message.javaStringCheckUtf8);
2557
+ /* optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; */
2558
+ if (message.optimizeFor !== undefined)
2559
+ writer.tag(9, WireType.Varint).int32(message.optimizeFor);
2560
+ /* optional string go_package = 11; */
2561
+ if (message.goPackage !== undefined)
2562
+ writer.tag(11, WireType.LengthDelimited).string(message.goPackage);
2563
+ /* optional bool cc_generic_services = 16; */
2564
+ if (message.ccGenericServices !== undefined)
2565
+ writer.tag(16, WireType.Varint).bool(message.ccGenericServices);
2566
+ /* optional bool java_generic_services = 17; */
2567
+ if (message.javaGenericServices !== undefined)
2568
+ writer.tag(17, WireType.Varint).bool(message.javaGenericServices);
2569
+ /* optional bool py_generic_services = 18; */
2570
+ if (message.pyGenericServices !== undefined)
2571
+ writer.tag(18, WireType.Varint).bool(message.pyGenericServices);
2572
+ /* optional bool php_generic_services = 42; */
2573
+ if (message.phpGenericServices !== undefined)
2574
+ writer.tag(42, WireType.Varint).bool(message.phpGenericServices);
2575
+ /* optional bool deprecated = 23; */
2576
+ if (message.deprecated !== undefined)
2577
+ writer.tag(23, WireType.Varint).bool(message.deprecated);
2578
+ /* optional bool cc_enable_arenas = 31; */
2579
+ if (message.ccEnableArenas !== undefined)
2580
+ writer.tag(31, WireType.Varint).bool(message.ccEnableArenas);
2581
+ /* optional string objc_class_prefix = 36; */
2582
+ if (message.objcClassPrefix !== undefined)
2583
+ writer.tag(36, WireType.LengthDelimited).string(message.objcClassPrefix);
2584
+ /* optional string csharp_namespace = 37; */
2585
+ if (message.csharpNamespace !== undefined)
2586
+ writer.tag(37, WireType.LengthDelimited).string(message.csharpNamespace);
2587
+ /* optional string swift_prefix = 39; */
2588
+ if (message.swiftPrefix !== undefined)
2589
+ writer.tag(39, WireType.LengthDelimited).string(message.swiftPrefix);
2590
+ /* optional string php_class_prefix = 40; */
2591
+ if (message.phpClassPrefix !== undefined)
2592
+ writer.tag(40, WireType.LengthDelimited).string(message.phpClassPrefix);
2593
+ /* optional string php_namespace = 41; */
2594
+ if (message.phpNamespace !== undefined)
2595
+ writer.tag(41, WireType.LengthDelimited).string(message.phpNamespace);
2596
+ /* optional string php_metadata_namespace = 44; */
2597
+ if (message.phpMetadataNamespace !== undefined)
2598
+ writer.tag(44, WireType.LengthDelimited).string(message.phpMetadataNamespace);
2599
+ /* optional string ruby_package = 45; */
2600
+ if (message.rubyPackage !== undefined)
2601
+ writer.tag(45, WireType.LengthDelimited).string(message.rubyPackage);
2602
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2603
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2604
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2605
+ let u = options.writeUnknownFields;
2606
+ if (u !== false)
2607
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2608
+ return writer;
2609
+ }
2610
+ }
2611
+ /**
2612
+ * @generated MessageType for protobuf message google.protobuf.FileOptions
2613
+ */
2614
+ export const FileOptions = new FileOptions$Type();
2615
+ // @generated message type with reflection information, may provide speed optimized methods
2616
+ class MessageOptions$Type extends MessageType<MessageOptions> {
2617
+ constructor() {
2618
+ super("google.protobuf.MessageOptions", [
2619
+ { no: 1, name: "message_set_wire_format", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2620
+ { no: 2, name: "no_standard_descriptor_accessor", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2621
+ { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2622
+ { no: 7, name: "map_entry", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2623
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2624
+ ]);
2625
+ }
2626
+ create(value?: PartialMessage<MessageOptions>): MessageOptions {
2627
+ const message = { uninterpretedOption: [] };
2628
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2629
+ if (value !== undefined)
2630
+ reflectionMergePartial<MessageOptions>(this, message, value);
2631
+ return message;
2632
+ }
2633
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions {
2634
+ let message = target ?? this.create(), end = reader.pos + length;
2635
+ while (reader.pos < end) {
2636
+ let [fieldNo, wireType] = reader.tag();
2637
+ switch (fieldNo) {
2638
+ case /* optional bool message_set_wire_format */ 1:
2639
+ message.messageSetWireFormat = reader.bool();
2640
+ break;
2641
+ case /* optional bool no_standard_descriptor_accessor */ 2:
2642
+ message.noStandardDescriptorAccessor = reader.bool();
2643
+ break;
2644
+ case /* optional bool deprecated */ 3:
2645
+ message.deprecated = reader.bool();
2646
+ break;
2647
+ case /* optional bool map_entry */ 7:
2648
+ message.mapEntry = reader.bool();
2649
+ break;
2650
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2651
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2652
+ break;
2653
+ default:
2654
+ let u = options.readUnknownField;
2655
+ if (u === "throw")
2656
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2657
+ let d = reader.skip(wireType);
2658
+ if (u !== false)
2659
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2660
+ }
2661
+ }
2662
+ return message;
2663
+ }
2664
+ internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2665
+ /* optional bool message_set_wire_format = 1; */
2666
+ if (message.messageSetWireFormat !== undefined)
2667
+ writer.tag(1, WireType.Varint).bool(message.messageSetWireFormat);
2668
+ /* optional bool no_standard_descriptor_accessor = 2; */
2669
+ if (message.noStandardDescriptorAccessor !== undefined)
2670
+ writer.tag(2, WireType.Varint).bool(message.noStandardDescriptorAccessor);
2671
+ /* optional bool deprecated = 3; */
2672
+ if (message.deprecated !== undefined)
2673
+ writer.tag(3, WireType.Varint).bool(message.deprecated);
2674
+ /* optional bool map_entry = 7; */
2675
+ if (message.mapEntry !== undefined)
2676
+ writer.tag(7, WireType.Varint).bool(message.mapEntry);
2677
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2678
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2679
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2680
+ let u = options.writeUnknownFields;
2681
+ if (u !== false)
2682
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2683
+ return writer;
2684
+ }
2685
+ }
2686
+ /**
2687
+ * @generated MessageType for protobuf message google.protobuf.MessageOptions
2688
+ */
2689
+ export const MessageOptions = new MessageOptions$Type();
2690
+ // @generated message type with reflection information, may provide speed optimized methods
2691
+ class FieldOptions$Type extends MessageType<FieldOptions> {
2692
+ constructor() {
2693
+ super("google.protobuf.FieldOptions", [
2694
+ { no: 1, name: "ctype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.CType", FieldOptions_CType] },
2695
+ { no: 2, name: "packed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2696
+ { no: 6, name: "jstype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.JSType", FieldOptions_JSType] },
2697
+ { no: 5, name: "lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2698
+ { no: 15, name: "unverified_lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2699
+ { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2700
+ { no: 10, name: "weak", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2701
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2702
+ ]);
2703
+ }
2704
+ create(value?: PartialMessage<FieldOptions>): FieldOptions {
2705
+ const message = { uninterpretedOption: [] };
2706
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2707
+ if (value !== undefined)
2708
+ reflectionMergePartial<FieldOptions>(this, message, value);
2709
+ return message;
2710
+ }
2711
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions {
2712
+ let message = target ?? this.create(), end = reader.pos + length;
2713
+ while (reader.pos < end) {
2714
+ let [fieldNo, wireType] = reader.tag();
2715
+ switch (fieldNo) {
2716
+ case /* optional google.protobuf.FieldOptions.CType ctype */ 1:
2717
+ message.ctype = reader.int32();
2718
+ break;
2719
+ case /* optional bool packed */ 2:
2720
+ message.packed = reader.bool();
2721
+ break;
2722
+ case /* optional google.protobuf.FieldOptions.JSType jstype */ 6:
2723
+ message.jstype = reader.int32();
2724
+ break;
2725
+ case /* optional bool lazy */ 5:
2726
+ message.lazy = reader.bool();
2727
+ break;
2728
+ case /* optional bool unverified_lazy */ 15:
2729
+ message.unverifiedLazy = reader.bool();
2730
+ break;
2731
+ case /* optional bool deprecated */ 3:
2732
+ message.deprecated = reader.bool();
2733
+ break;
2734
+ case /* optional bool weak */ 10:
2735
+ message.weak = reader.bool();
2736
+ break;
2737
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2738
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2739
+ break;
2740
+ default:
2741
+ let u = options.readUnknownField;
2742
+ if (u === "throw")
2743
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2744
+ let d = reader.skip(wireType);
2745
+ if (u !== false)
2746
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2747
+ }
2748
+ }
2749
+ return message;
2750
+ }
2751
+ internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2752
+ /* optional google.protobuf.FieldOptions.CType ctype = 1; */
2753
+ if (message.ctype !== undefined)
2754
+ writer.tag(1, WireType.Varint).int32(message.ctype);
2755
+ /* optional bool packed = 2; */
2756
+ if (message.packed !== undefined)
2757
+ writer.tag(2, WireType.Varint).bool(message.packed);
2758
+ /* optional google.protobuf.FieldOptions.JSType jstype = 6; */
2759
+ if (message.jstype !== undefined)
2760
+ writer.tag(6, WireType.Varint).int32(message.jstype);
2761
+ /* optional bool lazy = 5; */
2762
+ if (message.lazy !== undefined)
2763
+ writer.tag(5, WireType.Varint).bool(message.lazy);
2764
+ /* optional bool unverified_lazy = 15; */
2765
+ if (message.unverifiedLazy !== undefined)
2766
+ writer.tag(15, WireType.Varint).bool(message.unverifiedLazy);
2767
+ /* optional bool deprecated = 3; */
2768
+ if (message.deprecated !== undefined)
2769
+ writer.tag(3, WireType.Varint).bool(message.deprecated);
2770
+ /* optional bool weak = 10; */
2771
+ if (message.weak !== undefined)
2772
+ writer.tag(10, WireType.Varint).bool(message.weak);
2773
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2774
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2775
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2776
+ let u = options.writeUnknownFields;
2777
+ if (u !== false)
2778
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2779
+ return writer;
2780
+ }
2781
+ }
2782
+ /**
2783
+ * @generated MessageType for protobuf message google.protobuf.FieldOptions
2784
+ */
2785
+ export const FieldOptions = new FieldOptions$Type();
2786
+ // @generated message type with reflection information, may provide speed optimized methods
2787
+ class OneofOptions$Type extends MessageType<OneofOptions> {
2788
+ constructor() {
2789
+ super("google.protobuf.OneofOptions", [
2790
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2791
+ ]);
2792
+ }
2793
+ create(value?: PartialMessage<OneofOptions>): OneofOptions {
2794
+ const message = { uninterpretedOption: [] };
2795
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2796
+ if (value !== undefined)
2797
+ reflectionMergePartial<OneofOptions>(this, message, value);
2798
+ return message;
2799
+ }
2800
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions {
2801
+ let message = target ?? this.create(), end = reader.pos + length;
2802
+ while (reader.pos < end) {
2803
+ let [fieldNo, wireType] = reader.tag();
2804
+ switch (fieldNo) {
2805
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2806
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2807
+ break;
2808
+ default:
2809
+ let u = options.readUnknownField;
2810
+ if (u === "throw")
2811
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2812
+ let d = reader.skip(wireType);
2813
+ if (u !== false)
2814
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2815
+ }
2816
+ }
2817
+ return message;
2818
+ }
2819
+ internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2820
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2821
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2822
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2823
+ let u = options.writeUnknownFields;
2824
+ if (u !== false)
2825
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2826
+ return writer;
2827
+ }
2828
+ }
2829
+ /**
2830
+ * @generated MessageType for protobuf message google.protobuf.OneofOptions
2831
+ */
2832
+ export const OneofOptions = new OneofOptions$Type();
2833
+ // @generated message type with reflection information, may provide speed optimized methods
2834
+ class EnumOptions$Type extends MessageType<EnumOptions> {
2835
+ constructor() {
2836
+ super("google.protobuf.EnumOptions", [
2837
+ { no: 2, name: "allow_alias", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2838
+ { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2839
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2840
+ ]);
2841
+ }
2842
+ create(value?: PartialMessage<EnumOptions>): EnumOptions {
2843
+ const message = { uninterpretedOption: [] };
2844
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2845
+ if (value !== undefined)
2846
+ reflectionMergePartial<EnumOptions>(this, message, value);
2847
+ return message;
2848
+ }
2849
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions {
2850
+ let message = target ?? this.create(), end = reader.pos + length;
2851
+ while (reader.pos < end) {
2852
+ let [fieldNo, wireType] = reader.tag();
2853
+ switch (fieldNo) {
2854
+ case /* optional bool allow_alias */ 2:
2855
+ message.allowAlias = reader.bool();
2856
+ break;
2857
+ case /* optional bool deprecated */ 3:
2858
+ message.deprecated = reader.bool();
2859
+ break;
2860
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2861
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2862
+ break;
2863
+ default:
2864
+ let u = options.readUnknownField;
2865
+ if (u === "throw")
2866
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2867
+ let d = reader.skip(wireType);
2868
+ if (u !== false)
2869
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2870
+ }
2871
+ }
2872
+ return message;
2873
+ }
2874
+ internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2875
+ /* optional bool allow_alias = 2; */
2876
+ if (message.allowAlias !== undefined)
2877
+ writer.tag(2, WireType.Varint).bool(message.allowAlias);
2878
+ /* optional bool deprecated = 3; */
2879
+ if (message.deprecated !== undefined)
2880
+ writer.tag(3, WireType.Varint).bool(message.deprecated);
2881
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2882
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2883
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2884
+ let u = options.writeUnknownFields;
2885
+ if (u !== false)
2886
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2887
+ return writer;
2888
+ }
2889
+ }
2890
+ /**
2891
+ * @generated MessageType for protobuf message google.protobuf.EnumOptions
2892
+ */
2893
+ export const EnumOptions = new EnumOptions$Type();
2894
+ // @generated message type with reflection information, may provide speed optimized methods
2895
+ class EnumValueOptions$Type extends MessageType<EnumValueOptions> {
2896
+ constructor() {
2897
+ super("google.protobuf.EnumValueOptions", [
2898
+ { no: 1, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2899
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2900
+ ]);
2901
+ }
2902
+ create(value?: PartialMessage<EnumValueOptions>): EnumValueOptions {
2903
+ const message = { uninterpretedOption: [] };
2904
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2905
+ if (value !== undefined)
2906
+ reflectionMergePartial<EnumValueOptions>(this, message, value);
2907
+ return message;
2908
+ }
2909
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions {
2910
+ let message = target ?? this.create(), end = reader.pos + length;
2911
+ while (reader.pos < end) {
2912
+ let [fieldNo, wireType] = reader.tag();
2913
+ switch (fieldNo) {
2914
+ case /* optional bool deprecated */ 1:
2915
+ message.deprecated = reader.bool();
2916
+ break;
2917
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2918
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2919
+ break;
2920
+ default:
2921
+ let u = options.readUnknownField;
2922
+ if (u === "throw")
2923
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2924
+ let d = reader.skip(wireType);
2925
+ if (u !== false)
2926
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2927
+ }
2928
+ }
2929
+ return message;
2930
+ }
2931
+ internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2932
+ /* optional bool deprecated = 1; */
2933
+ if (message.deprecated !== undefined)
2934
+ writer.tag(1, WireType.Varint).bool(message.deprecated);
2935
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2936
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2937
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2938
+ let u = options.writeUnknownFields;
2939
+ if (u !== false)
2940
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2941
+ return writer;
2942
+ }
2943
+ }
2944
+ /**
2945
+ * @generated MessageType for protobuf message google.protobuf.EnumValueOptions
2946
+ */
2947
+ export const EnumValueOptions = new EnumValueOptions$Type();
2948
+ // @generated message type with reflection information, may provide speed optimized methods
2949
+ class ServiceOptions$Type extends MessageType<ServiceOptions> {
2950
+ constructor() {
2951
+ super("google.protobuf.ServiceOptions", [
2952
+ { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
2953
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
2954
+ ]);
2955
+ }
2956
+ create(value?: PartialMessage<ServiceOptions>): ServiceOptions {
2957
+ const message = { uninterpretedOption: [] };
2958
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2959
+ if (value !== undefined)
2960
+ reflectionMergePartial<ServiceOptions>(this, message, value);
2961
+ return message;
2962
+ }
2963
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions {
2964
+ let message = target ?? this.create(), end = reader.pos + length;
2965
+ while (reader.pos < end) {
2966
+ let [fieldNo, wireType] = reader.tag();
2967
+ switch (fieldNo) {
2968
+ case /* optional bool deprecated */ 33:
2969
+ message.deprecated = reader.bool();
2970
+ break;
2971
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
2972
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
2973
+ break;
2974
+ default:
2975
+ let u = options.readUnknownField;
2976
+ if (u === "throw")
2977
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2978
+ let d = reader.skip(wireType);
2979
+ if (u !== false)
2980
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2981
+ }
2982
+ }
2983
+ return message;
2984
+ }
2985
+ internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2986
+ /* optional bool deprecated = 33; */
2987
+ if (message.deprecated !== undefined)
2988
+ writer.tag(33, WireType.Varint).bool(message.deprecated);
2989
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
2990
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
2991
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
2992
+ let u = options.writeUnknownFields;
2993
+ if (u !== false)
2994
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2995
+ return writer;
2996
+ }
2997
+ }
2998
+ /**
2999
+ * @generated MessageType for protobuf message google.protobuf.ServiceOptions
3000
+ */
3001
+ export const ServiceOptions = new ServiceOptions$Type();
3002
+ // @generated message type with reflection information, may provide speed optimized methods
3003
+ class MethodOptions$Type extends MessageType<MethodOptions> {
3004
+ constructor() {
3005
+ super("google.protobuf.MethodOptions", [
3006
+ { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
3007
+ { no: 34, name: "idempotency_level", kind: "enum", opt: true, T: () => ["google.protobuf.MethodOptions.IdempotencyLevel", MethodOptions_IdempotencyLevel] },
3008
+ { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }
3009
+ ]);
3010
+ }
3011
+ create(value?: PartialMessage<MethodOptions>): MethodOptions {
3012
+ const message = { uninterpretedOption: [] };
3013
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3014
+ if (value !== undefined)
3015
+ reflectionMergePartial<MethodOptions>(this, message, value);
3016
+ return message;
3017
+ }
3018
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions {
3019
+ let message = target ?? this.create(), end = reader.pos + length;
3020
+ while (reader.pos < end) {
3021
+ let [fieldNo, wireType] = reader.tag();
3022
+ switch (fieldNo) {
3023
+ case /* optional bool deprecated */ 33:
3024
+ message.deprecated = reader.bool();
3025
+ break;
3026
+ case /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level */ 34:
3027
+ message.idempotencyLevel = reader.int32();
3028
+ break;
3029
+ case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999:
3030
+ message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options));
3031
+ break;
3032
+ default:
3033
+ let u = options.readUnknownField;
3034
+ if (u === "throw")
3035
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3036
+ let d = reader.skip(wireType);
3037
+ if (u !== false)
3038
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3039
+ }
3040
+ }
3041
+ return message;
3042
+ }
3043
+ internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3044
+ /* optional bool deprecated = 33; */
3045
+ if (message.deprecated !== undefined)
3046
+ writer.tag(33, WireType.Varint).bool(message.deprecated);
3047
+ /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; */
3048
+ if (message.idempotencyLevel !== undefined)
3049
+ writer.tag(34, WireType.Varint).int32(message.idempotencyLevel);
3050
+ /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */
3051
+ for (let i = 0; i < message.uninterpretedOption.length; i++)
3052
+ UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join();
3053
+ let u = options.writeUnknownFields;
3054
+ if (u !== false)
3055
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3056
+ return writer;
3057
+ }
3058
+ }
3059
+ /**
3060
+ * @generated MessageType for protobuf message google.protobuf.MethodOptions
3061
+ */
3062
+ export const MethodOptions = new MethodOptions$Type();
3063
+ // @generated message type with reflection information, may provide speed optimized methods
3064
+ class UninterpretedOption$Type extends MessageType<UninterpretedOption> {
3065
+ constructor() {
3066
+ super("google.protobuf.UninterpretedOption", [
3067
+ { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption_NamePart },
3068
+ { no: 3, name: "identifier_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
3069
+ { no: 4, name: "positive_int_value", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
3070
+ { no: 5, name: "negative_int_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/ },
3071
+ { no: 6, name: "double_value", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
3072
+ { no: 7, name: "string_value", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
3073
+ { no: 8, name: "aggregate_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
3074
+ ]);
3075
+ }
3076
+ create(value?: PartialMessage<UninterpretedOption>): UninterpretedOption {
3077
+ const message = { name: [] };
3078
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3079
+ if (value !== undefined)
3080
+ reflectionMergePartial<UninterpretedOption>(this, message, value);
3081
+ return message;
3082
+ }
3083
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption {
3084
+ let message = target ?? this.create(), end = reader.pos + length;
3085
+ while (reader.pos < end) {
3086
+ let [fieldNo, wireType] = reader.tag();
3087
+ switch (fieldNo) {
3088
+ case /* repeated google.protobuf.UninterpretedOption.NamePart name */ 2:
3089
+ message.name.push(UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options));
3090
+ break;
3091
+ case /* optional string identifier_value */ 3:
3092
+ message.identifierValue = reader.string();
3093
+ break;
3094
+ case /* optional uint64 positive_int_value */ 4:
3095
+ message.positiveIntValue = reader.uint64().toString();
3096
+ break;
3097
+ case /* optional int64 negative_int_value */ 5:
3098
+ message.negativeIntValue = reader.int64().toString();
3099
+ break;
3100
+ case /* optional double double_value */ 6:
3101
+ message.doubleValue = reader.double();
3102
+ break;
3103
+ case /* optional bytes string_value */ 7:
3104
+ message.stringValue = reader.bytes();
3105
+ break;
3106
+ case /* optional string aggregate_value */ 8:
3107
+ message.aggregateValue = reader.string();
3108
+ break;
3109
+ default:
3110
+ let u = options.readUnknownField;
3111
+ if (u === "throw")
3112
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3113
+ let d = reader.skip(wireType);
3114
+ if (u !== false)
3115
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3116
+ }
3117
+ }
3118
+ return message;
3119
+ }
3120
+ internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3121
+ /* repeated google.protobuf.UninterpretedOption.NamePart name = 2; */
3122
+ for (let i = 0; i < message.name.length; i++)
3123
+ UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
3124
+ /* optional string identifier_value = 3; */
3125
+ if (message.identifierValue !== undefined)
3126
+ writer.tag(3, WireType.LengthDelimited).string(message.identifierValue);
3127
+ /* optional uint64 positive_int_value = 4; */
3128
+ if (message.positiveIntValue !== undefined)
3129
+ writer.tag(4, WireType.Varint).uint64(message.positiveIntValue);
3130
+ /* optional int64 negative_int_value = 5; */
3131
+ if (message.negativeIntValue !== undefined)
3132
+ writer.tag(5, WireType.Varint).int64(message.negativeIntValue);
3133
+ /* optional double double_value = 6; */
3134
+ if (message.doubleValue !== undefined)
3135
+ writer.tag(6, WireType.Bit64).double(message.doubleValue);
3136
+ /* optional bytes string_value = 7; */
3137
+ if (message.stringValue !== undefined)
3138
+ writer.tag(7, WireType.LengthDelimited).bytes(message.stringValue);
3139
+ /* optional string aggregate_value = 8; */
3140
+ if (message.aggregateValue !== undefined)
3141
+ writer.tag(8, WireType.LengthDelimited).string(message.aggregateValue);
3142
+ let u = options.writeUnknownFields;
3143
+ if (u !== false)
3144
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3145
+ return writer;
3146
+ }
3147
+ }
3148
+ /**
3149
+ * @generated MessageType for protobuf message google.protobuf.UninterpretedOption
3150
+ */
3151
+ export const UninterpretedOption = new UninterpretedOption$Type();
3152
+ // @generated message type with reflection information, may provide speed optimized methods
3153
+ class UninterpretedOption_NamePart$Type extends MessageType<UninterpretedOption_NamePart> {
3154
+ constructor() {
3155
+ super("google.protobuf.UninterpretedOption.NamePart", [
3156
+ { no: 1, name: "name_part", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3157
+ { no: 2, name: "is_extension", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
3158
+ ]);
3159
+ }
3160
+ create(value?: PartialMessage<UninterpretedOption_NamePart>): UninterpretedOption_NamePart {
3161
+ const message = { namePart: "", isExtension: false };
3162
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3163
+ if (value !== undefined)
3164
+ reflectionMergePartial<UninterpretedOption_NamePart>(this, message, value);
3165
+ return message;
3166
+ }
3167
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart {
3168
+ let message = target ?? this.create(), end = reader.pos + length;
3169
+ while (reader.pos < end) {
3170
+ let [fieldNo, wireType] = reader.tag();
3171
+ switch (fieldNo) {
3172
+ case /* string name_part */ 1:
3173
+ message.namePart = reader.string();
3174
+ break;
3175
+ case /* bool is_extension */ 2:
3176
+ message.isExtension = reader.bool();
3177
+ break;
3178
+ default:
3179
+ let u = options.readUnknownField;
3180
+ if (u === "throw")
3181
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3182
+ let d = reader.skip(wireType);
3183
+ if (u !== false)
3184
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3185
+ }
3186
+ }
3187
+ return message;
3188
+ }
3189
+ internalBinaryWrite(message: UninterpretedOption_NamePart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3190
+ /* string name_part = 1; */
3191
+ if (message.namePart !== "")
3192
+ writer.tag(1, WireType.LengthDelimited).string(message.namePart);
3193
+ /* bool is_extension = 2; */
3194
+ if (message.isExtension !== false)
3195
+ writer.tag(2, WireType.Varint).bool(message.isExtension);
3196
+ let u = options.writeUnknownFields;
3197
+ if (u !== false)
3198
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3199
+ return writer;
3200
+ }
3201
+ }
3202
+ /**
3203
+ * @generated MessageType for protobuf message google.protobuf.UninterpretedOption.NamePart
3204
+ */
3205
+ export const UninterpretedOption_NamePart = new UninterpretedOption_NamePart$Type();
3206
+ // @generated message type with reflection information, may provide speed optimized methods
3207
+ class SourceCodeInfo$Type extends MessageType<SourceCodeInfo> {
3208
+ constructor() {
3209
+ super("google.protobuf.SourceCodeInfo", [
3210
+ { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SourceCodeInfo_Location }
3211
+ ]);
3212
+ }
3213
+ create(value?: PartialMessage<SourceCodeInfo>): SourceCodeInfo {
3214
+ const message = { location: [] };
3215
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3216
+ if (value !== undefined)
3217
+ reflectionMergePartial<SourceCodeInfo>(this, message, value);
3218
+ return message;
3219
+ }
3220
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo {
3221
+ let message = target ?? this.create(), end = reader.pos + length;
3222
+ while (reader.pos < end) {
3223
+ let [fieldNo, wireType] = reader.tag();
3224
+ switch (fieldNo) {
3225
+ case /* repeated google.protobuf.SourceCodeInfo.Location location */ 1:
3226
+ message.location.push(SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options));
3227
+ break;
3228
+ default:
3229
+ let u = options.readUnknownField;
3230
+ if (u === "throw")
3231
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3232
+ let d = reader.skip(wireType);
3233
+ if (u !== false)
3234
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3235
+ }
3236
+ }
3237
+ return message;
3238
+ }
3239
+ internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3240
+ /* repeated google.protobuf.SourceCodeInfo.Location location = 1; */
3241
+ for (let i = 0; i < message.location.length; i++)
3242
+ SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3243
+ let u = options.writeUnknownFields;
3244
+ if (u !== false)
3245
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3246
+ return writer;
3247
+ }
3248
+ }
3249
+ /**
3250
+ * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo
3251
+ */
3252
+ export const SourceCodeInfo = new SourceCodeInfo$Type();
3253
+ // @generated message type with reflection information, may provide speed optimized methods
3254
+ class SourceCodeInfo_Location$Type extends MessageType<SourceCodeInfo_Location> {
3255
+ constructor() {
3256
+ super("google.protobuf.SourceCodeInfo.Location", [
3257
+ { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
3258
+ { no: 2, name: "span", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
3259
+ { no: 3, name: "leading_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
3260
+ { no: 4, name: "trailing_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
3261
+ { no: 6, name: "leading_detached_comments", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
3262
+ ]);
3263
+ }
3264
+ create(value?: PartialMessage<SourceCodeInfo_Location>): SourceCodeInfo_Location {
3265
+ const message = { path: [], span: [], leadingDetachedComments: [] };
3266
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3267
+ if (value !== undefined)
3268
+ reflectionMergePartial<SourceCodeInfo_Location>(this, message, value);
3269
+ return message;
3270
+ }
3271
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location {
3272
+ let message = target ?? this.create(), end = reader.pos + length;
3273
+ while (reader.pos < end) {
3274
+ let [fieldNo, wireType] = reader.tag();
3275
+ switch (fieldNo) {
3276
+ case /* repeated int32 path = 1 [packed = true];*/ 1:
3277
+ if (wireType === WireType.LengthDelimited)
3278
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
3279
+ message.path.push(reader.int32());
3280
+ else
3281
+ message.path.push(reader.int32());
3282
+ break;
3283
+ case /* repeated int32 span = 2 [packed = true];*/ 2:
3284
+ if (wireType === WireType.LengthDelimited)
3285
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
3286
+ message.span.push(reader.int32());
3287
+ else
3288
+ message.span.push(reader.int32());
3289
+ break;
3290
+ case /* optional string leading_comments */ 3:
3291
+ message.leadingComments = reader.string();
3292
+ break;
3293
+ case /* optional string trailing_comments */ 4:
3294
+ message.trailingComments = reader.string();
3295
+ break;
3296
+ case /* repeated string leading_detached_comments */ 6:
3297
+ message.leadingDetachedComments.push(reader.string());
3298
+ break;
3299
+ default:
3300
+ let u = options.readUnknownField;
3301
+ if (u === "throw")
3302
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3303
+ let d = reader.skip(wireType);
3304
+ if (u !== false)
3305
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3306
+ }
3307
+ }
3308
+ return message;
3309
+ }
3310
+ internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3311
+ /* repeated int32 path = 1 [packed = true]; */
3312
+ if (message.path.length) {
3313
+ writer.tag(1, WireType.LengthDelimited).fork();
3314
+ for (let i = 0; i < message.path.length; i++)
3315
+ writer.int32(message.path[i]);
3316
+ writer.join();
3317
+ }
3318
+ /* repeated int32 span = 2 [packed = true]; */
3319
+ if (message.span.length) {
3320
+ writer.tag(2, WireType.LengthDelimited).fork();
3321
+ for (let i = 0; i < message.span.length; i++)
3322
+ writer.int32(message.span[i]);
3323
+ writer.join();
3324
+ }
3325
+ /* optional string leading_comments = 3; */
3326
+ if (message.leadingComments !== undefined)
3327
+ writer.tag(3, WireType.LengthDelimited).string(message.leadingComments);
3328
+ /* optional string trailing_comments = 4; */
3329
+ if (message.trailingComments !== undefined)
3330
+ writer.tag(4, WireType.LengthDelimited).string(message.trailingComments);
3331
+ /* repeated string leading_detached_comments = 6; */
3332
+ for (let i = 0; i < message.leadingDetachedComments.length; i++)
3333
+ writer.tag(6, WireType.LengthDelimited).string(message.leadingDetachedComments[i]);
3334
+ let u = options.writeUnknownFields;
3335
+ if (u !== false)
3336
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3337
+ return writer;
3338
+ }
3339
+ }
3340
+ /**
3341
+ * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location
3342
+ */
3343
+ export const SourceCodeInfo_Location = new SourceCodeInfo_Location$Type();
3344
+ // @generated message type with reflection information, may provide speed optimized methods
3345
+ class GeneratedCodeInfo$Type extends MessageType<GeneratedCodeInfo> {
3346
+ constructor() {
3347
+ super("google.protobuf.GeneratedCodeInfo", [
3348
+ { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GeneratedCodeInfo_Annotation }
3349
+ ]);
3350
+ }
3351
+ create(value?: PartialMessage<GeneratedCodeInfo>): GeneratedCodeInfo {
3352
+ const message = { annotation: [] };
3353
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3354
+ if (value !== undefined)
3355
+ reflectionMergePartial<GeneratedCodeInfo>(this, message, value);
3356
+ return message;
3357
+ }
3358
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo {
3359
+ let message = target ?? this.create(), end = reader.pos + length;
3360
+ while (reader.pos < end) {
3361
+ let [fieldNo, wireType] = reader.tag();
3362
+ switch (fieldNo) {
3363
+ case /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation */ 1:
3364
+ message.annotation.push(GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options));
3365
+ break;
3366
+ default:
3367
+ let u = options.readUnknownField;
3368
+ if (u === "throw")
3369
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3370
+ let d = reader.skip(wireType);
3371
+ if (u !== false)
3372
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3373
+ }
3374
+ }
3375
+ return message;
3376
+ }
3377
+ internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3378
+ /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; */
3379
+ for (let i = 0; i < message.annotation.length; i++)
3380
+ GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3381
+ let u = options.writeUnknownFields;
3382
+ if (u !== false)
3383
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3384
+ return writer;
3385
+ }
3386
+ }
3387
+ /**
3388
+ * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo
3389
+ */
3390
+ export const GeneratedCodeInfo = new GeneratedCodeInfo$Type();
3391
+ // @generated message type with reflection information, may provide speed optimized methods
3392
+ class GeneratedCodeInfo_Annotation$Type extends MessageType<GeneratedCodeInfo_Annotation> {
3393
+ constructor() {
3394
+ super("google.protobuf.GeneratedCodeInfo.Annotation", [
3395
+ { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
3396
+ { no: 2, name: "source_file", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
3397
+ { no: 3, name: "begin", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
3398
+ { no: 4, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
3399
+ ]);
3400
+ }
3401
+ create(value?: PartialMessage<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation {
3402
+ const message = { path: [] };
3403
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
3404
+ if (value !== undefined)
3405
+ reflectionMergePartial<GeneratedCodeInfo_Annotation>(this, message, value);
3406
+ return message;
3407
+ }
3408
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation {
3409
+ let message = target ?? this.create(), end = reader.pos + length;
3410
+ while (reader.pos < end) {
3411
+ let [fieldNo, wireType] = reader.tag();
3412
+ switch (fieldNo) {
3413
+ case /* repeated int32 path = 1 [packed = true];*/ 1:
3414
+ if (wireType === WireType.LengthDelimited)
3415
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
3416
+ message.path.push(reader.int32());
3417
+ else
3418
+ message.path.push(reader.int32());
3419
+ break;
3420
+ case /* optional string source_file */ 2:
3421
+ message.sourceFile = reader.string();
3422
+ break;
3423
+ case /* optional int32 begin */ 3:
3424
+ message.begin = reader.int32();
3425
+ break;
3426
+ case /* optional int32 end */ 4:
3427
+ message.end = reader.int32();
3428
+ break;
3429
+ default:
3430
+ let u = options.readUnknownField;
3431
+ if (u === "throw")
3432
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3433
+ let d = reader.skip(wireType);
3434
+ if (u !== false)
3435
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3436
+ }
3437
+ }
3438
+ return message;
3439
+ }
3440
+ internalBinaryWrite(message: GeneratedCodeInfo_Annotation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3441
+ /* repeated int32 path = 1 [packed = true]; */
3442
+ if (message.path.length) {
3443
+ writer.tag(1, WireType.LengthDelimited).fork();
3444
+ for (let i = 0; i < message.path.length; i++)
3445
+ writer.int32(message.path[i]);
3446
+ writer.join();
3447
+ }
3448
+ /* optional string source_file = 2; */
3449
+ if (message.sourceFile !== undefined)
3450
+ writer.tag(2, WireType.LengthDelimited).string(message.sourceFile);
3451
+ /* optional int32 begin = 3; */
3452
+ if (message.begin !== undefined)
3453
+ writer.tag(3, WireType.Varint).int32(message.begin);
3454
+ /* optional int32 end = 4; */
3455
+ if (message.end !== undefined)
3456
+ writer.tag(4, WireType.Varint).int32(message.end);
3457
+ let u = options.writeUnknownFields;
3458
+ if (u !== false)
3459
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3460
+ return writer;
3461
+ }
3462
+ }
3463
+ /**
3464
+ * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo.Annotation
3465
+ */
3466
+ export const GeneratedCodeInfo_Annotation = new GeneratedCodeInfo_Annotation$Type();