-
Notifications
You must be signed in to change notification settings - Fork 55
/
test_messages_proto2_pb.ts
2002 lines (1677 loc) · 79.6 KB
/
test_messages_proto2_pb.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// LINT: ALLOW_GROUPS
// @generated by protoc-gen-es v1.8.0 with parameter "ts_nocheck=false,target=ts"
// @generated from file google/protobuf/test_messages_proto2.proto (package protobuf_test_messages.proto2, syntax proto2)
/* eslint-disable */
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto2, protoInt64 } from "@bufbuild/protobuf";
/**
* @generated from enum protobuf_test_messages.proto2.ForeignEnumProto2
*/
export enum ForeignEnumProto2 {
/**
* @generated from enum value: FOREIGN_FOO = 0;
*/
FOREIGN_FOO = 0,
/**
* @generated from enum value: FOREIGN_BAR = 1;
*/
FOREIGN_BAR = 1,
/**
* @generated from enum value: FOREIGN_BAZ = 2;
*/
FOREIGN_BAZ = 2,
}
// Retrieve enum metadata with: proto2.getEnumType(ForeignEnumProto2)
proto2.util.setEnumType(ForeignEnumProto2, "protobuf_test_messages.proto2.ForeignEnumProto2", [
{ no: 0, name: "FOREIGN_FOO" },
{ no: 1, name: "FOREIGN_BAR" },
{ no: 2, name: "FOREIGN_BAZ" },
]);
/**
* This proto includes every type of field in both singular and repeated
* forms.
*
* Also, crucially, all messages and enums in this file are eventually
* submessages of this message. So for example, a fuzz test of TestAllTypes
* could trigger bugs that occur in any message type in this file. We verify
* this stays true in a unit test.
*
* @generated from message protobuf_test_messages.proto2.TestAllTypesProto2
*/
export class TestAllTypesProto2 extends Message<TestAllTypesProto2> {
/**
* Singular
*
* @generated from field: optional int32 optional_int32 = 1;
*/
optionalInt32?: number;
/**
* @generated from field: optional int64 optional_int64 = 2;
*/
optionalInt64?: bigint;
/**
* @generated from field: optional uint32 optional_uint32 = 3;
*/
optionalUint32?: number;
/**
* @generated from field: optional uint64 optional_uint64 = 4;
*/
optionalUint64?: bigint;
/**
* @generated from field: optional sint32 optional_sint32 = 5;
*/
optionalSint32?: number;
/**
* @generated from field: optional sint64 optional_sint64 = 6;
*/
optionalSint64?: bigint;
/**
* @generated from field: optional fixed32 optional_fixed32 = 7;
*/
optionalFixed32?: number;
/**
* @generated from field: optional fixed64 optional_fixed64 = 8;
*/
optionalFixed64?: bigint;
/**
* @generated from field: optional sfixed32 optional_sfixed32 = 9;
*/
optionalSfixed32?: number;
/**
* @generated from field: optional sfixed64 optional_sfixed64 = 10;
*/
optionalSfixed64?: bigint;
/**
* @generated from field: optional float optional_float = 11;
*/
optionalFloat?: number;
/**
* @generated from field: optional double optional_double = 12;
*/
optionalDouble?: number;
/**
* @generated from field: optional bool optional_bool = 13;
*/
optionalBool?: boolean;
/**
* @generated from field: optional string optional_string = 14;
*/
optionalString?: string;
/**
* @generated from field: optional bytes optional_bytes = 15;
*/
optionalBytes?: Uint8Array;
/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage optional_nested_message = 18;
*/
optionalNestedMessage?: TestAllTypesProto2_NestedMessage;
/**
* @generated from field: optional protobuf_test_messages.proto2.ForeignMessageProto2 optional_foreign_message = 19;
*/
optionalForeignMessage?: ForeignMessageProto2;
/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum optional_nested_enum = 21;
*/
optionalNestedEnum?: TestAllTypesProto2_NestedEnum;
/**
* @generated from field: optional protobuf_test_messages.proto2.ForeignEnumProto2 optional_foreign_enum = 22;
*/
optionalForeignEnum?: ForeignEnumProto2;
/**
* @generated from field: optional string optional_string_piece = 24;
*/
optionalStringPiece?: string;
/**
* @generated from field: optional string optional_cord = 25;
*/
optionalCord?: string;
/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2 recursive_message = 27;
*/
recursiveMessage?: TestAllTypesProto2;
/**
* Repeated
*
* @generated from field: repeated int32 repeated_int32 = 31;
*/
repeatedInt32: number[] = [];
/**
* @generated from field: repeated int64 repeated_int64 = 32;
*/
repeatedInt64: bigint[] = [];
/**
* @generated from field: repeated uint32 repeated_uint32 = 33;
*/
repeatedUint32: number[] = [];
/**
* @generated from field: repeated uint64 repeated_uint64 = 34;
*/
repeatedUint64: bigint[] = [];
/**
* @generated from field: repeated sint32 repeated_sint32 = 35;
*/
repeatedSint32: number[] = [];
/**
* @generated from field: repeated sint64 repeated_sint64 = 36;
*/
repeatedSint64: bigint[] = [];
/**
* @generated from field: repeated fixed32 repeated_fixed32 = 37;
*/
repeatedFixed32: number[] = [];
/**
* @generated from field: repeated fixed64 repeated_fixed64 = 38;
*/
repeatedFixed64: bigint[] = [];
/**
* @generated from field: repeated sfixed32 repeated_sfixed32 = 39;
*/
repeatedSfixed32: number[] = [];
/**
* @generated from field: repeated sfixed64 repeated_sfixed64 = 40;
*/
repeatedSfixed64: bigint[] = [];
/**
* @generated from field: repeated float repeated_float = 41;
*/
repeatedFloat: number[] = [];
/**
* @generated from field: repeated double repeated_double = 42;
*/
repeatedDouble: number[] = [];
/**
* @generated from field: repeated bool repeated_bool = 43;
*/
repeatedBool: boolean[] = [];
/**
* @generated from field: repeated string repeated_string = 44;
*/
repeatedString: string[] = [];
/**
* @generated from field: repeated bytes repeated_bytes = 45;
*/
repeatedBytes: Uint8Array[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage repeated_nested_message = 48;
*/
repeatedNestedMessage: TestAllTypesProto2_NestedMessage[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.ForeignMessageProto2 repeated_foreign_message = 49;
*/
repeatedForeignMessage: ForeignMessageProto2[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum repeated_nested_enum = 51;
*/
repeatedNestedEnum: TestAllTypesProto2_NestedEnum[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.ForeignEnumProto2 repeated_foreign_enum = 52;
*/
repeatedForeignEnum: ForeignEnumProto2[] = [];
/**
* @generated from field: repeated string repeated_string_piece = 54;
*/
repeatedStringPiece: string[] = [];
/**
* @generated from field: repeated string repeated_cord = 55;
*/
repeatedCord: string[] = [];
/**
* Packed
*
* @generated from field: repeated int32 packed_int32 = 75 [packed = true];
*/
packedInt32: number[] = [];
/**
* @generated from field: repeated int64 packed_int64 = 76 [packed = true];
*/
packedInt64: bigint[] = [];
/**
* @generated from field: repeated uint32 packed_uint32 = 77 [packed = true];
*/
packedUint32: number[] = [];
/**
* @generated from field: repeated uint64 packed_uint64 = 78 [packed = true];
*/
packedUint64: bigint[] = [];
/**
* @generated from field: repeated sint32 packed_sint32 = 79 [packed = true];
*/
packedSint32: number[] = [];
/**
* @generated from field: repeated sint64 packed_sint64 = 80 [packed = true];
*/
packedSint64: bigint[] = [];
/**
* @generated from field: repeated fixed32 packed_fixed32 = 81 [packed = true];
*/
packedFixed32: number[] = [];
/**
* @generated from field: repeated fixed64 packed_fixed64 = 82 [packed = true];
*/
packedFixed64: bigint[] = [];
/**
* @generated from field: repeated sfixed32 packed_sfixed32 = 83 [packed = true];
*/
packedSfixed32: number[] = [];
/**
* @generated from field: repeated sfixed64 packed_sfixed64 = 84 [packed = true];
*/
packedSfixed64: bigint[] = [];
/**
* @generated from field: repeated float packed_float = 85 [packed = true];
*/
packedFloat: number[] = [];
/**
* @generated from field: repeated double packed_double = 86 [packed = true];
*/
packedDouble: number[] = [];
/**
* @generated from field: repeated bool packed_bool = 87 [packed = true];
*/
packedBool: boolean[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum packed_nested_enum = 88 [packed = true];
*/
packedNestedEnum: TestAllTypesProto2_NestedEnum[] = [];
/**
* Unpacked
*
* @generated from field: repeated int32 unpacked_int32 = 89 [packed = false];
*/
unpackedInt32: number[] = [];
/**
* @generated from field: repeated int64 unpacked_int64 = 90 [packed = false];
*/
unpackedInt64: bigint[] = [];
/**
* @generated from field: repeated uint32 unpacked_uint32 = 91 [packed = false];
*/
unpackedUint32: number[] = [];
/**
* @generated from field: repeated uint64 unpacked_uint64 = 92 [packed = false];
*/
unpackedUint64: bigint[] = [];
/**
* @generated from field: repeated sint32 unpacked_sint32 = 93 [packed = false];
*/
unpackedSint32: number[] = [];
/**
* @generated from field: repeated sint64 unpacked_sint64 = 94 [packed = false];
*/
unpackedSint64: bigint[] = [];
/**
* @generated from field: repeated fixed32 unpacked_fixed32 = 95 [packed = false];
*/
unpackedFixed32: number[] = [];
/**
* @generated from field: repeated fixed64 unpacked_fixed64 = 96 [packed = false];
*/
unpackedFixed64: bigint[] = [];
/**
* @generated from field: repeated sfixed32 unpacked_sfixed32 = 97 [packed = false];
*/
unpackedSfixed32: number[] = [];
/**
* @generated from field: repeated sfixed64 unpacked_sfixed64 = 98 [packed = false];
*/
unpackedSfixed64: bigint[] = [];
/**
* @generated from field: repeated float unpacked_float = 99 [packed = false];
*/
unpackedFloat: number[] = [];
/**
* @generated from field: repeated double unpacked_double = 100 [packed = false];
*/
unpackedDouble: number[] = [];
/**
* @generated from field: repeated bool unpacked_bool = 101 [packed = false];
*/
unpackedBool: boolean[] = [];
/**
* @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum unpacked_nested_enum = 102 [packed = false];
*/
unpackedNestedEnum: TestAllTypesProto2_NestedEnum[] = [];
/**
* Map
*
* @generated from field: map<int32, int32> map_int32_int32 = 56;
*/
mapInt32Int32: { [key: number]: number } = {};
/**
* @generated from field: map<int64, int64> map_int64_int64 = 57;
*/
mapInt64Int64: { [key: string]: bigint } = {};
/**
* @generated from field: map<uint32, uint32> map_uint32_uint32 = 58;
*/
mapUint32Uint32: { [key: number]: number } = {};
/**
* @generated from field: map<uint64, uint64> map_uint64_uint64 = 59;
*/
mapUint64Uint64: { [key: string]: bigint } = {};
/**
* @generated from field: map<sint32, sint32> map_sint32_sint32 = 60;
*/
mapSint32Sint32: { [key: number]: number } = {};
/**
* @generated from field: map<sint64, sint64> map_sint64_sint64 = 61;
*/
mapSint64Sint64: { [key: string]: bigint } = {};
/**
* @generated from field: map<fixed32, fixed32> map_fixed32_fixed32 = 62;
*/
mapFixed32Fixed32: { [key: number]: number } = {};
/**
* @generated from field: map<fixed64, fixed64> map_fixed64_fixed64 = 63;
*/
mapFixed64Fixed64: { [key: string]: bigint } = {};
/**
* @generated from field: map<sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
*/
mapSfixed32Sfixed32: { [key: number]: number } = {};
/**
* @generated from field: map<sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
*/
mapSfixed64Sfixed64: { [key: string]: bigint } = {};
/**
* @generated from field: map<int32, float> map_int32_float = 66;
*/
mapInt32Float: { [key: number]: number } = {};
/**
* @generated from field: map<int32, double> map_int32_double = 67;
*/
mapInt32Double: { [key: number]: number } = {};
/**
* @generated from field: map<bool, bool> map_bool_bool = 68;
*/
mapBoolBool: { [key: string]: boolean } = {};
/**
* @generated from field: map<string, string> map_string_string = 69;
*/
mapStringString: { [key: string]: string } = {};
/**
* @generated from field: map<string, bytes> map_string_bytes = 70;
*/
mapStringBytes: { [key: string]: Uint8Array } = {};
/**
* @generated from field: map<string, protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage> map_string_nested_message = 71;
*/
mapStringNestedMessage: { [key: string]: TestAllTypesProto2_NestedMessage } = {};
/**
* @generated from field: map<string, protobuf_test_messages.proto2.ForeignMessageProto2> map_string_foreign_message = 72;
*/
mapStringForeignMessage: { [key: string]: ForeignMessageProto2 } = {};
/**
* @generated from field: map<string, protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum> map_string_nested_enum = 73;
*/
mapStringNestedEnum: { [key: string]: TestAllTypesProto2_NestedEnum } = {};
/**
* @generated from field: map<string, protobuf_test_messages.proto2.ForeignEnumProto2> map_string_foreign_enum = 74;
*/
mapStringForeignEnum: { [key: string]: ForeignEnumProto2 } = {};
/**
* @generated from oneof protobuf_test_messages.proto2.TestAllTypesProto2.oneof_field
*/
oneofField: {
/**
* @generated from field: uint32 oneof_uint32 = 111;
*/
value: number;
case: "oneofUint32";
} | {
/**
* @generated from field: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage oneof_nested_message = 112;
*/
value: TestAllTypesProto2_NestedMessage;
case: "oneofNestedMessage";
} | {
/**
* @generated from field: string oneof_string = 113;
*/
value: string;
case: "oneofString";
} | {
/**
* @generated from field: bytes oneof_bytes = 114;
*/
value: Uint8Array;
case: "oneofBytes";
} | {
/**
* @generated from field: bool oneof_bool = 115;
*/
value: boolean;
case: "oneofBool";
} | {
/**
* @generated from field: uint64 oneof_uint64 = 116;
*/
value: bigint;
case: "oneofUint64";
} | {
/**
* @generated from field: float oneof_float = 117;
*/
value: number;
case: "oneofFloat";
} | {
/**
* @generated from field: double oneof_double = 118;
*/
value: number;
case: "oneofDouble";
} | {
/**
* @generated from field: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum oneof_enum = 119;
*/
value: TestAllTypesProto2_NestedEnum;
case: "oneofEnum";
} | { case: undefined; value?: undefined } = { case: undefined };
/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.Data data = 201;
*/
data?: TestAllTypesProto2_Data;
/**
* default values
*
* @generated from field: optional int32 default_int32 = 241 [default = -123456789];
*/
defaultInt32?: number;
/**
* @generated from field: optional int64 default_int64 = 242 [default = -9123456789123456789];
*/
defaultInt64?: bigint;
/**
* @generated from field: optional uint32 default_uint32 = 243 [default = 2123456789];
*/
defaultUint32?: number;
/**
* @generated from field: optional uint64 default_uint64 = 244 [default = 10123456789123456789];
*/
defaultUint64?: bigint;
/**
* @generated from field: optional sint32 default_sint32 = 245 [default = -123456789];
*/
defaultSint32?: number;
/**
* @generated from field: optional sint64 default_sint64 = 246 [default = -9123456789123456789];
*/
defaultSint64?: bigint;
/**
* @generated from field: optional fixed32 default_fixed32 = 247 [default = 2123456789];
*/
defaultFixed32?: number;
/**
* @generated from field: optional fixed64 default_fixed64 = 248 [default = 10123456789123456789];
*/
defaultFixed64?: bigint;
/**
* @generated from field: optional sfixed32 default_sfixed32 = 249 [default = -123456789];
*/
defaultSfixed32?: number;
/**
* @generated from field: optional sfixed64 default_sfixed64 = 250 [default = -9123456789123456789];
*/
defaultSfixed64?: bigint;
/**
* @generated from field: optional float default_float = 251 [default = 9e+09];
*/
defaultFloat?: number;
/**
* @generated from field: optional double default_double = 252 [default = 7e+22];
*/
defaultDouble?: number;
/**
* @generated from field: optional bool default_bool = 253 [default = true];
*/
defaultBool?: boolean;
/**
* @generated from field: optional string default_string = 254 [default = "Rosebud"];
*/
defaultString?: string;
/**
* @generated from field: optional bytes default_bytes = 255 [default = "joshua"];
*/
defaultBytes?: Uint8Array;
/**
* Test field-name-to-JSON-name convention.
* (protobuf says names can be any valid C/C++ identifier.)
*
* @generated from field: optional int32 fieldname1 = 401;
*/
fieldname1?: number;
/**
* @generated from field: optional int32 field_name2 = 402;
*/
fieldName2?: number;
/**
* @generated from field: optional int32 _field_name3 = 403;
*/
FieldName3?: number;
/**
* @generated from field: optional int32 field__name4_ = 404;
*/
fieldName4?: number;
/**
* @generated from field: optional int32 field0name5 = 405;
*/
field0name5?: number;
/**
* @generated from field: optional int32 field_0_name6 = 406;
*/
field0Name6?: number;
/**
* @generated from field: optional int32 fieldName7 = 407;
*/
fieldName7?: number;
/**
* @generated from field: optional int32 FieldName8 = 408;
*/
FieldName8?: number;
/**
* @generated from field: optional int32 field_Name9 = 409;
*/
fieldName9?: number;
/**
* @generated from field: optional int32 Field_Name10 = 410;
*/
FieldName10?: number;
/**
* @generated from field: optional int32 FIELD_NAME11 = 411;
*/
FIELDNAME11?: number;
/**
* @generated from field: optional int32 FIELD_name12 = 412;
*/
FIELDName12?: number;
/**
* @generated from field: optional int32 __field_name13 = 413;
*/
FieldName13?: number;
/**
* @generated from field: optional int32 __Field_name14 = 414;
*/
FieldName14?: number;
/**
* @generated from field: optional int32 field__name15 = 415;
*/
fieldName15?: number;
/**
* @generated from field: optional int32 field__Name16 = 416;
*/
fieldName16?: number;
/**
* @generated from field: optional int32 field_name17__ = 417;
*/
fieldName17?: number;
/**
* @generated from field: optional int32 Field_name18__ = 418;
*/
FieldName18?: number;
constructor(data?: PartialMessage<TestAllTypesProto2>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "protobuf_test_messages.proto2.TestAllTypesProto2";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "optional_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 2, name: "optional_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
{ no: 3, name: "optional_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
{ no: 4, name: "optional_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
{ no: 5, name: "optional_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
{ no: 6, name: "optional_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
{ no: 7, name: "optional_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
{ no: 8, name: "optional_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
{ no: 9, name: "optional_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
{ no: 10, name: "optional_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
{ no: 11, name: "optional_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
{ no: 12, name: "optional_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
{ no: 13, name: "optional_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
{ no: 14, name: "optional_string", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "optional_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
{ no: 18, name: "optional_nested_message", kind: "message", T: TestAllTypesProto2_NestedMessage, opt: true },
{ no: 19, name: "optional_foreign_message", kind: "message", T: ForeignMessageProto2, opt: true },
{ no: 21, name: "optional_nested_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), opt: true },
{ no: 22, name: "optional_foreign_enum", kind: "enum", T: proto2.getEnumType(ForeignEnumProto2), opt: true },
{ no: 24, name: "optional_string_piece", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 25, name: "optional_cord", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 27, name: "recursive_message", kind: "message", T: TestAllTypesProto2, opt: true },
{ no: 31, name: "repeated_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
{ no: 32, name: "repeated_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
{ no: 33, name: "repeated_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
{ no: 34, name: "repeated_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
{ no: 35, name: "repeated_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
{ no: 36, name: "repeated_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
{ no: 37, name: "repeated_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
{ no: 38, name: "repeated_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
{ no: 39, name: "repeated_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
{ no: 40, name: "repeated_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
{ no: 41, name: "repeated_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
{ no: 42, name: "repeated_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
{ no: 43, name: "repeated_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true },
{ no: 44, name: "repeated_string", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 45, name: "repeated_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
{ no: 48, name: "repeated_nested_message", kind: "message", T: TestAllTypesProto2_NestedMessage, repeated: true },
{ no: 49, name: "repeated_foreign_message", kind: "message", T: ForeignMessageProto2, repeated: true },
{ no: 51, name: "repeated_nested_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), repeated: true },
{ no: 52, name: "repeated_foreign_enum", kind: "enum", T: proto2.getEnumType(ForeignEnumProto2), repeated: true },
{ no: 54, name: "repeated_string_piece", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 55, name: "repeated_cord", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 75, name: "packed_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true, packed: true },
{ no: 76, name: "packed_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true, packed: true },
{ no: 77, name: "packed_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true, packed: true },
{ no: 78, name: "packed_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true, packed: true },
{ no: 79, name: "packed_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true, packed: true },
{ no: 80, name: "packed_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true, packed: true },
{ no: 81, name: "packed_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true, packed: true },
{ no: 82, name: "packed_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true, packed: true },
{ no: 83, name: "packed_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true, packed: true },
{ no: 84, name: "packed_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true, packed: true },
{ no: 85, name: "packed_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true, packed: true },
{ no: 86, name: "packed_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true, packed: true },
{ no: 87, name: "packed_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true, packed: true },
{ no: 88, name: "packed_nested_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), repeated: true, packed: true },
{ no: 89, name: "unpacked_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
{ no: 90, name: "unpacked_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
{ no: 91, name: "unpacked_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
{ no: 92, name: "unpacked_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
{ no: 93, name: "unpacked_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
{ no: 94, name: "unpacked_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
{ no: 95, name: "unpacked_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
{ no: 96, name: "unpacked_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
{ no: 97, name: "unpacked_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
{ no: 98, name: "unpacked_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
{ no: 99, name: "unpacked_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
{ no: 100, name: "unpacked_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
{ no: 101, name: "unpacked_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true },
{ no: 102, name: "unpacked_nested_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), repeated: true },
{ no: 56, name: "map_int32_int32", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 5 /* ScalarType.INT32 */} },
{ no: 57, name: "map_int64_int64", kind: "map", K: 3 /* ScalarType.INT64 */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} },
{ no: 58, name: "map_uint32_uint32", kind: "map", K: 13 /* ScalarType.UINT32 */, V: {kind: "scalar", T: 13 /* ScalarType.UINT32 */} },
{ no: 59, name: "map_uint64_uint64", kind: "map", K: 4 /* ScalarType.UINT64 */, V: {kind: "scalar", T: 4 /* ScalarType.UINT64 */} },
{ no: 60, name: "map_sint32_sint32", kind: "map", K: 17 /* ScalarType.SINT32 */, V: {kind: "scalar", T: 17 /* ScalarType.SINT32 */} },
{ no: 61, name: "map_sint64_sint64", kind: "map", K: 18 /* ScalarType.SINT64 */, V: {kind: "scalar", T: 18 /* ScalarType.SINT64 */} },
{ no: 62, name: "map_fixed32_fixed32", kind: "map", K: 7 /* ScalarType.FIXED32 */, V: {kind: "scalar", T: 7 /* ScalarType.FIXED32 */} },
{ no: 63, name: "map_fixed64_fixed64", kind: "map", K: 6 /* ScalarType.FIXED64 */, V: {kind: "scalar", T: 6 /* ScalarType.FIXED64 */} },
{ no: 64, name: "map_sfixed32_sfixed32", kind: "map", K: 15 /* ScalarType.SFIXED32 */, V: {kind: "scalar", T: 15 /* ScalarType.SFIXED32 */} },
{ no: 65, name: "map_sfixed64_sfixed64", kind: "map", K: 16 /* ScalarType.SFIXED64 */, V: {kind: "scalar", T: 16 /* ScalarType.SFIXED64 */} },
{ no: 66, name: "map_int32_float", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 2 /* ScalarType.FLOAT */} },
{ no: 67, name: "map_int32_double", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 1 /* ScalarType.DOUBLE */} },
{ no: 68, name: "map_bool_bool", kind: "map", K: 8 /* ScalarType.BOOL */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} },
{ no: 69, name: "map_string_string", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
{ no: 70, name: "map_string_bytes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} },
{ no: 71, name: "map_string_nested_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TestAllTypesProto2_NestedMessage} },
{ no: 72, name: "map_string_foreign_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: ForeignMessageProto2} },
{ no: 73, name: "map_string_nested_enum", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum)} },
{ no: 74, name: "map_string_foreign_enum", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "enum", T: proto2.getEnumType(ForeignEnumProto2)} },
{ no: 111, name: "oneof_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "oneof_field" },
{ no: 112, name: "oneof_nested_message", kind: "message", T: TestAllTypesProto2_NestedMessage, oneof: "oneof_field" },
{ no: 113, name: "oneof_string", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "oneof_field" },
{ no: 114, name: "oneof_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "oneof_field" },
{ no: 115, name: "oneof_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "oneof_field" },
{ no: 116, name: "oneof_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "oneof_field" },
{ no: 117, name: "oneof_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, oneof: "oneof_field" },
{ no: 118, name: "oneof_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "oneof_field" },
{ no: 119, name: "oneof_enum", kind: "enum", T: proto2.getEnumType(TestAllTypesProto2_NestedEnum), oneof: "oneof_field" },
{ no: 201, name: "data", kind: "message", T: TestAllTypesProto2_Data, delimited: true, opt: true },
{ no: 241, name: "default_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true, default: -123456789 },
{ no: 242, name: "default_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true, default: protoInt64.parse("-9123456789123456789") },
{ no: 243, name: "default_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true, default: 2123456789 },
{ no: 244, name: "default_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true, default: protoInt64.uParse("10123456789123456789") },
{ no: 245, name: "default_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true, default: -123456789 },
{ no: 246, name: "default_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true, default: protoInt64.parse("-9123456789123456789") },
{ no: 247, name: "default_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true, default: 2123456789 },
{ no: 248, name: "default_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true, default: protoInt64.uParse("10123456789123456789") },
{ no: 249, name: "default_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true, default: -123456789 },
{ no: 250, name: "default_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true, default: protoInt64.parse("-9123456789123456789") },
{ no: 251, name: "default_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true, default: 9000000000 },
{ no: 252, name: "default_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true, default: 7e+22 },
{ no: 253, name: "default_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: true },
{ no: 254, name: "default_string", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true, default: "Rosebud" },
{ no: 255, name: "default_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true, default: new Uint8Array([0x6A, 0x6F, 0x73, 0x68, 0x75, 0x61]) },
{ no: 401, name: "fieldname1", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 402, name: "field_name2", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 403, name: "_field_name3", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 404, name: "field__name4_", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 405, name: "field0name5", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 406, name: "field_0_name6", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 407, name: "fieldName7", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 408, name: "FieldName8", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 409, name: "field_Name9", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 410, name: "Field_Name10", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 411, name: "FIELD_NAME11", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 412, name: "FIELD_name12", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 413, name: "__field_name13", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 414, name: "__Field_name14", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 415, name: "field__name15", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 416, name: "field__Name16", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 417, name: "field_name17__", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 418, name: "Field_name18__", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TestAllTypesProto2 {
return new TestAllTypesProto2().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TestAllTypesProto2 {
return new TestAllTypesProto2().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TestAllTypesProto2 {
return new TestAllTypesProto2().fromJsonString(jsonString, options);
}
static equals(a: TestAllTypesProto2 | PlainMessage<TestAllTypesProto2> | undefined, b: TestAllTypesProto2 | PlainMessage<TestAllTypesProto2> | undefined): boolean {
return proto2.util.equals(TestAllTypesProto2, a, b);
}
}
/**
* @generated from enum protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
*/
export enum TestAllTypesProto2_NestedEnum {
/**
* @generated from enum value: FOO = 0;
*/
FOO = 0,
/**
* @generated from enum value: BAR = 1;
*/
BAR = 1,
/**
* @generated from enum value: BAZ = 2;
*/
BAZ = 2,
/**
* Intentionally negative.
*
* @generated from enum value: NEG = -1;
*/
NEG = -1,
}
// Retrieve enum metadata with: proto2.getEnumType(TestAllTypesProto2_NestedEnum)
proto2.util.setEnumType(TestAllTypesProto2_NestedEnum, "protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum", [
{ no: 0, name: "FOO" },
{ no: 1, name: "BAR" },
{ no: 2, name: "BAZ" },
{ no: -1, name: "NEG" },
]);
/**
* @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
*/
export class TestAllTypesProto2_NestedMessage extends Message<TestAllTypesProto2_NestedMessage> {
/**
* @generated from field: optional int32 a = 1;
*/
a?: number;
/**
* @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2 corecursive = 2;
*/
corecursive?: TestAllTypesProto2;
constructor(data?: PartialMessage<TestAllTypesProto2_NestedMessage>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "a", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 2, name: "corecursive", kind: "message", T: TestAllTypesProto2, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TestAllTypesProto2_NestedMessage {
return new TestAllTypesProto2_NestedMessage().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TestAllTypesProto2_NestedMessage {
return new TestAllTypesProto2_NestedMessage().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TestAllTypesProto2_NestedMessage {
return new TestAllTypesProto2_NestedMessage().fromJsonString(jsonString, options);
}
static equals(a: TestAllTypesProto2_NestedMessage | PlainMessage<TestAllTypesProto2_NestedMessage> | undefined, b: TestAllTypesProto2_NestedMessage | PlainMessage<TestAllTypesProto2_NestedMessage> | undefined): boolean {
return proto2.util.equals(TestAllTypesProto2_NestedMessage, a, b);
}
}
/**
* groups
*
* @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.Data
*/
export class TestAllTypesProto2_Data extends Message<TestAllTypesProto2_Data> {
/**
* @generated from field: optional int32 group_int32 = 202;