github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/proto/impl/v1/impl_vtproto.pb.go (about) 1 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. 2 // protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 3 // source: impl/v1/impl.proto 4 5 package implv1 6 7 import ( 8 fmt "fmt" 9 protohelpers "github.com/planetscale/vtprotobuf/protohelpers" 10 v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" 11 proto "google.golang.org/protobuf/proto" 12 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 io "io" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 func (m *DecodedCaveat) CloneVT() *DecodedCaveat { 24 if m == nil { 25 return (*DecodedCaveat)(nil) 26 } 27 r := new(DecodedCaveat) 28 r.Name = m.Name 29 if m.KindOneof != nil { 30 r.KindOneof = m.KindOneof.(interface { 31 CloneVT() isDecodedCaveat_KindOneof 32 }).CloneVT() 33 } 34 if len(m.unknownFields) > 0 { 35 r.unknownFields = make([]byte, len(m.unknownFields)) 36 copy(r.unknownFields, m.unknownFields) 37 } 38 return r 39 } 40 41 func (m *DecodedCaveat) CloneMessageVT() proto.Message { 42 return m.CloneVT() 43 } 44 45 func (m *DecodedCaveat_Cel) CloneVT() isDecodedCaveat_KindOneof { 46 if m == nil { 47 return (*DecodedCaveat_Cel)(nil) 48 } 49 r := new(DecodedCaveat_Cel) 50 if rhs := m.Cel; rhs != nil { 51 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1alpha1.CheckedExpr }); ok { 52 r.Cel = vtpb.CloneVT() 53 } else { 54 r.Cel = proto.Clone(rhs).(*v1alpha1.CheckedExpr) 55 } 56 } 57 return r 58 } 59 60 func (m *DecodedZookie_V1Zookie) CloneVT() *DecodedZookie_V1Zookie { 61 if m == nil { 62 return (*DecodedZookie_V1Zookie)(nil) 63 } 64 r := new(DecodedZookie_V1Zookie) 65 r.Revision = m.Revision 66 if len(m.unknownFields) > 0 { 67 r.unknownFields = make([]byte, len(m.unknownFields)) 68 copy(r.unknownFields, m.unknownFields) 69 } 70 return r 71 } 72 73 func (m *DecodedZookie_V1Zookie) CloneMessageVT() proto.Message { 74 return m.CloneVT() 75 } 76 77 func (m *DecodedZookie_V2Zookie) CloneVT() *DecodedZookie_V2Zookie { 78 if m == nil { 79 return (*DecodedZookie_V2Zookie)(nil) 80 } 81 r := new(DecodedZookie_V2Zookie) 82 r.Revision = m.Revision 83 if len(m.unknownFields) > 0 { 84 r.unknownFields = make([]byte, len(m.unknownFields)) 85 copy(r.unknownFields, m.unknownFields) 86 } 87 return r 88 } 89 90 func (m *DecodedZookie_V2Zookie) CloneMessageVT() proto.Message { 91 return m.CloneVT() 92 } 93 94 func (m *DecodedZookie) CloneVT() *DecodedZookie { 95 if m == nil { 96 return (*DecodedZookie)(nil) 97 } 98 r := new(DecodedZookie) 99 r.Version = m.Version 100 if m.VersionOneof != nil { 101 r.VersionOneof = m.VersionOneof.(interface { 102 CloneVT() isDecodedZookie_VersionOneof 103 }).CloneVT() 104 } 105 if len(m.unknownFields) > 0 { 106 r.unknownFields = make([]byte, len(m.unknownFields)) 107 copy(r.unknownFields, m.unknownFields) 108 } 109 return r 110 } 111 112 func (m *DecodedZookie) CloneMessageVT() proto.Message { 113 return m.CloneVT() 114 } 115 116 func (m *DecodedZookie_V1) CloneVT() isDecodedZookie_VersionOneof { 117 if m == nil { 118 return (*DecodedZookie_V1)(nil) 119 } 120 r := new(DecodedZookie_V1) 121 r.V1 = m.V1.CloneVT() 122 return r 123 } 124 125 func (m *DecodedZookie_V2) CloneVT() isDecodedZookie_VersionOneof { 126 if m == nil { 127 return (*DecodedZookie_V2)(nil) 128 } 129 r := new(DecodedZookie_V2) 130 r.V2 = m.V2.CloneVT() 131 return r 132 } 133 134 func (m *DecodedZedToken_V1Zookie) CloneVT() *DecodedZedToken_V1Zookie { 135 if m == nil { 136 return (*DecodedZedToken_V1Zookie)(nil) 137 } 138 r := new(DecodedZedToken_V1Zookie) 139 r.Revision = m.Revision 140 if len(m.unknownFields) > 0 { 141 r.unknownFields = make([]byte, len(m.unknownFields)) 142 copy(r.unknownFields, m.unknownFields) 143 } 144 return r 145 } 146 147 func (m *DecodedZedToken_V1Zookie) CloneMessageVT() proto.Message { 148 return m.CloneVT() 149 } 150 151 func (m *DecodedZedToken_V1ZedToken) CloneVT() *DecodedZedToken_V1ZedToken { 152 if m == nil { 153 return (*DecodedZedToken_V1ZedToken)(nil) 154 } 155 r := new(DecodedZedToken_V1ZedToken) 156 r.Revision = m.Revision 157 if len(m.unknownFields) > 0 { 158 r.unknownFields = make([]byte, len(m.unknownFields)) 159 copy(r.unknownFields, m.unknownFields) 160 } 161 return r 162 } 163 164 func (m *DecodedZedToken_V1ZedToken) CloneMessageVT() proto.Message { 165 return m.CloneVT() 166 } 167 168 func (m *DecodedZedToken) CloneVT() *DecodedZedToken { 169 if m == nil { 170 return (*DecodedZedToken)(nil) 171 } 172 r := new(DecodedZedToken) 173 if m.VersionOneof != nil { 174 r.VersionOneof = m.VersionOneof.(interface { 175 CloneVT() isDecodedZedToken_VersionOneof 176 }).CloneVT() 177 } 178 if len(m.unknownFields) > 0 { 179 r.unknownFields = make([]byte, len(m.unknownFields)) 180 copy(r.unknownFields, m.unknownFields) 181 } 182 return r 183 } 184 185 func (m *DecodedZedToken) CloneMessageVT() proto.Message { 186 return m.CloneVT() 187 } 188 189 func (m *DecodedZedToken_DeprecatedV1Zookie) CloneVT() isDecodedZedToken_VersionOneof { 190 if m == nil { 191 return (*DecodedZedToken_DeprecatedV1Zookie)(nil) 192 } 193 r := new(DecodedZedToken_DeprecatedV1Zookie) 194 r.DeprecatedV1Zookie = m.DeprecatedV1Zookie.CloneVT() 195 return r 196 } 197 198 func (m *DecodedZedToken_V1) CloneVT() isDecodedZedToken_VersionOneof { 199 if m == nil { 200 return (*DecodedZedToken_V1)(nil) 201 } 202 r := new(DecodedZedToken_V1) 203 r.V1 = m.V1.CloneVT() 204 return r 205 } 206 207 func (m *DecodedCursor) CloneVT() *DecodedCursor { 208 if m == nil { 209 return (*DecodedCursor)(nil) 210 } 211 r := new(DecodedCursor) 212 if m.VersionOneof != nil { 213 r.VersionOneof = m.VersionOneof.(interface { 214 CloneVT() isDecodedCursor_VersionOneof 215 }).CloneVT() 216 } 217 if len(m.unknownFields) > 0 { 218 r.unknownFields = make([]byte, len(m.unknownFields)) 219 copy(r.unknownFields, m.unknownFields) 220 } 221 return r 222 } 223 224 func (m *DecodedCursor) CloneMessageVT() proto.Message { 225 return m.CloneVT() 226 } 227 228 func (m *DecodedCursor_V1) CloneVT() isDecodedCursor_VersionOneof { 229 if m == nil { 230 return (*DecodedCursor_V1)(nil) 231 } 232 r := new(DecodedCursor_V1) 233 r.V1 = m.V1.CloneVT() 234 return r 235 } 236 237 func (m *V1Cursor) CloneVT() *V1Cursor { 238 if m == nil { 239 return (*V1Cursor)(nil) 240 } 241 r := new(V1Cursor) 242 r.Revision = m.Revision 243 r.CallAndParametersHash = m.CallAndParametersHash 244 r.DispatchVersion = m.DispatchVersion 245 if rhs := m.Sections; rhs != nil { 246 tmpContainer := make([]string, len(rhs)) 247 copy(tmpContainer, rhs) 248 r.Sections = tmpContainer 249 } 250 if len(m.unknownFields) > 0 { 251 r.unknownFields = make([]byte, len(m.unknownFields)) 252 copy(r.unknownFields, m.unknownFields) 253 } 254 return r 255 } 256 257 func (m *V1Cursor) CloneMessageVT() proto.Message { 258 return m.CloneVT() 259 } 260 261 func (m *DocComment) CloneVT() *DocComment { 262 if m == nil { 263 return (*DocComment)(nil) 264 } 265 r := new(DocComment) 266 r.Comment = m.Comment 267 if len(m.unknownFields) > 0 { 268 r.unknownFields = make([]byte, len(m.unknownFields)) 269 copy(r.unknownFields, m.unknownFields) 270 } 271 return r 272 } 273 274 func (m *DocComment) CloneMessageVT() proto.Message { 275 return m.CloneVT() 276 } 277 278 func (m *RelationMetadata) CloneVT() *RelationMetadata { 279 if m == nil { 280 return (*RelationMetadata)(nil) 281 } 282 r := new(RelationMetadata) 283 r.Kind = m.Kind 284 if len(m.unknownFields) > 0 { 285 r.unknownFields = make([]byte, len(m.unknownFields)) 286 copy(r.unknownFields, m.unknownFields) 287 } 288 return r 289 } 290 291 func (m *RelationMetadata) CloneMessageVT() proto.Message { 292 return m.CloneVT() 293 } 294 295 func (m *NamespaceAndRevision) CloneVT() *NamespaceAndRevision { 296 if m == nil { 297 return (*NamespaceAndRevision)(nil) 298 } 299 r := new(NamespaceAndRevision) 300 r.NamespaceName = m.NamespaceName 301 r.Revision = m.Revision 302 if len(m.unknownFields) > 0 { 303 r.unknownFields = make([]byte, len(m.unknownFields)) 304 copy(r.unknownFields, m.unknownFields) 305 } 306 return r 307 } 308 309 func (m *NamespaceAndRevision) CloneMessageVT() proto.Message { 310 return m.CloneVT() 311 } 312 313 func (m *V1Alpha1Revision) CloneVT() *V1Alpha1Revision { 314 if m == nil { 315 return (*V1Alpha1Revision)(nil) 316 } 317 r := new(V1Alpha1Revision) 318 if rhs := m.NsRevisions; rhs != nil { 319 tmpContainer := make([]*NamespaceAndRevision, len(rhs)) 320 for k, v := range rhs { 321 tmpContainer[k] = v.CloneVT() 322 } 323 r.NsRevisions = tmpContainer 324 } 325 if len(m.unknownFields) > 0 { 326 r.unknownFields = make([]byte, len(m.unknownFields)) 327 copy(r.unknownFields, m.unknownFields) 328 } 329 return r 330 } 331 332 func (m *V1Alpha1Revision) CloneMessageVT() proto.Message { 333 return m.CloneVT() 334 } 335 336 func (this *DecodedCaveat) EqualVT(that *DecodedCaveat) bool { 337 if this == that { 338 return true 339 } else if this == nil || that == nil { 340 return false 341 } 342 if this.KindOneof == nil && that.KindOneof != nil { 343 return false 344 } else if this.KindOneof != nil { 345 if that.KindOneof == nil { 346 return false 347 } 348 if !this.KindOneof.(interface { 349 EqualVT(isDecodedCaveat_KindOneof) bool 350 }).EqualVT(that.KindOneof) { 351 return false 352 } 353 } 354 if this.Name != that.Name { 355 return false 356 } 357 return string(this.unknownFields) == string(that.unknownFields) 358 } 359 360 func (this *DecodedCaveat) EqualMessageVT(thatMsg proto.Message) bool { 361 that, ok := thatMsg.(*DecodedCaveat) 362 if !ok { 363 return false 364 } 365 return this.EqualVT(that) 366 } 367 func (this *DecodedCaveat_Cel) EqualVT(thatIface isDecodedCaveat_KindOneof) bool { 368 that, ok := thatIface.(*DecodedCaveat_Cel) 369 if !ok { 370 return false 371 } 372 if this == that { 373 return true 374 } 375 if this == nil && that != nil || this != nil && that == nil { 376 return false 377 } 378 if p, q := this.Cel, that.Cel; p != q { 379 if p == nil { 380 p = &v1alpha1.CheckedExpr{} 381 } 382 if q == nil { 383 q = &v1alpha1.CheckedExpr{} 384 } 385 if equal, ok := interface{}(p).(interface { 386 EqualVT(*v1alpha1.CheckedExpr) bool 387 }); ok { 388 if !equal.EqualVT(q) { 389 return false 390 } 391 } else if !proto.Equal(p, q) { 392 return false 393 } 394 } 395 return true 396 } 397 398 func (this *DecodedZookie_V1Zookie) EqualVT(that *DecodedZookie_V1Zookie) bool { 399 if this == that { 400 return true 401 } else if this == nil || that == nil { 402 return false 403 } 404 if this.Revision != that.Revision { 405 return false 406 } 407 return string(this.unknownFields) == string(that.unknownFields) 408 } 409 410 func (this *DecodedZookie_V1Zookie) EqualMessageVT(thatMsg proto.Message) bool { 411 that, ok := thatMsg.(*DecodedZookie_V1Zookie) 412 if !ok { 413 return false 414 } 415 return this.EqualVT(that) 416 } 417 func (this *DecodedZookie_V2Zookie) EqualVT(that *DecodedZookie_V2Zookie) bool { 418 if this == that { 419 return true 420 } else if this == nil || that == nil { 421 return false 422 } 423 if this.Revision != that.Revision { 424 return false 425 } 426 return string(this.unknownFields) == string(that.unknownFields) 427 } 428 429 func (this *DecodedZookie_V2Zookie) EqualMessageVT(thatMsg proto.Message) bool { 430 that, ok := thatMsg.(*DecodedZookie_V2Zookie) 431 if !ok { 432 return false 433 } 434 return this.EqualVT(that) 435 } 436 func (this *DecodedZookie) EqualVT(that *DecodedZookie) bool { 437 if this == that { 438 return true 439 } else if this == nil || that == nil { 440 return false 441 } 442 if this.VersionOneof == nil && that.VersionOneof != nil { 443 return false 444 } else if this.VersionOneof != nil { 445 if that.VersionOneof == nil { 446 return false 447 } 448 if !this.VersionOneof.(interface { 449 EqualVT(isDecodedZookie_VersionOneof) bool 450 }).EqualVT(that.VersionOneof) { 451 return false 452 } 453 } 454 if this.Version != that.Version { 455 return false 456 } 457 return string(this.unknownFields) == string(that.unknownFields) 458 } 459 460 func (this *DecodedZookie) EqualMessageVT(thatMsg proto.Message) bool { 461 that, ok := thatMsg.(*DecodedZookie) 462 if !ok { 463 return false 464 } 465 return this.EqualVT(that) 466 } 467 func (this *DecodedZookie_V1) EqualVT(thatIface isDecodedZookie_VersionOneof) bool { 468 that, ok := thatIface.(*DecodedZookie_V1) 469 if !ok { 470 return false 471 } 472 if this == that { 473 return true 474 } 475 if this == nil && that != nil || this != nil && that == nil { 476 return false 477 } 478 if p, q := this.V1, that.V1; p != q { 479 if p == nil { 480 p = &DecodedZookie_V1Zookie{} 481 } 482 if q == nil { 483 q = &DecodedZookie_V1Zookie{} 484 } 485 if !p.EqualVT(q) { 486 return false 487 } 488 } 489 return true 490 } 491 492 func (this *DecodedZookie_V2) EqualVT(thatIface isDecodedZookie_VersionOneof) bool { 493 that, ok := thatIface.(*DecodedZookie_V2) 494 if !ok { 495 return false 496 } 497 if this == that { 498 return true 499 } 500 if this == nil && that != nil || this != nil && that == nil { 501 return false 502 } 503 if p, q := this.V2, that.V2; p != q { 504 if p == nil { 505 p = &DecodedZookie_V2Zookie{} 506 } 507 if q == nil { 508 q = &DecodedZookie_V2Zookie{} 509 } 510 if !p.EqualVT(q) { 511 return false 512 } 513 } 514 return true 515 } 516 517 func (this *DecodedZedToken_V1Zookie) EqualVT(that *DecodedZedToken_V1Zookie) bool { 518 if this == that { 519 return true 520 } else if this == nil || that == nil { 521 return false 522 } 523 if this.Revision != that.Revision { 524 return false 525 } 526 return string(this.unknownFields) == string(that.unknownFields) 527 } 528 529 func (this *DecodedZedToken_V1Zookie) EqualMessageVT(thatMsg proto.Message) bool { 530 that, ok := thatMsg.(*DecodedZedToken_V1Zookie) 531 if !ok { 532 return false 533 } 534 return this.EqualVT(that) 535 } 536 func (this *DecodedZedToken_V1ZedToken) EqualVT(that *DecodedZedToken_V1ZedToken) bool { 537 if this == that { 538 return true 539 } else if this == nil || that == nil { 540 return false 541 } 542 if this.Revision != that.Revision { 543 return false 544 } 545 return string(this.unknownFields) == string(that.unknownFields) 546 } 547 548 func (this *DecodedZedToken_V1ZedToken) EqualMessageVT(thatMsg proto.Message) bool { 549 that, ok := thatMsg.(*DecodedZedToken_V1ZedToken) 550 if !ok { 551 return false 552 } 553 return this.EqualVT(that) 554 } 555 func (this *DecodedZedToken) EqualVT(that *DecodedZedToken) bool { 556 if this == that { 557 return true 558 } else if this == nil || that == nil { 559 return false 560 } 561 if this.VersionOneof == nil && that.VersionOneof != nil { 562 return false 563 } else if this.VersionOneof != nil { 564 if that.VersionOneof == nil { 565 return false 566 } 567 if !this.VersionOneof.(interface { 568 EqualVT(isDecodedZedToken_VersionOneof) bool 569 }).EqualVT(that.VersionOneof) { 570 return false 571 } 572 } 573 return string(this.unknownFields) == string(that.unknownFields) 574 } 575 576 func (this *DecodedZedToken) EqualMessageVT(thatMsg proto.Message) bool { 577 that, ok := thatMsg.(*DecodedZedToken) 578 if !ok { 579 return false 580 } 581 return this.EqualVT(that) 582 } 583 func (this *DecodedZedToken_DeprecatedV1Zookie) EqualVT(thatIface isDecodedZedToken_VersionOneof) bool { 584 that, ok := thatIface.(*DecodedZedToken_DeprecatedV1Zookie) 585 if !ok { 586 return false 587 } 588 if this == that { 589 return true 590 } 591 if this == nil && that != nil || this != nil && that == nil { 592 return false 593 } 594 if p, q := this.DeprecatedV1Zookie, that.DeprecatedV1Zookie; p != q { 595 if p == nil { 596 p = &DecodedZedToken_V1Zookie{} 597 } 598 if q == nil { 599 q = &DecodedZedToken_V1Zookie{} 600 } 601 if !p.EqualVT(q) { 602 return false 603 } 604 } 605 return true 606 } 607 608 func (this *DecodedZedToken_V1) EqualVT(thatIface isDecodedZedToken_VersionOneof) bool { 609 that, ok := thatIface.(*DecodedZedToken_V1) 610 if !ok { 611 return false 612 } 613 if this == that { 614 return true 615 } 616 if this == nil && that != nil || this != nil && that == nil { 617 return false 618 } 619 if p, q := this.V1, that.V1; p != q { 620 if p == nil { 621 p = &DecodedZedToken_V1ZedToken{} 622 } 623 if q == nil { 624 q = &DecodedZedToken_V1ZedToken{} 625 } 626 if !p.EqualVT(q) { 627 return false 628 } 629 } 630 return true 631 } 632 633 func (this *DecodedCursor) EqualVT(that *DecodedCursor) bool { 634 if this == that { 635 return true 636 } else if this == nil || that == nil { 637 return false 638 } 639 if this.VersionOneof == nil && that.VersionOneof != nil { 640 return false 641 } else if this.VersionOneof != nil { 642 if that.VersionOneof == nil { 643 return false 644 } 645 if !this.VersionOneof.(interface { 646 EqualVT(isDecodedCursor_VersionOneof) bool 647 }).EqualVT(that.VersionOneof) { 648 return false 649 } 650 } 651 return string(this.unknownFields) == string(that.unknownFields) 652 } 653 654 func (this *DecodedCursor) EqualMessageVT(thatMsg proto.Message) bool { 655 that, ok := thatMsg.(*DecodedCursor) 656 if !ok { 657 return false 658 } 659 return this.EqualVT(that) 660 } 661 func (this *DecodedCursor_V1) EqualVT(thatIface isDecodedCursor_VersionOneof) bool { 662 that, ok := thatIface.(*DecodedCursor_V1) 663 if !ok { 664 return false 665 } 666 if this == that { 667 return true 668 } 669 if this == nil && that != nil || this != nil && that == nil { 670 return false 671 } 672 if p, q := this.V1, that.V1; p != q { 673 if p == nil { 674 p = &V1Cursor{} 675 } 676 if q == nil { 677 q = &V1Cursor{} 678 } 679 if !p.EqualVT(q) { 680 return false 681 } 682 } 683 return true 684 } 685 686 func (this *V1Cursor) EqualVT(that *V1Cursor) bool { 687 if this == that { 688 return true 689 } else if this == nil || that == nil { 690 return false 691 } 692 if this.Revision != that.Revision { 693 return false 694 } 695 if len(this.Sections) != len(that.Sections) { 696 return false 697 } 698 for i, vx := range this.Sections { 699 vy := that.Sections[i] 700 if vx != vy { 701 return false 702 } 703 } 704 if this.CallAndParametersHash != that.CallAndParametersHash { 705 return false 706 } 707 if this.DispatchVersion != that.DispatchVersion { 708 return false 709 } 710 return string(this.unknownFields) == string(that.unknownFields) 711 } 712 713 func (this *V1Cursor) EqualMessageVT(thatMsg proto.Message) bool { 714 that, ok := thatMsg.(*V1Cursor) 715 if !ok { 716 return false 717 } 718 return this.EqualVT(that) 719 } 720 func (this *DocComment) EqualVT(that *DocComment) bool { 721 if this == that { 722 return true 723 } else if this == nil || that == nil { 724 return false 725 } 726 if this.Comment != that.Comment { 727 return false 728 } 729 return string(this.unknownFields) == string(that.unknownFields) 730 } 731 732 func (this *DocComment) EqualMessageVT(thatMsg proto.Message) bool { 733 that, ok := thatMsg.(*DocComment) 734 if !ok { 735 return false 736 } 737 return this.EqualVT(that) 738 } 739 func (this *RelationMetadata) EqualVT(that *RelationMetadata) bool { 740 if this == that { 741 return true 742 } else if this == nil || that == nil { 743 return false 744 } 745 if this.Kind != that.Kind { 746 return false 747 } 748 return string(this.unknownFields) == string(that.unknownFields) 749 } 750 751 func (this *RelationMetadata) EqualMessageVT(thatMsg proto.Message) bool { 752 that, ok := thatMsg.(*RelationMetadata) 753 if !ok { 754 return false 755 } 756 return this.EqualVT(that) 757 } 758 func (this *NamespaceAndRevision) EqualVT(that *NamespaceAndRevision) bool { 759 if this == that { 760 return true 761 } else if this == nil || that == nil { 762 return false 763 } 764 if this.NamespaceName != that.NamespaceName { 765 return false 766 } 767 if this.Revision != that.Revision { 768 return false 769 } 770 return string(this.unknownFields) == string(that.unknownFields) 771 } 772 773 func (this *NamespaceAndRevision) EqualMessageVT(thatMsg proto.Message) bool { 774 that, ok := thatMsg.(*NamespaceAndRevision) 775 if !ok { 776 return false 777 } 778 return this.EqualVT(that) 779 } 780 func (this *V1Alpha1Revision) EqualVT(that *V1Alpha1Revision) bool { 781 if this == that { 782 return true 783 } else if this == nil || that == nil { 784 return false 785 } 786 if len(this.NsRevisions) != len(that.NsRevisions) { 787 return false 788 } 789 for i, vx := range this.NsRevisions { 790 vy := that.NsRevisions[i] 791 if p, q := vx, vy; p != q { 792 if p == nil { 793 p = &NamespaceAndRevision{} 794 } 795 if q == nil { 796 q = &NamespaceAndRevision{} 797 } 798 if !p.EqualVT(q) { 799 return false 800 } 801 } 802 } 803 return string(this.unknownFields) == string(that.unknownFields) 804 } 805 806 func (this *V1Alpha1Revision) EqualMessageVT(thatMsg proto.Message) bool { 807 that, ok := thatMsg.(*V1Alpha1Revision) 808 if !ok { 809 return false 810 } 811 return this.EqualVT(that) 812 } 813 func (m *DecodedCaveat) MarshalVT() (dAtA []byte, err error) { 814 if m == nil { 815 return nil, nil 816 } 817 size := m.SizeVT() 818 dAtA = make([]byte, size) 819 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 820 if err != nil { 821 return nil, err 822 } 823 return dAtA[:n], nil 824 } 825 826 func (m *DecodedCaveat) MarshalToVT(dAtA []byte) (int, error) { 827 size := m.SizeVT() 828 return m.MarshalToSizedBufferVT(dAtA[:size]) 829 } 830 831 func (m *DecodedCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 832 if m == nil { 833 return 0, nil 834 } 835 i := len(dAtA) 836 _ = i 837 var l int 838 _ = l 839 if m.unknownFields != nil { 840 i -= len(m.unknownFields) 841 copy(dAtA[i:], m.unknownFields) 842 } 843 if vtmsg, ok := m.KindOneof.(interface { 844 MarshalToSizedBufferVT([]byte) (int, error) 845 }); ok { 846 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 847 if err != nil { 848 return 0, err 849 } 850 i -= size 851 } 852 if len(m.Name) > 0 { 853 i -= len(m.Name) 854 copy(dAtA[i:], m.Name) 855 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) 856 i-- 857 dAtA[i] = 0x12 858 } 859 return len(dAtA) - i, nil 860 } 861 862 func (m *DecodedCaveat_Cel) MarshalToVT(dAtA []byte) (int, error) { 863 size := m.SizeVT() 864 return m.MarshalToSizedBufferVT(dAtA[:size]) 865 } 866 867 func (m *DecodedCaveat_Cel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 868 i := len(dAtA) 869 if m.Cel != nil { 870 if vtmsg, ok := interface{}(m.Cel).(interface { 871 MarshalToSizedBufferVT([]byte) (int, error) 872 }); ok { 873 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 874 if err != nil { 875 return 0, err 876 } 877 i -= size 878 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 879 } else { 880 encoded, err := proto.Marshal(m.Cel) 881 if err != nil { 882 return 0, err 883 } 884 i -= len(encoded) 885 copy(dAtA[i:], encoded) 886 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 887 } 888 i-- 889 dAtA[i] = 0xa 890 } 891 return len(dAtA) - i, nil 892 } 893 func (m *DecodedZookie_V1Zookie) MarshalVT() (dAtA []byte, err error) { 894 if m == nil { 895 return nil, nil 896 } 897 size := m.SizeVT() 898 dAtA = make([]byte, size) 899 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 900 if err != nil { 901 return nil, err 902 } 903 return dAtA[:n], nil 904 } 905 906 func (m *DecodedZookie_V1Zookie) MarshalToVT(dAtA []byte) (int, error) { 907 size := m.SizeVT() 908 return m.MarshalToSizedBufferVT(dAtA[:size]) 909 } 910 911 func (m *DecodedZookie_V1Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 912 if m == nil { 913 return 0, nil 914 } 915 i := len(dAtA) 916 _ = i 917 var l int 918 _ = l 919 if m.unknownFields != nil { 920 i -= len(m.unknownFields) 921 copy(dAtA[i:], m.unknownFields) 922 } 923 if m.Revision != 0 { 924 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Revision)) 925 i-- 926 dAtA[i] = 0x8 927 } 928 return len(dAtA) - i, nil 929 } 930 931 func (m *DecodedZookie_V2Zookie) MarshalVT() (dAtA []byte, err error) { 932 if m == nil { 933 return nil, nil 934 } 935 size := m.SizeVT() 936 dAtA = make([]byte, size) 937 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 938 if err != nil { 939 return nil, err 940 } 941 return dAtA[:n], nil 942 } 943 944 func (m *DecodedZookie_V2Zookie) MarshalToVT(dAtA []byte) (int, error) { 945 size := m.SizeVT() 946 return m.MarshalToSizedBufferVT(dAtA[:size]) 947 } 948 949 func (m *DecodedZookie_V2Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 950 if m == nil { 951 return 0, nil 952 } 953 i := len(dAtA) 954 _ = i 955 var l int 956 _ = l 957 if m.unknownFields != nil { 958 i -= len(m.unknownFields) 959 copy(dAtA[i:], m.unknownFields) 960 } 961 if len(m.Revision) > 0 { 962 i -= len(m.Revision) 963 copy(dAtA[i:], m.Revision) 964 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) 965 i-- 966 dAtA[i] = 0xa 967 } 968 return len(dAtA) - i, nil 969 } 970 971 func (m *DecodedZookie) MarshalVT() (dAtA []byte, err error) { 972 if m == nil { 973 return nil, nil 974 } 975 size := m.SizeVT() 976 dAtA = make([]byte, size) 977 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 978 if err != nil { 979 return nil, err 980 } 981 return dAtA[:n], nil 982 } 983 984 func (m *DecodedZookie) MarshalToVT(dAtA []byte) (int, error) { 985 size := m.SizeVT() 986 return m.MarshalToSizedBufferVT(dAtA[:size]) 987 } 988 989 func (m *DecodedZookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 990 if m == nil { 991 return 0, nil 992 } 993 i := len(dAtA) 994 _ = i 995 var l int 996 _ = l 997 if m.unknownFields != nil { 998 i -= len(m.unknownFields) 999 copy(dAtA[i:], m.unknownFields) 1000 } 1001 if vtmsg, ok := m.VersionOneof.(interface { 1002 MarshalToSizedBufferVT([]byte) (int, error) 1003 }); ok { 1004 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1005 if err != nil { 1006 return 0, err 1007 } 1008 i -= size 1009 } 1010 if m.Version != 0 { 1011 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) 1012 i-- 1013 dAtA[i] = 0x8 1014 } 1015 return len(dAtA) - i, nil 1016 } 1017 1018 func (m *DecodedZookie_V1) MarshalToVT(dAtA []byte) (int, error) { 1019 size := m.SizeVT() 1020 return m.MarshalToSizedBufferVT(dAtA[:size]) 1021 } 1022 1023 func (m *DecodedZookie_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1024 i := len(dAtA) 1025 if m.V1 != nil { 1026 size, err := m.V1.MarshalToSizedBufferVT(dAtA[:i]) 1027 if err != nil { 1028 return 0, err 1029 } 1030 i -= size 1031 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1032 i-- 1033 dAtA[i] = 0x12 1034 } 1035 return len(dAtA) - i, nil 1036 } 1037 func (m *DecodedZookie_V2) MarshalToVT(dAtA []byte) (int, error) { 1038 size := m.SizeVT() 1039 return m.MarshalToSizedBufferVT(dAtA[:size]) 1040 } 1041 1042 func (m *DecodedZookie_V2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1043 i := len(dAtA) 1044 if m.V2 != nil { 1045 size, err := m.V2.MarshalToSizedBufferVT(dAtA[:i]) 1046 if err != nil { 1047 return 0, err 1048 } 1049 i -= size 1050 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1051 i-- 1052 dAtA[i] = 0x1a 1053 } 1054 return len(dAtA) - i, nil 1055 } 1056 func (m *DecodedZedToken_V1Zookie) MarshalVT() (dAtA []byte, err error) { 1057 if m == nil { 1058 return nil, nil 1059 } 1060 size := m.SizeVT() 1061 dAtA = make([]byte, size) 1062 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1063 if err != nil { 1064 return nil, err 1065 } 1066 return dAtA[:n], nil 1067 } 1068 1069 func (m *DecodedZedToken_V1Zookie) MarshalToVT(dAtA []byte) (int, error) { 1070 size := m.SizeVT() 1071 return m.MarshalToSizedBufferVT(dAtA[:size]) 1072 } 1073 1074 func (m *DecodedZedToken_V1Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1075 if m == nil { 1076 return 0, nil 1077 } 1078 i := len(dAtA) 1079 _ = i 1080 var l int 1081 _ = l 1082 if m.unknownFields != nil { 1083 i -= len(m.unknownFields) 1084 copy(dAtA[i:], m.unknownFields) 1085 } 1086 if m.Revision != 0 { 1087 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Revision)) 1088 i-- 1089 dAtA[i] = 0x8 1090 } 1091 return len(dAtA) - i, nil 1092 } 1093 1094 func (m *DecodedZedToken_V1ZedToken) MarshalVT() (dAtA []byte, err error) { 1095 if m == nil { 1096 return nil, nil 1097 } 1098 size := m.SizeVT() 1099 dAtA = make([]byte, size) 1100 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1101 if err != nil { 1102 return nil, err 1103 } 1104 return dAtA[:n], nil 1105 } 1106 1107 func (m *DecodedZedToken_V1ZedToken) MarshalToVT(dAtA []byte) (int, error) { 1108 size := m.SizeVT() 1109 return m.MarshalToSizedBufferVT(dAtA[:size]) 1110 } 1111 1112 func (m *DecodedZedToken_V1ZedToken) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1113 if m == nil { 1114 return 0, nil 1115 } 1116 i := len(dAtA) 1117 _ = i 1118 var l int 1119 _ = l 1120 if m.unknownFields != nil { 1121 i -= len(m.unknownFields) 1122 copy(dAtA[i:], m.unknownFields) 1123 } 1124 if len(m.Revision) > 0 { 1125 i -= len(m.Revision) 1126 copy(dAtA[i:], m.Revision) 1127 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) 1128 i-- 1129 dAtA[i] = 0xa 1130 } 1131 return len(dAtA) - i, nil 1132 } 1133 1134 func (m *DecodedZedToken) MarshalVT() (dAtA []byte, err error) { 1135 if m == nil { 1136 return nil, nil 1137 } 1138 size := m.SizeVT() 1139 dAtA = make([]byte, size) 1140 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1141 if err != nil { 1142 return nil, err 1143 } 1144 return dAtA[:n], nil 1145 } 1146 1147 func (m *DecodedZedToken) MarshalToVT(dAtA []byte) (int, error) { 1148 size := m.SizeVT() 1149 return m.MarshalToSizedBufferVT(dAtA[:size]) 1150 } 1151 1152 func (m *DecodedZedToken) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1153 if m == nil { 1154 return 0, nil 1155 } 1156 i := len(dAtA) 1157 _ = i 1158 var l int 1159 _ = l 1160 if m.unknownFields != nil { 1161 i -= len(m.unknownFields) 1162 copy(dAtA[i:], m.unknownFields) 1163 } 1164 if vtmsg, ok := m.VersionOneof.(interface { 1165 MarshalToSizedBufferVT([]byte) (int, error) 1166 }); ok { 1167 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1168 if err != nil { 1169 return 0, err 1170 } 1171 i -= size 1172 } 1173 return len(dAtA) - i, nil 1174 } 1175 1176 func (m *DecodedZedToken_DeprecatedV1Zookie) MarshalToVT(dAtA []byte) (int, error) { 1177 size := m.SizeVT() 1178 return m.MarshalToSizedBufferVT(dAtA[:size]) 1179 } 1180 1181 func (m *DecodedZedToken_DeprecatedV1Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1182 i := len(dAtA) 1183 if m.DeprecatedV1Zookie != nil { 1184 size, err := m.DeprecatedV1Zookie.MarshalToSizedBufferVT(dAtA[:i]) 1185 if err != nil { 1186 return 0, err 1187 } 1188 i -= size 1189 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1190 i-- 1191 dAtA[i] = 0x12 1192 } 1193 return len(dAtA) - i, nil 1194 } 1195 func (m *DecodedZedToken_V1) MarshalToVT(dAtA []byte) (int, error) { 1196 size := m.SizeVT() 1197 return m.MarshalToSizedBufferVT(dAtA[:size]) 1198 } 1199 1200 func (m *DecodedZedToken_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1201 i := len(dAtA) 1202 if m.V1 != nil { 1203 size, err := m.V1.MarshalToSizedBufferVT(dAtA[:i]) 1204 if err != nil { 1205 return 0, err 1206 } 1207 i -= size 1208 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1209 i-- 1210 dAtA[i] = 0x1a 1211 } 1212 return len(dAtA) - i, nil 1213 } 1214 func (m *DecodedCursor) MarshalVT() (dAtA []byte, err error) { 1215 if m == nil { 1216 return nil, nil 1217 } 1218 size := m.SizeVT() 1219 dAtA = make([]byte, size) 1220 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1221 if err != nil { 1222 return nil, err 1223 } 1224 return dAtA[:n], nil 1225 } 1226 1227 func (m *DecodedCursor) MarshalToVT(dAtA []byte) (int, error) { 1228 size := m.SizeVT() 1229 return m.MarshalToSizedBufferVT(dAtA[:size]) 1230 } 1231 1232 func (m *DecodedCursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1233 if m == nil { 1234 return 0, nil 1235 } 1236 i := len(dAtA) 1237 _ = i 1238 var l int 1239 _ = l 1240 if m.unknownFields != nil { 1241 i -= len(m.unknownFields) 1242 copy(dAtA[i:], m.unknownFields) 1243 } 1244 if vtmsg, ok := m.VersionOneof.(interface { 1245 MarshalToSizedBufferVT([]byte) (int, error) 1246 }); ok { 1247 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1248 if err != nil { 1249 return 0, err 1250 } 1251 i -= size 1252 } 1253 return len(dAtA) - i, nil 1254 } 1255 1256 func (m *DecodedCursor_V1) MarshalToVT(dAtA []byte) (int, error) { 1257 size := m.SizeVT() 1258 return m.MarshalToSizedBufferVT(dAtA[:size]) 1259 } 1260 1261 func (m *DecodedCursor_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1262 i := len(dAtA) 1263 if m.V1 != nil { 1264 size, err := m.V1.MarshalToSizedBufferVT(dAtA[:i]) 1265 if err != nil { 1266 return 0, err 1267 } 1268 i -= size 1269 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1270 i-- 1271 dAtA[i] = 0xa 1272 } 1273 return len(dAtA) - i, nil 1274 } 1275 func (m *V1Cursor) MarshalVT() (dAtA []byte, err error) { 1276 if m == nil { 1277 return nil, nil 1278 } 1279 size := m.SizeVT() 1280 dAtA = make([]byte, size) 1281 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1282 if err != nil { 1283 return nil, err 1284 } 1285 return dAtA[:n], nil 1286 } 1287 1288 func (m *V1Cursor) MarshalToVT(dAtA []byte) (int, error) { 1289 size := m.SizeVT() 1290 return m.MarshalToSizedBufferVT(dAtA[:size]) 1291 } 1292 1293 func (m *V1Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1294 if m == nil { 1295 return 0, nil 1296 } 1297 i := len(dAtA) 1298 _ = i 1299 var l int 1300 _ = l 1301 if m.unknownFields != nil { 1302 i -= len(m.unknownFields) 1303 copy(dAtA[i:], m.unknownFields) 1304 } 1305 if m.DispatchVersion != 0 { 1306 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchVersion)) 1307 i-- 1308 dAtA[i] = 0x20 1309 } 1310 if len(m.CallAndParametersHash) > 0 { 1311 i -= len(m.CallAndParametersHash) 1312 copy(dAtA[i:], m.CallAndParametersHash) 1313 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CallAndParametersHash))) 1314 i-- 1315 dAtA[i] = 0x1a 1316 } 1317 if len(m.Sections) > 0 { 1318 for iNdEx := len(m.Sections) - 1; iNdEx >= 0; iNdEx-- { 1319 i -= len(m.Sections[iNdEx]) 1320 copy(dAtA[i:], m.Sections[iNdEx]) 1321 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) 1322 i-- 1323 dAtA[i] = 0x12 1324 } 1325 } 1326 if len(m.Revision) > 0 { 1327 i -= len(m.Revision) 1328 copy(dAtA[i:], m.Revision) 1329 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) 1330 i-- 1331 dAtA[i] = 0xa 1332 } 1333 return len(dAtA) - i, nil 1334 } 1335 1336 func (m *DocComment) MarshalVT() (dAtA []byte, err error) { 1337 if m == nil { 1338 return nil, nil 1339 } 1340 size := m.SizeVT() 1341 dAtA = make([]byte, size) 1342 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1343 if err != nil { 1344 return nil, err 1345 } 1346 return dAtA[:n], nil 1347 } 1348 1349 func (m *DocComment) MarshalToVT(dAtA []byte) (int, error) { 1350 size := m.SizeVT() 1351 return m.MarshalToSizedBufferVT(dAtA[:size]) 1352 } 1353 1354 func (m *DocComment) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1355 if m == nil { 1356 return 0, nil 1357 } 1358 i := len(dAtA) 1359 _ = i 1360 var l int 1361 _ = l 1362 if m.unknownFields != nil { 1363 i -= len(m.unknownFields) 1364 copy(dAtA[i:], m.unknownFields) 1365 } 1366 if len(m.Comment) > 0 { 1367 i -= len(m.Comment) 1368 copy(dAtA[i:], m.Comment) 1369 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment))) 1370 i-- 1371 dAtA[i] = 0xa 1372 } 1373 return len(dAtA) - i, nil 1374 } 1375 1376 func (m *RelationMetadata) MarshalVT() (dAtA []byte, err error) { 1377 if m == nil { 1378 return nil, nil 1379 } 1380 size := m.SizeVT() 1381 dAtA = make([]byte, size) 1382 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1383 if err != nil { 1384 return nil, err 1385 } 1386 return dAtA[:n], nil 1387 } 1388 1389 func (m *RelationMetadata) MarshalToVT(dAtA []byte) (int, error) { 1390 size := m.SizeVT() 1391 return m.MarshalToSizedBufferVT(dAtA[:size]) 1392 } 1393 1394 func (m *RelationMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1395 if m == nil { 1396 return 0, nil 1397 } 1398 i := len(dAtA) 1399 _ = i 1400 var l int 1401 _ = l 1402 if m.unknownFields != nil { 1403 i -= len(m.unknownFields) 1404 copy(dAtA[i:], m.unknownFields) 1405 } 1406 if m.Kind != 0 { 1407 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Kind)) 1408 i-- 1409 dAtA[i] = 0x8 1410 } 1411 return len(dAtA) - i, nil 1412 } 1413 1414 func (m *NamespaceAndRevision) MarshalVT() (dAtA []byte, err error) { 1415 if m == nil { 1416 return nil, nil 1417 } 1418 size := m.SizeVT() 1419 dAtA = make([]byte, size) 1420 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1421 if err != nil { 1422 return nil, err 1423 } 1424 return dAtA[:n], nil 1425 } 1426 1427 func (m *NamespaceAndRevision) MarshalToVT(dAtA []byte) (int, error) { 1428 size := m.SizeVT() 1429 return m.MarshalToSizedBufferVT(dAtA[:size]) 1430 } 1431 1432 func (m *NamespaceAndRevision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1433 if m == nil { 1434 return 0, nil 1435 } 1436 i := len(dAtA) 1437 _ = i 1438 var l int 1439 _ = l 1440 if m.unknownFields != nil { 1441 i -= len(m.unknownFields) 1442 copy(dAtA[i:], m.unknownFields) 1443 } 1444 if len(m.Revision) > 0 { 1445 i -= len(m.Revision) 1446 copy(dAtA[i:], m.Revision) 1447 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) 1448 i-- 1449 dAtA[i] = 0x12 1450 } 1451 if len(m.NamespaceName) > 0 { 1452 i -= len(m.NamespaceName) 1453 copy(dAtA[i:], m.NamespaceName) 1454 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NamespaceName))) 1455 i-- 1456 dAtA[i] = 0xa 1457 } 1458 return len(dAtA) - i, nil 1459 } 1460 1461 func (m *V1Alpha1Revision) MarshalVT() (dAtA []byte, err error) { 1462 if m == nil { 1463 return nil, nil 1464 } 1465 size := m.SizeVT() 1466 dAtA = make([]byte, size) 1467 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1468 if err != nil { 1469 return nil, err 1470 } 1471 return dAtA[:n], nil 1472 } 1473 1474 func (m *V1Alpha1Revision) MarshalToVT(dAtA []byte) (int, error) { 1475 size := m.SizeVT() 1476 return m.MarshalToSizedBufferVT(dAtA[:size]) 1477 } 1478 1479 func (m *V1Alpha1Revision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1480 if m == nil { 1481 return 0, nil 1482 } 1483 i := len(dAtA) 1484 _ = i 1485 var l int 1486 _ = l 1487 if m.unknownFields != nil { 1488 i -= len(m.unknownFields) 1489 copy(dAtA[i:], m.unknownFields) 1490 } 1491 if len(m.NsRevisions) > 0 { 1492 for iNdEx := len(m.NsRevisions) - 1; iNdEx >= 0; iNdEx-- { 1493 size, err := m.NsRevisions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 1494 if err != nil { 1495 return 0, err 1496 } 1497 i -= size 1498 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1499 i-- 1500 dAtA[i] = 0xa 1501 } 1502 } 1503 return len(dAtA) - i, nil 1504 } 1505 1506 func (m *DecodedCaveat) SizeVT() (n int) { 1507 if m == nil { 1508 return 0 1509 } 1510 var l int 1511 _ = l 1512 if vtmsg, ok := m.KindOneof.(interface{ SizeVT() int }); ok { 1513 n += vtmsg.SizeVT() 1514 } 1515 l = len(m.Name) 1516 if l > 0 { 1517 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1518 } 1519 n += len(m.unknownFields) 1520 return n 1521 } 1522 1523 func (m *DecodedCaveat_Cel) SizeVT() (n int) { 1524 if m == nil { 1525 return 0 1526 } 1527 var l int 1528 _ = l 1529 if m.Cel != nil { 1530 if size, ok := interface{}(m.Cel).(interface { 1531 SizeVT() int 1532 }); ok { 1533 l = size.SizeVT() 1534 } else { 1535 l = proto.Size(m.Cel) 1536 } 1537 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1538 } 1539 return n 1540 } 1541 func (m *DecodedZookie_V1Zookie) SizeVT() (n int) { 1542 if m == nil { 1543 return 0 1544 } 1545 var l int 1546 _ = l 1547 if m.Revision != 0 { 1548 n += 1 + protohelpers.SizeOfVarint(uint64(m.Revision)) 1549 } 1550 n += len(m.unknownFields) 1551 return n 1552 } 1553 1554 func (m *DecodedZookie_V2Zookie) SizeVT() (n int) { 1555 if m == nil { 1556 return 0 1557 } 1558 var l int 1559 _ = l 1560 l = len(m.Revision) 1561 if l > 0 { 1562 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1563 } 1564 n += len(m.unknownFields) 1565 return n 1566 } 1567 1568 func (m *DecodedZookie) SizeVT() (n int) { 1569 if m == nil { 1570 return 0 1571 } 1572 var l int 1573 _ = l 1574 if m.Version != 0 { 1575 n += 1 + protohelpers.SizeOfVarint(uint64(m.Version)) 1576 } 1577 if vtmsg, ok := m.VersionOneof.(interface{ SizeVT() int }); ok { 1578 n += vtmsg.SizeVT() 1579 } 1580 n += len(m.unknownFields) 1581 return n 1582 } 1583 1584 func (m *DecodedZookie_V1) SizeVT() (n int) { 1585 if m == nil { 1586 return 0 1587 } 1588 var l int 1589 _ = l 1590 if m.V1 != nil { 1591 l = m.V1.SizeVT() 1592 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1593 } 1594 return n 1595 } 1596 func (m *DecodedZookie_V2) SizeVT() (n int) { 1597 if m == nil { 1598 return 0 1599 } 1600 var l int 1601 _ = l 1602 if m.V2 != nil { 1603 l = m.V2.SizeVT() 1604 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1605 } 1606 return n 1607 } 1608 func (m *DecodedZedToken_V1Zookie) SizeVT() (n int) { 1609 if m == nil { 1610 return 0 1611 } 1612 var l int 1613 _ = l 1614 if m.Revision != 0 { 1615 n += 1 + protohelpers.SizeOfVarint(uint64(m.Revision)) 1616 } 1617 n += len(m.unknownFields) 1618 return n 1619 } 1620 1621 func (m *DecodedZedToken_V1ZedToken) SizeVT() (n int) { 1622 if m == nil { 1623 return 0 1624 } 1625 var l int 1626 _ = l 1627 l = len(m.Revision) 1628 if l > 0 { 1629 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1630 } 1631 n += len(m.unknownFields) 1632 return n 1633 } 1634 1635 func (m *DecodedZedToken) SizeVT() (n int) { 1636 if m == nil { 1637 return 0 1638 } 1639 var l int 1640 _ = l 1641 if vtmsg, ok := m.VersionOneof.(interface{ SizeVT() int }); ok { 1642 n += vtmsg.SizeVT() 1643 } 1644 n += len(m.unknownFields) 1645 return n 1646 } 1647 1648 func (m *DecodedZedToken_DeprecatedV1Zookie) SizeVT() (n int) { 1649 if m == nil { 1650 return 0 1651 } 1652 var l int 1653 _ = l 1654 if m.DeprecatedV1Zookie != nil { 1655 l = m.DeprecatedV1Zookie.SizeVT() 1656 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1657 } 1658 return n 1659 } 1660 func (m *DecodedZedToken_V1) SizeVT() (n int) { 1661 if m == nil { 1662 return 0 1663 } 1664 var l int 1665 _ = l 1666 if m.V1 != nil { 1667 l = m.V1.SizeVT() 1668 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1669 } 1670 return n 1671 } 1672 func (m *DecodedCursor) SizeVT() (n int) { 1673 if m == nil { 1674 return 0 1675 } 1676 var l int 1677 _ = l 1678 if vtmsg, ok := m.VersionOneof.(interface{ SizeVT() int }); ok { 1679 n += vtmsg.SizeVT() 1680 } 1681 n += len(m.unknownFields) 1682 return n 1683 } 1684 1685 func (m *DecodedCursor_V1) SizeVT() (n int) { 1686 if m == nil { 1687 return 0 1688 } 1689 var l int 1690 _ = l 1691 if m.V1 != nil { 1692 l = m.V1.SizeVT() 1693 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1694 } 1695 return n 1696 } 1697 func (m *V1Cursor) SizeVT() (n int) { 1698 if m == nil { 1699 return 0 1700 } 1701 var l int 1702 _ = l 1703 l = len(m.Revision) 1704 if l > 0 { 1705 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1706 } 1707 if len(m.Sections) > 0 { 1708 for _, s := range m.Sections { 1709 l = len(s) 1710 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1711 } 1712 } 1713 l = len(m.CallAndParametersHash) 1714 if l > 0 { 1715 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1716 } 1717 if m.DispatchVersion != 0 { 1718 n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchVersion)) 1719 } 1720 n += len(m.unknownFields) 1721 return n 1722 } 1723 1724 func (m *DocComment) SizeVT() (n int) { 1725 if m == nil { 1726 return 0 1727 } 1728 var l int 1729 _ = l 1730 l = len(m.Comment) 1731 if l > 0 { 1732 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1733 } 1734 n += len(m.unknownFields) 1735 return n 1736 } 1737 1738 func (m *RelationMetadata) SizeVT() (n int) { 1739 if m == nil { 1740 return 0 1741 } 1742 var l int 1743 _ = l 1744 if m.Kind != 0 { 1745 n += 1 + protohelpers.SizeOfVarint(uint64(m.Kind)) 1746 } 1747 n += len(m.unknownFields) 1748 return n 1749 } 1750 1751 func (m *NamespaceAndRevision) SizeVT() (n int) { 1752 if m == nil { 1753 return 0 1754 } 1755 var l int 1756 _ = l 1757 l = len(m.NamespaceName) 1758 if l > 0 { 1759 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1760 } 1761 l = len(m.Revision) 1762 if l > 0 { 1763 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1764 } 1765 n += len(m.unknownFields) 1766 return n 1767 } 1768 1769 func (m *V1Alpha1Revision) SizeVT() (n int) { 1770 if m == nil { 1771 return 0 1772 } 1773 var l int 1774 _ = l 1775 if len(m.NsRevisions) > 0 { 1776 for _, e := range m.NsRevisions { 1777 l = e.SizeVT() 1778 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 1779 } 1780 } 1781 n += len(m.unknownFields) 1782 return n 1783 } 1784 1785 func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { 1786 l := len(dAtA) 1787 iNdEx := 0 1788 for iNdEx < l { 1789 preIndex := iNdEx 1790 var wire uint64 1791 for shift := uint(0); ; shift += 7 { 1792 if shift >= 64 { 1793 return protohelpers.ErrIntOverflow 1794 } 1795 if iNdEx >= l { 1796 return io.ErrUnexpectedEOF 1797 } 1798 b := dAtA[iNdEx] 1799 iNdEx++ 1800 wire |= uint64(b&0x7F) << shift 1801 if b < 0x80 { 1802 break 1803 } 1804 } 1805 fieldNum := int32(wire >> 3) 1806 wireType := int(wire & 0x7) 1807 if wireType == 4 { 1808 return fmt.Errorf("proto: DecodedCaveat: wiretype end group for non-group") 1809 } 1810 if fieldNum <= 0 { 1811 return fmt.Errorf("proto: DecodedCaveat: illegal tag %d (wire type %d)", fieldNum, wire) 1812 } 1813 switch fieldNum { 1814 case 1: 1815 if wireType != 2 { 1816 return fmt.Errorf("proto: wrong wireType = %d for field Cel", wireType) 1817 } 1818 var msglen int 1819 for shift := uint(0); ; shift += 7 { 1820 if shift >= 64 { 1821 return protohelpers.ErrIntOverflow 1822 } 1823 if iNdEx >= l { 1824 return io.ErrUnexpectedEOF 1825 } 1826 b := dAtA[iNdEx] 1827 iNdEx++ 1828 msglen |= int(b&0x7F) << shift 1829 if b < 0x80 { 1830 break 1831 } 1832 } 1833 if msglen < 0 { 1834 return protohelpers.ErrInvalidLength 1835 } 1836 postIndex := iNdEx + msglen 1837 if postIndex < 0 { 1838 return protohelpers.ErrInvalidLength 1839 } 1840 if postIndex > l { 1841 return io.ErrUnexpectedEOF 1842 } 1843 if oneof, ok := m.KindOneof.(*DecodedCaveat_Cel); ok { 1844 if unmarshal, ok := interface{}(oneof.Cel).(interface { 1845 UnmarshalVT([]byte) error 1846 }); ok { 1847 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1848 return err 1849 } 1850 } else { 1851 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], oneof.Cel); err != nil { 1852 return err 1853 } 1854 } 1855 } else { 1856 v := &v1alpha1.CheckedExpr{} 1857 if unmarshal, ok := interface{}(v).(interface { 1858 UnmarshalVT([]byte) error 1859 }); ok { 1860 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1861 return err 1862 } 1863 } else { 1864 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { 1865 return err 1866 } 1867 } 1868 m.KindOneof = &DecodedCaveat_Cel{Cel: v} 1869 } 1870 iNdEx = postIndex 1871 case 2: 1872 if wireType != 2 { 1873 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 1874 } 1875 var stringLen uint64 1876 for shift := uint(0); ; shift += 7 { 1877 if shift >= 64 { 1878 return protohelpers.ErrIntOverflow 1879 } 1880 if iNdEx >= l { 1881 return io.ErrUnexpectedEOF 1882 } 1883 b := dAtA[iNdEx] 1884 iNdEx++ 1885 stringLen |= uint64(b&0x7F) << shift 1886 if b < 0x80 { 1887 break 1888 } 1889 } 1890 intStringLen := int(stringLen) 1891 if intStringLen < 0 { 1892 return protohelpers.ErrInvalidLength 1893 } 1894 postIndex := iNdEx + intStringLen 1895 if postIndex < 0 { 1896 return protohelpers.ErrInvalidLength 1897 } 1898 if postIndex > l { 1899 return io.ErrUnexpectedEOF 1900 } 1901 m.Name = string(dAtA[iNdEx:postIndex]) 1902 iNdEx = postIndex 1903 default: 1904 iNdEx = preIndex 1905 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 1906 if err != nil { 1907 return err 1908 } 1909 if (skippy < 0) || (iNdEx+skippy) < 0 { 1910 return protohelpers.ErrInvalidLength 1911 } 1912 if (iNdEx + skippy) > l { 1913 return io.ErrUnexpectedEOF 1914 } 1915 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1916 iNdEx += skippy 1917 } 1918 } 1919 1920 if iNdEx > l { 1921 return io.ErrUnexpectedEOF 1922 } 1923 return nil 1924 } 1925 func (m *DecodedZookie_V1Zookie) UnmarshalVT(dAtA []byte) error { 1926 l := len(dAtA) 1927 iNdEx := 0 1928 for iNdEx < l { 1929 preIndex := iNdEx 1930 var wire uint64 1931 for shift := uint(0); ; shift += 7 { 1932 if shift >= 64 { 1933 return protohelpers.ErrIntOverflow 1934 } 1935 if iNdEx >= l { 1936 return io.ErrUnexpectedEOF 1937 } 1938 b := dAtA[iNdEx] 1939 iNdEx++ 1940 wire |= uint64(b&0x7F) << shift 1941 if b < 0x80 { 1942 break 1943 } 1944 } 1945 fieldNum := int32(wire >> 3) 1946 wireType := int(wire & 0x7) 1947 if wireType == 4 { 1948 return fmt.Errorf("proto: DecodedZookie_V1Zookie: wiretype end group for non-group") 1949 } 1950 if fieldNum <= 0 { 1951 return fmt.Errorf("proto: DecodedZookie_V1Zookie: illegal tag %d (wire type %d)", fieldNum, wire) 1952 } 1953 switch fieldNum { 1954 case 1: 1955 if wireType != 0 { 1956 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 1957 } 1958 m.Revision = 0 1959 for shift := uint(0); ; shift += 7 { 1960 if shift >= 64 { 1961 return protohelpers.ErrIntOverflow 1962 } 1963 if iNdEx >= l { 1964 return io.ErrUnexpectedEOF 1965 } 1966 b := dAtA[iNdEx] 1967 iNdEx++ 1968 m.Revision |= uint64(b&0x7F) << shift 1969 if b < 0x80 { 1970 break 1971 } 1972 } 1973 default: 1974 iNdEx = preIndex 1975 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 1976 if err != nil { 1977 return err 1978 } 1979 if (skippy < 0) || (iNdEx+skippy) < 0 { 1980 return protohelpers.ErrInvalidLength 1981 } 1982 if (iNdEx + skippy) > l { 1983 return io.ErrUnexpectedEOF 1984 } 1985 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1986 iNdEx += skippy 1987 } 1988 } 1989 1990 if iNdEx > l { 1991 return io.ErrUnexpectedEOF 1992 } 1993 return nil 1994 } 1995 func (m *DecodedZookie_V2Zookie) UnmarshalVT(dAtA []byte) error { 1996 l := len(dAtA) 1997 iNdEx := 0 1998 for iNdEx < l { 1999 preIndex := iNdEx 2000 var wire uint64 2001 for shift := uint(0); ; shift += 7 { 2002 if shift >= 64 { 2003 return protohelpers.ErrIntOverflow 2004 } 2005 if iNdEx >= l { 2006 return io.ErrUnexpectedEOF 2007 } 2008 b := dAtA[iNdEx] 2009 iNdEx++ 2010 wire |= uint64(b&0x7F) << shift 2011 if b < 0x80 { 2012 break 2013 } 2014 } 2015 fieldNum := int32(wire >> 3) 2016 wireType := int(wire & 0x7) 2017 if wireType == 4 { 2018 return fmt.Errorf("proto: DecodedZookie_V2Zookie: wiretype end group for non-group") 2019 } 2020 if fieldNum <= 0 { 2021 return fmt.Errorf("proto: DecodedZookie_V2Zookie: illegal tag %d (wire type %d)", fieldNum, wire) 2022 } 2023 switch fieldNum { 2024 case 1: 2025 if wireType != 2 { 2026 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 2027 } 2028 var stringLen uint64 2029 for shift := uint(0); ; shift += 7 { 2030 if shift >= 64 { 2031 return protohelpers.ErrIntOverflow 2032 } 2033 if iNdEx >= l { 2034 return io.ErrUnexpectedEOF 2035 } 2036 b := dAtA[iNdEx] 2037 iNdEx++ 2038 stringLen |= uint64(b&0x7F) << shift 2039 if b < 0x80 { 2040 break 2041 } 2042 } 2043 intStringLen := int(stringLen) 2044 if intStringLen < 0 { 2045 return protohelpers.ErrInvalidLength 2046 } 2047 postIndex := iNdEx + intStringLen 2048 if postIndex < 0 { 2049 return protohelpers.ErrInvalidLength 2050 } 2051 if postIndex > l { 2052 return io.ErrUnexpectedEOF 2053 } 2054 m.Revision = string(dAtA[iNdEx:postIndex]) 2055 iNdEx = postIndex 2056 default: 2057 iNdEx = preIndex 2058 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2059 if err != nil { 2060 return err 2061 } 2062 if (skippy < 0) || (iNdEx+skippy) < 0 { 2063 return protohelpers.ErrInvalidLength 2064 } 2065 if (iNdEx + skippy) > l { 2066 return io.ErrUnexpectedEOF 2067 } 2068 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2069 iNdEx += skippy 2070 } 2071 } 2072 2073 if iNdEx > l { 2074 return io.ErrUnexpectedEOF 2075 } 2076 return nil 2077 } 2078 func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { 2079 l := len(dAtA) 2080 iNdEx := 0 2081 for iNdEx < l { 2082 preIndex := iNdEx 2083 var wire uint64 2084 for shift := uint(0); ; shift += 7 { 2085 if shift >= 64 { 2086 return protohelpers.ErrIntOverflow 2087 } 2088 if iNdEx >= l { 2089 return io.ErrUnexpectedEOF 2090 } 2091 b := dAtA[iNdEx] 2092 iNdEx++ 2093 wire |= uint64(b&0x7F) << shift 2094 if b < 0x80 { 2095 break 2096 } 2097 } 2098 fieldNum := int32(wire >> 3) 2099 wireType := int(wire & 0x7) 2100 if wireType == 4 { 2101 return fmt.Errorf("proto: DecodedZookie: wiretype end group for non-group") 2102 } 2103 if fieldNum <= 0 { 2104 return fmt.Errorf("proto: DecodedZookie: illegal tag %d (wire type %d)", fieldNum, wire) 2105 } 2106 switch fieldNum { 2107 case 1: 2108 if wireType != 0 { 2109 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 2110 } 2111 m.Version = 0 2112 for shift := uint(0); ; shift += 7 { 2113 if shift >= 64 { 2114 return protohelpers.ErrIntOverflow 2115 } 2116 if iNdEx >= l { 2117 return io.ErrUnexpectedEOF 2118 } 2119 b := dAtA[iNdEx] 2120 iNdEx++ 2121 m.Version |= uint32(b&0x7F) << shift 2122 if b < 0x80 { 2123 break 2124 } 2125 } 2126 case 2: 2127 if wireType != 2 { 2128 return fmt.Errorf("proto: wrong wireType = %d for field V1", wireType) 2129 } 2130 var msglen int 2131 for shift := uint(0); ; shift += 7 { 2132 if shift >= 64 { 2133 return protohelpers.ErrIntOverflow 2134 } 2135 if iNdEx >= l { 2136 return io.ErrUnexpectedEOF 2137 } 2138 b := dAtA[iNdEx] 2139 iNdEx++ 2140 msglen |= int(b&0x7F) << shift 2141 if b < 0x80 { 2142 break 2143 } 2144 } 2145 if msglen < 0 { 2146 return protohelpers.ErrInvalidLength 2147 } 2148 postIndex := iNdEx + msglen 2149 if postIndex < 0 { 2150 return protohelpers.ErrInvalidLength 2151 } 2152 if postIndex > l { 2153 return io.ErrUnexpectedEOF 2154 } 2155 if oneof, ok := m.VersionOneof.(*DecodedZookie_V1); ok { 2156 if err := oneof.V1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2157 return err 2158 } 2159 } else { 2160 v := &DecodedZookie_V1Zookie{} 2161 if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2162 return err 2163 } 2164 m.VersionOneof = &DecodedZookie_V1{V1: v} 2165 } 2166 iNdEx = postIndex 2167 case 3: 2168 if wireType != 2 { 2169 return fmt.Errorf("proto: wrong wireType = %d for field V2", wireType) 2170 } 2171 var msglen int 2172 for shift := uint(0); ; shift += 7 { 2173 if shift >= 64 { 2174 return protohelpers.ErrIntOverflow 2175 } 2176 if iNdEx >= l { 2177 return io.ErrUnexpectedEOF 2178 } 2179 b := dAtA[iNdEx] 2180 iNdEx++ 2181 msglen |= int(b&0x7F) << shift 2182 if b < 0x80 { 2183 break 2184 } 2185 } 2186 if msglen < 0 { 2187 return protohelpers.ErrInvalidLength 2188 } 2189 postIndex := iNdEx + msglen 2190 if postIndex < 0 { 2191 return protohelpers.ErrInvalidLength 2192 } 2193 if postIndex > l { 2194 return io.ErrUnexpectedEOF 2195 } 2196 if oneof, ok := m.VersionOneof.(*DecodedZookie_V2); ok { 2197 if err := oneof.V2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2198 return err 2199 } 2200 } else { 2201 v := &DecodedZookie_V2Zookie{} 2202 if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2203 return err 2204 } 2205 m.VersionOneof = &DecodedZookie_V2{V2: v} 2206 } 2207 iNdEx = postIndex 2208 default: 2209 iNdEx = preIndex 2210 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2211 if err != nil { 2212 return err 2213 } 2214 if (skippy < 0) || (iNdEx+skippy) < 0 { 2215 return protohelpers.ErrInvalidLength 2216 } 2217 if (iNdEx + skippy) > l { 2218 return io.ErrUnexpectedEOF 2219 } 2220 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2221 iNdEx += skippy 2222 } 2223 } 2224 2225 if iNdEx > l { 2226 return io.ErrUnexpectedEOF 2227 } 2228 return nil 2229 } 2230 func (m *DecodedZedToken_V1Zookie) UnmarshalVT(dAtA []byte) error { 2231 l := len(dAtA) 2232 iNdEx := 0 2233 for iNdEx < l { 2234 preIndex := iNdEx 2235 var wire uint64 2236 for shift := uint(0); ; shift += 7 { 2237 if shift >= 64 { 2238 return protohelpers.ErrIntOverflow 2239 } 2240 if iNdEx >= l { 2241 return io.ErrUnexpectedEOF 2242 } 2243 b := dAtA[iNdEx] 2244 iNdEx++ 2245 wire |= uint64(b&0x7F) << shift 2246 if b < 0x80 { 2247 break 2248 } 2249 } 2250 fieldNum := int32(wire >> 3) 2251 wireType := int(wire & 0x7) 2252 if wireType == 4 { 2253 return fmt.Errorf("proto: DecodedZedToken_V1Zookie: wiretype end group for non-group") 2254 } 2255 if fieldNum <= 0 { 2256 return fmt.Errorf("proto: DecodedZedToken_V1Zookie: illegal tag %d (wire type %d)", fieldNum, wire) 2257 } 2258 switch fieldNum { 2259 case 1: 2260 if wireType != 0 { 2261 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 2262 } 2263 m.Revision = 0 2264 for shift := uint(0); ; shift += 7 { 2265 if shift >= 64 { 2266 return protohelpers.ErrIntOverflow 2267 } 2268 if iNdEx >= l { 2269 return io.ErrUnexpectedEOF 2270 } 2271 b := dAtA[iNdEx] 2272 iNdEx++ 2273 m.Revision |= uint64(b&0x7F) << shift 2274 if b < 0x80 { 2275 break 2276 } 2277 } 2278 default: 2279 iNdEx = preIndex 2280 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2281 if err != nil { 2282 return err 2283 } 2284 if (skippy < 0) || (iNdEx+skippy) < 0 { 2285 return protohelpers.ErrInvalidLength 2286 } 2287 if (iNdEx + skippy) > l { 2288 return io.ErrUnexpectedEOF 2289 } 2290 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2291 iNdEx += skippy 2292 } 2293 } 2294 2295 if iNdEx > l { 2296 return io.ErrUnexpectedEOF 2297 } 2298 return nil 2299 } 2300 func (m *DecodedZedToken_V1ZedToken) UnmarshalVT(dAtA []byte) error { 2301 l := len(dAtA) 2302 iNdEx := 0 2303 for iNdEx < l { 2304 preIndex := iNdEx 2305 var wire uint64 2306 for shift := uint(0); ; shift += 7 { 2307 if shift >= 64 { 2308 return protohelpers.ErrIntOverflow 2309 } 2310 if iNdEx >= l { 2311 return io.ErrUnexpectedEOF 2312 } 2313 b := dAtA[iNdEx] 2314 iNdEx++ 2315 wire |= uint64(b&0x7F) << shift 2316 if b < 0x80 { 2317 break 2318 } 2319 } 2320 fieldNum := int32(wire >> 3) 2321 wireType := int(wire & 0x7) 2322 if wireType == 4 { 2323 return fmt.Errorf("proto: DecodedZedToken_V1ZedToken: wiretype end group for non-group") 2324 } 2325 if fieldNum <= 0 { 2326 return fmt.Errorf("proto: DecodedZedToken_V1ZedToken: illegal tag %d (wire type %d)", fieldNum, wire) 2327 } 2328 switch fieldNum { 2329 case 1: 2330 if wireType != 2 { 2331 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 2332 } 2333 var stringLen uint64 2334 for shift := uint(0); ; shift += 7 { 2335 if shift >= 64 { 2336 return protohelpers.ErrIntOverflow 2337 } 2338 if iNdEx >= l { 2339 return io.ErrUnexpectedEOF 2340 } 2341 b := dAtA[iNdEx] 2342 iNdEx++ 2343 stringLen |= uint64(b&0x7F) << shift 2344 if b < 0x80 { 2345 break 2346 } 2347 } 2348 intStringLen := int(stringLen) 2349 if intStringLen < 0 { 2350 return protohelpers.ErrInvalidLength 2351 } 2352 postIndex := iNdEx + intStringLen 2353 if postIndex < 0 { 2354 return protohelpers.ErrInvalidLength 2355 } 2356 if postIndex > l { 2357 return io.ErrUnexpectedEOF 2358 } 2359 m.Revision = string(dAtA[iNdEx:postIndex]) 2360 iNdEx = postIndex 2361 default: 2362 iNdEx = preIndex 2363 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2364 if err != nil { 2365 return err 2366 } 2367 if (skippy < 0) || (iNdEx+skippy) < 0 { 2368 return protohelpers.ErrInvalidLength 2369 } 2370 if (iNdEx + skippy) > l { 2371 return io.ErrUnexpectedEOF 2372 } 2373 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2374 iNdEx += skippy 2375 } 2376 } 2377 2378 if iNdEx > l { 2379 return io.ErrUnexpectedEOF 2380 } 2381 return nil 2382 } 2383 func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { 2384 l := len(dAtA) 2385 iNdEx := 0 2386 for iNdEx < l { 2387 preIndex := iNdEx 2388 var wire uint64 2389 for shift := uint(0); ; shift += 7 { 2390 if shift >= 64 { 2391 return protohelpers.ErrIntOverflow 2392 } 2393 if iNdEx >= l { 2394 return io.ErrUnexpectedEOF 2395 } 2396 b := dAtA[iNdEx] 2397 iNdEx++ 2398 wire |= uint64(b&0x7F) << shift 2399 if b < 0x80 { 2400 break 2401 } 2402 } 2403 fieldNum := int32(wire >> 3) 2404 wireType := int(wire & 0x7) 2405 if wireType == 4 { 2406 return fmt.Errorf("proto: DecodedZedToken: wiretype end group for non-group") 2407 } 2408 if fieldNum <= 0 { 2409 return fmt.Errorf("proto: DecodedZedToken: illegal tag %d (wire type %d)", fieldNum, wire) 2410 } 2411 switch fieldNum { 2412 case 2: 2413 if wireType != 2 { 2414 return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedV1Zookie", wireType) 2415 } 2416 var msglen int 2417 for shift := uint(0); ; shift += 7 { 2418 if shift >= 64 { 2419 return protohelpers.ErrIntOverflow 2420 } 2421 if iNdEx >= l { 2422 return io.ErrUnexpectedEOF 2423 } 2424 b := dAtA[iNdEx] 2425 iNdEx++ 2426 msglen |= int(b&0x7F) << shift 2427 if b < 0x80 { 2428 break 2429 } 2430 } 2431 if msglen < 0 { 2432 return protohelpers.ErrInvalidLength 2433 } 2434 postIndex := iNdEx + msglen 2435 if postIndex < 0 { 2436 return protohelpers.ErrInvalidLength 2437 } 2438 if postIndex > l { 2439 return io.ErrUnexpectedEOF 2440 } 2441 if oneof, ok := m.VersionOneof.(*DecodedZedToken_DeprecatedV1Zookie); ok { 2442 if err := oneof.DeprecatedV1Zookie.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2443 return err 2444 } 2445 } else { 2446 v := &DecodedZedToken_V1Zookie{} 2447 if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2448 return err 2449 } 2450 m.VersionOneof = &DecodedZedToken_DeprecatedV1Zookie{DeprecatedV1Zookie: v} 2451 } 2452 iNdEx = postIndex 2453 case 3: 2454 if wireType != 2 { 2455 return fmt.Errorf("proto: wrong wireType = %d for field V1", wireType) 2456 } 2457 var msglen int 2458 for shift := uint(0); ; shift += 7 { 2459 if shift >= 64 { 2460 return protohelpers.ErrIntOverflow 2461 } 2462 if iNdEx >= l { 2463 return io.ErrUnexpectedEOF 2464 } 2465 b := dAtA[iNdEx] 2466 iNdEx++ 2467 msglen |= int(b&0x7F) << shift 2468 if b < 0x80 { 2469 break 2470 } 2471 } 2472 if msglen < 0 { 2473 return protohelpers.ErrInvalidLength 2474 } 2475 postIndex := iNdEx + msglen 2476 if postIndex < 0 { 2477 return protohelpers.ErrInvalidLength 2478 } 2479 if postIndex > l { 2480 return io.ErrUnexpectedEOF 2481 } 2482 if oneof, ok := m.VersionOneof.(*DecodedZedToken_V1); ok { 2483 if err := oneof.V1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2484 return err 2485 } 2486 } else { 2487 v := &DecodedZedToken_V1ZedToken{} 2488 if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2489 return err 2490 } 2491 m.VersionOneof = &DecodedZedToken_V1{V1: v} 2492 } 2493 iNdEx = postIndex 2494 default: 2495 iNdEx = preIndex 2496 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2497 if err != nil { 2498 return err 2499 } 2500 if (skippy < 0) || (iNdEx+skippy) < 0 { 2501 return protohelpers.ErrInvalidLength 2502 } 2503 if (iNdEx + skippy) > l { 2504 return io.ErrUnexpectedEOF 2505 } 2506 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2507 iNdEx += skippy 2508 } 2509 } 2510 2511 if iNdEx > l { 2512 return io.ErrUnexpectedEOF 2513 } 2514 return nil 2515 } 2516 func (m *DecodedCursor) UnmarshalVT(dAtA []byte) error { 2517 l := len(dAtA) 2518 iNdEx := 0 2519 for iNdEx < l { 2520 preIndex := iNdEx 2521 var wire uint64 2522 for shift := uint(0); ; shift += 7 { 2523 if shift >= 64 { 2524 return protohelpers.ErrIntOverflow 2525 } 2526 if iNdEx >= l { 2527 return io.ErrUnexpectedEOF 2528 } 2529 b := dAtA[iNdEx] 2530 iNdEx++ 2531 wire |= uint64(b&0x7F) << shift 2532 if b < 0x80 { 2533 break 2534 } 2535 } 2536 fieldNum := int32(wire >> 3) 2537 wireType := int(wire & 0x7) 2538 if wireType == 4 { 2539 return fmt.Errorf("proto: DecodedCursor: wiretype end group for non-group") 2540 } 2541 if fieldNum <= 0 { 2542 return fmt.Errorf("proto: DecodedCursor: illegal tag %d (wire type %d)", fieldNum, wire) 2543 } 2544 switch fieldNum { 2545 case 1: 2546 if wireType != 2 { 2547 return fmt.Errorf("proto: wrong wireType = %d for field V1", wireType) 2548 } 2549 var msglen int 2550 for shift := uint(0); ; shift += 7 { 2551 if shift >= 64 { 2552 return protohelpers.ErrIntOverflow 2553 } 2554 if iNdEx >= l { 2555 return io.ErrUnexpectedEOF 2556 } 2557 b := dAtA[iNdEx] 2558 iNdEx++ 2559 msglen |= int(b&0x7F) << shift 2560 if b < 0x80 { 2561 break 2562 } 2563 } 2564 if msglen < 0 { 2565 return protohelpers.ErrInvalidLength 2566 } 2567 postIndex := iNdEx + msglen 2568 if postIndex < 0 { 2569 return protohelpers.ErrInvalidLength 2570 } 2571 if postIndex > l { 2572 return io.ErrUnexpectedEOF 2573 } 2574 if oneof, ok := m.VersionOneof.(*DecodedCursor_V1); ok { 2575 if err := oneof.V1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2576 return err 2577 } 2578 } else { 2579 v := &V1Cursor{} 2580 if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2581 return err 2582 } 2583 m.VersionOneof = &DecodedCursor_V1{V1: v} 2584 } 2585 iNdEx = postIndex 2586 default: 2587 iNdEx = preIndex 2588 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2589 if err != nil { 2590 return err 2591 } 2592 if (skippy < 0) || (iNdEx+skippy) < 0 { 2593 return protohelpers.ErrInvalidLength 2594 } 2595 if (iNdEx + skippy) > l { 2596 return io.ErrUnexpectedEOF 2597 } 2598 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2599 iNdEx += skippy 2600 } 2601 } 2602 2603 if iNdEx > l { 2604 return io.ErrUnexpectedEOF 2605 } 2606 return nil 2607 } 2608 func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { 2609 l := len(dAtA) 2610 iNdEx := 0 2611 for iNdEx < l { 2612 preIndex := iNdEx 2613 var wire uint64 2614 for shift := uint(0); ; shift += 7 { 2615 if shift >= 64 { 2616 return protohelpers.ErrIntOverflow 2617 } 2618 if iNdEx >= l { 2619 return io.ErrUnexpectedEOF 2620 } 2621 b := dAtA[iNdEx] 2622 iNdEx++ 2623 wire |= uint64(b&0x7F) << shift 2624 if b < 0x80 { 2625 break 2626 } 2627 } 2628 fieldNum := int32(wire >> 3) 2629 wireType := int(wire & 0x7) 2630 if wireType == 4 { 2631 return fmt.Errorf("proto: V1Cursor: wiretype end group for non-group") 2632 } 2633 if fieldNum <= 0 { 2634 return fmt.Errorf("proto: V1Cursor: illegal tag %d (wire type %d)", fieldNum, wire) 2635 } 2636 switch fieldNum { 2637 case 1: 2638 if wireType != 2 { 2639 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 2640 } 2641 var stringLen uint64 2642 for shift := uint(0); ; shift += 7 { 2643 if shift >= 64 { 2644 return protohelpers.ErrIntOverflow 2645 } 2646 if iNdEx >= l { 2647 return io.ErrUnexpectedEOF 2648 } 2649 b := dAtA[iNdEx] 2650 iNdEx++ 2651 stringLen |= uint64(b&0x7F) << shift 2652 if b < 0x80 { 2653 break 2654 } 2655 } 2656 intStringLen := int(stringLen) 2657 if intStringLen < 0 { 2658 return protohelpers.ErrInvalidLength 2659 } 2660 postIndex := iNdEx + intStringLen 2661 if postIndex < 0 { 2662 return protohelpers.ErrInvalidLength 2663 } 2664 if postIndex > l { 2665 return io.ErrUnexpectedEOF 2666 } 2667 m.Revision = string(dAtA[iNdEx:postIndex]) 2668 iNdEx = postIndex 2669 case 2: 2670 if wireType != 2 { 2671 return fmt.Errorf("proto: wrong wireType = %d for field Sections", wireType) 2672 } 2673 var stringLen uint64 2674 for shift := uint(0); ; shift += 7 { 2675 if shift >= 64 { 2676 return protohelpers.ErrIntOverflow 2677 } 2678 if iNdEx >= l { 2679 return io.ErrUnexpectedEOF 2680 } 2681 b := dAtA[iNdEx] 2682 iNdEx++ 2683 stringLen |= uint64(b&0x7F) << shift 2684 if b < 0x80 { 2685 break 2686 } 2687 } 2688 intStringLen := int(stringLen) 2689 if intStringLen < 0 { 2690 return protohelpers.ErrInvalidLength 2691 } 2692 postIndex := iNdEx + intStringLen 2693 if postIndex < 0 { 2694 return protohelpers.ErrInvalidLength 2695 } 2696 if postIndex > l { 2697 return io.ErrUnexpectedEOF 2698 } 2699 m.Sections = append(m.Sections, string(dAtA[iNdEx:postIndex])) 2700 iNdEx = postIndex 2701 case 3: 2702 if wireType != 2 { 2703 return fmt.Errorf("proto: wrong wireType = %d for field CallAndParametersHash", wireType) 2704 } 2705 var stringLen uint64 2706 for shift := uint(0); ; shift += 7 { 2707 if shift >= 64 { 2708 return protohelpers.ErrIntOverflow 2709 } 2710 if iNdEx >= l { 2711 return io.ErrUnexpectedEOF 2712 } 2713 b := dAtA[iNdEx] 2714 iNdEx++ 2715 stringLen |= uint64(b&0x7F) << shift 2716 if b < 0x80 { 2717 break 2718 } 2719 } 2720 intStringLen := int(stringLen) 2721 if intStringLen < 0 { 2722 return protohelpers.ErrInvalidLength 2723 } 2724 postIndex := iNdEx + intStringLen 2725 if postIndex < 0 { 2726 return protohelpers.ErrInvalidLength 2727 } 2728 if postIndex > l { 2729 return io.ErrUnexpectedEOF 2730 } 2731 m.CallAndParametersHash = string(dAtA[iNdEx:postIndex]) 2732 iNdEx = postIndex 2733 case 4: 2734 if wireType != 0 { 2735 return fmt.Errorf("proto: wrong wireType = %d for field DispatchVersion", wireType) 2736 } 2737 m.DispatchVersion = 0 2738 for shift := uint(0); ; shift += 7 { 2739 if shift >= 64 { 2740 return protohelpers.ErrIntOverflow 2741 } 2742 if iNdEx >= l { 2743 return io.ErrUnexpectedEOF 2744 } 2745 b := dAtA[iNdEx] 2746 iNdEx++ 2747 m.DispatchVersion |= uint32(b&0x7F) << shift 2748 if b < 0x80 { 2749 break 2750 } 2751 } 2752 default: 2753 iNdEx = preIndex 2754 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2755 if err != nil { 2756 return err 2757 } 2758 if (skippy < 0) || (iNdEx+skippy) < 0 { 2759 return protohelpers.ErrInvalidLength 2760 } 2761 if (iNdEx + skippy) > l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2765 iNdEx += skippy 2766 } 2767 } 2768 2769 if iNdEx > l { 2770 return io.ErrUnexpectedEOF 2771 } 2772 return nil 2773 } 2774 func (m *DocComment) UnmarshalVT(dAtA []byte) error { 2775 l := len(dAtA) 2776 iNdEx := 0 2777 for iNdEx < l { 2778 preIndex := iNdEx 2779 var wire uint64 2780 for shift := uint(0); ; shift += 7 { 2781 if shift >= 64 { 2782 return protohelpers.ErrIntOverflow 2783 } 2784 if iNdEx >= l { 2785 return io.ErrUnexpectedEOF 2786 } 2787 b := dAtA[iNdEx] 2788 iNdEx++ 2789 wire |= uint64(b&0x7F) << shift 2790 if b < 0x80 { 2791 break 2792 } 2793 } 2794 fieldNum := int32(wire >> 3) 2795 wireType := int(wire & 0x7) 2796 if wireType == 4 { 2797 return fmt.Errorf("proto: DocComment: wiretype end group for non-group") 2798 } 2799 if fieldNum <= 0 { 2800 return fmt.Errorf("proto: DocComment: illegal tag %d (wire type %d)", fieldNum, wire) 2801 } 2802 switch fieldNum { 2803 case 1: 2804 if wireType != 2 { 2805 return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) 2806 } 2807 var stringLen uint64 2808 for shift := uint(0); ; shift += 7 { 2809 if shift >= 64 { 2810 return protohelpers.ErrIntOverflow 2811 } 2812 if iNdEx >= l { 2813 return io.ErrUnexpectedEOF 2814 } 2815 b := dAtA[iNdEx] 2816 iNdEx++ 2817 stringLen |= uint64(b&0x7F) << shift 2818 if b < 0x80 { 2819 break 2820 } 2821 } 2822 intStringLen := int(stringLen) 2823 if intStringLen < 0 { 2824 return protohelpers.ErrInvalidLength 2825 } 2826 postIndex := iNdEx + intStringLen 2827 if postIndex < 0 { 2828 return protohelpers.ErrInvalidLength 2829 } 2830 if postIndex > l { 2831 return io.ErrUnexpectedEOF 2832 } 2833 m.Comment = string(dAtA[iNdEx:postIndex]) 2834 iNdEx = postIndex 2835 default: 2836 iNdEx = preIndex 2837 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2838 if err != nil { 2839 return err 2840 } 2841 if (skippy < 0) || (iNdEx+skippy) < 0 { 2842 return protohelpers.ErrInvalidLength 2843 } 2844 if (iNdEx + skippy) > l { 2845 return io.ErrUnexpectedEOF 2846 } 2847 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2848 iNdEx += skippy 2849 } 2850 } 2851 2852 if iNdEx > l { 2853 return io.ErrUnexpectedEOF 2854 } 2855 return nil 2856 } 2857 func (m *RelationMetadata) UnmarshalVT(dAtA []byte) error { 2858 l := len(dAtA) 2859 iNdEx := 0 2860 for iNdEx < l { 2861 preIndex := iNdEx 2862 var wire uint64 2863 for shift := uint(0); ; shift += 7 { 2864 if shift >= 64 { 2865 return protohelpers.ErrIntOverflow 2866 } 2867 if iNdEx >= l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 b := dAtA[iNdEx] 2871 iNdEx++ 2872 wire |= uint64(b&0x7F) << shift 2873 if b < 0x80 { 2874 break 2875 } 2876 } 2877 fieldNum := int32(wire >> 3) 2878 wireType := int(wire & 0x7) 2879 if wireType == 4 { 2880 return fmt.Errorf("proto: RelationMetadata: wiretype end group for non-group") 2881 } 2882 if fieldNum <= 0 { 2883 return fmt.Errorf("proto: RelationMetadata: illegal tag %d (wire type %d)", fieldNum, wire) 2884 } 2885 switch fieldNum { 2886 case 1: 2887 if wireType != 0 { 2888 return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) 2889 } 2890 m.Kind = 0 2891 for shift := uint(0); ; shift += 7 { 2892 if shift >= 64 { 2893 return protohelpers.ErrIntOverflow 2894 } 2895 if iNdEx >= l { 2896 return io.ErrUnexpectedEOF 2897 } 2898 b := dAtA[iNdEx] 2899 iNdEx++ 2900 m.Kind |= RelationMetadata_RelationKind(b&0x7F) << shift 2901 if b < 0x80 { 2902 break 2903 } 2904 } 2905 default: 2906 iNdEx = preIndex 2907 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 2908 if err != nil { 2909 return err 2910 } 2911 if (skippy < 0) || (iNdEx+skippy) < 0 { 2912 return protohelpers.ErrInvalidLength 2913 } 2914 if (iNdEx + skippy) > l { 2915 return io.ErrUnexpectedEOF 2916 } 2917 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2918 iNdEx += skippy 2919 } 2920 } 2921 2922 if iNdEx > l { 2923 return io.ErrUnexpectedEOF 2924 } 2925 return nil 2926 } 2927 func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { 2928 l := len(dAtA) 2929 iNdEx := 0 2930 for iNdEx < l { 2931 preIndex := iNdEx 2932 var wire uint64 2933 for shift := uint(0); ; shift += 7 { 2934 if shift >= 64 { 2935 return protohelpers.ErrIntOverflow 2936 } 2937 if iNdEx >= l { 2938 return io.ErrUnexpectedEOF 2939 } 2940 b := dAtA[iNdEx] 2941 iNdEx++ 2942 wire |= uint64(b&0x7F) << shift 2943 if b < 0x80 { 2944 break 2945 } 2946 } 2947 fieldNum := int32(wire >> 3) 2948 wireType := int(wire & 0x7) 2949 if wireType == 4 { 2950 return fmt.Errorf("proto: NamespaceAndRevision: wiretype end group for non-group") 2951 } 2952 if fieldNum <= 0 { 2953 return fmt.Errorf("proto: NamespaceAndRevision: illegal tag %d (wire type %d)", fieldNum, wire) 2954 } 2955 switch fieldNum { 2956 case 1: 2957 if wireType != 2 { 2958 return fmt.Errorf("proto: wrong wireType = %d for field NamespaceName", wireType) 2959 } 2960 var stringLen uint64 2961 for shift := uint(0); ; shift += 7 { 2962 if shift >= 64 { 2963 return protohelpers.ErrIntOverflow 2964 } 2965 if iNdEx >= l { 2966 return io.ErrUnexpectedEOF 2967 } 2968 b := dAtA[iNdEx] 2969 iNdEx++ 2970 stringLen |= uint64(b&0x7F) << shift 2971 if b < 0x80 { 2972 break 2973 } 2974 } 2975 intStringLen := int(stringLen) 2976 if intStringLen < 0 { 2977 return protohelpers.ErrInvalidLength 2978 } 2979 postIndex := iNdEx + intStringLen 2980 if postIndex < 0 { 2981 return protohelpers.ErrInvalidLength 2982 } 2983 if postIndex > l { 2984 return io.ErrUnexpectedEOF 2985 } 2986 m.NamespaceName = string(dAtA[iNdEx:postIndex]) 2987 iNdEx = postIndex 2988 case 2: 2989 if wireType != 2 { 2990 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 2991 } 2992 var stringLen uint64 2993 for shift := uint(0); ; shift += 7 { 2994 if shift >= 64 { 2995 return protohelpers.ErrIntOverflow 2996 } 2997 if iNdEx >= l { 2998 return io.ErrUnexpectedEOF 2999 } 3000 b := dAtA[iNdEx] 3001 iNdEx++ 3002 stringLen |= uint64(b&0x7F) << shift 3003 if b < 0x80 { 3004 break 3005 } 3006 } 3007 intStringLen := int(stringLen) 3008 if intStringLen < 0 { 3009 return protohelpers.ErrInvalidLength 3010 } 3011 postIndex := iNdEx + intStringLen 3012 if postIndex < 0 { 3013 return protohelpers.ErrInvalidLength 3014 } 3015 if postIndex > l { 3016 return io.ErrUnexpectedEOF 3017 } 3018 m.Revision = string(dAtA[iNdEx:postIndex]) 3019 iNdEx = postIndex 3020 default: 3021 iNdEx = preIndex 3022 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3023 if err != nil { 3024 return err 3025 } 3026 if (skippy < 0) || (iNdEx+skippy) < 0 { 3027 return protohelpers.ErrInvalidLength 3028 } 3029 if (iNdEx + skippy) > l { 3030 return io.ErrUnexpectedEOF 3031 } 3032 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 3033 iNdEx += skippy 3034 } 3035 } 3036 3037 if iNdEx > l { 3038 return io.ErrUnexpectedEOF 3039 } 3040 return nil 3041 } 3042 func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { 3043 l := len(dAtA) 3044 iNdEx := 0 3045 for iNdEx < l { 3046 preIndex := iNdEx 3047 var wire uint64 3048 for shift := uint(0); ; shift += 7 { 3049 if shift >= 64 { 3050 return protohelpers.ErrIntOverflow 3051 } 3052 if iNdEx >= l { 3053 return io.ErrUnexpectedEOF 3054 } 3055 b := dAtA[iNdEx] 3056 iNdEx++ 3057 wire |= uint64(b&0x7F) << shift 3058 if b < 0x80 { 3059 break 3060 } 3061 } 3062 fieldNum := int32(wire >> 3) 3063 wireType := int(wire & 0x7) 3064 if wireType == 4 { 3065 return fmt.Errorf("proto: V1Alpha1Revision: wiretype end group for non-group") 3066 } 3067 if fieldNum <= 0 { 3068 return fmt.Errorf("proto: V1Alpha1Revision: illegal tag %d (wire type %d)", fieldNum, wire) 3069 } 3070 switch fieldNum { 3071 case 1: 3072 if wireType != 2 { 3073 return fmt.Errorf("proto: wrong wireType = %d for field NsRevisions", wireType) 3074 } 3075 var msglen int 3076 for shift := uint(0); ; shift += 7 { 3077 if shift >= 64 { 3078 return protohelpers.ErrIntOverflow 3079 } 3080 if iNdEx >= l { 3081 return io.ErrUnexpectedEOF 3082 } 3083 b := dAtA[iNdEx] 3084 iNdEx++ 3085 msglen |= int(b&0x7F) << shift 3086 if b < 0x80 { 3087 break 3088 } 3089 } 3090 if msglen < 0 { 3091 return protohelpers.ErrInvalidLength 3092 } 3093 postIndex := iNdEx + msglen 3094 if postIndex < 0 { 3095 return protohelpers.ErrInvalidLength 3096 } 3097 if postIndex > l { 3098 return io.ErrUnexpectedEOF 3099 } 3100 m.NsRevisions = append(m.NsRevisions, &NamespaceAndRevision{}) 3101 if err := m.NsRevisions[len(m.NsRevisions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3102 return err 3103 } 3104 iNdEx = postIndex 3105 default: 3106 iNdEx = preIndex 3107 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3108 if err != nil { 3109 return err 3110 } 3111 if (skippy < 0) || (iNdEx+skippy) < 0 { 3112 return protohelpers.ErrInvalidLength 3113 } 3114 if (iNdEx + skippy) > l { 3115 return io.ErrUnexpectedEOF 3116 } 3117 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 3118 iNdEx += skippy 3119 } 3120 } 3121 3122 if iNdEx > l { 3123 return io.ErrUnexpectedEOF 3124 } 3125 return nil 3126 }