github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/cluster/codecs/BackupResponse.go (about) 1 // Generated SBE (Simple Binary Encoding) message codec 2 3 package codecs 4 5 import ( 6 "fmt" 7 "io" 8 "io/ioutil" 9 "math" 10 ) 11 12 type BackupResponse struct { 13 CorrelationId int64 14 LogRecordingId int64 15 LogLeadershipTermId int64 16 LogTermBaseLogPosition int64 17 LastLeadershipTermId int64 18 LastTermBaseLogPosition int64 19 CommitPositionCounterId int32 20 LeaderMemberId int32 21 Snapshots []BackupResponseSnapshots 22 ClusterMembers []uint8 23 } 24 type BackupResponseSnapshots struct { 25 RecordingId int64 26 LeadershipTermId int64 27 TermBaseLogPosition int64 28 LogPosition int64 29 Timestamp int64 30 ServiceId int32 31 } 32 33 func (b *BackupResponse) Encode(_m *SbeGoMarshaller, _w io.Writer, doRangeCheck bool) error { 34 if doRangeCheck { 35 if err := b.RangeCheck(b.SbeSchemaVersion(), b.SbeSchemaVersion()); err != nil { 36 return err 37 } 38 } 39 if err := _m.WriteInt64(_w, b.CorrelationId); err != nil { 40 return err 41 } 42 if err := _m.WriteInt64(_w, b.LogRecordingId); err != nil { 43 return err 44 } 45 if err := _m.WriteInt64(_w, b.LogLeadershipTermId); err != nil { 46 return err 47 } 48 if err := _m.WriteInt64(_w, b.LogTermBaseLogPosition); err != nil { 49 return err 50 } 51 if err := _m.WriteInt64(_w, b.LastLeadershipTermId); err != nil { 52 return err 53 } 54 if err := _m.WriteInt64(_w, b.LastTermBaseLogPosition); err != nil { 55 return err 56 } 57 if err := _m.WriteInt32(_w, b.CommitPositionCounterId); err != nil { 58 return err 59 } 60 if err := _m.WriteInt32(_w, b.LeaderMemberId); err != nil { 61 return err 62 } 63 var SnapshotsBlockLength uint16 = 44 64 if err := _m.WriteUint16(_w, SnapshotsBlockLength); err != nil { 65 return err 66 } 67 var SnapshotsNumInGroup uint16 = uint16(len(b.Snapshots)) 68 if err := _m.WriteUint16(_w, SnapshotsNumInGroup); err != nil { 69 return err 70 } 71 for _, prop := range b.Snapshots { 72 if err := prop.Encode(_m, _w); err != nil { 73 return err 74 } 75 } 76 if err := _m.WriteUint32(_w, uint32(len(b.ClusterMembers))); err != nil { 77 return err 78 } 79 if err := _m.WriteBytes(_w, b.ClusterMembers); err != nil { 80 return err 81 } 82 return nil 83 } 84 85 func (b *BackupResponse) Decode(_m *SbeGoMarshaller, _r io.Reader, actingVersion uint16, blockLength uint16, doRangeCheck bool) error { 86 if !b.CorrelationIdInActingVersion(actingVersion) { 87 b.CorrelationId = b.CorrelationIdNullValue() 88 } else { 89 if err := _m.ReadInt64(_r, &b.CorrelationId); err != nil { 90 return err 91 } 92 } 93 if !b.LogRecordingIdInActingVersion(actingVersion) { 94 b.LogRecordingId = b.LogRecordingIdNullValue() 95 } else { 96 if err := _m.ReadInt64(_r, &b.LogRecordingId); err != nil { 97 return err 98 } 99 } 100 if !b.LogLeadershipTermIdInActingVersion(actingVersion) { 101 b.LogLeadershipTermId = b.LogLeadershipTermIdNullValue() 102 } else { 103 if err := _m.ReadInt64(_r, &b.LogLeadershipTermId); err != nil { 104 return err 105 } 106 } 107 if !b.LogTermBaseLogPositionInActingVersion(actingVersion) { 108 b.LogTermBaseLogPosition = b.LogTermBaseLogPositionNullValue() 109 } else { 110 if err := _m.ReadInt64(_r, &b.LogTermBaseLogPosition); err != nil { 111 return err 112 } 113 } 114 if !b.LastLeadershipTermIdInActingVersion(actingVersion) { 115 b.LastLeadershipTermId = b.LastLeadershipTermIdNullValue() 116 } else { 117 if err := _m.ReadInt64(_r, &b.LastLeadershipTermId); err != nil { 118 return err 119 } 120 } 121 if !b.LastTermBaseLogPositionInActingVersion(actingVersion) { 122 b.LastTermBaseLogPosition = b.LastTermBaseLogPositionNullValue() 123 } else { 124 if err := _m.ReadInt64(_r, &b.LastTermBaseLogPosition); err != nil { 125 return err 126 } 127 } 128 if !b.CommitPositionCounterIdInActingVersion(actingVersion) { 129 b.CommitPositionCounterId = b.CommitPositionCounterIdNullValue() 130 } else { 131 if err := _m.ReadInt32(_r, &b.CommitPositionCounterId); err != nil { 132 return err 133 } 134 } 135 if !b.LeaderMemberIdInActingVersion(actingVersion) { 136 b.LeaderMemberId = b.LeaderMemberIdNullValue() 137 } else { 138 if err := _m.ReadInt32(_r, &b.LeaderMemberId); err != nil { 139 return err 140 } 141 } 142 if actingVersion > b.SbeSchemaVersion() && blockLength > b.SbeBlockLength() { 143 io.CopyN(ioutil.Discard, _r, int64(blockLength-b.SbeBlockLength())) 144 } 145 146 if b.SnapshotsInActingVersion(actingVersion) { 147 var SnapshotsBlockLength uint16 148 if err := _m.ReadUint16(_r, &SnapshotsBlockLength); err != nil { 149 return err 150 } 151 var SnapshotsNumInGroup uint16 152 if err := _m.ReadUint16(_r, &SnapshotsNumInGroup); err != nil { 153 return err 154 } 155 if cap(b.Snapshots) < int(SnapshotsNumInGroup) { 156 b.Snapshots = make([]BackupResponseSnapshots, SnapshotsNumInGroup) 157 } 158 b.Snapshots = b.Snapshots[:SnapshotsNumInGroup] 159 for i := range b.Snapshots { 160 if err := b.Snapshots[i].Decode(_m, _r, actingVersion, uint(SnapshotsBlockLength)); err != nil { 161 return err 162 } 163 } 164 } 165 166 if b.ClusterMembersInActingVersion(actingVersion) { 167 var ClusterMembersLength uint32 168 if err := _m.ReadUint32(_r, &ClusterMembersLength); err != nil { 169 return err 170 } 171 if cap(b.ClusterMembers) < int(ClusterMembersLength) { 172 b.ClusterMembers = make([]uint8, ClusterMembersLength) 173 } 174 b.ClusterMembers = b.ClusterMembers[:ClusterMembersLength] 175 if err := _m.ReadBytes(_r, b.ClusterMembers); err != nil { 176 return err 177 } 178 } 179 if doRangeCheck { 180 if err := b.RangeCheck(actingVersion, b.SbeSchemaVersion()); err != nil { 181 return err 182 } 183 } 184 return nil 185 } 186 187 func (b *BackupResponse) RangeCheck(actingVersion uint16, schemaVersion uint16) error { 188 if b.CorrelationIdInActingVersion(actingVersion) { 189 if b.CorrelationId < b.CorrelationIdMinValue() || b.CorrelationId > b.CorrelationIdMaxValue() { 190 return fmt.Errorf("Range check failed on b.CorrelationId (%v < %v > %v)", b.CorrelationIdMinValue(), b.CorrelationId, b.CorrelationIdMaxValue()) 191 } 192 } 193 if b.LogRecordingIdInActingVersion(actingVersion) { 194 if b.LogRecordingId < b.LogRecordingIdMinValue() || b.LogRecordingId > b.LogRecordingIdMaxValue() { 195 return fmt.Errorf("Range check failed on b.LogRecordingId (%v < %v > %v)", b.LogRecordingIdMinValue(), b.LogRecordingId, b.LogRecordingIdMaxValue()) 196 } 197 } 198 if b.LogLeadershipTermIdInActingVersion(actingVersion) { 199 if b.LogLeadershipTermId < b.LogLeadershipTermIdMinValue() || b.LogLeadershipTermId > b.LogLeadershipTermIdMaxValue() { 200 return fmt.Errorf("Range check failed on b.LogLeadershipTermId (%v < %v > %v)", b.LogLeadershipTermIdMinValue(), b.LogLeadershipTermId, b.LogLeadershipTermIdMaxValue()) 201 } 202 } 203 if b.LogTermBaseLogPositionInActingVersion(actingVersion) { 204 if b.LogTermBaseLogPosition < b.LogTermBaseLogPositionMinValue() || b.LogTermBaseLogPosition > b.LogTermBaseLogPositionMaxValue() { 205 return fmt.Errorf("Range check failed on b.LogTermBaseLogPosition (%v < %v > %v)", b.LogTermBaseLogPositionMinValue(), b.LogTermBaseLogPosition, b.LogTermBaseLogPositionMaxValue()) 206 } 207 } 208 if b.LastLeadershipTermIdInActingVersion(actingVersion) { 209 if b.LastLeadershipTermId < b.LastLeadershipTermIdMinValue() || b.LastLeadershipTermId > b.LastLeadershipTermIdMaxValue() { 210 return fmt.Errorf("Range check failed on b.LastLeadershipTermId (%v < %v > %v)", b.LastLeadershipTermIdMinValue(), b.LastLeadershipTermId, b.LastLeadershipTermIdMaxValue()) 211 } 212 } 213 if b.LastTermBaseLogPositionInActingVersion(actingVersion) { 214 if b.LastTermBaseLogPosition < b.LastTermBaseLogPositionMinValue() || b.LastTermBaseLogPosition > b.LastTermBaseLogPositionMaxValue() { 215 return fmt.Errorf("Range check failed on b.LastTermBaseLogPosition (%v < %v > %v)", b.LastTermBaseLogPositionMinValue(), b.LastTermBaseLogPosition, b.LastTermBaseLogPositionMaxValue()) 216 } 217 } 218 if b.CommitPositionCounterIdInActingVersion(actingVersion) { 219 if b.CommitPositionCounterId < b.CommitPositionCounterIdMinValue() || b.CommitPositionCounterId > b.CommitPositionCounterIdMaxValue() { 220 return fmt.Errorf("Range check failed on b.CommitPositionCounterId (%v < %v > %v)", b.CommitPositionCounterIdMinValue(), b.CommitPositionCounterId, b.CommitPositionCounterIdMaxValue()) 221 } 222 } 223 if b.LeaderMemberIdInActingVersion(actingVersion) { 224 if b.LeaderMemberId < b.LeaderMemberIdMinValue() || b.LeaderMemberId > b.LeaderMemberIdMaxValue() { 225 return fmt.Errorf("Range check failed on b.LeaderMemberId (%v < %v > %v)", b.LeaderMemberIdMinValue(), b.LeaderMemberId, b.LeaderMemberIdMaxValue()) 226 } 227 } 228 for _, prop := range b.Snapshots { 229 if err := prop.RangeCheck(actingVersion, schemaVersion); err != nil { 230 return err 231 } 232 } 233 for idx, ch := range b.ClusterMembers { 234 if ch > 127 { 235 return fmt.Errorf("b.ClusterMembers[%d]=%d failed ASCII validation", idx, ch) 236 } 237 } 238 return nil 239 } 240 241 func BackupResponseInit(b *BackupResponse) { 242 return 243 } 244 245 func (b *BackupResponseSnapshots) Encode(_m *SbeGoMarshaller, _w io.Writer) error { 246 if err := _m.WriteInt64(_w, b.RecordingId); err != nil { 247 return err 248 } 249 if err := _m.WriteInt64(_w, b.LeadershipTermId); err != nil { 250 return err 251 } 252 if err := _m.WriteInt64(_w, b.TermBaseLogPosition); err != nil { 253 return err 254 } 255 if err := _m.WriteInt64(_w, b.LogPosition); err != nil { 256 return err 257 } 258 if err := _m.WriteInt64(_w, b.Timestamp); err != nil { 259 return err 260 } 261 if err := _m.WriteInt32(_w, b.ServiceId); err != nil { 262 return err 263 } 264 return nil 265 } 266 267 func (b *BackupResponseSnapshots) Decode(_m *SbeGoMarshaller, _r io.Reader, actingVersion uint16, blockLength uint) error { 268 if !b.RecordingIdInActingVersion(actingVersion) { 269 b.RecordingId = b.RecordingIdNullValue() 270 } else { 271 if err := _m.ReadInt64(_r, &b.RecordingId); err != nil { 272 return err 273 } 274 } 275 if !b.LeadershipTermIdInActingVersion(actingVersion) { 276 b.LeadershipTermId = b.LeadershipTermIdNullValue() 277 } else { 278 if err := _m.ReadInt64(_r, &b.LeadershipTermId); err != nil { 279 return err 280 } 281 } 282 if !b.TermBaseLogPositionInActingVersion(actingVersion) { 283 b.TermBaseLogPosition = b.TermBaseLogPositionNullValue() 284 } else { 285 if err := _m.ReadInt64(_r, &b.TermBaseLogPosition); err != nil { 286 return err 287 } 288 } 289 if !b.LogPositionInActingVersion(actingVersion) { 290 b.LogPosition = b.LogPositionNullValue() 291 } else { 292 if err := _m.ReadInt64(_r, &b.LogPosition); err != nil { 293 return err 294 } 295 } 296 if !b.TimestampInActingVersion(actingVersion) { 297 b.Timestamp = b.TimestampNullValue() 298 } else { 299 if err := _m.ReadInt64(_r, &b.Timestamp); err != nil { 300 return err 301 } 302 } 303 if !b.ServiceIdInActingVersion(actingVersion) { 304 b.ServiceId = b.ServiceIdNullValue() 305 } else { 306 if err := _m.ReadInt32(_r, &b.ServiceId); err != nil { 307 return err 308 } 309 } 310 if actingVersion > b.SbeSchemaVersion() && blockLength > b.SbeBlockLength() { 311 io.CopyN(ioutil.Discard, _r, int64(blockLength-b.SbeBlockLength())) 312 } 313 return nil 314 } 315 316 func (b *BackupResponseSnapshots) RangeCheck(actingVersion uint16, schemaVersion uint16) error { 317 if b.RecordingIdInActingVersion(actingVersion) { 318 if b.RecordingId < b.RecordingIdMinValue() || b.RecordingId > b.RecordingIdMaxValue() { 319 return fmt.Errorf("Range check failed on b.RecordingId (%v < %v > %v)", b.RecordingIdMinValue(), b.RecordingId, b.RecordingIdMaxValue()) 320 } 321 } 322 if b.LeadershipTermIdInActingVersion(actingVersion) { 323 if b.LeadershipTermId < b.LeadershipTermIdMinValue() || b.LeadershipTermId > b.LeadershipTermIdMaxValue() { 324 return fmt.Errorf("Range check failed on b.LeadershipTermId (%v < %v > %v)", b.LeadershipTermIdMinValue(), b.LeadershipTermId, b.LeadershipTermIdMaxValue()) 325 } 326 } 327 if b.TermBaseLogPositionInActingVersion(actingVersion) { 328 if b.TermBaseLogPosition < b.TermBaseLogPositionMinValue() || b.TermBaseLogPosition > b.TermBaseLogPositionMaxValue() { 329 return fmt.Errorf("Range check failed on b.TermBaseLogPosition (%v < %v > %v)", b.TermBaseLogPositionMinValue(), b.TermBaseLogPosition, b.TermBaseLogPositionMaxValue()) 330 } 331 } 332 if b.LogPositionInActingVersion(actingVersion) { 333 if b.LogPosition < b.LogPositionMinValue() || b.LogPosition > b.LogPositionMaxValue() { 334 return fmt.Errorf("Range check failed on b.LogPosition (%v < %v > %v)", b.LogPositionMinValue(), b.LogPosition, b.LogPositionMaxValue()) 335 } 336 } 337 if b.TimestampInActingVersion(actingVersion) { 338 if b.Timestamp < b.TimestampMinValue() || b.Timestamp > b.TimestampMaxValue() { 339 return fmt.Errorf("Range check failed on b.Timestamp (%v < %v > %v)", b.TimestampMinValue(), b.Timestamp, b.TimestampMaxValue()) 340 } 341 } 342 if b.ServiceIdInActingVersion(actingVersion) { 343 if b.ServiceId < b.ServiceIdMinValue() || b.ServiceId > b.ServiceIdMaxValue() { 344 return fmt.Errorf("Range check failed on b.ServiceId (%v < %v > %v)", b.ServiceIdMinValue(), b.ServiceId, b.ServiceIdMaxValue()) 345 } 346 } 347 return nil 348 } 349 350 func BackupResponseSnapshotsInit(b *BackupResponseSnapshots) { 351 return 352 } 353 354 func (*BackupResponse) SbeBlockLength() (blockLength uint16) { 355 return 56 356 } 357 358 func (*BackupResponse) SbeTemplateId() (templateId uint16) { 359 return 78 360 } 361 362 func (*BackupResponse) SbeSchemaId() (schemaId uint16) { 363 return 111 364 } 365 366 func (*BackupResponse) SbeSchemaVersion() (schemaVersion uint16) { 367 return 8 368 } 369 370 func (*BackupResponse) SbeSemanticType() (semanticType []byte) { 371 return []byte("") 372 } 373 374 func (*BackupResponse) CorrelationIdId() uint16 { 375 return 1 376 } 377 378 func (*BackupResponse) CorrelationIdSinceVersion() uint16 { 379 return 0 380 } 381 382 func (b *BackupResponse) CorrelationIdInActingVersion(actingVersion uint16) bool { 383 return actingVersion >= b.CorrelationIdSinceVersion() 384 } 385 386 func (*BackupResponse) CorrelationIdDeprecated() uint16 { 387 return 0 388 } 389 390 func (*BackupResponse) CorrelationIdMetaAttribute(meta int) string { 391 switch meta { 392 case 1: 393 return "" 394 case 2: 395 return "" 396 case 3: 397 return "" 398 case 4: 399 return "required" 400 } 401 return "" 402 } 403 404 func (*BackupResponse) CorrelationIdMinValue() int64 { 405 return math.MinInt64 + 1 406 } 407 408 func (*BackupResponse) CorrelationIdMaxValue() int64 { 409 return math.MaxInt64 410 } 411 412 func (*BackupResponse) CorrelationIdNullValue() int64 { 413 return math.MinInt64 414 } 415 416 func (*BackupResponse) LogRecordingIdId() uint16 { 417 return 2 418 } 419 420 func (*BackupResponse) LogRecordingIdSinceVersion() uint16 { 421 return 0 422 } 423 424 func (b *BackupResponse) LogRecordingIdInActingVersion(actingVersion uint16) bool { 425 return actingVersion >= b.LogRecordingIdSinceVersion() 426 } 427 428 func (*BackupResponse) LogRecordingIdDeprecated() uint16 { 429 return 0 430 } 431 432 func (*BackupResponse) LogRecordingIdMetaAttribute(meta int) string { 433 switch meta { 434 case 1: 435 return "" 436 case 2: 437 return "" 438 case 3: 439 return "" 440 case 4: 441 return "required" 442 } 443 return "" 444 } 445 446 func (*BackupResponse) LogRecordingIdMinValue() int64 { 447 return math.MinInt64 + 1 448 } 449 450 func (*BackupResponse) LogRecordingIdMaxValue() int64 { 451 return math.MaxInt64 452 } 453 454 func (*BackupResponse) LogRecordingIdNullValue() int64 { 455 return math.MinInt64 456 } 457 458 func (*BackupResponse) LogLeadershipTermIdId() uint16 { 459 return 3 460 } 461 462 func (*BackupResponse) LogLeadershipTermIdSinceVersion() uint16 { 463 return 0 464 } 465 466 func (b *BackupResponse) LogLeadershipTermIdInActingVersion(actingVersion uint16) bool { 467 return actingVersion >= b.LogLeadershipTermIdSinceVersion() 468 } 469 470 func (*BackupResponse) LogLeadershipTermIdDeprecated() uint16 { 471 return 0 472 } 473 474 func (*BackupResponse) LogLeadershipTermIdMetaAttribute(meta int) string { 475 switch meta { 476 case 1: 477 return "" 478 case 2: 479 return "" 480 case 3: 481 return "" 482 case 4: 483 return "required" 484 } 485 return "" 486 } 487 488 func (*BackupResponse) LogLeadershipTermIdMinValue() int64 { 489 return math.MinInt64 + 1 490 } 491 492 func (*BackupResponse) LogLeadershipTermIdMaxValue() int64 { 493 return math.MaxInt64 494 } 495 496 func (*BackupResponse) LogLeadershipTermIdNullValue() int64 { 497 return math.MinInt64 498 } 499 500 func (*BackupResponse) LogTermBaseLogPositionId() uint16 { 501 return 4 502 } 503 504 func (*BackupResponse) LogTermBaseLogPositionSinceVersion() uint16 { 505 return 0 506 } 507 508 func (b *BackupResponse) LogTermBaseLogPositionInActingVersion(actingVersion uint16) bool { 509 return actingVersion >= b.LogTermBaseLogPositionSinceVersion() 510 } 511 512 func (*BackupResponse) LogTermBaseLogPositionDeprecated() uint16 { 513 return 0 514 } 515 516 func (*BackupResponse) LogTermBaseLogPositionMetaAttribute(meta int) string { 517 switch meta { 518 case 1: 519 return "" 520 case 2: 521 return "" 522 case 3: 523 return "" 524 case 4: 525 return "required" 526 } 527 return "" 528 } 529 530 func (*BackupResponse) LogTermBaseLogPositionMinValue() int64 { 531 return math.MinInt64 + 1 532 } 533 534 func (*BackupResponse) LogTermBaseLogPositionMaxValue() int64 { 535 return math.MaxInt64 536 } 537 538 func (*BackupResponse) LogTermBaseLogPositionNullValue() int64 { 539 return math.MinInt64 540 } 541 542 func (*BackupResponse) LastLeadershipTermIdId() uint16 { 543 return 5 544 } 545 546 func (*BackupResponse) LastLeadershipTermIdSinceVersion() uint16 { 547 return 0 548 } 549 550 func (b *BackupResponse) LastLeadershipTermIdInActingVersion(actingVersion uint16) bool { 551 return actingVersion >= b.LastLeadershipTermIdSinceVersion() 552 } 553 554 func (*BackupResponse) LastLeadershipTermIdDeprecated() uint16 { 555 return 0 556 } 557 558 func (*BackupResponse) LastLeadershipTermIdMetaAttribute(meta int) string { 559 switch meta { 560 case 1: 561 return "" 562 case 2: 563 return "" 564 case 3: 565 return "" 566 case 4: 567 return "required" 568 } 569 return "" 570 } 571 572 func (*BackupResponse) LastLeadershipTermIdMinValue() int64 { 573 return math.MinInt64 + 1 574 } 575 576 func (*BackupResponse) LastLeadershipTermIdMaxValue() int64 { 577 return math.MaxInt64 578 } 579 580 func (*BackupResponse) LastLeadershipTermIdNullValue() int64 { 581 return math.MinInt64 582 } 583 584 func (*BackupResponse) LastTermBaseLogPositionId() uint16 { 585 return 6 586 } 587 588 func (*BackupResponse) LastTermBaseLogPositionSinceVersion() uint16 { 589 return 0 590 } 591 592 func (b *BackupResponse) LastTermBaseLogPositionInActingVersion(actingVersion uint16) bool { 593 return actingVersion >= b.LastTermBaseLogPositionSinceVersion() 594 } 595 596 func (*BackupResponse) LastTermBaseLogPositionDeprecated() uint16 { 597 return 0 598 } 599 600 func (*BackupResponse) LastTermBaseLogPositionMetaAttribute(meta int) string { 601 switch meta { 602 case 1: 603 return "" 604 case 2: 605 return "" 606 case 3: 607 return "" 608 case 4: 609 return "required" 610 } 611 return "" 612 } 613 614 func (*BackupResponse) LastTermBaseLogPositionMinValue() int64 { 615 return math.MinInt64 + 1 616 } 617 618 func (*BackupResponse) LastTermBaseLogPositionMaxValue() int64 { 619 return math.MaxInt64 620 } 621 622 func (*BackupResponse) LastTermBaseLogPositionNullValue() int64 { 623 return math.MinInt64 624 } 625 626 func (*BackupResponse) CommitPositionCounterIdId() uint16 { 627 return 7 628 } 629 630 func (*BackupResponse) CommitPositionCounterIdSinceVersion() uint16 { 631 return 0 632 } 633 634 func (b *BackupResponse) CommitPositionCounterIdInActingVersion(actingVersion uint16) bool { 635 return actingVersion >= b.CommitPositionCounterIdSinceVersion() 636 } 637 638 func (*BackupResponse) CommitPositionCounterIdDeprecated() uint16 { 639 return 0 640 } 641 642 func (*BackupResponse) CommitPositionCounterIdMetaAttribute(meta int) string { 643 switch meta { 644 case 1: 645 return "" 646 case 2: 647 return "" 648 case 3: 649 return "" 650 case 4: 651 return "required" 652 } 653 return "" 654 } 655 656 func (*BackupResponse) CommitPositionCounterIdMinValue() int32 { 657 return math.MinInt32 + 1 658 } 659 660 func (*BackupResponse) CommitPositionCounterIdMaxValue() int32 { 661 return math.MaxInt32 662 } 663 664 func (*BackupResponse) CommitPositionCounterIdNullValue() int32 { 665 return math.MinInt32 666 } 667 668 func (*BackupResponse) LeaderMemberIdId() uint16 { 669 return 8 670 } 671 672 func (*BackupResponse) LeaderMemberIdSinceVersion() uint16 { 673 return 0 674 } 675 676 func (b *BackupResponse) LeaderMemberIdInActingVersion(actingVersion uint16) bool { 677 return actingVersion >= b.LeaderMemberIdSinceVersion() 678 } 679 680 func (*BackupResponse) LeaderMemberIdDeprecated() uint16 { 681 return 0 682 } 683 684 func (*BackupResponse) LeaderMemberIdMetaAttribute(meta int) string { 685 switch meta { 686 case 1: 687 return "" 688 case 2: 689 return "" 690 case 3: 691 return "" 692 case 4: 693 return "required" 694 } 695 return "" 696 } 697 698 func (*BackupResponse) LeaderMemberIdMinValue() int32 { 699 return math.MinInt32 + 1 700 } 701 702 func (*BackupResponse) LeaderMemberIdMaxValue() int32 { 703 return math.MaxInt32 704 } 705 706 func (*BackupResponse) LeaderMemberIdNullValue() int32 { 707 return math.MinInt32 708 } 709 710 func (*BackupResponseSnapshots) RecordingIdId() uint16 { 711 return 10 712 } 713 714 func (*BackupResponseSnapshots) RecordingIdSinceVersion() uint16 { 715 return 0 716 } 717 718 func (b *BackupResponseSnapshots) RecordingIdInActingVersion(actingVersion uint16) bool { 719 return actingVersion >= b.RecordingIdSinceVersion() 720 } 721 722 func (*BackupResponseSnapshots) RecordingIdDeprecated() uint16 { 723 return 0 724 } 725 726 func (*BackupResponseSnapshots) RecordingIdMetaAttribute(meta int) string { 727 switch meta { 728 case 1: 729 return "" 730 case 2: 731 return "" 732 case 3: 733 return "" 734 case 4: 735 return "required" 736 } 737 return "" 738 } 739 740 func (*BackupResponseSnapshots) RecordingIdMinValue() int64 { 741 return math.MinInt64 + 1 742 } 743 744 func (*BackupResponseSnapshots) RecordingIdMaxValue() int64 { 745 return math.MaxInt64 746 } 747 748 func (*BackupResponseSnapshots) RecordingIdNullValue() int64 { 749 return math.MinInt64 750 } 751 752 func (*BackupResponseSnapshots) LeadershipTermIdId() uint16 { 753 return 11 754 } 755 756 func (*BackupResponseSnapshots) LeadershipTermIdSinceVersion() uint16 { 757 return 0 758 } 759 760 func (b *BackupResponseSnapshots) LeadershipTermIdInActingVersion(actingVersion uint16) bool { 761 return actingVersion >= b.LeadershipTermIdSinceVersion() 762 } 763 764 func (*BackupResponseSnapshots) LeadershipTermIdDeprecated() uint16 { 765 return 0 766 } 767 768 func (*BackupResponseSnapshots) LeadershipTermIdMetaAttribute(meta int) string { 769 switch meta { 770 case 1: 771 return "" 772 case 2: 773 return "" 774 case 3: 775 return "" 776 case 4: 777 return "required" 778 } 779 return "" 780 } 781 782 func (*BackupResponseSnapshots) LeadershipTermIdMinValue() int64 { 783 return math.MinInt64 + 1 784 } 785 786 func (*BackupResponseSnapshots) LeadershipTermIdMaxValue() int64 { 787 return math.MaxInt64 788 } 789 790 func (*BackupResponseSnapshots) LeadershipTermIdNullValue() int64 { 791 return math.MinInt64 792 } 793 794 func (*BackupResponseSnapshots) TermBaseLogPositionId() uint16 { 795 return 12 796 } 797 798 func (*BackupResponseSnapshots) TermBaseLogPositionSinceVersion() uint16 { 799 return 0 800 } 801 802 func (b *BackupResponseSnapshots) TermBaseLogPositionInActingVersion(actingVersion uint16) bool { 803 return actingVersion >= b.TermBaseLogPositionSinceVersion() 804 } 805 806 func (*BackupResponseSnapshots) TermBaseLogPositionDeprecated() uint16 { 807 return 0 808 } 809 810 func (*BackupResponseSnapshots) TermBaseLogPositionMetaAttribute(meta int) string { 811 switch meta { 812 case 1: 813 return "" 814 case 2: 815 return "" 816 case 3: 817 return "" 818 case 4: 819 return "required" 820 } 821 return "" 822 } 823 824 func (*BackupResponseSnapshots) TermBaseLogPositionMinValue() int64 { 825 return math.MinInt64 + 1 826 } 827 828 func (*BackupResponseSnapshots) TermBaseLogPositionMaxValue() int64 { 829 return math.MaxInt64 830 } 831 832 func (*BackupResponseSnapshots) TermBaseLogPositionNullValue() int64 { 833 return math.MinInt64 834 } 835 836 func (*BackupResponseSnapshots) LogPositionId() uint16 { 837 return 13 838 } 839 840 func (*BackupResponseSnapshots) LogPositionSinceVersion() uint16 { 841 return 0 842 } 843 844 func (b *BackupResponseSnapshots) LogPositionInActingVersion(actingVersion uint16) bool { 845 return actingVersion >= b.LogPositionSinceVersion() 846 } 847 848 func (*BackupResponseSnapshots) LogPositionDeprecated() uint16 { 849 return 0 850 } 851 852 func (*BackupResponseSnapshots) LogPositionMetaAttribute(meta int) string { 853 switch meta { 854 case 1: 855 return "" 856 case 2: 857 return "" 858 case 3: 859 return "" 860 case 4: 861 return "required" 862 } 863 return "" 864 } 865 866 func (*BackupResponseSnapshots) LogPositionMinValue() int64 { 867 return math.MinInt64 + 1 868 } 869 870 func (*BackupResponseSnapshots) LogPositionMaxValue() int64 { 871 return math.MaxInt64 872 } 873 874 func (*BackupResponseSnapshots) LogPositionNullValue() int64 { 875 return math.MinInt64 876 } 877 878 func (*BackupResponseSnapshots) TimestampId() uint16 { 879 return 14 880 } 881 882 func (*BackupResponseSnapshots) TimestampSinceVersion() uint16 { 883 return 0 884 } 885 886 func (b *BackupResponseSnapshots) TimestampInActingVersion(actingVersion uint16) bool { 887 return actingVersion >= b.TimestampSinceVersion() 888 } 889 890 func (*BackupResponseSnapshots) TimestampDeprecated() uint16 { 891 return 0 892 } 893 894 func (*BackupResponseSnapshots) TimestampMetaAttribute(meta int) string { 895 switch meta { 896 case 1: 897 return "" 898 case 2: 899 return "" 900 case 3: 901 return "" 902 case 4: 903 return "required" 904 } 905 return "" 906 } 907 908 func (*BackupResponseSnapshots) TimestampMinValue() int64 { 909 return math.MinInt64 + 1 910 } 911 912 func (*BackupResponseSnapshots) TimestampMaxValue() int64 { 913 return math.MaxInt64 914 } 915 916 func (*BackupResponseSnapshots) TimestampNullValue() int64 { 917 return math.MinInt64 918 } 919 920 func (*BackupResponseSnapshots) ServiceIdId() uint16 { 921 return 15 922 } 923 924 func (*BackupResponseSnapshots) ServiceIdSinceVersion() uint16 { 925 return 0 926 } 927 928 func (b *BackupResponseSnapshots) ServiceIdInActingVersion(actingVersion uint16) bool { 929 return actingVersion >= b.ServiceIdSinceVersion() 930 } 931 932 func (*BackupResponseSnapshots) ServiceIdDeprecated() uint16 { 933 return 0 934 } 935 936 func (*BackupResponseSnapshots) ServiceIdMetaAttribute(meta int) string { 937 switch meta { 938 case 1: 939 return "" 940 case 2: 941 return "" 942 case 3: 943 return "" 944 case 4: 945 return "required" 946 } 947 return "" 948 } 949 950 func (*BackupResponseSnapshots) ServiceIdMinValue() int32 { 951 return math.MinInt32 + 1 952 } 953 954 func (*BackupResponseSnapshots) ServiceIdMaxValue() int32 { 955 return math.MaxInt32 956 } 957 958 func (*BackupResponseSnapshots) ServiceIdNullValue() int32 { 959 return math.MinInt32 960 } 961 962 func (*BackupResponse) SnapshotsId() uint16 { 963 return 9 964 } 965 966 func (*BackupResponse) SnapshotsSinceVersion() uint16 { 967 return 0 968 } 969 970 func (b *BackupResponse) SnapshotsInActingVersion(actingVersion uint16) bool { 971 return actingVersion >= b.SnapshotsSinceVersion() 972 } 973 974 func (*BackupResponse) SnapshotsDeprecated() uint16 { 975 return 0 976 } 977 978 func (*BackupResponseSnapshots) SbeBlockLength() (blockLength uint) { 979 return 44 980 } 981 982 func (*BackupResponseSnapshots) SbeSchemaVersion() (schemaVersion uint16) { 983 return 8 984 } 985 986 func (*BackupResponse) ClusterMembersMetaAttribute(meta int) string { 987 switch meta { 988 case 1: 989 return "" 990 case 2: 991 return "" 992 case 3: 993 return "" 994 case 4: 995 return "required" 996 } 997 return "" 998 } 999 1000 func (*BackupResponse) ClusterMembersSinceVersion() uint16 { 1001 return 0 1002 } 1003 1004 func (b *BackupResponse) ClusterMembersInActingVersion(actingVersion uint16) bool { 1005 return actingVersion >= b.ClusterMembersSinceVersion() 1006 } 1007 1008 func (*BackupResponse) ClusterMembersDeprecated() uint16 { 1009 return 0 1010 } 1011 1012 func (BackupResponse) ClusterMembersCharacterEncoding() string { 1013 return "US-ASCII" 1014 } 1015 1016 func (BackupResponse) ClusterMembersHeaderLength() uint64 { 1017 return 4 1018 }