forked from influxdata/influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapshot_recovery_request.pb.go
894 lines (864 loc) · 24 KB
/
snapshot_recovery_request.pb.go
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
// Code generated by protoc-gen-gogo.
// source: snapshot_recovery_request.proto
// DO NOT EDIT!
package protobuf
import proto "code.google.com/p/gogoprotobuf/proto"
import json "encoding/json"
import math "math"
// discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.pb"
import io5 "io"
import code_google_com_p_gogoprotobuf_proto10 "code.google.com/p/gogoprotobuf/proto"
import fmt15 "fmt"
import strings10 "strings"
import reflect10 "reflect"
import fmt16 "fmt"
import strings11 "strings"
import code_google_com_p_gogoprotobuf_proto11 "code.google.com/p/gogoprotobuf/proto"
import sort5 "sort"
import strconv5 "strconv"
import reflect11 "reflect"
import fmt17 "fmt"
import bytes5 "bytes"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type SnapshotRecoveryRequest struct {
LeaderName *string `protobuf:"bytes,1,req" json:"LeaderName,omitempty"`
LastIndex *uint64 `protobuf:"varint,2,req" json:"LastIndex,omitempty"`
LastTerm *uint64 `protobuf:"varint,3,req" json:"LastTerm,omitempty"`
Peers []*SnapshotRecoveryRequest_Peer `protobuf:"bytes,4,rep" json:"Peers,omitempty"`
State []byte `protobuf:"bytes,5,req" json:"State,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SnapshotRecoveryRequest) Reset() { *m = SnapshotRecoveryRequest{} }
func (*SnapshotRecoveryRequest) ProtoMessage() {}
func (m *SnapshotRecoveryRequest) GetLeaderName() string {
if m != nil && m.LeaderName != nil {
return *m.LeaderName
}
return ""
}
func (m *SnapshotRecoveryRequest) GetLastIndex() uint64 {
if m != nil && m.LastIndex != nil {
return *m.LastIndex
}
return 0
}
func (m *SnapshotRecoveryRequest) GetLastTerm() uint64 {
if m != nil && m.LastTerm != nil {
return *m.LastTerm
}
return 0
}
func (m *SnapshotRecoveryRequest) GetPeers() []*SnapshotRecoveryRequest_Peer {
if m != nil {
return m.Peers
}
return nil
}
func (m *SnapshotRecoveryRequest) GetState() []byte {
if m != nil {
return m.State
}
return nil
}
type SnapshotRecoveryRequest_Peer struct {
Name *string `protobuf:"bytes,1,req" json:"Name,omitempty"`
ConnectionString *string `protobuf:"bytes,2,req" json:"ConnectionString,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SnapshotRecoveryRequest_Peer) Reset() { *m = SnapshotRecoveryRequest_Peer{} }
func (*SnapshotRecoveryRequest_Peer) ProtoMessage() {}
func (m *SnapshotRecoveryRequest_Peer) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *SnapshotRecoveryRequest_Peer) GetConnectionString() string {
if m != nil && m.ConnectionString != nil {
return *m.ConnectionString
}
return ""
}
func init() {
}
func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
l := len(data)
index := 0
for index < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
switch fieldNum {
case 1:
if wireType != 2 {
return proto.ErrWrongType
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + int(stringLen)
if postIndex > l {
return io5.ErrUnexpectedEOF
}
s := string(data[index:postIndex])
m.LeaderName = &s
index = postIndex
case 2:
if wireType != 0 {
return proto.ErrWrongType
}
var v uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.LastIndex = &v
case 3:
if wireType != 0 {
return proto.ErrWrongType
}
var v uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.LastTerm = &v
case 4:
if wireType != 2 {
return proto.ErrWrongType
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io5.ErrUnexpectedEOF
}
m.Peers = append(m.Peers, &SnapshotRecoveryRequest_Peer{})
m.Peers[len(m.Peers)-1].Unmarshal(data[index:postIndex])
index = postIndex
case 5:
if wireType != 2 {
return proto.ErrWrongType
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + byteLen
if postIndex > l {
return io5.ErrUnexpectedEOF
}
m.State = append(m.State, data[index:postIndex]...)
index = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
index -= sizeOfWire
skippy, err := code_google_com_p_gogoprotobuf_proto10.Skip(data[index:])
if err != nil {
return err
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (m *SnapshotRecoveryRequest_Peer) Unmarshal(data []byte) error {
l := len(data)
index := 0
for index < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
switch fieldNum {
case 1:
if wireType != 2 {
return proto.ErrWrongType
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + int(stringLen)
if postIndex > l {
return io5.ErrUnexpectedEOF
}
s := string(data[index:postIndex])
m.Name = &s
index = postIndex
case 2:
if wireType != 2 {
return proto.ErrWrongType
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io5.ErrUnexpectedEOF
}
b := data[index]
index++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + int(stringLen)
if postIndex > l {
return io5.ErrUnexpectedEOF
}
s := string(data[index:postIndex])
m.ConnectionString = &s
index = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
index -= sizeOfWire
skippy, err := code_google_com_p_gogoprotobuf_proto10.Skip(data[index:])
if err != nil {
return err
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (this *SnapshotRecoveryRequest) String() string {
if this == nil {
return "nil"
}
s := strings10.Join([]string{`&SnapshotRecoveryRequest{`,
`LeaderName:` + valueToStringSnapshotRecoveryRequest(this.LeaderName) + `,`,
`LastIndex:` + valueToStringSnapshotRecoveryRequest(this.LastIndex) + `,`,
`LastTerm:` + valueToStringSnapshotRecoveryRequest(this.LastTerm) + `,`,
`Peers:` + strings10.Replace(fmt15.Sprintf("%v", this.Peers), "SnapshotRecoveryRequest_Peer", "SnapshotRecoveryRequest_Peer", 1) + `,`,
`State:` + valueToStringSnapshotRecoveryRequest(this.State) + `,`,
`XXX_unrecognized:` + fmt15.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *SnapshotRecoveryRequest_Peer) String() string {
if this == nil {
return "nil"
}
s := strings10.Join([]string{`&SnapshotRecoveryRequest_Peer{`,
`Name:` + valueToStringSnapshotRecoveryRequest(this.Name) + `,`,
`ConnectionString:` + valueToStringSnapshotRecoveryRequest(this.ConnectionString) + `,`,
`XXX_unrecognized:` + fmt15.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringSnapshotRecoveryRequest(v interface{}) string {
rv := reflect10.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect10.Indirect(rv).Interface()
return fmt15.Sprintf("*%v", pv)
}
func (m *SnapshotRecoveryRequest) Size() (n int) {
var l int
_ = l
if m.LeaderName != nil {
l = len(*m.LeaderName)
n += 1 + l + sovSnapshotRecoveryRequest(uint64(l))
}
if m.LastIndex != nil {
n += 1 + sovSnapshotRecoveryRequest(uint64(*m.LastIndex))
}
if m.LastTerm != nil {
n += 1 + sovSnapshotRecoveryRequest(uint64(*m.LastTerm))
}
if len(m.Peers) > 0 {
for _, e := range m.Peers {
l = e.Size()
n += 1 + l + sovSnapshotRecoveryRequest(uint64(l))
}
}
if m.State != nil {
l = len(m.State)
n += 1 + l + sovSnapshotRecoveryRequest(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *SnapshotRecoveryRequest_Peer) Size() (n int) {
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovSnapshotRecoveryRequest(uint64(l))
}
if m.ConnectionString != nil {
l = len(*m.ConnectionString)
n += 1 + l + sovSnapshotRecoveryRequest(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovSnapshotRecoveryRequest(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozSnapshotRecoveryRequest(x uint64) (n int) {
return sovSnapshotRecoveryRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
return sovSnapshotRecoveryRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func NewPopulatedSnapshotRecoveryRequest(r randySnapshotRecoveryRequest, easy bool) *SnapshotRecoveryRequest {
this := &SnapshotRecoveryRequest{}
v1 := randStringSnapshotRecoveryRequest(r)
this.LeaderName = &v1
v2 := uint64(r.Uint32())
this.LastIndex = &v2
v3 := uint64(r.Uint32())
this.LastTerm = &v3
if r.Intn(10) != 0 {
v4 := r.Intn(10)
this.Peers = make([]*SnapshotRecoveryRequest_Peer, v4)
for i := 0; i < v4; i++ {
this.Peers[i] = NewPopulatedSnapshotRecoveryRequest_Peer(r, easy)
}
}
v5 := r.Intn(100)
this.State = make([]byte, v5)
for i := 0; i < v5; i++ {
this.State[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedSnapshotRecoveryRequest(r, 6)
}
return this
}
func NewPopulatedSnapshotRecoveryRequest_Peer(r randySnapshotRecoveryRequest, easy bool) *SnapshotRecoveryRequest_Peer {
this := &SnapshotRecoveryRequest_Peer{}
v6 := randStringSnapshotRecoveryRequest(r)
this.Name = &v6
v7 := randStringSnapshotRecoveryRequest(r)
this.ConnectionString = &v7
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedSnapshotRecoveryRequest(r, 3)
}
return this
}
type randySnapshotRecoveryRequest interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneSnapshotRecoveryRequest(r randySnapshotRecoveryRequest) rune {
res := rune(r.Uint32() % 1112064)
if 55296 <= res {
res += 2047
}
return res
}
func randStringSnapshotRecoveryRequest(r randySnapshotRecoveryRequest) string {
v8 := r.Intn(100)
tmps := make([]rune, v8)
for i := 0; i < v8; i++ {
tmps[i] = randUTF8RuneSnapshotRecoveryRequest(r)
}
return string(tmps)
}
func randUnrecognizedSnapshotRecoveryRequest(r randySnapshotRecoveryRequest, maxFieldNumber int) (data []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
data = randFieldSnapshotRecoveryRequest(data, r, fieldNumber, wire)
}
return data
}
func randFieldSnapshotRecoveryRequest(data []byte, r randySnapshotRecoveryRequest, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(r.Int63()))
case 1:
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return data
}
func encodeVarintPopulateSnapshotRecoveryRequest(data []byte, v uint64) []byte {
for v >= 1<<7 {
data = append(data, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
data = append(data, uint8(v))
return data
}
func (m *SnapshotRecoveryRequest) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
if err != nil {
return nil, err
}
return data[:n], nil
}
func (m *SnapshotRecoveryRequest) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.LeaderName != nil {
data[i] = 0xa
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(len(*m.LeaderName)))
i += copy(data[i:], *m.LeaderName)
}
if m.LastIndex != nil {
data[i] = 0x10
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(*m.LastIndex))
}
if m.LastTerm != nil {
data[i] = 0x18
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(*m.LastTerm))
}
if len(m.Peers) > 0 {
for _, msg := range m.Peers {
data[i] = 0x22
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(msg.Size()))
n, err := msg.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.State != nil {
data[i] = 0x2a
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(len(m.State)))
i += copy(data[i:], m.State)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *SnapshotRecoveryRequest_Peer) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
if err != nil {
return nil, err
}
return data[:n], nil
}
func (m *SnapshotRecoveryRequest_Peer) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Name != nil {
data[i] = 0xa
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(len(*m.Name)))
i += copy(data[i:], *m.Name)
}
if m.ConnectionString != nil {
data[i] = 0x12
i++
i = encodeVarintSnapshotRecoveryRequest(data, i, uint64(len(*m.ConnectionString)))
i += copy(data[i:], *m.ConnectionString)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64SnapshotRecoveryRequest(data []byte, offset int, v uint64) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
data[offset+4] = uint8(v >> 32)
data[offset+5] = uint8(v >> 40)
data[offset+6] = uint8(v >> 48)
data[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32SnapshotRecoveryRequest(data []byte, offset int, v uint32) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintSnapshotRecoveryRequest(data []byte, offset int, v uint64) int {
for v >= 1<<7 {
data[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
data[offset] = uint8(v)
return offset + 1
}
func (this *SnapshotRecoveryRequest) GoString() string {
if this == nil {
return "nil"
}
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest{` + `LeaderName:` + valueToGoStringSnapshotRecoveryRequest(this.LeaderName, "string"), `LastIndex:` + valueToGoStringSnapshotRecoveryRequest(this.LastIndex, "uint64"), `LastTerm:` + valueToGoStringSnapshotRecoveryRequest(this.LastTerm, "uint64"), `Peers:` + fmt16.Sprintf("%#v", this.Peers), `State:` + valueToGoStringSnapshotRecoveryRequest(this.State, "byte"), `XXX_unrecognized:` + fmt16.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func (this *SnapshotRecoveryRequest_Peer) GoString() string {
if this == nil {
return "nil"
}
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest_Peer{` + `Name:` + valueToGoStringSnapshotRecoveryRequest(this.Name, "string"), `ConnectionString:` + valueToGoStringSnapshotRecoveryRequest(this.ConnectionString, "string"), `XXX_unrecognized:` + fmt16.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func valueToGoStringSnapshotRecoveryRequest(v interface{}, typ string) string {
rv := reflect11.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect11.Indirect(rv).Interface()
return fmt16.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func extensionToGoStringSnapshotRecoveryRequest(e map[int32]code_google_com_p_gogoprotobuf_proto11.Extension) string {
if e == nil {
return "nil"
}
s := "map[int32]proto.Extension{"
keys := make([]int, 0, len(e))
for k := range e {
keys = append(keys, int(k))
}
sort5.Ints(keys)
ss := []string{}
for _, k := range keys {
ss = append(ss, strconv5.Itoa(k)+": "+e[int32(k)].GoString())
}
s += strings11.Join(ss, ",") + "}"
return s
}
func (this *SnapshotRecoveryRequest) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt17.Errorf("that == nil && this != nil")
}
that1, ok := that.(*SnapshotRecoveryRequest)
if !ok {
return fmt17.Errorf("that is not of type *SnapshotRecoveryRequest")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt17.Errorf("that is type *SnapshotRecoveryRequest but is nil && this != nil")
} else if this == nil {
return fmt17.Errorf("that is type *SnapshotRecoveryRequestbut is not nil && this == nil")
}
if this.LeaderName != nil && that1.LeaderName != nil {
if *this.LeaderName != *that1.LeaderName {
return fmt17.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
}
} else if this.LeaderName != nil {
return fmt17.Errorf("this.LeaderName == nil && that.LeaderName != nil")
} else if that1.LeaderName != nil {
return fmt17.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
}
if this.LastIndex != nil && that1.LastIndex != nil {
if *this.LastIndex != *that1.LastIndex {
return fmt17.Errorf("LastIndex this(%v) Not Equal that(%v)", *this.LastIndex, *that1.LastIndex)
}
} else if this.LastIndex != nil {
return fmt17.Errorf("this.LastIndex == nil && that.LastIndex != nil")
} else if that1.LastIndex != nil {
return fmt17.Errorf("LastIndex this(%v) Not Equal that(%v)", this.LastIndex, that1.LastIndex)
}
if this.LastTerm != nil && that1.LastTerm != nil {
if *this.LastTerm != *that1.LastTerm {
return fmt17.Errorf("LastTerm this(%v) Not Equal that(%v)", *this.LastTerm, *that1.LastTerm)
}
} else if this.LastTerm != nil {
return fmt17.Errorf("this.LastTerm == nil && that.LastTerm != nil")
} else if that1.LastTerm != nil {
return fmt17.Errorf("LastTerm this(%v) Not Equal that(%v)", this.LastTerm, that1.LastTerm)
}
if len(this.Peers) != len(that1.Peers) {
return fmt17.Errorf("Peers this(%v) Not Equal that(%v)", len(this.Peers), len(that1.Peers))
}
for i := range this.Peers {
if !this.Peers[i].Equal(that1.Peers[i]) {
return fmt17.Errorf("Peers this[%v](%v) Not Equal that[%v](%v)", i, this.Peers[i], i, that1.Peers[i])
}
}
if !bytes5.Equal(this.State, that1.State) {
return fmt17.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State)
}
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt17.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *SnapshotRecoveryRequest) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*SnapshotRecoveryRequest)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.LeaderName != nil && that1.LeaderName != nil {
if *this.LeaderName != *that1.LeaderName {
return false
}
} else if this.LeaderName != nil {
return false
} else if that1.LeaderName != nil {
return false
}
if this.LastIndex != nil && that1.LastIndex != nil {
if *this.LastIndex != *that1.LastIndex {
return false
}
} else if this.LastIndex != nil {
return false
} else if that1.LastIndex != nil {
return false
}
if this.LastTerm != nil && that1.LastTerm != nil {
if *this.LastTerm != *that1.LastTerm {
return false
}
} else if this.LastTerm != nil {
return false
} else if that1.LastTerm != nil {
return false
}
if len(this.Peers) != len(that1.Peers) {
return false
}
for i := range this.Peers {
if !this.Peers[i].Equal(that1.Peers[i]) {
return false
}
}
if !bytes5.Equal(this.State, that1.State) {
return false
}
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *SnapshotRecoveryRequest_Peer) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt17.Errorf("that == nil && this != nil")
}
that1, ok := that.(*SnapshotRecoveryRequest_Peer)
if !ok {
return fmt17.Errorf("that is not of type *SnapshotRecoveryRequest_Peer")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt17.Errorf("that is type *SnapshotRecoveryRequest_Peer but is nil && this != nil")
} else if this == nil {
return fmt17.Errorf("that is type *SnapshotRecoveryRequest_Peerbut is not nil && this == nil")
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return fmt17.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
}
} else if this.Name != nil {
return fmt17.Errorf("this.Name == nil && that.Name != nil")
} else if that1.Name != nil {
return fmt17.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
}
if this.ConnectionString != nil && that1.ConnectionString != nil {
if *this.ConnectionString != *that1.ConnectionString {
return fmt17.Errorf("ConnectionString this(%v) Not Equal that(%v)", *this.ConnectionString, *that1.ConnectionString)
}
} else if this.ConnectionString != nil {
return fmt17.Errorf("this.ConnectionString == nil && that.ConnectionString != nil")
} else if that1.ConnectionString != nil {
return fmt17.Errorf("ConnectionString this(%v) Not Equal that(%v)", this.ConnectionString, that1.ConnectionString)
}
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt17.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *SnapshotRecoveryRequest_Peer) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*SnapshotRecoveryRequest_Peer)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return false
}
} else if this.Name != nil {
return false
} else if that1.Name != nil {
return false
}
if this.ConnectionString != nil && that1.ConnectionString != nil {
if *this.ConnectionString != *that1.ConnectionString {
return false
}
} else if this.ConnectionString != nil {
return false
} else if that1.ConnectionString != nil {
return false
}
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}