github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/proto/dispatch/v1/dispatch_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: dispatch/v1/dispatch.proto 4 5 package dispatchv1 6 7 import ( 8 fmt "fmt" 9 v1 "github.com/authzed/spicedb/pkg/proto/core/v1" 10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers" 11 durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb" 12 structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" 13 proto "google.golang.org/protobuf/proto" 14 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 15 durationpb "google.golang.org/protobuf/types/known/durationpb" 16 structpb "google.golang.org/protobuf/types/known/structpb" 17 io "io" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 func (m *DispatchCheckRequest) CloneVT() *DispatchCheckRequest { 28 if m == nil { 29 return (*DispatchCheckRequest)(nil) 30 } 31 r := new(DispatchCheckRequest) 32 r.Metadata = m.Metadata.CloneVT() 33 r.ResultsSetting = m.ResultsSetting 34 r.Debug = m.Debug 35 if rhs := m.ResourceRelation; rhs != nil { 36 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 37 r.ResourceRelation = vtpb.CloneVT() 38 } else { 39 r.ResourceRelation = proto.Clone(rhs).(*v1.RelationReference) 40 } 41 } 42 if rhs := m.ResourceIds; rhs != nil { 43 tmpContainer := make([]string, len(rhs)) 44 copy(tmpContainer, rhs) 45 r.ResourceIds = tmpContainer 46 } 47 if rhs := m.Subject; rhs != nil { 48 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.ObjectAndRelation }); ok { 49 r.Subject = vtpb.CloneVT() 50 } else { 51 r.Subject = proto.Clone(rhs).(*v1.ObjectAndRelation) 52 } 53 } 54 if len(m.unknownFields) > 0 { 55 r.unknownFields = make([]byte, len(m.unknownFields)) 56 copy(r.unknownFields, m.unknownFields) 57 } 58 return r 59 } 60 61 func (m *DispatchCheckRequest) CloneMessageVT() proto.Message { 62 return m.CloneVT() 63 } 64 65 func (m *DispatchCheckResponse) CloneVT() *DispatchCheckResponse { 66 if m == nil { 67 return (*DispatchCheckResponse)(nil) 68 } 69 r := new(DispatchCheckResponse) 70 r.Metadata = m.Metadata.CloneVT() 71 if rhs := m.ResultsByResourceId; rhs != nil { 72 tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) 73 for k, v := range rhs { 74 tmpContainer[k] = v.CloneVT() 75 } 76 r.ResultsByResourceId = tmpContainer 77 } 78 if len(m.unknownFields) > 0 { 79 r.unknownFields = make([]byte, len(m.unknownFields)) 80 copy(r.unknownFields, m.unknownFields) 81 } 82 return r 83 } 84 85 func (m *DispatchCheckResponse) CloneMessageVT() proto.Message { 86 return m.CloneVT() 87 } 88 89 func (m *ResourceCheckResult) CloneVT() *ResourceCheckResult { 90 if m == nil { 91 return (*ResourceCheckResult)(nil) 92 } 93 r := new(ResourceCheckResult) 94 r.Membership = m.Membership 95 if rhs := m.Expression; rhs != nil { 96 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.CaveatExpression }); ok { 97 r.Expression = vtpb.CloneVT() 98 } else { 99 r.Expression = proto.Clone(rhs).(*v1.CaveatExpression) 100 } 101 } 102 if rhs := m.MissingExprFields; rhs != nil { 103 tmpContainer := make([]string, len(rhs)) 104 copy(tmpContainer, rhs) 105 r.MissingExprFields = tmpContainer 106 } 107 if len(m.unknownFields) > 0 { 108 r.unknownFields = make([]byte, len(m.unknownFields)) 109 copy(r.unknownFields, m.unknownFields) 110 } 111 return r 112 } 113 114 func (m *ResourceCheckResult) CloneMessageVT() proto.Message { 115 return m.CloneVT() 116 } 117 118 func (m *DispatchExpandRequest) CloneVT() *DispatchExpandRequest { 119 if m == nil { 120 return (*DispatchExpandRequest)(nil) 121 } 122 r := new(DispatchExpandRequest) 123 r.Metadata = m.Metadata.CloneVT() 124 r.ExpansionMode = m.ExpansionMode 125 if rhs := m.ResourceAndRelation; rhs != nil { 126 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.ObjectAndRelation }); ok { 127 r.ResourceAndRelation = vtpb.CloneVT() 128 } else { 129 r.ResourceAndRelation = proto.Clone(rhs).(*v1.ObjectAndRelation) 130 } 131 } 132 if len(m.unknownFields) > 0 { 133 r.unknownFields = make([]byte, len(m.unknownFields)) 134 copy(r.unknownFields, m.unknownFields) 135 } 136 return r 137 } 138 139 func (m *DispatchExpandRequest) CloneMessageVT() proto.Message { 140 return m.CloneVT() 141 } 142 143 func (m *DispatchExpandResponse) CloneVT() *DispatchExpandResponse { 144 if m == nil { 145 return (*DispatchExpandResponse)(nil) 146 } 147 r := new(DispatchExpandResponse) 148 r.Metadata = m.Metadata.CloneVT() 149 if rhs := m.TreeNode; rhs != nil { 150 if vtpb, ok := interface{}(rhs).(interface { 151 CloneVT() *v1.RelationTupleTreeNode 152 }); ok { 153 r.TreeNode = vtpb.CloneVT() 154 } else { 155 r.TreeNode = proto.Clone(rhs).(*v1.RelationTupleTreeNode) 156 } 157 } 158 if len(m.unknownFields) > 0 { 159 r.unknownFields = make([]byte, len(m.unknownFields)) 160 copy(r.unknownFields, m.unknownFields) 161 } 162 return r 163 } 164 165 func (m *DispatchExpandResponse) CloneMessageVT() proto.Message { 166 return m.CloneVT() 167 } 168 169 func (m *Cursor) CloneVT() *Cursor { 170 if m == nil { 171 return (*Cursor)(nil) 172 } 173 r := new(Cursor) 174 r.DispatchVersion = m.DispatchVersion 175 if rhs := m.Sections; rhs != nil { 176 tmpContainer := make([]string, len(rhs)) 177 copy(tmpContainer, rhs) 178 r.Sections = tmpContainer 179 } 180 if len(m.unknownFields) > 0 { 181 r.unknownFields = make([]byte, len(m.unknownFields)) 182 copy(r.unknownFields, m.unknownFields) 183 } 184 return r 185 } 186 187 func (m *Cursor) CloneMessageVT() proto.Message { 188 return m.CloneVT() 189 } 190 191 func (m *DispatchReachableResourcesRequest) CloneVT() *DispatchReachableResourcesRequest { 192 if m == nil { 193 return (*DispatchReachableResourcesRequest)(nil) 194 } 195 r := new(DispatchReachableResourcesRequest) 196 r.Metadata = m.Metadata.CloneVT() 197 r.OptionalCursor = m.OptionalCursor.CloneVT() 198 r.OptionalLimit = m.OptionalLimit 199 if rhs := m.ResourceRelation; rhs != nil { 200 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 201 r.ResourceRelation = vtpb.CloneVT() 202 } else { 203 r.ResourceRelation = proto.Clone(rhs).(*v1.RelationReference) 204 } 205 } 206 if rhs := m.SubjectRelation; rhs != nil { 207 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 208 r.SubjectRelation = vtpb.CloneVT() 209 } else { 210 r.SubjectRelation = proto.Clone(rhs).(*v1.RelationReference) 211 } 212 } 213 if rhs := m.SubjectIds; rhs != nil { 214 tmpContainer := make([]string, len(rhs)) 215 copy(tmpContainer, rhs) 216 r.SubjectIds = tmpContainer 217 } 218 if len(m.unknownFields) > 0 { 219 r.unknownFields = make([]byte, len(m.unknownFields)) 220 copy(r.unknownFields, m.unknownFields) 221 } 222 return r 223 } 224 225 func (m *DispatchReachableResourcesRequest) CloneMessageVT() proto.Message { 226 return m.CloneVT() 227 } 228 229 func (m *ReachableResource) CloneVT() *ReachableResource { 230 if m == nil { 231 return (*ReachableResource)(nil) 232 } 233 r := new(ReachableResource) 234 r.ResourceId = m.ResourceId 235 r.ResultStatus = m.ResultStatus 236 if rhs := m.ForSubjectIds; rhs != nil { 237 tmpContainer := make([]string, len(rhs)) 238 copy(tmpContainer, rhs) 239 r.ForSubjectIds = tmpContainer 240 } 241 if len(m.unknownFields) > 0 { 242 r.unknownFields = make([]byte, len(m.unknownFields)) 243 copy(r.unknownFields, m.unknownFields) 244 } 245 return r 246 } 247 248 func (m *ReachableResource) CloneMessageVT() proto.Message { 249 return m.CloneVT() 250 } 251 252 func (m *DispatchReachableResourcesResponse) CloneVT() *DispatchReachableResourcesResponse { 253 if m == nil { 254 return (*DispatchReachableResourcesResponse)(nil) 255 } 256 r := new(DispatchReachableResourcesResponse) 257 r.Resource = m.Resource.CloneVT() 258 r.Metadata = m.Metadata.CloneVT() 259 r.AfterResponseCursor = m.AfterResponseCursor.CloneVT() 260 if len(m.unknownFields) > 0 { 261 r.unknownFields = make([]byte, len(m.unknownFields)) 262 copy(r.unknownFields, m.unknownFields) 263 } 264 return r 265 } 266 267 func (m *DispatchReachableResourcesResponse) CloneMessageVT() proto.Message { 268 return m.CloneVT() 269 } 270 271 func (m *DispatchLookupResourcesRequest) CloneVT() *DispatchLookupResourcesRequest { 272 if m == nil { 273 return (*DispatchLookupResourcesRequest)(nil) 274 } 275 r := new(DispatchLookupResourcesRequest) 276 r.Metadata = m.Metadata.CloneVT() 277 r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT()) 278 r.OptionalLimit = m.OptionalLimit 279 r.OptionalCursor = m.OptionalCursor.CloneVT() 280 if rhs := m.ObjectRelation; rhs != nil { 281 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 282 r.ObjectRelation = vtpb.CloneVT() 283 } else { 284 r.ObjectRelation = proto.Clone(rhs).(*v1.RelationReference) 285 } 286 } 287 if rhs := m.Subject; rhs != nil { 288 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.ObjectAndRelation }); ok { 289 r.Subject = vtpb.CloneVT() 290 } else { 291 r.Subject = proto.Clone(rhs).(*v1.ObjectAndRelation) 292 } 293 } 294 if len(m.unknownFields) > 0 { 295 r.unknownFields = make([]byte, len(m.unknownFields)) 296 copy(r.unknownFields, m.unknownFields) 297 } 298 return r 299 } 300 301 func (m *DispatchLookupResourcesRequest) CloneMessageVT() proto.Message { 302 return m.CloneVT() 303 } 304 305 func (m *ResolvedResource) CloneVT() *ResolvedResource { 306 if m == nil { 307 return (*ResolvedResource)(nil) 308 } 309 r := new(ResolvedResource) 310 r.ResourceId = m.ResourceId 311 r.Permissionship = m.Permissionship 312 if rhs := m.MissingRequiredContext; rhs != nil { 313 tmpContainer := make([]string, len(rhs)) 314 copy(tmpContainer, rhs) 315 r.MissingRequiredContext = tmpContainer 316 } 317 if len(m.unknownFields) > 0 { 318 r.unknownFields = make([]byte, len(m.unknownFields)) 319 copy(r.unknownFields, m.unknownFields) 320 } 321 return r 322 } 323 324 func (m *ResolvedResource) CloneMessageVT() proto.Message { 325 return m.CloneVT() 326 } 327 328 func (m *DispatchLookupResourcesResponse) CloneVT() *DispatchLookupResourcesResponse { 329 if m == nil { 330 return (*DispatchLookupResourcesResponse)(nil) 331 } 332 r := new(DispatchLookupResourcesResponse) 333 r.Metadata = m.Metadata.CloneVT() 334 r.ResolvedResource = m.ResolvedResource.CloneVT() 335 r.AfterResponseCursor = m.AfterResponseCursor.CloneVT() 336 if len(m.unknownFields) > 0 { 337 r.unknownFields = make([]byte, len(m.unknownFields)) 338 copy(r.unknownFields, m.unknownFields) 339 } 340 return r 341 } 342 343 func (m *DispatchLookupResourcesResponse) CloneMessageVT() proto.Message { 344 return m.CloneVT() 345 } 346 347 func (m *DispatchLookupSubjectsRequest) CloneVT() *DispatchLookupSubjectsRequest { 348 if m == nil { 349 return (*DispatchLookupSubjectsRequest)(nil) 350 } 351 r := new(DispatchLookupSubjectsRequest) 352 r.Metadata = m.Metadata.CloneVT() 353 r.OptionalLimit = m.OptionalLimit 354 r.OptionalCursor = m.OptionalCursor.CloneVT() 355 if rhs := m.ResourceRelation; rhs != nil { 356 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 357 r.ResourceRelation = vtpb.CloneVT() 358 } else { 359 r.ResourceRelation = proto.Clone(rhs).(*v1.RelationReference) 360 } 361 } 362 if rhs := m.ResourceIds; rhs != nil { 363 tmpContainer := make([]string, len(rhs)) 364 copy(tmpContainer, rhs) 365 r.ResourceIds = tmpContainer 366 } 367 if rhs := m.SubjectRelation; rhs != nil { 368 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { 369 r.SubjectRelation = vtpb.CloneVT() 370 } else { 371 r.SubjectRelation = proto.Clone(rhs).(*v1.RelationReference) 372 } 373 } 374 if len(m.unknownFields) > 0 { 375 r.unknownFields = make([]byte, len(m.unknownFields)) 376 copy(r.unknownFields, m.unknownFields) 377 } 378 return r 379 } 380 381 func (m *DispatchLookupSubjectsRequest) CloneMessageVT() proto.Message { 382 return m.CloneVT() 383 } 384 385 func (m *FoundSubject) CloneVT() *FoundSubject { 386 if m == nil { 387 return (*FoundSubject)(nil) 388 } 389 r := new(FoundSubject) 390 r.SubjectId = m.SubjectId 391 if rhs := m.CaveatExpression; rhs != nil { 392 if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.CaveatExpression }); ok { 393 r.CaveatExpression = vtpb.CloneVT() 394 } else { 395 r.CaveatExpression = proto.Clone(rhs).(*v1.CaveatExpression) 396 } 397 } 398 if rhs := m.ExcludedSubjects; rhs != nil { 399 tmpContainer := make([]*FoundSubject, len(rhs)) 400 for k, v := range rhs { 401 tmpContainer[k] = v.CloneVT() 402 } 403 r.ExcludedSubjects = tmpContainer 404 } 405 if len(m.unknownFields) > 0 { 406 r.unknownFields = make([]byte, len(m.unknownFields)) 407 copy(r.unknownFields, m.unknownFields) 408 } 409 return r 410 } 411 412 func (m *FoundSubject) CloneMessageVT() proto.Message { 413 return m.CloneVT() 414 } 415 416 func (m *FoundSubjects) CloneVT() *FoundSubjects { 417 if m == nil { 418 return (*FoundSubjects)(nil) 419 } 420 r := new(FoundSubjects) 421 if rhs := m.FoundSubjects; rhs != nil { 422 tmpContainer := make([]*FoundSubject, len(rhs)) 423 for k, v := range rhs { 424 tmpContainer[k] = v.CloneVT() 425 } 426 r.FoundSubjects = tmpContainer 427 } 428 if len(m.unknownFields) > 0 { 429 r.unknownFields = make([]byte, len(m.unknownFields)) 430 copy(r.unknownFields, m.unknownFields) 431 } 432 return r 433 } 434 435 func (m *FoundSubjects) CloneMessageVT() proto.Message { 436 return m.CloneVT() 437 } 438 439 func (m *DispatchLookupSubjectsResponse) CloneVT() *DispatchLookupSubjectsResponse { 440 if m == nil { 441 return (*DispatchLookupSubjectsResponse)(nil) 442 } 443 r := new(DispatchLookupSubjectsResponse) 444 r.Metadata = m.Metadata.CloneVT() 445 r.AfterResponseCursor = m.AfterResponseCursor.CloneVT() 446 if rhs := m.FoundSubjectsByResourceId; rhs != nil { 447 tmpContainer := make(map[string]*FoundSubjects, len(rhs)) 448 for k, v := range rhs { 449 tmpContainer[k] = v.CloneVT() 450 } 451 r.FoundSubjectsByResourceId = tmpContainer 452 } 453 if len(m.unknownFields) > 0 { 454 r.unknownFields = make([]byte, len(m.unknownFields)) 455 copy(r.unknownFields, m.unknownFields) 456 } 457 return r 458 } 459 460 func (m *DispatchLookupSubjectsResponse) CloneMessageVT() proto.Message { 461 return m.CloneVT() 462 } 463 464 func (m *ResolverMeta) CloneVT() *ResolverMeta { 465 if m == nil { 466 return (*ResolverMeta)(nil) 467 } 468 r := new(ResolverMeta) 469 r.AtRevision = m.AtRevision 470 r.DepthRemaining = m.DepthRemaining 471 r.RequestId = m.RequestId 472 if rhs := m.TraversalBloom; rhs != nil { 473 tmpBytes := make([]byte, len(rhs)) 474 copy(tmpBytes, rhs) 475 r.TraversalBloom = tmpBytes 476 } 477 if len(m.unknownFields) > 0 { 478 r.unknownFields = make([]byte, len(m.unknownFields)) 479 copy(r.unknownFields, m.unknownFields) 480 } 481 return r 482 } 483 484 func (m *ResolverMeta) CloneMessageVT() proto.Message { 485 return m.CloneVT() 486 } 487 488 func (m *ResponseMeta) CloneVT() *ResponseMeta { 489 if m == nil { 490 return (*ResponseMeta)(nil) 491 } 492 r := new(ResponseMeta) 493 r.DispatchCount = m.DispatchCount 494 r.DepthRequired = m.DepthRequired 495 r.CachedDispatchCount = m.CachedDispatchCount 496 r.DebugInfo = m.DebugInfo.CloneVT() 497 if len(m.unknownFields) > 0 { 498 r.unknownFields = make([]byte, len(m.unknownFields)) 499 copy(r.unknownFields, m.unknownFields) 500 } 501 return r 502 } 503 504 func (m *ResponseMeta) CloneMessageVT() proto.Message { 505 return m.CloneVT() 506 } 507 508 func (m *DebugInformation) CloneVT() *DebugInformation { 509 if m == nil { 510 return (*DebugInformation)(nil) 511 } 512 r := new(DebugInformation) 513 r.Check = m.Check.CloneVT() 514 if len(m.unknownFields) > 0 { 515 r.unknownFields = make([]byte, len(m.unknownFields)) 516 copy(r.unknownFields, m.unknownFields) 517 } 518 return r 519 } 520 521 func (m *DebugInformation) CloneMessageVT() proto.Message { 522 return m.CloneVT() 523 } 524 525 func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace { 526 if m == nil { 527 return (*CheckDebugTrace)(nil) 528 } 529 r := new(CheckDebugTrace) 530 r.Request = m.Request.CloneVT() 531 r.ResourceRelationType = m.ResourceRelationType 532 r.IsCachedResult = m.IsCachedResult 533 r.Duration = (*durationpb.Duration)((*durationpb1.Duration)(m.Duration).CloneVT()) 534 if rhs := m.Results; rhs != nil { 535 tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) 536 for k, v := range rhs { 537 tmpContainer[k] = v.CloneVT() 538 } 539 r.Results = tmpContainer 540 } 541 if rhs := m.SubProblems; rhs != nil { 542 tmpContainer := make([]*CheckDebugTrace, len(rhs)) 543 for k, v := range rhs { 544 tmpContainer[k] = v.CloneVT() 545 } 546 r.SubProblems = tmpContainer 547 } 548 if len(m.unknownFields) > 0 { 549 r.unknownFields = make([]byte, len(m.unknownFields)) 550 copy(r.unknownFields, m.unknownFields) 551 } 552 return r 553 } 554 555 func (m *CheckDebugTrace) CloneMessageVT() proto.Message { 556 return m.CloneVT() 557 } 558 559 func (this *DispatchCheckRequest) EqualVT(that *DispatchCheckRequest) bool { 560 if this == that { 561 return true 562 } else if this == nil || that == nil { 563 return false 564 } 565 if !this.Metadata.EqualVT(that.Metadata) { 566 return false 567 } 568 if equal, ok := interface{}(this.ResourceRelation).(interface { 569 EqualVT(*v1.RelationReference) bool 570 }); ok { 571 if !equal.EqualVT(that.ResourceRelation) { 572 return false 573 } 574 } else if !proto.Equal(this.ResourceRelation, that.ResourceRelation) { 575 return false 576 } 577 if len(this.ResourceIds) != len(that.ResourceIds) { 578 return false 579 } 580 for i, vx := range this.ResourceIds { 581 vy := that.ResourceIds[i] 582 if vx != vy { 583 return false 584 } 585 } 586 if equal, ok := interface{}(this.Subject).(interface { 587 EqualVT(*v1.ObjectAndRelation) bool 588 }); ok { 589 if !equal.EqualVT(that.Subject) { 590 return false 591 } 592 } else if !proto.Equal(this.Subject, that.Subject) { 593 return false 594 } 595 if this.ResultsSetting != that.ResultsSetting { 596 return false 597 } 598 if this.Debug != that.Debug { 599 return false 600 } 601 return string(this.unknownFields) == string(that.unknownFields) 602 } 603 604 func (this *DispatchCheckRequest) EqualMessageVT(thatMsg proto.Message) bool { 605 that, ok := thatMsg.(*DispatchCheckRequest) 606 if !ok { 607 return false 608 } 609 return this.EqualVT(that) 610 } 611 func (this *DispatchCheckResponse) EqualVT(that *DispatchCheckResponse) bool { 612 if this == that { 613 return true 614 } else if this == nil || that == nil { 615 return false 616 } 617 if !this.Metadata.EqualVT(that.Metadata) { 618 return false 619 } 620 if len(this.ResultsByResourceId) != len(that.ResultsByResourceId) { 621 return false 622 } 623 for i, vx := range this.ResultsByResourceId { 624 vy, ok := that.ResultsByResourceId[i] 625 if !ok { 626 return false 627 } 628 if p, q := vx, vy; p != q { 629 if p == nil { 630 p = &ResourceCheckResult{} 631 } 632 if q == nil { 633 q = &ResourceCheckResult{} 634 } 635 if !p.EqualVT(q) { 636 return false 637 } 638 } 639 } 640 return string(this.unknownFields) == string(that.unknownFields) 641 } 642 643 func (this *DispatchCheckResponse) EqualMessageVT(thatMsg proto.Message) bool { 644 that, ok := thatMsg.(*DispatchCheckResponse) 645 if !ok { 646 return false 647 } 648 return this.EqualVT(that) 649 } 650 func (this *ResourceCheckResult) EqualVT(that *ResourceCheckResult) bool { 651 if this == that { 652 return true 653 } else if this == nil || that == nil { 654 return false 655 } 656 if this.Membership != that.Membership { 657 return false 658 } 659 if equal, ok := interface{}(this.Expression).(interface { 660 EqualVT(*v1.CaveatExpression) bool 661 }); ok { 662 if !equal.EqualVT(that.Expression) { 663 return false 664 } 665 } else if !proto.Equal(this.Expression, that.Expression) { 666 return false 667 } 668 if len(this.MissingExprFields) != len(that.MissingExprFields) { 669 return false 670 } 671 for i, vx := range this.MissingExprFields { 672 vy := that.MissingExprFields[i] 673 if vx != vy { 674 return false 675 } 676 } 677 return string(this.unknownFields) == string(that.unknownFields) 678 } 679 680 func (this *ResourceCheckResult) EqualMessageVT(thatMsg proto.Message) bool { 681 that, ok := thatMsg.(*ResourceCheckResult) 682 if !ok { 683 return false 684 } 685 return this.EqualVT(that) 686 } 687 func (this *DispatchExpandRequest) EqualVT(that *DispatchExpandRequest) bool { 688 if this == that { 689 return true 690 } else if this == nil || that == nil { 691 return false 692 } 693 if !this.Metadata.EqualVT(that.Metadata) { 694 return false 695 } 696 if equal, ok := interface{}(this.ResourceAndRelation).(interface { 697 EqualVT(*v1.ObjectAndRelation) bool 698 }); ok { 699 if !equal.EqualVT(that.ResourceAndRelation) { 700 return false 701 } 702 } else if !proto.Equal(this.ResourceAndRelation, that.ResourceAndRelation) { 703 return false 704 } 705 if this.ExpansionMode != that.ExpansionMode { 706 return false 707 } 708 return string(this.unknownFields) == string(that.unknownFields) 709 } 710 711 func (this *DispatchExpandRequest) EqualMessageVT(thatMsg proto.Message) bool { 712 that, ok := thatMsg.(*DispatchExpandRequest) 713 if !ok { 714 return false 715 } 716 return this.EqualVT(that) 717 } 718 func (this *DispatchExpandResponse) EqualVT(that *DispatchExpandResponse) bool { 719 if this == that { 720 return true 721 } else if this == nil || that == nil { 722 return false 723 } 724 if !this.Metadata.EqualVT(that.Metadata) { 725 return false 726 } 727 if equal, ok := interface{}(this.TreeNode).(interface { 728 EqualVT(*v1.RelationTupleTreeNode) bool 729 }); ok { 730 if !equal.EqualVT(that.TreeNode) { 731 return false 732 } 733 } else if !proto.Equal(this.TreeNode, that.TreeNode) { 734 return false 735 } 736 return string(this.unknownFields) == string(that.unknownFields) 737 } 738 739 func (this *DispatchExpandResponse) EqualMessageVT(thatMsg proto.Message) bool { 740 that, ok := thatMsg.(*DispatchExpandResponse) 741 if !ok { 742 return false 743 } 744 return this.EqualVT(that) 745 } 746 func (this *Cursor) EqualVT(that *Cursor) bool { 747 if this == that { 748 return true 749 } else if this == nil || that == nil { 750 return false 751 } 752 if len(this.Sections) != len(that.Sections) { 753 return false 754 } 755 for i, vx := range this.Sections { 756 vy := that.Sections[i] 757 if vx != vy { 758 return false 759 } 760 } 761 if this.DispatchVersion != that.DispatchVersion { 762 return false 763 } 764 return string(this.unknownFields) == string(that.unknownFields) 765 } 766 767 func (this *Cursor) EqualMessageVT(thatMsg proto.Message) bool { 768 that, ok := thatMsg.(*Cursor) 769 if !ok { 770 return false 771 } 772 return this.EqualVT(that) 773 } 774 func (this *DispatchReachableResourcesRequest) EqualVT(that *DispatchReachableResourcesRequest) bool { 775 if this == that { 776 return true 777 } else if this == nil || that == nil { 778 return false 779 } 780 if !this.Metadata.EqualVT(that.Metadata) { 781 return false 782 } 783 if equal, ok := interface{}(this.ResourceRelation).(interface { 784 EqualVT(*v1.RelationReference) bool 785 }); ok { 786 if !equal.EqualVT(that.ResourceRelation) { 787 return false 788 } 789 } else if !proto.Equal(this.ResourceRelation, that.ResourceRelation) { 790 return false 791 } 792 if equal, ok := interface{}(this.SubjectRelation).(interface { 793 EqualVT(*v1.RelationReference) bool 794 }); ok { 795 if !equal.EqualVT(that.SubjectRelation) { 796 return false 797 } 798 } else if !proto.Equal(this.SubjectRelation, that.SubjectRelation) { 799 return false 800 } 801 if len(this.SubjectIds) != len(that.SubjectIds) { 802 return false 803 } 804 for i, vx := range this.SubjectIds { 805 vy := that.SubjectIds[i] 806 if vx != vy { 807 return false 808 } 809 } 810 if !this.OptionalCursor.EqualVT(that.OptionalCursor) { 811 return false 812 } 813 if this.OptionalLimit != that.OptionalLimit { 814 return false 815 } 816 return string(this.unknownFields) == string(that.unknownFields) 817 } 818 819 func (this *DispatchReachableResourcesRequest) EqualMessageVT(thatMsg proto.Message) bool { 820 that, ok := thatMsg.(*DispatchReachableResourcesRequest) 821 if !ok { 822 return false 823 } 824 return this.EqualVT(that) 825 } 826 func (this *ReachableResource) EqualVT(that *ReachableResource) bool { 827 if this == that { 828 return true 829 } else if this == nil || that == nil { 830 return false 831 } 832 if this.ResourceId != that.ResourceId { 833 return false 834 } 835 if this.ResultStatus != that.ResultStatus { 836 return false 837 } 838 if len(this.ForSubjectIds) != len(that.ForSubjectIds) { 839 return false 840 } 841 for i, vx := range this.ForSubjectIds { 842 vy := that.ForSubjectIds[i] 843 if vx != vy { 844 return false 845 } 846 } 847 return string(this.unknownFields) == string(that.unknownFields) 848 } 849 850 func (this *ReachableResource) EqualMessageVT(thatMsg proto.Message) bool { 851 that, ok := thatMsg.(*ReachableResource) 852 if !ok { 853 return false 854 } 855 return this.EqualVT(that) 856 } 857 func (this *DispatchReachableResourcesResponse) EqualVT(that *DispatchReachableResourcesResponse) bool { 858 if this == that { 859 return true 860 } else if this == nil || that == nil { 861 return false 862 } 863 if !this.Resource.EqualVT(that.Resource) { 864 return false 865 } 866 if !this.Metadata.EqualVT(that.Metadata) { 867 return false 868 } 869 if !this.AfterResponseCursor.EqualVT(that.AfterResponseCursor) { 870 return false 871 } 872 return string(this.unknownFields) == string(that.unknownFields) 873 } 874 875 func (this *DispatchReachableResourcesResponse) EqualMessageVT(thatMsg proto.Message) bool { 876 that, ok := thatMsg.(*DispatchReachableResourcesResponse) 877 if !ok { 878 return false 879 } 880 return this.EqualVT(that) 881 } 882 func (this *DispatchLookupResourcesRequest) EqualVT(that *DispatchLookupResourcesRequest) bool { 883 if this == that { 884 return true 885 } else if this == nil || that == nil { 886 return false 887 } 888 if !this.Metadata.EqualVT(that.Metadata) { 889 return false 890 } 891 if equal, ok := interface{}(this.ObjectRelation).(interface { 892 EqualVT(*v1.RelationReference) bool 893 }); ok { 894 if !equal.EqualVT(that.ObjectRelation) { 895 return false 896 } 897 } else if !proto.Equal(this.ObjectRelation, that.ObjectRelation) { 898 return false 899 } 900 if equal, ok := interface{}(this.Subject).(interface { 901 EqualVT(*v1.ObjectAndRelation) bool 902 }); ok { 903 if !equal.EqualVT(that.Subject) { 904 return false 905 } 906 } else if !proto.Equal(this.Subject, that.Subject) { 907 return false 908 } 909 if this.OptionalLimit != that.OptionalLimit { 910 return false 911 } 912 if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) { 913 return false 914 } 915 if !this.OptionalCursor.EqualVT(that.OptionalCursor) { 916 return false 917 } 918 return string(this.unknownFields) == string(that.unknownFields) 919 } 920 921 func (this *DispatchLookupResourcesRequest) EqualMessageVT(thatMsg proto.Message) bool { 922 that, ok := thatMsg.(*DispatchLookupResourcesRequest) 923 if !ok { 924 return false 925 } 926 return this.EqualVT(that) 927 } 928 func (this *ResolvedResource) EqualVT(that *ResolvedResource) bool { 929 if this == that { 930 return true 931 } else if this == nil || that == nil { 932 return false 933 } 934 if this.ResourceId != that.ResourceId { 935 return false 936 } 937 if this.Permissionship != that.Permissionship { 938 return false 939 } 940 if len(this.MissingRequiredContext) != len(that.MissingRequiredContext) { 941 return false 942 } 943 for i, vx := range this.MissingRequiredContext { 944 vy := that.MissingRequiredContext[i] 945 if vx != vy { 946 return false 947 } 948 } 949 return string(this.unknownFields) == string(that.unknownFields) 950 } 951 952 func (this *ResolvedResource) EqualMessageVT(thatMsg proto.Message) bool { 953 that, ok := thatMsg.(*ResolvedResource) 954 if !ok { 955 return false 956 } 957 return this.EqualVT(that) 958 } 959 func (this *DispatchLookupResourcesResponse) EqualVT(that *DispatchLookupResourcesResponse) bool { 960 if this == that { 961 return true 962 } else if this == nil || that == nil { 963 return false 964 } 965 if !this.Metadata.EqualVT(that.Metadata) { 966 return false 967 } 968 if !this.ResolvedResource.EqualVT(that.ResolvedResource) { 969 return false 970 } 971 if !this.AfterResponseCursor.EqualVT(that.AfterResponseCursor) { 972 return false 973 } 974 return string(this.unknownFields) == string(that.unknownFields) 975 } 976 977 func (this *DispatchLookupResourcesResponse) EqualMessageVT(thatMsg proto.Message) bool { 978 that, ok := thatMsg.(*DispatchLookupResourcesResponse) 979 if !ok { 980 return false 981 } 982 return this.EqualVT(that) 983 } 984 func (this *DispatchLookupSubjectsRequest) EqualVT(that *DispatchLookupSubjectsRequest) bool { 985 if this == that { 986 return true 987 } else if this == nil || that == nil { 988 return false 989 } 990 if !this.Metadata.EqualVT(that.Metadata) { 991 return false 992 } 993 if equal, ok := interface{}(this.ResourceRelation).(interface { 994 EqualVT(*v1.RelationReference) bool 995 }); ok { 996 if !equal.EqualVT(that.ResourceRelation) { 997 return false 998 } 999 } else if !proto.Equal(this.ResourceRelation, that.ResourceRelation) { 1000 return false 1001 } 1002 if len(this.ResourceIds) != len(that.ResourceIds) { 1003 return false 1004 } 1005 for i, vx := range this.ResourceIds { 1006 vy := that.ResourceIds[i] 1007 if vx != vy { 1008 return false 1009 } 1010 } 1011 if equal, ok := interface{}(this.SubjectRelation).(interface { 1012 EqualVT(*v1.RelationReference) bool 1013 }); ok { 1014 if !equal.EqualVT(that.SubjectRelation) { 1015 return false 1016 } 1017 } else if !proto.Equal(this.SubjectRelation, that.SubjectRelation) { 1018 return false 1019 } 1020 if this.OptionalLimit != that.OptionalLimit { 1021 return false 1022 } 1023 if !this.OptionalCursor.EqualVT(that.OptionalCursor) { 1024 return false 1025 } 1026 return string(this.unknownFields) == string(that.unknownFields) 1027 } 1028 1029 func (this *DispatchLookupSubjectsRequest) EqualMessageVT(thatMsg proto.Message) bool { 1030 that, ok := thatMsg.(*DispatchLookupSubjectsRequest) 1031 if !ok { 1032 return false 1033 } 1034 return this.EqualVT(that) 1035 } 1036 func (this *FoundSubject) EqualVT(that *FoundSubject) bool { 1037 if this == that { 1038 return true 1039 } else if this == nil || that == nil { 1040 return false 1041 } 1042 if this.SubjectId != that.SubjectId { 1043 return false 1044 } 1045 if equal, ok := interface{}(this.CaveatExpression).(interface { 1046 EqualVT(*v1.CaveatExpression) bool 1047 }); ok { 1048 if !equal.EqualVT(that.CaveatExpression) { 1049 return false 1050 } 1051 } else if !proto.Equal(this.CaveatExpression, that.CaveatExpression) { 1052 return false 1053 } 1054 if len(this.ExcludedSubjects) != len(that.ExcludedSubjects) { 1055 return false 1056 } 1057 for i, vx := range this.ExcludedSubjects { 1058 vy := that.ExcludedSubjects[i] 1059 if p, q := vx, vy; p != q { 1060 if p == nil { 1061 p = &FoundSubject{} 1062 } 1063 if q == nil { 1064 q = &FoundSubject{} 1065 } 1066 if !p.EqualVT(q) { 1067 return false 1068 } 1069 } 1070 } 1071 return string(this.unknownFields) == string(that.unknownFields) 1072 } 1073 1074 func (this *FoundSubject) EqualMessageVT(thatMsg proto.Message) bool { 1075 that, ok := thatMsg.(*FoundSubject) 1076 if !ok { 1077 return false 1078 } 1079 return this.EqualVT(that) 1080 } 1081 func (this *FoundSubjects) EqualVT(that *FoundSubjects) bool { 1082 if this == that { 1083 return true 1084 } else if this == nil || that == nil { 1085 return false 1086 } 1087 if len(this.FoundSubjects) != len(that.FoundSubjects) { 1088 return false 1089 } 1090 for i, vx := range this.FoundSubjects { 1091 vy := that.FoundSubjects[i] 1092 if p, q := vx, vy; p != q { 1093 if p == nil { 1094 p = &FoundSubject{} 1095 } 1096 if q == nil { 1097 q = &FoundSubject{} 1098 } 1099 if !p.EqualVT(q) { 1100 return false 1101 } 1102 } 1103 } 1104 return string(this.unknownFields) == string(that.unknownFields) 1105 } 1106 1107 func (this *FoundSubjects) EqualMessageVT(thatMsg proto.Message) bool { 1108 that, ok := thatMsg.(*FoundSubjects) 1109 if !ok { 1110 return false 1111 } 1112 return this.EqualVT(that) 1113 } 1114 func (this *DispatchLookupSubjectsResponse) EqualVT(that *DispatchLookupSubjectsResponse) bool { 1115 if this == that { 1116 return true 1117 } else if this == nil || that == nil { 1118 return false 1119 } 1120 if len(this.FoundSubjectsByResourceId) != len(that.FoundSubjectsByResourceId) { 1121 return false 1122 } 1123 for i, vx := range this.FoundSubjectsByResourceId { 1124 vy, ok := that.FoundSubjectsByResourceId[i] 1125 if !ok { 1126 return false 1127 } 1128 if p, q := vx, vy; p != q { 1129 if p == nil { 1130 p = &FoundSubjects{} 1131 } 1132 if q == nil { 1133 q = &FoundSubjects{} 1134 } 1135 if !p.EqualVT(q) { 1136 return false 1137 } 1138 } 1139 } 1140 if !this.Metadata.EqualVT(that.Metadata) { 1141 return false 1142 } 1143 if !this.AfterResponseCursor.EqualVT(that.AfterResponseCursor) { 1144 return false 1145 } 1146 return string(this.unknownFields) == string(that.unknownFields) 1147 } 1148 1149 func (this *DispatchLookupSubjectsResponse) EqualMessageVT(thatMsg proto.Message) bool { 1150 that, ok := thatMsg.(*DispatchLookupSubjectsResponse) 1151 if !ok { 1152 return false 1153 } 1154 return this.EqualVT(that) 1155 } 1156 func (this *ResolverMeta) EqualVT(that *ResolverMeta) bool { 1157 if this == that { 1158 return true 1159 } else if this == nil || that == nil { 1160 return false 1161 } 1162 if this.AtRevision != that.AtRevision { 1163 return false 1164 } 1165 if this.DepthRemaining != that.DepthRemaining { 1166 return false 1167 } 1168 if this.RequestId != that.RequestId { 1169 return false 1170 } 1171 if string(this.TraversalBloom) != string(that.TraversalBloom) { 1172 return false 1173 } 1174 return string(this.unknownFields) == string(that.unknownFields) 1175 } 1176 1177 func (this *ResolverMeta) EqualMessageVT(thatMsg proto.Message) bool { 1178 that, ok := thatMsg.(*ResolverMeta) 1179 if !ok { 1180 return false 1181 } 1182 return this.EqualVT(that) 1183 } 1184 func (this *ResponseMeta) EqualVT(that *ResponseMeta) bool { 1185 if this == that { 1186 return true 1187 } else if this == nil || that == nil { 1188 return false 1189 } 1190 if this.DispatchCount != that.DispatchCount { 1191 return false 1192 } 1193 if this.DepthRequired != that.DepthRequired { 1194 return false 1195 } 1196 if this.CachedDispatchCount != that.CachedDispatchCount { 1197 return false 1198 } 1199 if !this.DebugInfo.EqualVT(that.DebugInfo) { 1200 return false 1201 } 1202 return string(this.unknownFields) == string(that.unknownFields) 1203 } 1204 1205 func (this *ResponseMeta) EqualMessageVT(thatMsg proto.Message) bool { 1206 that, ok := thatMsg.(*ResponseMeta) 1207 if !ok { 1208 return false 1209 } 1210 return this.EqualVT(that) 1211 } 1212 func (this *DebugInformation) EqualVT(that *DebugInformation) bool { 1213 if this == that { 1214 return true 1215 } else if this == nil || that == nil { 1216 return false 1217 } 1218 if !this.Check.EqualVT(that.Check) { 1219 return false 1220 } 1221 return string(this.unknownFields) == string(that.unknownFields) 1222 } 1223 1224 func (this *DebugInformation) EqualMessageVT(thatMsg proto.Message) bool { 1225 that, ok := thatMsg.(*DebugInformation) 1226 if !ok { 1227 return false 1228 } 1229 return this.EqualVT(that) 1230 } 1231 func (this *CheckDebugTrace) EqualVT(that *CheckDebugTrace) bool { 1232 if this == that { 1233 return true 1234 } else if this == nil || that == nil { 1235 return false 1236 } 1237 if !this.Request.EqualVT(that.Request) { 1238 return false 1239 } 1240 if this.ResourceRelationType != that.ResourceRelationType { 1241 return false 1242 } 1243 if len(this.Results) != len(that.Results) { 1244 return false 1245 } 1246 for i, vx := range this.Results { 1247 vy, ok := that.Results[i] 1248 if !ok { 1249 return false 1250 } 1251 if p, q := vx, vy; p != q { 1252 if p == nil { 1253 p = &ResourceCheckResult{} 1254 } 1255 if q == nil { 1256 q = &ResourceCheckResult{} 1257 } 1258 if !p.EqualVT(q) { 1259 return false 1260 } 1261 } 1262 } 1263 if this.IsCachedResult != that.IsCachedResult { 1264 return false 1265 } 1266 if len(this.SubProblems) != len(that.SubProblems) { 1267 return false 1268 } 1269 for i, vx := range this.SubProblems { 1270 vy := that.SubProblems[i] 1271 if p, q := vx, vy; p != q { 1272 if p == nil { 1273 p = &CheckDebugTrace{} 1274 } 1275 if q == nil { 1276 q = &CheckDebugTrace{} 1277 } 1278 if !p.EqualVT(q) { 1279 return false 1280 } 1281 } 1282 } 1283 if !(*durationpb1.Duration)(this.Duration).EqualVT((*durationpb1.Duration)(that.Duration)) { 1284 return false 1285 } 1286 return string(this.unknownFields) == string(that.unknownFields) 1287 } 1288 1289 func (this *CheckDebugTrace) EqualMessageVT(thatMsg proto.Message) bool { 1290 that, ok := thatMsg.(*CheckDebugTrace) 1291 if !ok { 1292 return false 1293 } 1294 return this.EqualVT(that) 1295 } 1296 func (m *DispatchCheckRequest) MarshalVT() (dAtA []byte, err error) { 1297 if m == nil { 1298 return nil, nil 1299 } 1300 size := m.SizeVT() 1301 dAtA = make([]byte, size) 1302 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1303 if err != nil { 1304 return nil, err 1305 } 1306 return dAtA[:n], nil 1307 } 1308 1309 func (m *DispatchCheckRequest) MarshalToVT(dAtA []byte) (int, error) { 1310 size := m.SizeVT() 1311 return m.MarshalToSizedBufferVT(dAtA[:size]) 1312 } 1313 1314 func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1315 if m == nil { 1316 return 0, nil 1317 } 1318 i := len(dAtA) 1319 _ = i 1320 var l int 1321 _ = l 1322 if m.unknownFields != nil { 1323 i -= len(m.unknownFields) 1324 copy(dAtA[i:], m.unknownFields) 1325 } 1326 if m.Debug != 0 { 1327 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Debug)) 1328 i-- 1329 dAtA[i] = 0x30 1330 } 1331 if m.ResultsSetting != 0 { 1332 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResultsSetting)) 1333 i-- 1334 dAtA[i] = 0x28 1335 } 1336 if m.Subject != nil { 1337 if vtmsg, ok := interface{}(m.Subject).(interface { 1338 MarshalToSizedBufferVT([]byte) (int, error) 1339 }); ok { 1340 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1341 if err != nil { 1342 return 0, err 1343 } 1344 i -= size 1345 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1346 } else { 1347 encoded, err := proto.Marshal(m.Subject) 1348 if err != nil { 1349 return 0, err 1350 } 1351 i -= len(encoded) 1352 copy(dAtA[i:], encoded) 1353 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1354 } 1355 i-- 1356 dAtA[i] = 0x22 1357 } 1358 if len(m.ResourceIds) > 0 { 1359 for iNdEx := len(m.ResourceIds) - 1; iNdEx >= 0; iNdEx-- { 1360 i -= len(m.ResourceIds[iNdEx]) 1361 copy(dAtA[i:], m.ResourceIds[iNdEx]) 1362 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) 1363 i-- 1364 dAtA[i] = 0x1a 1365 } 1366 } 1367 if m.ResourceRelation != nil { 1368 if vtmsg, ok := interface{}(m.ResourceRelation).(interface { 1369 MarshalToSizedBufferVT([]byte) (int, error) 1370 }); ok { 1371 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1372 if err != nil { 1373 return 0, err 1374 } 1375 i -= size 1376 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1377 } else { 1378 encoded, err := proto.Marshal(m.ResourceRelation) 1379 if err != nil { 1380 return 0, err 1381 } 1382 i -= len(encoded) 1383 copy(dAtA[i:], encoded) 1384 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1385 } 1386 i-- 1387 dAtA[i] = 0x12 1388 } 1389 if m.Metadata != nil { 1390 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1391 if err != nil { 1392 return 0, err 1393 } 1394 i -= size 1395 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1396 i-- 1397 dAtA[i] = 0xa 1398 } 1399 return len(dAtA) - i, nil 1400 } 1401 1402 func (m *DispatchCheckResponse) MarshalVT() (dAtA []byte, err error) { 1403 if m == nil { 1404 return nil, nil 1405 } 1406 size := m.SizeVT() 1407 dAtA = make([]byte, size) 1408 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1409 if err != nil { 1410 return nil, err 1411 } 1412 return dAtA[:n], nil 1413 } 1414 1415 func (m *DispatchCheckResponse) MarshalToVT(dAtA []byte) (int, error) { 1416 size := m.SizeVT() 1417 return m.MarshalToSizedBufferVT(dAtA[:size]) 1418 } 1419 1420 func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1421 if m == nil { 1422 return 0, nil 1423 } 1424 i := len(dAtA) 1425 _ = i 1426 var l int 1427 _ = l 1428 if m.unknownFields != nil { 1429 i -= len(m.unknownFields) 1430 copy(dAtA[i:], m.unknownFields) 1431 } 1432 if len(m.ResultsByResourceId) > 0 { 1433 for k := range m.ResultsByResourceId { 1434 v := m.ResultsByResourceId[k] 1435 baseI := i 1436 size, err := v.MarshalToSizedBufferVT(dAtA[:i]) 1437 if err != nil { 1438 return 0, err 1439 } 1440 i -= size 1441 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1442 i-- 1443 dAtA[i] = 0x12 1444 i -= len(k) 1445 copy(dAtA[i:], k) 1446 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) 1447 i-- 1448 dAtA[i] = 0xa 1449 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) 1450 i-- 1451 dAtA[i] = 0x12 1452 } 1453 } 1454 if m.Metadata != nil { 1455 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1456 if err != nil { 1457 return 0, err 1458 } 1459 i -= size 1460 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1461 i-- 1462 dAtA[i] = 0xa 1463 } 1464 return len(dAtA) - i, nil 1465 } 1466 1467 func (m *ResourceCheckResult) MarshalVT() (dAtA []byte, err error) { 1468 if m == nil { 1469 return nil, nil 1470 } 1471 size := m.SizeVT() 1472 dAtA = make([]byte, size) 1473 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1474 if err != nil { 1475 return nil, err 1476 } 1477 return dAtA[:n], nil 1478 } 1479 1480 func (m *ResourceCheckResult) MarshalToVT(dAtA []byte) (int, error) { 1481 size := m.SizeVT() 1482 return m.MarshalToSizedBufferVT(dAtA[:size]) 1483 } 1484 1485 func (m *ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1486 if m == nil { 1487 return 0, nil 1488 } 1489 i := len(dAtA) 1490 _ = i 1491 var l int 1492 _ = l 1493 if m.unknownFields != nil { 1494 i -= len(m.unknownFields) 1495 copy(dAtA[i:], m.unknownFields) 1496 } 1497 if len(m.MissingExprFields) > 0 { 1498 for iNdEx := len(m.MissingExprFields) - 1; iNdEx >= 0; iNdEx-- { 1499 i -= len(m.MissingExprFields[iNdEx]) 1500 copy(dAtA[i:], m.MissingExprFields[iNdEx]) 1501 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingExprFields[iNdEx]))) 1502 i-- 1503 dAtA[i] = 0x1a 1504 } 1505 } 1506 if m.Expression != nil { 1507 if vtmsg, ok := interface{}(m.Expression).(interface { 1508 MarshalToSizedBufferVT([]byte) (int, error) 1509 }); ok { 1510 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1511 if err != nil { 1512 return 0, err 1513 } 1514 i -= size 1515 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1516 } else { 1517 encoded, err := proto.Marshal(m.Expression) 1518 if err != nil { 1519 return 0, err 1520 } 1521 i -= len(encoded) 1522 copy(dAtA[i:], encoded) 1523 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1524 } 1525 i-- 1526 dAtA[i] = 0x12 1527 } 1528 if m.Membership != 0 { 1529 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Membership)) 1530 i-- 1531 dAtA[i] = 0x8 1532 } 1533 return len(dAtA) - i, nil 1534 } 1535 1536 func (m *DispatchExpandRequest) MarshalVT() (dAtA []byte, err error) { 1537 if m == nil { 1538 return nil, nil 1539 } 1540 size := m.SizeVT() 1541 dAtA = make([]byte, size) 1542 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1543 if err != nil { 1544 return nil, err 1545 } 1546 return dAtA[:n], nil 1547 } 1548 1549 func (m *DispatchExpandRequest) MarshalToVT(dAtA []byte) (int, error) { 1550 size := m.SizeVT() 1551 return m.MarshalToSizedBufferVT(dAtA[:size]) 1552 } 1553 1554 func (m *DispatchExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1555 if m == nil { 1556 return 0, nil 1557 } 1558 i := len(dAtA) 1559 _ = i 1560 var l int 1561 _ = l 1562 if m.unknownFields != nil { 1563 i -= len(m.unknownFields) 1564 copy(dAtA[i:], m.unknownFields) 1565 } 1566 if m.ExpansionMode != 0 { 1567 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExpansionMode)) 1568 i-- 1569 dAtA[i] = 0x18 1570 } 1571 if m.ResourceAndRelation != nil { 1572 if vtmsg, ok := interface{}(m.ResourceAndRelation).(interface { 1573 MarshalToSizedBufferVT([]byte) (int, error) 1574 }); ok { 1575 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1576 if err != nil { 1577 return 0, err 1578 } 1579 i -= size 1580 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1581 } else { 1582 encoded, err := proto.Marshal(m.ResourceAndRelation) 1583 if err != nil { 1584 return 0, err 1585 } 1586 i -= len(encoded) 1587 copy(dAtA[i:], encoded) 1588 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1589 } 1590 i-- 1591 dAtA[i] = 0x12 1592 } 1593 if m.Metadata != nil { 1594 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1595 if err != nil { 1596 return 0, err 1597 } 1598 i -= size 1599 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1600 i-- 1601 dAtA[i] = 0xa 1602 } 1603 return len(dAtA) - i, nil 1604 } 1605 1606 func (m *DispatchExpandResponse) MarshalVT() (dAtA []byte, err error) { 1607 if m == nil { 1608 return nil, nil 1609 } 1610 size := m.SizeVT() 1611 dAtA = make([]byte, size) 1612 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1613 if err != nil { 1614 return nil, err 1615 } 1616 return dAtA[:n], nil 1617 } 1618 1619 func (m *DispatchExpandResponse) MarshalToVT(dAtA []byte) (int, error) { 1620 size := m.SizeVT() 1621 return m.MarshalToSizedBufferVT(dAtA[:size]) 1622 } 1623 1624 func (m *DispatchExpandResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1625 if m == nil { 1626 return 0, nil 1627 } 1628 i := len(dAtA) 1629 _ = i 1630 var l int 1631 _ = l 1632 if m.unknownFields != nil { 1633 i -= len(m.unknownFields) 1634 copy(dAtA[i:], m.unknownFields) 1635 } 1636 if m.TreeNode != nil { 1637 if vtmsg, ok := interface{}(m.TreeNode).(interface { 1638 MarshalToSizedBufferVT([]byte) (int, error) 1639 }); ok { 1640 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1641 if err != nil { 1642 return 0, err 1643 } 1644 i -= size 1645 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1646 } else { 1647 encoded, err := proto.Marshal(m.TreeNode) 1648 if err != nil { 1649 return 0, err 1650 } 1651 i -= len(encoded) 1652 copy(dAtA[i:], encoded) 1653 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1654 } 1655 i-- 1656 dAtA[i] = 0x12 1657 } 1658 if m.Metadata != nil { 1659 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1660 if err != nil { 1661 return 0, err 1662 } 1663 i -= size 1664 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1665 i-- 1666 dAtA[i] = 0xa 1667 } 1668 return len(dAtA) - i, nil 1669 } 1670 1671 func (m *Cursor) MarshalVT() (dAtA []byte, err error) { 1672 if m == nil { 1673 return nil, nil 1674 } 1675 size := m.SizeVT() 1676 dAtA = make([]byte, size) 1677 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1678 if err != nil { 1679 return nil, err 1680 } 1681 return dAtA[:n], nil 1682 } 1683 1684 func (m *Cursor) MarshalToVT(dAtA []byte) (int, error) { 1685 size := m.SizeVT() 1686 return m.MarshalToSizedBufferVT(dAtA[:size]) 1687 } 1688 1689 func (m *Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1690 if m == nil { 1691 return 0, nil 1692 } 1693 i := len(dAtA) 1694 _ = i 1695 var l int 1696 _ = l 1697 if m.unknownFields != nil { 1698 i -= len(m.unknownFields) 1699 copy(dAtA[i:], m.unknownFields) 1700 } 1701 if m.DispatchVersion != 0 { 1702 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchVersion)) 1703 i-- 1704 dAtA[i] = 0x18 1705 } 1706 if len(m.Sections) > 0 { 1707 for iNdEx := len(m.Sections) - 1; iNdEx >= 0; iNdEx-- { 1708 i -= len(m.Sections[iNdEx]) 1709 copy(dAtA[i:], m.Sections[iNdEx]) 1710 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) 1711 i-- 1712 dAtA[i] = 0x12 1713 } 1714 } 1715 return len(dAtA) - i, nil 1716 } 1717 1718 func (m *DispatchReachableResourcesRequest) MarshalVT() (dAtA []byte, err error) { 1719 if m == nil { 1720 return nil, nil 1721 } 1722 size := m.SizeVT() 1723 dAtA = make([]byte, size) 1724 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1725 if err != nil { 1726 return nil, err 1727 } 1728 return dAtA[:n], nil 1729 } 1730 1731 func (m *DispatchReachableResourcesRequest) MarshalToVT(dAtA []byte) (int, error) { 1732 size := m.SizeVT() 1733 return m.MarshalToSizedBufferVT(dAtA[:size]) 1734 } 1735 1736 func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1737 if m == nil { 1738 return 0, nil 1739 } 1740 i := len(dAtA) 1741 _ = i 1742 var l int 1743 _ = l 1744 if m.unknownFields != nil { 1745 i -= len(m.unknownFields) 1746 copy(dAtA[i:], m.unknownFields) 1747 } 1748 if m.OptionalLimit != 0 { 1749 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit)) 1750 i-- 1751 dAtA[i] = 0x30 1752 } 1753 if m.OptionalCursor != nil { 1754 size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i]) 1755 if err != nil { 1756 return 0, err 1757 } 1758 i -= size 1759 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1760 i-- 1761 dAtA[i] = 0x2a 1762 } 1763 if len(m.SubjectIds) > 0 { 1764 for iNdEx := len(m.SubjectIds) - 1; iNdEx >= 0; iNdEx-- { 1765 i -= len(m.SubjectIds[iNdEx]) 1766 copy(dAtA[i:], m.SubjectIds[iNdEx]) 1767 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectIds[iNdEx]))) 1768 i-- 1769 dAtA[i] = 0x22 1770 } 1771 } 1772 if m.SubjectRelation != nil { 1773 if vtmsg, ok := interface{}(m.SubjectRelation).(interface { 1774 MarshalToSizedBufferVT([]byte) (int, error) 1775 }); ok { 1776 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1777 if err != nil { 1778 return 0, err 1779 } 1780 i -= size 1781 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1782 } else { 1783 encoded, err := proto.Marshal(m.SubjectRelation) 1784 if err != nil { 1785 return 0, err 1786 } 1787 i -= len(encoded) 1788 copy(dAtA[i:], encoded) 1789 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1790 } 1791 i-- 1792 dAtA[i] = 0x1a 1793 } 1794 if m.ResourceRelation != nil { 1795 if vtmsg, ok := interface{}(m.ResourceRelation).(interface { 1796 MarshalToSizedBufferVT([]byte) (int, error) 1797 }); ok { 1798 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 1799 if err != nil { 1800 return 0, err 1801 } 1802 i -= size 1803 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1804 } else { 1805 encoded, err := proto.Marshal(m.ResourceRelation) 1806 if err != nil { 1807 return 0, err 1808 } 1809 i -= len(encoded) 1810 copy(dAtA[i:], encoded) 1811 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 1812 } 1813 i-- 1814 dAtA[i] = 0x12 1815 } 1816 if m.Metadata != nil { 1817 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1818 if err != nil { 1819 return 0, err 1820 } 1821 i -= size 1822 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1823 i-- 1824 dAtA[i] = 0xa 1825 } 1826 return len(dAtA) - i, nil 1827 } 1828 1829 func (m *ReachableResource) MarshalVT() (dAtA []byte, err error) { 1830 if m == nil { 1831 return nil, nil 1832 } 1833 size := m.SizeVT() 1834 dAtA = make([]byte, size) 1835 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1836 if err != nil { 1837 return nil, err 1838 } 1839 return dAtA[:n], nil 1840 } 1841 1842 func (m *ReachableResource) MarshalToVT(dAtA []byte) (int, error) { 1843 size := m.SizeVT() 1844 return m.MarshalToSizedBufferVT(dAtA[:size]) 1845 } 1846 1847 func (m *ReachableResource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1848 if m == nil { 1849 return 0, nil 1850 } 1851 i := len(dAtA) 1852 _ = i 1853 var l int 1854 _ = l 1855 if m.unknownFields != nil { 1856 i -= len(m.unknownFields) 1857 copy(dAtA[i:], m.unknownFields) 1858 } 1859 if len(m.ForSubjectIds) > 0 { 1860 for iNdEx := len(m.ForSubjectIds) - 1; iNdEx >= 0; iNdEx-- { 1861 i -= len(m.ForSubjectIds[iNdEx]) 1862 copy(dAtA[i:], m.ForSubjectIds[iNdEx]) 1863 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ForSubjectIds[iNdEx]))) 1864 i-- 1865 dAtA[i] = 0x1a 1866 } 1867 } 1868 if m.ResultStatus != 0 { 1869 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResultStatus)) 1870 i-- 1871 dAtA[i] = 0x10 1872 } 1873 if len(m.ResourceId) > 0 { 1874 i -= len(m.ResourceId) 1875 copy(dAtA[i:], m.ResourceId) 1876 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceId))) 1877 i-- 1878 dAtA[i] = 0xa 1879 } 1880 return len(dAtA) - i, nil 1881 } 1882 1883 func (m *DispatchReachableResourcesResponse) MarshalVT() (dAtA []byte, err error) { 1884 if m == nil { 1885 return nil, nil 1886 } 1887 size := m.SizeVT() 1888 dAtA = make([]byte, size) 1889 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1890 if err != nil { 1891 return nil, err 1892 } 1893 return dAtA[:n], nil 1894 } 1895 1896 func (m *DispatchReachableResourcesResponse) MarshalToVT(dAtA []byte) (int, error) { 1897 size := m.SizeVT() 1898 return m.MarshalToSizedBufferVT(dAtA[:size]) 1899 } 1900 1901 func (m *DispatchReachableResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1902 if m == nil { 1903 return 0, nil 1904 } 1905 i := len(dAtA) 1906 _ = i 1907 var l int 1908 _ = l 1909 if m.unknownFields != nil { 1910 i -= len(m.unknownFields) 1911 copy(dAtA[i:], m.unknownFields) 1912 } 1913 if m.AfterResponseCursor != nil { 1914 size, err := m.AfterResponseCursor.MarshalToSizedBufferVT(dAtA[:i]) 1915 if err != nil { 1916 return 0, err 1917 } 1918 i -= size 1919 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1920 i-- 1921 dAtA[i] = 0x1a 1922 } 1923 if m.Metadata != nil { 1924 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 1925 if err != nil { 1926 return 0, err 1927 } 1928 i -= size 1929 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1930 i-- 1931 dAtA[i] = 0x12 1932 } 1933 if m.Resource != nil { 1934 size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i]) 1935 if err != nil { 1936 return 0, err 1937 } 1938 i -= size 1939 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1940 i-- 1941 dAtA[i] = 0xa 1942 } 1943 return len(dAtA) - i, nil 1944 } 1945 1946 func (m *DispatchLookupResourcesRequest) MarshalVT() (dAtA []byte, err error) { 1947 if m == nil { 1948 return nil, nil 1949 } 1950 size := m.SizeVT() 1951 dAtA = make([]byte, size) 1952 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 1953 if err != nil { 1954 return nil, err 1955 } 1956 return dAtA[:n], nil 1957 } 1958 1959 func (m *DispatchLookupResourcesRequest) MarshalToVT(dAtA []byte) (int, error) { 1960 size := m.SizeVT() 1961 return m.MarshalToSizedBufferVT(dAtA[:size]) 1962 } 1963 1964 func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 1965 if m == nil { 1966 return 0, nil 1967 } 1968 i := len(dAtA) 1969 _ = i 1970 var l int 1971 _ = l 1972 if m.unknownFields != nil { 1973 i -= len(m.unknownFields) 1974 copy(dAtA[i:], m.unknownFields) 1975 } 1976 if m.OptionalCursor != nil { 1977 size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i]) 1978 if err != nil { 1979 return 0, err 1980 } 1981 i -= size 1982 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1983 i-- 1984 dAtA[i] = 0x32 1985 } 1986 if m.Context != nil { 1987 size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i]) 1988 if err != nil { 1989 return 0, err 1990 } 1991 i -= size 1992 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 1993 i-- 1994 dAtA[i] = 0x2a 1995 } 1996 if m.OptionalLimit != 0 { 1997 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit)) 1998 i-- 1999 dAtA[i] = 0x20 2000 } 2001 if m.Subject != nil { 2002 if vtmsg, ok := interface{}(m.Subject).(interface { 2003 MarshalToSizedBufferVT([]byte) (int, error) 2004 }); ok { 2005 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 2006 if err != nil { 2007 return 0, err 2008 } 2009 i -= size 2010 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2011 } else { 2012 encoded, err := proto.Marshal(m.Subject) 2013 if err != nil { 2014 return 0, err 2015 } 2016 i -= len(encoded) 2017 copy(dAtA[i:], encoded) 2018 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 2019 } 2020 i-- 2021 dAtA[i] = 0x1a 2022 } 2023 if m.ObjectRelation != nil { 2024 if vtmsg, ok := interface{}(m.ObjectRelation).(interface { 2025 MarshalToSizedBufferVT([]byte) (int, error) 2026 }); ok { 2027 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 2028 if err != nil { 2029 return 0, err 2030 } 2031 i -= size 2032 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2033 } else { 2034 encoded, err := proto.Marshal(m.ObjectRelation) 2035 if err != nil { 2036 return 0, err 2037 } 2038 i -= len(encoded) 2039 copy(dAtA[i:], encoded) 2040 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 2041 } 2042 i-- 2043 dAtA[i] = 0x12 2044 } 2045 if m.Metadata != nil { 2046 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 2047 if err != nil { 2048 return 0, err 2049 } 2050 i -= size 2051 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2052 i-- 2053 dAtA[i] = 0xa 2054 } 2055 return len(dAtA) - i, nil 2056 } 2057 2058 func (m *ResolvedResource) MarshalVT() (dAtA []byte, err error) { 2059 if m == nil { 2060 return nil, nil 2061 } 2062 size := m.SizeVT() 2063 dAtA = make([]byte, size) 2064 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2065 if err != nil { 2066 return nil, err 2067 } 2068 return dAtA[:n], nil 2069 } 2070 2071 func (m *ResolvedResource) MarshalToVT(dAtA []byte) (int, error) { 2072 size := m.SizeVT() 2073 return m.MarshalToSizedBufferVT(dAtA[:size]) 2074 } 2075 2076 func (m *ResolvedResource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2077 if m == nil { 2078 return 0, nil 2079 } 2080 i := len(dAtA) 2081 _ = i 2082 var l int 2083 _ = l 2084 if m.unknownFields != nil { 2085 i -= len(m.unknownFields) 2086 copy(dAtA[i:], m.unknownFields) 2087 } 2088 if len(m.MissingRequiredContext) > 0 { 2089 for iNdEx := len(m.MissingRequiredContext) - 1; iNdEx >= 0; iNdEx-- { 2090 i -= len(m.MissingRequiredContext[iNdEx]) 2091 copy(dAtA[i:], m.MissingRequiredContext[iNdEx]) 2092 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx]))) 2093 i-- 2094 dAtA[i] = 0x1a 2095 } 2096 } 2097 if m.Permissionship != 0 { 2098 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship)) 2099 i-- 2100 dAtA[i] = 0x10 2101 } 2102 if len(m.ResourceId) > 0 { 2103 i -= len(m.ResourceId) 2104 copy(dAtA[i:], m.ResourceId) 2105 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceId))) 2106 i-- 2107 dAtA[i] = 0xa 2108 } 2109 return len(dAtA) - i, nil 2110 } 2111 2112 func (m *DispatchLookupResourcesResponse) MarshalVT() (dAtA []byte, err error) { 2113 if m == nil { 2114 return nil, nil 2115 } 2116 size := m.SizeVT() 2117 dAtA = make([]byte, size) 2118 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2119 if err != nil { 2120 return nil, err 2121 } 2122 return dAtA[:n], nil 2123 } 2124 2125 func (m *DispatchLookupResourcesResponse) MarshalToVT(dAtA []byte) (int, error) { 2126 size := m.SizeVT() 2127 return m.MarshalToSizedBufferVT(dAtA[:size]) 2128 } 2129 2130 func (m *DispatchLookupResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2131 if m == nil { 2132 return 0, nil 2133 } 2134 i := len(dAtA) 2135 _ = i 2136 var l int 2137 _ = l 2138 if m.unknownFields != nil { 2139 i -= len(m.unknownFields) 2140 copy(dAtA[i:], m.unknownFields) 2141 } 2142 if m.AfterResponseCursor != nil { 2143 size, err := m.AfterResponseCursor.MarshalToSizedBufferVT(dAtA[:i]) 2144 if err != nil { 2145 return 0, err 2146 } 2147 i -= size 2148 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2149 i-- 2150 dAtA[i] = 0x1a 2151 } 2152 if m.ResolvedResource != nil { 2153 size, err := m.ResolvedResource.MarshalToSizedBufferVT(dAtA[:i]) 2154 if err != nil { 2155 return 0, err 2156 } 2157 i -= size 2158 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2159 i-- 2160 dAtA[i] = 0x12 2161 } 2162 if m.Metadata != nil { 2163 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 2164 if err != nil { 2165 return 0, err 2166 } 2167 i -= size 2168 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2169 i-- 2170 dAtA[i] = 0xa 2171 } 2172 return len(dAtA) - i, nil 2173 } 2174 2175 func (m *DispatchLookupSubjectsRequest) MarshalVT() (dAtA []byte, err error) { 2176 if m == nil { 2177 return nil, nil 2178 } 2179 size := m.SizeVT() 2180 dAtA = make([]byte, size) 2181 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2182 if err != nil { 2183 return nil, err 2184 } 2185 return dAtA[:n], nil 2186 } 2187 2188 func (m *DispatchLookupSubjectsRequest) MarshalToVT(dAtA []byte) (int, error) { 2189 size := m.SizeVT() 2190 return m.MarshalToSizedBufferVT(dAtA[:size]) 2191 } 2192 2193 func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2194 if m == nil { 2195 return 0, nil 2196 } 2197 i := len(dAtA) 2198 _ = i 2199 var l int 2200 _ = l 2201 if m.unknownFields != nil { 2202 i -= len(m.unknownFields) 2203 copy(dAtA[i:], m.unknownFields) 2204 } 2205 if m.OptionalCursor != nil { 2206 size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i]) 2207 if err != nil { 2208 return 0, err 2209 } 2210 i -= size 2211 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2212 i-- 2213 dAtA[i] = 0x32 2214 } 2215 if m.OptionalLimit != 0 { 2216 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit)) 2217 i-- 2218 dAtA[i] = 0x28 2219 } 2220 if m.SubjectRelation != nil { 2221 if vtmsg, ok := interface{}(m.SubjectRelation).(interface { 2222 MarshalToSizedBufferVT([]byte) (int, error) 2223 }); ok { 2224 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 2225 if err != nil { 2226 return 0, err 2227 } 2228 i -= size 2229 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2230 } else { 2231 encoded, err := proto.Marshal(m.SubjectRelation) 2232 if err != nil { 2233 return 0, err 2234 } 2235 i -= len(encoded) 2236 copy(dAtA[i:], encoded) 2237 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 2238 } 2239 i-- 2240 dAtA[i] = 0x22 2241 } 2242 if len(m.ResourceIds) > 0 { 2243 for iNdEx := len(m.ResourceIds) - 1; iNdEx >= 0; iNdEx-- { 2244 i -= len(m.ResourceIds[iNdEx]) 2245 copy(dAtA[i:], m.ResourceIds[iNdEx]) 2246 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) 2247 i-- 2248 dAtA[i] = 0x1a 2249 } 2250 } 2251 if m.ResourceRelation != nil { 2252 if vtmsg, ok := interface{}(m.ResourceRelation).(interface { 2253 MarshalToSizedBufferVT([]byte) (int, error) 2254 }); ok { 2255 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 2256 if err != nil { 2257 return 0, err 2258 } 2259 i -= size 2260 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2261 } else { 2262 encoded, err := proto.Marshal(m.ResourceRelation) 2263 if err != nil { 2264 return 0, err 2265 } 2266 i -= len(encoded) 2267 copy(dAtA[i:], encoded) 2268 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 2269 } 2270 i-- 2271 dAtA[i] = 0x12 2272 } 2273 if m.Metadata != nil { 2274 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 2275 if err != nil { 2276 return 0, err 2277 } 2278 i -= size 2279 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2280 i-- 2281 dAtA[i] = 0xa 2282 } 2283 return len(dAtA) - i, nil 2284 } 2285 2286 func (m *FoundSubject) MarshalVT() (dAtA []byte, err error) { 2287 if m == nil { 2288 return nil, nil 2289 } 2290 size := m.SizeVT() 2291 dAtA = make([]byte, size) 2292 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2293 if err != nil { 2294 return nil, err 2295 } 2296 return dAtA[:n], nil 2297 } 2298 2299 func (m *FoundSubject) MarshalToVT(dAtA []byte) (int, error) { 2300 size := m.SizeVT() 2301 return m.MarshalToSizedBufferVT(dAtA[:size]) 2302 } 2303 2304 func (m *FoundSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2305 if m == nil { 2306 return 0, nil 2307 } 2308 i := len(dAtA) 2309 _ = i 2310 var l int 2311 _ = l 2312 if m.unknownFields != nil { 2313 i -= len(m.unknownFields) 2314 copy(dAtA[i:], m.unknownFields) 2315 } 2316 if len(m.ExcludedSubjects) > 0 { 2317 for iNdEx := len(m.ExcludedSubjects) - 1; iNdEx >= 0; iNdEx-- { 2318 size, err := m.ExcludedSubjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 2319 if err != nil { 2320 return 0, err 2321 } 2322 i -= size 2323 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2324 i-- 2325 dAtA[i] = 0x1a 2326 } 2327 } 2328 if m.CaveatExpression != nil { 2329 if vtmsg, ok := interface{}(m.CaveatExpression).(interface { 2330 MarshalToSizedBufferVT([]byte) (int, error) 2331 }); ok { 2332 size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) 2333 if err != nil { 2334 return 0, err 2335 } 2336 i -= size 2337 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2338 } else { 2339 encoded, err := proto.Marshal(m.CaveatExpression) 2340 if err != nil { 2341 return 0, err 2342 } 2343 i -= len(encoded) 2344 copy(dAtA[i:], encoded) 2345 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) 2346 } 2347 i-- 2348 dAtA[i] = 0x12 2349 } 2350 if len(m.SubjectId) > 0 { 2351 i -= len(m.SubjectId) 2352 copy(dAtA[i:], m.SubjectId) 2353 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectId))) 2354 i-- 2355 dAtA[i] = 0xa 2356 } 2357 return len(dAtA) - i, nil 2358 } 2359 2360 func (m *FoundSubjects) MarshalVT() (dAtA []byte, err error) { 2361 if m == nil { 2362 return nil, nil 2363 } 2364 size := m.SizeVT() 2365 dAtA = make([]byte, size) 2366 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2367 if err != nil { 2368 return nil, err 2369 } 2370 return dAtA[:n], nil 2371 } 2372 2373 func (m *FoundSubjects) MarshalToVT(dAtA []byte) (int, error) { 2374 size := m.SizeVT() 2375 return m.MarshalToSizedBufferVT(dAtA[:size]) 2376 } 2377 2378 func (m *FoundSubjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2379 if m == nil { 2380 return 0, nil 2381 } 2382 i := len(dAtA) 2383 _ = i 2384 var l int 2385 _ = l 2386 if m.unknownFields != nil { 2387 i -= len(m.unknownFields) 2388 copy(dAtA[i:], m.unknownFields) 2389 } 2390 if len(m.FoundSubjects) > 0 { 2391 for iNdEx := len(m.FoundSubjects) - 1; iNdEx >= 0; iNdEx-- { 2392 size, err := m.FoundSubjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 2393 if err != nil { 2394 return 0, err 2395 } 2396 i -= size 2397 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2398 i-- 2399 dAtA[i] = 0xa 2400 } 2401 } 2402 return len(dAtA) - i, nil 2403 } 2404 2405 func (m *DispatchLookupSubjectsResponse) MarshalVT() (dAtA []byte, err error) { 2406 if m == nil { 2407 return nil, nil 2408 } 2409 size := m.SizeVT() 2410 dAtA = make([]byte, size) 2411 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2412 if err != nil { 2413 return nil, err 2414 } 2415 return dAtA[:n], nil 2416 } 2417 2418 func (m *DispatchLookupSubjectsResponse) MarshalToVT(dAtA []byte) (int, error) { 2419 size := m.SizeVT() 2420 return m.MarshalToSizedBufferVT(dAtA[:size]) 2421 } 2422 2423 func (m *DispatchLookupSubjectsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2424 if m == nil { 2425 return 0, nil 2426 } 2427 i := len(dAtA) 2428 _ = i 2429 var l int 2430 _ = l 2431 if m.unknownFields != nil { 2432 i -= len(m.unknownFields) 2433 copy(dAtA[i:], m.unknownFields) 2434 } 2435 if m.AfterResponseCursor != nil { 2436 size, err := m.AfterResponseCursor.MarshalToSizedBufferVT(dAtA[:i]) 2437 if err != nil { 2438 return 0, err 2439 } 2440 i -= size 2441 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2442 i-- 2443 dAtA[i] = 0x1a 2444 } 2445 if m.Metadata != nil { 2446 size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) 2447 if err != nil { 2448 return 0, err 2449 } 2450 i -= size 2451 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2452 i-- 2453 dAtA[i] = 0x12 2454 } 2455 if len(m.FoundSubjectsByResourceId) > 0 { 2456 for k := range m.FoundSubjectsByResourceId { 2457 v := m.FoundSubjectsByResourceId[k] 2458 baseI := i 2459 size, err := v.MarshalToSizedBufferVT(dAtA[:i]) 2460 if err != nil { 2461 return 0, err 2462 } 2463 i -= size 2464 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2465 i-- 2466 dAtA[i] = 0x12 2467 i -= len(k) 2468 copy(dAtA[i:], k) 2469 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) 2470 i-- 2471 dAtA[i] = 0xa 2472 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) 2473 i-- 2474 dAtA[i] = 0xa 2475 } 2476 } 2477 return len(dAtA) - i, nil 2478 } 2479 2480 func (m *ResolverMeta) MarshalVT() (dAtA []byte, err error) { 2481 if m == nil { 2482 return nil, nil 2483 } 2484 size := m.SizeVT() 2485 dAtA = make([]byte, size) 2486 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2487 if err != nil { 2488 return nil, err 2489 } 2490 return dAtA[:n], nil 2491 } 2492 2493 func (m *ResolverMeta) MarshalToVT(dAtA []byte) (int, error) { 2494 size := m.SizeVT() 2495 return m.MarshalToSizedBufferVT(dAtA[:size]) 2496 } 2497 2498 func (m *ResolverMeta) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2499 if m == nil { 2500 return 0, nil 2501 } 2502 i := len(dAtA) 2503 _ = i 2504 var l int 2505 _ = l 2506 if m.unknownFields != nil { 2507 i -= len(m.unknownFields) 2508 copy(dAtA[i:], m.unknownFields) 2509 } 2510 if len(m.TraversalBloom) > 0 { 2511 i -= len(m.TraversalBloom) 2512 copy(dAtA[i:], m.TraversalBloom) 2513 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TraversalBloom))) 2514 i-- 2515 dAtA[i] = 0x22 2516 } 2517 if len(m.RequestId) > 0 { 2518 i -= len(m.RequestId) 2519 copy(dAtA[i:], m.RequestId) 2520 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) 2521 i-- 2522 dAtA[i] = 0x1a 2523 } 2524 if m.DepthRemaining != 0 { 2525 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DepthRemaining)) 2526 i-- 2527 dAtA[i] = 0x10 2528 } 2529 if len(m.AtRevision) > 0 { 2530 i -= len(m.AtRevision) 2531 copy(dAtA[i:], m.AtRevision) 2532 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AtRevision))) 2533 i-- 2534 dAtA[i] = 0xa 2535 } 2536 return len(dAtA) - i, nil 2537 } 2538 2539 func (m *ResponseMeta) MarshalVT() (dAtA []byte, err error) { 2540 if m == nil { 2541 return nil, nil 2542 } 2543 size := m.SizeVT() 2544 dAtA = make([]byte, size) 2545 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2546 if err != nil { 2547 return nil, err 2548 } 2549 return dAtA[:n], nil 2550 } 2551 2552 func (m *ResponseMeta) MarshalToVT(dAtA []byte) (int, error) { 2553 size := m.SizeVT() 2554 return m.MarshalToSizedBufferVT(dAtA[:size]) 2555 } 2556 2557 func (m *ResponseMeta) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2558 if m == nil { 2559 return 0, nil 2560 } 2561 i := len(dAtA) 2562 _ = i 2563 var l int 2564 _ = l 2565 if m.unknownFields != nil { 2566 i -= len(m.unknownFields) 2567 copy(dAtA[i:], m.unknownFields) 2568 } 2569 if m.DebugInfo != nil { 2570 size, err := m.DebugInfo.MarshalToSizedBufferVT(dAtA[:i]) 2571 if err != nil { 2572 return 0, err 2573 } 2574 i -= size 2575 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2576 i-- 2577 dAtA[i] = 0x32 2578 } 2579 if m.CachedDispatchCount != 0 { 2580 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CachedDispatchCount)) 2581 i-- 2582 dAtA[i] = 0x18 2583 } 2584 if m.DepthRequired != 0 { 2585 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DepthRequired)) 2586 i-- 2587 dAtA[i] = 0x10 2588 } 2589 if m.DispatchCount != 0 { 2590 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchCount)) 2591 i-- 2592 dAtA[i] = 0x8 2593 } 2594 return len(dAtA) - i, nil 2595 } 2596 2597 func (m *DebugInformation) MarshalVT() (dAtA []byte, err error) { 2598 if m == nil { 2599 return nil, nil 2600 } 2601 size := m.SizeVT() 2602 dAtA = make([]byte, size) 2603 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2604 if err != nil { 2605 return nil, err 2606 } 2607 return dAtA[:n], nil 2608 } 2609 2610 func (m *DebugInformation) MarshalToVT(dAtA []byte) (int, error) { 2611 size := m.SizeVT() 2612 return m.MarshalToSizedBufferVT(dAtA[:size]) 2613 } 2614 2615 func (m *DebugInformation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2616 if m == nil { 2617 return 0, nil 2618 } 2619 i := len(dAtA) 2620 _ = i 2621 var l int 2622 _ = l 2623 if m.unknownFields != nil { 2624 i -= len(m.unknownFields) 2625 copy(dAtA[i:], m.unknownFields) 2626 } 2627 if m.Check != nil { 2628 size, err := m.Check.MarshalToSizedBufferVT(dAtA[:i]) 2629 if err != nil { 2630 return 0, err 2631 } 2632 i -= size 2633 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2634 i-- 2635 dAtA[i] = 0xa 2636 } 2637 return len(dAtA) - i, nil 2638 } 2639 2640 func (m *CheckDebugTrace) MarshalVT() (dAtA []byte, err error) { 2641 if m == nil { 2642 return nil, nil 2643 } 2644 size := m.SizeVT() 2645 dAtA = make([]byte, size) 2646 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 2647 if err != nil { 2648 return nil, err 2649 } 2650 return dAtA[:n], nil 2651 } 2652 2653 func (m *CheckDebugTrace) MarshalToVT(dAtA []byte) (int, error) { 2654 size := m.SizeVT() 2655 return m.MarshalToSizedBufferVT(dAtA[:size]) 2656 } 2657 2658 func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 2659 if m == nil { 2660 return 0, nil 2661 } 2662 i := len(dAtA) 2663 _ = i 2664 var l int 2665 _ = l 2666 if m.unknownFields != nil { 2667 i -= len(m.unknownFields) 2668 copy(dAtA[i:], m.unknownFields) 2669 } 2670 if m.Duration != nil { 2671 size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i]) 2672 if err != nil { 2673 return 0, err 2674 } 2675 i -= size 2676 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2677 i-- 2678 dAtA[i] = 0x32 2679 } 2680 if len(m.SubProblems) > 0 { 2681 for iNdEx := len(m.SubProblems) - 1; iNdEx >= 0; iNdEx-- { 2682 size, err := m.SubProblems[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 2683 if err != nil { 2684 return 0, err 2685 } 2686 i -= size 2687 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2688 i-- 2689 dAtA[i] = 0x2a 2690 } 2691 } 2692 if m.IsCachedResult { 2693 i-- 2694 if m.IsCachedResult { 2695 dAtA[i] = 1 2696 } else { 2697 dAtA[i] = 0 2698 } 2699 i-- 2700 dAtA[i] = 0x20 2701 } 2702 if len(m.Results) > 0 { 2703 for k := range m.Results { 2704 v := m.Results[k] 2705 baseI := i 2706 size, err := v.MarshalToSizedBufferVT(dAtA[:i]) 2707 if err != nil { 2708 return 0, err 2709 } 2710 i -= size 2711 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2712 i-- 2713 dAtA[i] = 0x12 2714 i -= len(k) 2715 copy(dAtA[i:], k) 2716 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) 2717 i-- 2718 dAtA[i] = 0xa 2719 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) 2720 i-- 2721 dAtA[i] = 0x1a 2722 } 2723 } 2724 if m.ResourceRelationType != 0 { 2725 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResourceRelationType)) 2726 i-- 2727 dAtA[i] = 0x10 2728 } 2729 if m.Request != nil { 2730 size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) 2731 if err != nil { 2732 return 0, err 2733 } 2734 i -= size 2735 i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) 2736 i-- 2737 dAtA[i] = 0xa 2738 } 2739 return len(dAtA) - i, nil 2740 } 2741 2742 func (m *DispatchCheckRequest) SizeVT() (n int) { 2743 if m == nil { 2744 return 0 2745 } 2746 var l int 2747 _ = l 2748 if m.Metadata != nil { 2749 l = m.Metadata.SizeVT() 2750 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2751 } 2752 if m.ResourceRelation != nil { 2753 if size, ok := interface{}(m.ResourceRelation).(interface { 2754 SizeVT() int 2755 }); ok { 2756 l = size.SizeVT() 2757 } else { 2758 l = proto.Size(m.ResourceRelation) 2759 } 2760 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2761 } 2762 if len(m.ResourceIds) > 0 { 2763 for _, s := range m.ResourceIds { 2764 l = len(s) 2765 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2766 } 2767 } 2768 if m.Subject != nil { 2769 if size, ok := interface{}(m.Subject).(interface { 2770 SizeVT() int 2771 }); ok { 2772 l = size.SizeVT() 2773 } else { 2774 l = proto.Size(m.Subject) 2775 } 2776 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2777 } 2778 if m.ResultsSetting != 0 { 2779 n += 1 + protohelpers.SizeOfVarint(uint64(m.ResultsSetting)) 2780 } 2781 if m.Debug != 0 { 2782 n += 1 + protohelpers.SizeOfVarint(uint64(m.Debug)) 2783 } 2784 n += len(m.unknownFields) 2785 return n 2786 } 2787 2788 func (m *DispatchCheckResponse) SizeVT() (n int) { 2789 if m == nil { 2790 return 0 2791 } 2792 var l int 2793 _ = l 2794 if m.Metadata != nil { 2795 l = m.Metadata.SizeVT() 2796 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2797 } 2798 if len(m.ResultsByResourceId) > 0 { 2799 for k, v := range m.ResultsByResourceId { 2800 _ = k 2801 _ = v 2802 l = 0 2803 if v != nil { 2804 l = v.SizeVT() 2805 } 2806 l += 1 + protohelpers.SizeOfVarint(uint64(l)) 2807 mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l 2808 n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) 2809 } 2810 } 2811 n += len(m.unknownFields) 2812 return n 2813 } 2814 2815 func (m *ResourceCheckResult) SizeVT() (n int) { 2816 if m == nil { 2817 return 0 2818 } 2819 var l int 2820 _ = l 2821 if m.Membership != 0 { 2822 n += 1 + protohelpers.SizeOfVarint(uint64(m.Membership)) 2823 } 2824 if m.Expression != nil { 2825 if size, ok := interface{}(m.Expression).(interface { 2826 SizeVT() int 2827 }); ok { 2828 l = size.SizeVT() 2829 } else { 2830 l = proto.Size(m.Expression) 2831 } 2832 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2833 } 2834 if len(m.MissingExprFields) > 0 { 2835 for _, s := range m.MissingExprFields { 2836 l = len(s) 2837 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2838 } 2839 } 2840 n += len(m.unknownFields) 2841 return n 2842 } 2843 2844 func (m *DispatchExpandRequest) SizeVT() (n int) { 2845 if m == nil { 2846 return 0 2847 } 2848 var l int 2849 _ = l 2850 if m.Metadata != nil { 2851 l = m.Metadata.SizeVT() 2852 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2853 } 2854 if m.ResourceAndRelation != nil { 2855 if size, ok := interface{}(m.ResourceAndRelation).(interface { 2856 SizeVT() int 2857 }); ok { 2858 l = size.SizeVT() 2859 } else { 2860 l = proto.Size(m.ResourceAndRelation) 2861 } 2862 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2863 } 2864 if m.ExpansionMode != 0 { 2865 n += 1 + protohelpers.SizeOfVarint(uint64(m.ExpansionMode)) 2866 } 2867 n += len(m.unknownFields) 2868 return n 2869 } 2870 2871 func (m *DispatchExpandResponse) SizeVT() (n int) { 2872 if m == nil { 2873 return 0 2874 } 2875 var l int 2876 _ = l 2877 if m.Metadata != nil { 2878 l = m.Metadata.SizeVT() 2879 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2880 } 2881 if m.TreeNode != nil { 2882 if size, ok := interface{}(m.TreeNode).(interface { 2883 SizeVT() int 2884 }); ok { 2885 l = size.SizeVT() 2886 } else { 2887 l = proto.Size(m.TreeNode) 2888 } 2889 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2890 } 2891 n += len(m.unknownFields) 2892 return n 2893 } 2894 2895 func (m *Cursor) SizeVT() (n int) { 2896 if m == nil { 2897 return 0 2898 } 2899 var l int 2900 _ = l 2901 if len(m.Sections) > 0 { 2902 for _, s := range m.Sections { 2903 l = len(s) 2904 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2905 } 2906 } 2907 if m.DispatchVersion != 0 { 2908 n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchVersion)) 2909 } 2910 n += len(m.unknownFields) 2911 return n 2912 } 2913 2914 func (m *DispatchReachableResourcesRequest) SizeVT() (n int) { 2915 if m == nil { 2916 return 0 2917 } 2918 var l int 2919 _ = l 2920 if m.Metadata != nil { 2921 l = m.Metadata.SizeVT() 2922 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2923 } 2924 if m.ResourceRelation != nil { 2925 if size, ok := interface{}(m.ResourceRelation).(interface { 2926 SizeVT() int 2927 }); ok { 2928 l = size.SizeVT() 2929 } else { 2930 l = proto.Size(m.ResourceRelation) 2931 } 2932 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2933 } 2934 if m.SubjectRelation != nil { 2935 if size, ok := interface{}(m.SubjectRelation).(interface { 2936 SizeVT() int 2937 }); ok { 2938 l = size.SizeVT() 2939 } else { 2940 l = proto.Size(m.SubjectRelation) 2941 } 2942 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2943 } 2944 if len(m.SubjectIds) > 0 { 2945 for _, s := range m.SubjectIds { 2946 l = len(s) 2947 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2948 } 2949 } 2950 if m.OptionalCursor != nil { 2951 l = m.OptionalCursor.SizeVT() 2952 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2953 } 2954 if m.OptionalLimit != 0 { 2955 n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit)) 2956 } 2957 n += len(m.unknownFields) 2958 return n 2959 } 2960 2961 func (m *ReachableResource) SizeVT() (n int) { 2962 if m == nil { 2963 return 0 2964 } 2965 var l int 2966 _ = l 2967 l = len(m.ResourceId) 2968 if l > 0 { 2969 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2970 } 2971 if m.ResultStatus != 0 { 2972 n += 1 + protohelpers.SizeOfVarint(uint64(m.ResultStatus)) 2973 } 2974 if len(m.ForSubjectIds) > 0 { 2975 for _, s := range m.ForSubjectIds { 2976 l = len(s) 2977 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2978 } 2979 } 2980 n += len(m.unknownFields) 2981 return n 2982 } 2983 2984 func (m *DispatchReachableResourcesResponse) SizeVT() (n int) { 2985 if m == nil { 2986 return 0 2987 } 2988 var l int 2989 _ = l 2990 if m.Resource != nil { 2991 l = m.Resource.SizeVT() 2992 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2993 } 2994 if m.Metadata != nil { 2995 l = m.Metadata.SizeVT() 2996 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 2997 } 2998 if m.AfterResponseCursor != nil { 2999 l = m.AfterResponseCursor.SizeVT() 3000 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3001 } 3002 n += len(m.unknownFields) 3003 return n 3004 } 3005 3006 func (m *DispatchLookupResourcesRequest) SizeVT() (n int) { 3007 if m == nil { 3008 return 0 3009 } 3010 var l int 3011 _ = l 3012 if m.Metadata != nil { 3013 l = m.Metadata.SizeVT() 3014 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3015 } 3016 if m.ObjectRelation != nil { 3017 if size, ok := interface{}(m.ObjectRelation).(interface { 3018 SizeVT() int 3019 }); ok { 3020 l = size.SizeVT() 3021 } else { 3022 l = proto.Size(m.ObjectRelation) 3023 } 3024 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3025 } 3026 if m.Subject != nil { 3027 if size, ok := interface{}(m.Subject).(interface { 3028 SizeVT() int 3029 }); ok { 3030 l = size.SizeVT() 3031 } else { 3032 l = proto.Size(m.Subject) 3033 } 3034 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3035 } 3036 if m.OptionalLimit != 0 { 3037 n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit)) 3038 } 3039 if m.Context != nil { 3040 l = (*structpb1.Struct)(m.Context).SizeVT() 3041 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3042 } 3043 if m.OptionalCursor != nil { 3044 l = m.OptionalCursor.SizeVT() 3045 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3046 } 3047 n += len(m.unknownFields) 3048 return n 3049 } 3050 3051 func (m *ResolvedResource) SizeVT() (n int) { 3052 if m == nil { 3053 return 0 3054 } 3055 var l int 3056 _ = l 3057 l = len(m.ResourceId) 3058 if l > 0 { 3059 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3060 } 3061 if m.Permissionship != 0 { 3062 n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship)) 3063 } 3064 if len(m.MissingRequiredContext) > 0 { 3065 for _, s := range m.MissingRequiredContext { 3066 l = len(s) 3067 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3068 } 3069 } 3070 n += len(m.unknownFields) 3071 return n 3072 } 3073 3074 func (m *DispatchLookupResourcesResponse) SizeVT() (n int) { 3075 if m == nil { 3076 return 0 3077 } 3078 var l int 3079 _ = l 3080 if m.Metadata != nil { 3081 l = m.Metadata.SizeVT() 3082 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3083 } 3084 if m.ResolvedResource != nil { 3085 l = m.ResolvedResource.SizeVT() 3086 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3087 } 3088 if m.AfterResponseCursor != nil { 3089 l = m.AfterResponseCursor.SizeVT() 3090 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3091 } 3092 n += len(m.unknownFields) 3093 return n 3094 } 3095 3096 func (m *DispatchLookupSubjectsRequest) SizeVT() (n int) { 3097 if m == nil { 3098 return 0 3099 } 3100 var l int 3101 _ = l 3102 if m.Metadata != nil { 3103 l = m.Metadata.SizeVT() 3104 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3105 } 3106 if m.ResourceRelation != nil { 3107 if size, ok := interface{}(m.ResourceRelation).(interface { 3108 SizeVT() int 3109 }); ok { 3110 l = size.SizeVT() 3111 } else { 3112 l = proto.Size(m.ResourceRelation) 3113 } 3114 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3115 } 3116 if len(m.ResourceIds) > 0 { 3117 for _, s := range m.ResourceIds { 3118 l = len(s) 3119 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3120 } 3121 } 3122 if m.SubjectRelation != nil { 3123 if size, ok := interface{}(m.SubjectRelation).(interface { 3124 SizeVT() int 3125 }); ok { 3126 l = size.SizeVT() 3127 } else { 3128 l = proto.Size(m.SubjectRelation) 3129 } 3130 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3131 } 3132 if m.OptionalLimit != 0 { 3133 n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit)) 3134 } 3135 if m.OptionalCursor != nil { 3136 l = m.OptionalCursor.SizeVT() 3137 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3138 } 3139 n += len(m.unknownFields) 3140 return n 3141 } 3142 3143 func (m *FoundSubject) SizeVT() (n int) { 3144 if m == nil { 3145 return 0 3146 } 3147 var l int 3148 _ = l 3149 l = len(m.SubjectId) 3150 if l > 0 { 3151 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3152 } 3153 if m.CaveatExpression != nil { 3154 if size, ok := interface{}(m.CaveatExpression).(interface { 3155 SizeVT() int 3156 }); ok { 3157 l = size.SizeVT() 3158 } else { 3159 l = proto.Size(m.CaveatExpression) 3160 } 3161 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3162 } 3163 if len(m.ExcludedSubjects) > 0 { 3164 for _, e := range m.ExcludedSubjects { 3165 l = e.SizeVT() 3166 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3167 } 3168 } 3169 n += len(m.unknownFields) 3170 return n 3171 } 3172 3173 func (m *FoundSubjects) SizeVT() (n int) { 3174 if m == nil { 3175 return 0 3176 } 3177 var l int 3178 _ = l 3179 if len(m.FoundSubjects) > 0 { 3180 for _, e := range m.FoundSubjects { 3181 l = e.SizeVT() 3182 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3183 } 3184 } 3185 n += len(m.unknownFields) 3186 return n 3187 } 3188 3189 func (m *DispatchLookupSubjectsResponse) SizeVT() (n int) { 3190 if m == nil { 3191 return 0 3192 } 3193 var l int 3194 _ = l 3195 if len(m.FoundSubjectsByResourceId) > 0 { 3196 for k, v := range m.FoundSubjectsByResourceId { 3197 _ = k 3198 _ = v 3199 l = 0 3200 if v != nil { 3201 l = v.SizeVT() 3202 } 3203 l += 1 + protohelpers.SizeOfVarint(uint64(l)) 3204 mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l 3205 n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) 3206 } 3207 } 3208 if m.Metadata != nil { 3209 l = m.Metadata.SizeVT() 3210 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3211 } 3212 if m.AfterResponseCursor != nil { 3213 l = m.AfterResponseCursor.SizeVT() 3214 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3215 } 3216 n += len(m.unknownFields) 3217 return n 3218 } 3219 3220 func (m *ResolverMeta) SizeVT() (n int) { 3221 if m == nil { 3222 return 0 3223 } 3224 var l int 3225 _ = l 3226 l = len(m.AtRevision) 3227 if l > 0 { 3228 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3229 } 3230 if m.DepthRemaining != 0 { 3231 n += 1 + protohelpers.SizeOfVarint(uint64(m.DepthRemaining)) 3232 } 3233 l = len(m.RequestId) 3234 if l > 0 { 3235 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3236 } 3237 l = len(m.TraversalBloom) 3238 if l > 0 { 3239 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3240 } 3241 n += len(m.unknownFields) 3242 return n 3243 } 3244 3245 func (m *ResponseMeta) SizeVT() (n int) { 3246 if m == nil { 3247 return 0 3248 } 3249 var l int 3250 _ = l 3251 if m.DispatchCount != 0 { 3252 n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchCount)) 3253 } 3254 if m.DepthRequired != 0 { 3255 n += 1 + protohelpers.SizeOfVarint(uint64(m.DepthRequired)) 3256 } 3257 if m.CachedDispatchCount != 0 { 3258 n += 1 + protohelpers.SizeOfVarint(uint64(m.CachedDispatchCount)) 3259 } 3260 if m.DebugInfo != nil { 3261 l = m.DebugInfo.SizeVT() 3262 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3263 } 3264 n += len(m.unknownFields) 3265 return n 3266 } 3267 3268 func (m *DebugInformation) SizeVT() (n int) { 3269 if m == nil { 3270 return 0 3271 } 3272 var l int 3273 _ = l 3274 if m.Check != nil { 3275 l = m.Check.SizeVT() 3276 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3277 } 3278 n += len(m.unknownFields) 3279 return n 3280 } 3281 3282 func (m *CheckDebugTrace) SizeVT() (n int) { 3283 if m == nil { 3284 return 0 3285 } 3286 var l int 3287 _ = l 3288 if m.Request != nil { 3289 l = m.Request.SizeVT() 3290 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3291 } 3292 if m.ResourceRelationType != 0 { 3293 n += 1 + protohelpers.SizeOfVarint(uint64(m.ResourceRelationType)) 3294 } 3295 if len(m.Results) > 0 { 3296 for k, v := range m.Results { 3297 _ = k 3298 _ = v 3299 l = 0 3300 if v != nil { 3301 l = v.SizeVT() 3302 } 3303 l += 1 + protohelpers.SizeOfVarint(uint64(l)) 3304 mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l 3305 n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) 3306 } 3307 } 3308 if m.IsCachedResult { 3309 n += 2 3310 } 3311 if len(m.SubProblems) > 0 { 3312 for _, e := range m.SubProblems { 3313 l = e.SizeVT() 3314 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3315 } 3316 } 3317 if m.Duration != nil { 3318 l = (*durationpb1.Duration)(m.Duration).SizeVT() 3319 n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) 3320 } 3321 n += len(m.unknownFields) 3322 return n 3323 } 3324 3325 func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { 3326 l := len(dAtA) 3327 iNdEx := 0 3328 for iNdEx < l { 3329 preIndex := iNdEx 3330 var wire uint64 3331 for shift := uint(0); ; shift += 7 { 3332 if shift >= 64 { 3333 return protohelpers.ErrIntOverflow 3334 } 3335 if iNdEx >= l { 3336 return io.ErrUnexpectedEOF 3337 } 3338 b := dAtA[iNdEx] 3339 iNdEx++ 3340 wire |= uint64(b&0x7F) << shift 3341 if b < 0x80 { 3342 break 3343 } 3344 } 3345 fieldNum := int32(wire >> 3) 3346 wireType := int(wire & 0x7) 3347 if wireType == 4 { 3348 return fmt.Errorf("proto: DispatchCheckRequest: wiretype end group for non-group") 3349 } 3350 if fieldNum <= 0 { 3351 return fmt.Errorf("proto: DispatchCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3352 } 3353 switch fieldNum { 3354 case 1: 3355 if wireType != 2 { 3356 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 3357 } 3358 var msglen int 3359 for shift := uint(0); ; shift += 7 { 3360 if shift >= 64 { 3361 return protohelpers.ErrIntOverflow 3362 } 3363 if iNdEx >= l { 3364 return io.ErrUnexpectedEOF 3365 } 3366 b := dAtA[iNdEx] 3367 iNdEx++ 3368 msglen |= int(b&0x7F) << shift 3369 if b < 0x80 { 3370 break 3371 } 3372 } 3373 if msglen < 0 { 3374 return protohelpers.ErrInvalidLength 3375 } 3376 postIndex := iNdEx + msglen 3377 if postIndex < 0 { 3378 return protohelpers.ErrInvalidLength 3379 } 3380 if postIndex > l { 3381 return io.ErrUnexpectedEOF 3382 } 3383 if m.Metadata == nil { 3384 m.Metadata = &ResolverMeta{} 3385 } 3386 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3387 return err 3388 } 3389 iNdEx = postIndex 3390 case 2: 3391 if wireType != 2 { 3392 return fmt.Errorf("proto: wrong wireType = %d for field ResourceRelation", wireType) 3393 } 3394 var msglen int 3395 for shift := uint(0); ; shift += 7 { 3396 if shift >= 64 { 3397 return protohelpers.ErrIntOverflow 3398 } 3399 if iNdEx >= l { 3400 return io.ErrUnexpectedEOF 3401 } 3402 b := dAtA[iNdEx] 3403 iNdEx++ 3404 msglen |= int(b&0x7F) << shift 3405 if b < 0x80 { 3406 break 3407 } 3408 } 3409 if msglen < 0 { 3410 return protohelpers.ErrInvalidLength 3411 } 3412 postIndex := iNdEx + msglen 3413 if postIndex < 0 { 3414 return protohelpers.ErrInvalidLength 3415 } 3416 if postIndex > l { 3417 return io.ErrUnexpectedEOF 3418 } 3419 if m.ResourceRelation == nil { 3420 m.ResourceRelation = &v1.RelationReference{} 3421 } 3422 if unmarshal, ok := interface{}(m.ResourceRelation).(interface { 3423 UnmarshalVT([]byte) error 3424 }); ok { 3425 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3426 return err 3427 } 3428 } else { 3429 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ResourceRelation); err != nil { 3430 return err 3431 } 3432 } 3433 iNdEx = postIndex 3434 case 3: 3435 if wireType != 2 { 3436 return fmt.Errorf("proto: wrong wireType = %d for field ResourceIds", wireType) 3437 } 3438 var stringLen uint64 3439 for shift := uint(0); ; shift += 7 { 3440 if shift >= 64 { 3441 return protohelpers.ErrIntOverflow 3442 } 3443 if iNdEx >= l { 3444 return io.ErrUnexpectedEOF 3445 } 3446 b := dAtA[iNdEx] 3447 iNdEx++ 3448 stringLen |= uint64(b&0x7F) << shift 3449 if b < 0x80 { 3450 break 3451 } 3452 } 3453 intStringLen := int(stringLen) 3454 if intStringLen < 0 { 3455 return protohelpers.ErrInvalidLength 3456 } 3457 postIndex := iNdEx + intStringLen 3458 if postIndex < 0 { 3459 return protohelpers.ErrInvalidLength 3460 } 3461 if postIndex > l { 3462 return io.ErrUnexpectedEOF 3463 } 3464 m.ResourceIds = append(m.ResourceIds, string(dAtA[iNdEx:postIndex])) 3465 iNdEx = postIndex 3466 case 4: 3467 if wireType != 2 { 3468 return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) 3469 } 3470 var msglen int 3471 for shift := uint(0); ; shift += 7 { 3472 if shift >= 64 { 3473 return protohelpers.ErrIntOverflow 3474 } 3475 if iNdEx >= l { 3476 return io.ErrUnexpectedEOF 3477 } 3478 b := dAtA[iNdEx] 3479 iNdEx++ 3480 msglen |= int(b&0x7F) << shift 3481 if b < 0x80 { 3482 break 3483 } 3484 } 3485 if msglen < 0 { 3486 return protohelpers.ErrInvalidLength 3487 } 3488 postIndex := iNdEx + msglen 3489 if postIndex < 0 { 3490 return protohelpers.ErrInvalidLength 3491 } 3492 if postIndex > l { 3493 return io.ErrUnexpectedEOF 3494 } 3495 if m.Subject == nil { 3496 m.Subject = &v1.ObjectAndRelation{} 3497 } 3498 if unmarshal, ok := interface{}(m.Subject).(interface { 3499 UnmarshalVT([]byte) error 3500 }); ok { 3501 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3502 return err 3503 } 3504 } else { 3505 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Subject); err != nil { 3506 return err 3507 } 3508 } 3509 iNdEx = postIndex 3510 case 5: 3511 if wireType != 0 { 3512 return fmt.Errorf("proto: wrong wireType = %d for field ResultsSetting", wireType) 3513 } 3514 m.ResultsSetting = 0 3515 for shift := uint(0); ; shift += 7 { 3516 if shift >= 64 { 3517 return protohelpers.ErrIntOverflow 3518 } 3519 if iNdEx >= l { 3520 return io.ErrUnexpectedEOF 3521 } 3522 b := dAtA[iNdEx] 3523 iNdEx++ 3524 m.ResultsSetting |= DispatchCheckRequest_ResultsSetting(b&0x7F) << shift 3525 if b < 0x80 { 3526 break 3527 } 3528 } 3529 case 6: 3530 if wireType != 0 { 3531 return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) 3532 } 3533 m.Debug = 0 3534 for shift := uint(0); ; shift += 7 { 3535 if shift >= 64 { 3536 return protohelpers.ErrIntOverflow 3537 } 3538 if iNdEx >= l { 3539 return io.ErrUnexpectedEOF 3540 } 3541 b := dAtA[iNdEx] 3542 iNdEx++ 3543 m.Debug |= DispatchCheckRequest_DebugSetting(b&0x7F) << shift 3544 if b < 0x80 { 3545 break 3546 } 3547 } 3548 default: 3549 iNdEx = preIndex 3550 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3551 if err != nil { 3552 return err 3553 } 3554 if (skippy < 0) || (iNdEx+skippy) < 0 { 3555 return protohelpers.ErrInvalidLength 3556 } 3557 if (iNdEx + skippy) > l { 3558 return io.ErrUnexpectedEOF 3559 } 3560 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 3561 iNdEx += skippy 3562 } 3563 } 3564 3565 if iNdEx > l { 3566 return io.ErrUnexpectedEOF 3567 } 3568 return nil 3569 } 3570 func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { 3571 l := len(dAtA) 3572 iNdEx := 0 3573 for iNdEx < l { 3574 preIndex := iNdEx 3575 var wire uint64 3576 for shift := uint(0); ; shift += 7 { 3577 if shift >= 64 { 3578 return protohelpers.ErrIntOverflow 3579 } 3580 if iNdEx >= l { 3581 return io.ErrUnexpectedEOF 3582 } 3583 b := dAtA[iNdEx] 3584 iNdEx++ 3585 wire |= uint64(b&0x7F) << shift 3586 if b < 0x80 { 3587 break 3588 } 3589 } 3590 fieldNum := int32(wire >> 3) 3591 wireType := int(wire & 0x7) 3592 if wireType == 4 { 3593 return fmt.Errorf("proto: DispatchCheckResponse: wiretype end group for non-group") 3594 } 3595 if fieldNum <= 0 { 3596 return fmt.Errorf("proto: DispatchCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3597 } 3598 switch fieldNum { 3599 case 1: 3600 if wireType != 2 { 3601 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 3602 } 3603 var msglen int 3604 for shift := uint(0); ; shift += 7 { 3605 if shift >= 64 { 3606 return protohelpers.ErrIntOverflow 3607 } 3608 if iNdEx >= l { 3609 return io.ErrUnexpectedEOF 3610 } 3611 b := dAtA[iNdEx] 3612 iNdEx++ 3613 msglen |= int(b&0x7F) << shift 3614 if b < 0x80 { 3615 break 3616 } 3617 } 3618 if msglen < 0 { 3619 return protohelpers.ErrInvalidLength 3620 } 3621 postIndex := iNdEx + msglen 3622 if postIndex < 0 { 3623 return protohelpers.ErrInvalidLength 3624 } 3625 if postIndex > l { 3626 return io.ErrUnexpectedEOF 3627 } 3628 if m.Metadata == nil { 3629 m.Metadata = &ResponseMeta{} 3630 } 3631 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3632 return err 3633 } 3634 iNdEx = postIndex 3635 case 2: 3636 if wireType != 2 { 3637 return fmt.Errorf("proto: wrong wireType = %d for field ResultsByResourceId", wireType) 3638 } 3639 var msglen int 3640 for shift := uint(0); ; shift += 7 { 3641 if shift >= 64 { 3642 return protohelpers.ErrIntOverflow 3643 } 3644 if iNdEx >= l { 3645 return io.ErrUnexpectedEOF 3646 } 3647 b := dAtA[iNdEx] 3648 iNdEx++ 3649 msglen |= int(b&0x7F) << shift 3650 if b < 0x80 { 3651 break 3652 } 3653 } 3654 if msglen < 0 { 3655 return protohelpers.ErrInvalidLength 3656 } 3657 postIndex := iNdEx + msglen 3658 if postIndex < 0 { 3659 return protohelpers.ErrInvalidLength 3660 } 3661 if postIndex > l { 3662 return io.ErrUnexpectedEOF 3663 } 3664 if m.ResultsByResourceId == nil { 3665 m.ResultsByResourceId = make(map[string]*ResourceCheckResult) 3666 } 3667 var mapkey string 3668 var mapvalue *ResourceCheckResult 3669 for iNdEx < postIndex { 3670 entryPreIndex := iNdEx 3671 var wire uint64 3672 for shift := uint(0); ; shift += 7 { 3673 if shift >= 64 { 3674 return protohelpers.ErrIntOverflow 3675 } 3676 if iNdEx >= l { 3677 return io.ErrUnexpectedEOF 3678 } 3679 b := dAtA[iNdEx] 3680 iNdEx++ 3681 wire |= uint64(b&0x7F) << shift 3682 if b < 0x80 { 3683 break 3684 } 3685 } 3686 fieldNum := int32(wire >> 3) 3687 if fieldNum == 1 { 3688 var stringLenmapkey uint64 3689 for shift := uint(0); ; shift += 7 { 3690 if shift >= 64 { 3691 return protohelpers.ErrIntOverflow 3692 } 3693 if iNdEx >= l { 3694 return io.ErrUnexpectedEOF 3695 } 3696 b := dAtA[iNdEx] 3697 iNdEx++ 3698 stringLenmapkey |= uint64(b&0x7F) << shift 3699 if b < 0x80 { 3700 break 3701 } 3702 } 3703 intStringLenmapkey := int(stringLenmapkey) 3704 if intStringLenmapkey < 0 { 3705 return protohelpers.ErrInvalidLength 3706 } 3707 postStringIndexmapkey := iNdEx + intStringLenmapkey 3708 if postStringIndexmapkey < 0 { 3709 return protohelpers.ErrInvalidLength 3710 } 3711 if postStringIndexmapkey > l { 3712 return io.ErrUnexpectedEOF 3713 } 3714 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 3715 iNdEx = postStringIndexmapkey 3716 } else if fieldNum == 2 { 3717 var mapmsglen int 3718 for shift := uint(0); ; shift += 7 { 3719 if shift >= 64 { 3720 return protohelpers.ErrIntOverflow 3721 } 3722 if iNdEx >= l { 3723 return io.ErrUnexpectedEOF 3724 } 3725 b := dAtA[iNdEx] 3726 iNdEx++ 3727 mapmsglen |= int(b&0x7F) << shift 3728 if b < 0x80 { 3729 break 3730 } 3731 } 3732 if mapmsglen < 0 { 3733 return protohelpers.ErrInvalidLength 3734 } 3735 postmsgIndex := iNdEx + mapmsglen 3736 if postmsgIndex < 0 { 3737 return protohelpers.ErrInvalidLength 3738 } 3739 if postmsgIndex > l { 3740 return io.ErrUnexpectedEOF 3741 } 3742 mapvalue = &ResourceCheckResult{} 3743 if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { 3744 return err 3745 } 3746 iNdEx = postmsgIndex 3747 } else { 3748 iNdEx = entryPreIndex 3749 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3750 if err != nil { 3751 return err 3752 } 3753 if (skippy < 0) || (iNdEx+skippy) < 0 { 3754 return protohelpers.ErrInvalidLength 3755 } 3756 if (iNdEx + skippy) > postIndex { 3757 return io.ErrUnexpectedEOF 3758 } 3759 iNdEx += skippy 3760 } 3761 } 3762 m.ResultsByResourceId[mapkey] = mapvalue 3763 iNdEx = postIndex 3764 default: 3765 iNdEx = preIndex 3766 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3767 if err != nil { 3768 return err 3769 } 3770 if (skippy < 0) || (iNdEx+skippy) < 0 { 3771 return protohelpers.ErrInvalidLength 3772 } 3773 if (iNdEx + skippy) > l { 3774 return io.ErrUnexpectedEOF 3775 } 3776 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 3777 iNdEx += skippy 3778 } 3779 } 3780 3781 if iNdEx > l { 3782 return io.ErrUnexpectedEOF 3783 } 3784 return nil 3785 } 3786 func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { 3787 l := len(dAtA) 3788 iNdEx := 0 3789 for iNdEx < l { 3790 preIndex := iNdEx 3791 var wire uint64 3792 for shift := uint(0); ; shift += 7 { 3793 if shift >= 64 { 3794 return protohelpers.ErrIntOverflow 3795 } 3796 if iNdEx >= l { 3797 return io.ErrUnexpectedEOF 3798 } 3799 b := dAtA[iNdEx] 3800 iNdEx++ 3801 wire |= uint64(b&0x7F) << shift 3802 if b < 0x80 { 3803 break 3804 } 3805 } 3806 fieldNum := int32(wire >> 3) 3807 wireType := int(wire & 0x7) 3808 if wireType == 4 { 3809 return fmt.Errorf("proto: ResourceCheckResult: wiretype end group for non-group") 3810 } 3811 if fieldNum <= 0 { 3812 return fmt.Errorf("proto: ResourceCheckResult: illegal tag %d (wire type %d)", fieldNum, wire) 3813 } 3814 switch fieldNum { 3815 case 1: 3816 if wireType != 0 { 3817 return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType) 3818 } 3819 m.Membership = 0 3820 for shift := uint(0); ; shift += 7 { 3821 if shift >= 64 { 3822 return protohelpers.ErrIntOverflow 3823 } 3824 if iNdEx >= l { 3825 return io.ErrUnexpectedEOF 3826 } 3827 b := dAtA[iNdEx] 3828 iNdEx++ 3829 m.Membership |= ResourceCheckResult_Membership(b&0x7F) << shift 3830 if b < 0x80 { 3831 break 3832 } 3833 } 3834 case 2: 3835 if wireType != 2 { 3836 return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) 3837 } 3838 var msglen int 3839 for shift := uint(0); ; shift += 7 { 3840 if shift >= 64 { 3841 return protohelpers.ErrIntOverflow 3842 } 3843 if iNdEx >= l { 3844 return io.ErrUnexpectedEOF 3845 } 3846 b := dAtA[iNdEx] 3847 iNdEx++ 3848 msglen |= int(b&0x7F) << shift 3849 if b < 0x80 { 3850 break 3851 } 3852 } 3853 if msglen < 0 { 3854 return protohelpers.ErrInvalidLength 3855 } 3856 postIndex := iNdEx + msglen 3857 if postIndex < 0 { 3858 return protohelpers.ErrInvalidLength 3859 } 3860 if postIndex > l { 3861 return io.ErrUnexpectedEOF 3862 } 3863 if m.Expression == nil { 3864 m.Expression = &v1.CaveatExpression{} 3865 } 3866 if unmarshal, ok := interface{}(m.Expression).(interface { 3867 UnmarshalVT([]byte) error 3868 }); ok { 3869 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3870 return err 3871 } 3872 } else { 3873 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Expression); err != nil { 3874 return err 3875 } 3876 } 3877 iNdEx = postIndex 3878 case 3: 3879 if wireType != 2 { 3880 return fmt.Errorf("proto: wrong wireType = %d for field MissingExprFields", wireType) 3881 } 3882 var stringLen uint64 3883 for shift := uint(0); ; shift += 7 { 3884 if shift >= 64 { 3885 return protohelpers.ErrIntOverflow 3886 } 3887 if iNdEx >= l { 3888 return io.ErrUnexpectedEOF 3889 } 3890 b := dAtA[iNdEx] 3891 iNdEx++ 3892 stringLen |= uint64(b&0x7F) << shift 3893 if b < 0x80 { 3894 break 3895 } 3896 } 3897 intStringLen := int(stringLen) 3898 if intStringLen < 0 { 3899 return protohelpers.ErrInvalidLength 3900 } 3901 postIndex := iNdEx + intStringLen 3902 if postIndex < 0 { 3903 return protohelpers.ErrInvalidLength 3904 } 3905 if postIndex > l { 3906 return io.ErrUnexpectedEOF 3907 } 3908 m.MissingExprFields = append(m.MissingExprFields, string(dAtA[iNdEx:postIndex])) 3909 iNdEx = postIndex 3910 default: 3911 iNdEx = preIndex 3912 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 3913 if err != nil { 3914 return err 3915 } 3916 if (skippy < 0) || (iNdEx+skippy) < 0 { 3917 return protohelpers.ErrInvalidLength 3918 } 3919 if (iNdEx + skippy) > l { 3920 return io.ErrUnexpectedEOF 3921 } 3922 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 3923 iNdEx += skippy 3924 } 3925 } 3926 3927 if iNdEx > l { 3928 return io.ErrUnexpectedEOF 3929 } 3930 return nil 3931 } 3932 func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { 3933 l := len(dAtA) 3934 iNdEx := 0 3935 for iNdEx < l { 3936 preIndex := iNdEx 3937 var wire uint64 3938 for shift := uint(0); ; shift += 7 { 3939 if shift >= 64 { 3940 return protohelpers.ErrIntOverflow 3941 } 3942 if iNdEx >= l { 3943 return io.ErrUnexpectedEOF 3944 } 3945 b := dAtA[iNdEx] 3946 iNdEx++ 3947 wire |= uint64(b&0x7F) << shift 3948 if b < 0x80 { 3949 break 3950 } 3951 } 3952 fieldNum := int32(wire >> 3) 3953 wireType := int(wire & 0x7) 3954 if wireType == 4 { 3955 return fmt.Errorf("proto: DispatchExpandRequest: wiretype end group for non-group") 3956 } 3957 if fieldNum <= 0 { 3958 return fmt.Errorf("proto: DispatchExpandRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3959 } 3960 switch fieldNum { 3961 case 1: 3962 if wireType != 2 { 3963 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 3964 } 3965 var msglen int 3966 for shift := uint(0); ; shift += 7 { 3967 if shift >= 64 { 3968 return protohelpers.ErrIntOverflow 3969 } 3970 if iNdEx >= l { 3971 return io.ErrUnexpectedEOF 3972 } 3973 b := dAtA[iNdEx] 3974 iNdEx++ 3975 msglen |= int(b&0x7F) << shift 3976 if b < 0x80 { 3977 break 3978 } 3979 } 3980 if msglen < 0 { 3981 return protohelpers.ErrInvalidLength 3982 } 3983 postIndex := iNdEx + msglen 3984 if postIndex < 0 { 3985 return protohelpers.ErrInvalidLength 3986 } 3987 if postIndex > l { 3988 return io.ErrUnexpectedEOF 3989 } 3990 if m.Metadata == nil { 3991 m.Metadata = &ResolverMeta{} 3992 } 3993 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 3994 return err 3995 } 3996 iNdEx = postIndex 3997 case 2: 3998 if wireType != 2 { 3999 return fmt.Errorf("proto: wrong wireType = %d for field ResourceAndRelation", wireType) 4000 } 4001 var msglen int 4002 for shift := uint(0); ; shift += 7 { 4003 if shift >= 64 { 4004 return protohelpers.ErrIntOverflow 4005 } 4006 if iNdEx >= l { 4007 return io.ErrUnexpectedEOF 4008 } 4009 b := dAtA[iNdEx] 4010 iNdEx++ 4011 msglen |= int(b&0x7F) << shift 4012 if b < 0x80 { 4013 break 4014 } 4015 } 4016 if msglen < 0 { 4017 return protohelpers.ErrInvalidLength 4018 } 4019 postIndex := iNdEx + msglen 4020 if postIndex < 0 { 4021 return protohelpers.ErrInvalidLength 4022 } 4023 if postIndex > l { 4024 return io.ErrUnexpectedEOF 4025 } 4026 if m.ResourceAndRelation == nil { 4027 m.ResourceAndRelation = &v1.ObjectAndRelation{} 4028 } 4029 if unmarshal, ok := interface{}(m.ResourceAndRelation).(interface { 4030 UnmarshalVT([]byte) error 4031 }); ok { 4032 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4033 return err 4034 } 4035 } else { 4036 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ResourceAndRelation); err != nil { 4037 return err 4038 } 4039 } 4040 iNdEx = postIndex 4041 case 3: 4042 if wireType != 0 { 4043 return fmt.Errorf("proto: wrong wireType = %d for field ExpansionMode", wireType) 4044 } 4045 m.ExpansionMode = 0 4046 for shift := uint(0); ; shift += 7 { 4047 if shift >= 64 { 4048 return protohelpers.ErrIntOverflow 4049 } 4050 if iNdEx >= l { 4051 return io.ErrUnexpectedEOF 4052 } 4053 b := dAtA[iNdEx] 4054 iNdEx++ 4055 m.ExpansionMode |= DispatchExpandRequest_ExpansionMode(b&0x7F) << shift 4056 if b < 0x80 { 4057 break 4058 } 4059 } 4060 default: 4061 iNdEx = preIndex 4062 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4063 if err != nil { 4064 return err 4065 } 4066 if (skippy < 0) || (iNdEx+skippy) < 0 { 4067 return protohelpers.ErrInvalidLength 4068 } 4069 if (iNdEx + skippy) > l { 4070 return io.ErrUnexpectedEOF 4071 } 4072 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4073 iNdEx += skippy 4074 } 4075 } 4076 4077 if iNdEx > l { 4078 return io.ErrUnexpectedEOF 4079 } 4080 return nil 4081 } 4082 func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { 4083 l := len(dAtA) 4084 iNdEx := 0 4085 for iNdEx < l { 4086 preIndex := iNdEx 4087 var wire uint64 4088 for shift := uint(0); ; shift += 7 { 4089 if shift >= 64 { 4090 return protohelpers.ErrIntOverflow 4091 } 4092 if iNdEx >= l { 4093 return io.ErrUnexpectedEOF 4094 } 4095 b := dAtA[iNdEx] 4096 iNdEx++ 4097 wire |= uint64(b&0x7F) << shift 4098 if b < 0x80 { 4099 break 4100 } 4101 } 4102 fieldNum := int32(wire >> 3) 4103 wireType := int(wire & 0x7) 4104 if wireType == 4 { 4105 return fmt.Errorf("proto: DispatchExpandResponse: wiretype end group for non-group") 4106 } 4107 if fieldNum <= 0 { 4108 return fmt.Errorf("proto: DispatchExpandResponse: illegal tag %d (wire type %d)", fieldNum, wire) 4109 } 4110 switch fieldNum { 4111 case 1: 4112 if wireType != 2 { 4113 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 4114 } 4115 var msglen int 4116 for shift := uint(0); ; shift += 7 { 4117 if shift >= 64 { 4118 return protohelpers.ErrIntOverflow 4119 } 4120 if iNdEx >= l { 4121 return io.ErrUnexpectedEOF 4122 } 4123 b := dAtA[iNdEx] 4124 iNdEx++ 4125 msglen |= int(b&0x7F) << shift 4126 if b < 0x80 { 4127 break 4128 } 4129 } 4130 if msglen < 0 { 4131 return protohelpers.ErrInvalidLength 4132 } 4133 postIndex := iNdEx + msglen 4134 if postIndex < 0 { 4135 return protohelpers.ErrInvalidLength 4136 } 4137 if postIndex > l { 4138 return io.ErrUnexpectedEOF 4139 } 4140 if m.Metadata == nil { 4141 m.Metadata = &ResponseMeta{} 4142 } 4143 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4144 return err 4145 } 4146 iNdEx = postIndex 4147 case 2: 4148 if wireType != 2 { 4149 return fmt.Errorf("proto: wrong wireType = %d for field TreeNode", wireType) 4150 } 4151 var msglen int 4152 for shift := uint(0); ; shift += 7 { 4153 if shift >= 64 { 4154 return protohelpers.ErrIntOverflow 4155 } 4156 if iNdEx >= l { 4157 return io.ErrUnexpectedEOF 4158 } 4159 b := dAtA[iNdEx] 4160 iNdEx++ 4161 msglen |= int(b&0x7F) << shift 4162 if b < 0x80 { 4163 break 4164 } 4165 } 4166 if msglen < 0 { 4167 return protohelpers.ErrInvalidLength 4168 } 4169 postIndex := iNdEx + msglen 4170 if postIndex < 0 { 4171 return protohelpers.ErrInvalidLength 4172 } 4173 if postIndex > l { 4174 return io.ErrUnexpectedEOF 4175 } 4176 if m.TreeNode == nil { 4177 m.TreeNode = &v1.RelationTupleTreeNode{} 4178 } 4179 if unmarshal, ok := interface{}(m.TreeNode).(interface { 4180 UnmarshalVT([]byte) error 4181 }); ok { 4182 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4183 return err 4184 } 4185 } else { 4186 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.TreeNode); err != nil { 4187 return err 4188 } 4189 } 4190 iNdEx = postIndex 4191 default: 4192 iNdEx = preIndex 4193 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4194 if err != nil { 4195 return err 4196 } 4197 if (skippy < 0) || (iNdEx+skippy) < 0 { 4198 return protohelpers.ErrInvalidLength 4199 } 4200 if (iNdEx + skippy) > l { 4201 return io.ErrUnexpectedEOF 4202 } 4203 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4204 iNdEx += skippy 4205 } 4206 } 4207 4208 if iNdEx > l { 4209 return io.ErrUnexpectedEOF 4210 } 4211 return nil 4212 } 4213 func (m *Cursor) UnmarshalVT(dAtA []byte) error { 4214 l := len(dAtA) 4215 iNdEx := 0 4216 for iNdEx < l { 4217 preIndex := iNdEx 4218 var wire uint64 4219 for shift := uint(0); ; shift += 7 { 4220 if shift >= 64 { 4221 return protohelpers.ErrIntOverflow 4222 } 4223 if iNdEx >= l { 4224 return io.ErrUnexpectedEOF 4225 } 4226 b := dAtA[iNdEx] 4227 iNdEx++ 4228 wire |= uint64(b&0x7F) << shift 4229 if b < 0x80 { 4230 break 4231 } 4232 } 4233 fieldNum := int32(wire >> 3) 4234 wireType := int(wire & 0x7) 4235 if wireType == 4 { 4236 return fmt.Errorf("proto: Cursor: wiretype end group for non-group") 4237 } 4238 if fieldNum <= 0 { 4239 return fmt.Errorf("proto: Cursor: illegal tag %d (wire type %d)", fieldNum, wire) 4240 } 4241 switch fieldNum { 4242 case 2: 4243 if wireType != 2 { 4244 return fmt.Errorf("proto: wrong wireType = %d for field Sections", wireType) 4245 } 4246 var stringLen uint64 4247 for shift := uint(0); ; shift += 7 { 4248 if shift >= 64 { 4249 return protohelpers.ErrIntOverflow 4250 } 4251 if iNdEx >= l { 4252 return io.ErrUnexpectedEOF 4253 } 4254 b := dAtA[iNdEx] 4255 iNdEx++ 4256 stringLen |= uint64(b&0x7F) << shift 4257 if b < 0x80 { 4258 break 4259 } 4260 } 4261 intStringLen := int(stringLen) 4262 if intStringLen < 0 { 4263 return protohelpers.ErrInvalidLength 4264 } 4265 postIndex := iNdEx + intStringLen 4266 if postIndex < 0 { 4267 return protohelpers.ErrInvalidLength 4268 } 4269 if postIndex > l { 4270 return io.ErrUnexpectedEOF 4271 } 4272 m.Sections = append(m.Sections, string(dAtA[iNdEx:postIndex])) 4273 iNdEx = postIndex 4274 case 3: 4275 if wireType != 0 { 4276 return fmt.Errorf("proto: wrong wireType = %d for field DispatchVersion", wireType) 4277 } 4278 m.DispatchVersion = 0 4279 for shift := uint(0); ; shift += 7 { 4280 if shift >= 64 { 4281 return protohelpers.ErrIntOverflow 4282 } 4283 if iNdEx >= l { 4284 return io.ErrUnexpectedEOF 4285 } 4286 b := dAtA[iNdEx] 4287 iNdEx++ 4288 m.DispatchVersion |= uint32(b&0x7F) << shift 4289 if b < 0x80 { 4290 break 4291 } 4292 } 4293 default: 4294 iNdEx = preIndex 4295 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4296 if err != nil { 4297 return err 4298 } 4299 if (skippy < 0) || (iNdEx+skippy) < 0 { 4300 return protohelpers.ErrInvalidLength 4301 } 4302 if (iNdEx + skippy) > l { 4303 return io.ErrUnexpectedEOF 4304 } 4305 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4306 iNdEx += skippy 4307 } 4308 } 4309 4310 if iNdEx > l { 4311 return io.ErrUnexpectedEOF 4312 } 4313 return nil 4314 } 4315 func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { 4316 l := len(dAtA) 4317 iNdEx := 0 4318 for iNdEx < l { 4319 preIndex := iNdEx 4320 var wire uint64 4321 for shift := uint(0); ; shift += 7 { 4322 if shift >= 64 { 4323 return protohelpers.ErrIntOverflow 4324 } 4325 if iNdEx >= l { 4326 return io.ErrUnexpectedEOF 4327 } 4328 b := dAtA[iNdEx] 4329 iNdEx++ 4330 wire |= uint64(b&0x7F) << shift 4331 if b < 0x80 { 4332 break 4333 } 4334 } 4335 fieldNum := int32(wire >> 3) 4336 wireType := int(wire & 0x7) 4337 if wireType == 4 { 4338 return fmt.Errorf("proto: DispatchReachableResourcesRequest: wiretype end group for non-group") 4339 } 4340 if fieldNum <= 0 { 4341 return fmt.Errorf("proto: DispatchReachableResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4342 } 4343 switch fieldNum { 4344 case 1: 4345 if wireType != 2 { 4346 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 4347 } 4348 var msglen int 4349 for shift := uint(0); ; shift += 7 { 4350 if shift >= 64 { 4351 return protohelpers.ErrIntOverflow 4352 } 4353 if iNdEx >= l { 4354 return io.ErrUnexpectedEOF 4355 } 4356 b := dAtA[iNdEx] 4357 iNdEx++ 4358 msglen |= int(b&0x7F) << shift 4359 if b < 0x80 { 4360 break 4361 } 4362 } 4363 if msglen < 0 { 4364 return protohelpers.ErrInvalidLength 4365 } 4366 postIndex := iNdEx + msglen 4367 if postIndex < 0 { 4368 return protohelpers.ErrInvalidLength 4369 } 4370 if postIndex > l { 4371 return io.ErrUnexpectedEOF 4372 } 4373 if m.Metadata == nil { 4374 m.Metadata = &ResolverMeta{} 4375 } 4376 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4377 return err 4378 } 4379 iNdEx = postIndex 4380 case 2: 4381 if wireType != 2 { 4382 return fmt.Errorf("proto: wrong wireType = %d for field ResourceRelation", wireType) 4383 } 4384 var msglen int 4385 for shift := uint(0); ; shift += 7 { 4386 if shift >= 64 { 4387 return protohelpers.ErrIntOverflow 4388 } 4389 if iNdEx >= l { 4390 return io.ErrUnexpectedEOF 4391 } 4392 b := dAtA[iNdEx] 4393 iNdEx++ 4394 msglen |= int(b&0x7F) << shift 4395 if b < 0x80 { 4396 break 4397 } 4398 } 4399 if msglen < 0 { 4400 return protohelpers.ErrInvalidLength 4401 } 4402 postIndex := iNdEx + msglen 4403 if postIndex < 0 { 4404 return protohelpers.ErrInvalidLength 4405 } 4406 if postIndex > l { 4407 return io.ErrUnexpectedEOF 4408 } 4409 if m.ResourceRelation == nil { 4410 m.ResourceRelation = &v1.RelationReference{} 4411 } 4412 if unmarshal, ok := interface{}(m.ResourceRelation).(interface { 4413 UnmarshalVT([]byte) error 4414 }); ok { 4415 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4416 return err 4417 } 4418 } else { 4419 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ResourceRelation); err != nil { 4420 return err 4421 } 4422 } 4423 iNdEx = postIndex 4424 case 3: 4425 if wireType != 2 { 4426 return fmt.Errorf("proto: wrong wireType = %d for field SubjectRelation", wireType) 4427 } 4428 var msglen int 4429 for shift := uint(0); ; shift += 7 { 4430 if shift >= 64 { 4431 return protohelpers.ErrIntOverflow 4432 } 4433 if iNdEx >= l { 4434 return io.ErrUnexpectedEOF 4435 } 4436 b := dAtA[iNdEx] 4437 iNdEx++ 4438 msglen |= int(b&0x7F) << shift 4439 if b < 0x80 { 4440 break 4441 } 4442 } 4443 if msglen < 0 { 4444 return protohelpers.ErrInvalidLength 4445 } 4446 postIndex := iNdEx + msglen 4447 if postIndex < 0 { 4448 return protohelpers.ErrInvalidLength 4449 } 4450 if postIndex > l { 4451 return io.ErrUnexpectedEOF 4452 } 4453 if m.SubjectRelation == nil { 4454 m.SubjectRelation = &v1.RelationReference{} 4455 } 4456 if unmarshal, ok := interface{}(m.SubjectRelation).(interface { 4457 UnmarshalVT([]byte) error 4458 }); ok { 4459 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4460 return err 4461 } 4462 } else { 4463 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.SubjectRelation); err != nil { 4464 return err 4465 } 4466 } 4467 iNdEx = postIndex 4468 case 4: 4469 if wireType != 2 { 4470 return fmt.Errorf("proto: wrong wireType = %d for field SubjectIds", wireType) 4471 } 4472 var stringLen uint64 4473 for shift := uint(0); ; shift += 7 { 4474 if shift >= 64 { 4475 return protohelpers.ErrIntOverflow 4476 } 4477 if iNdEx >= l { 4478 return io.ErrUnexpectedEOF 4479 } 4480 b := dAtA[iNdEx] 4481 iNdEx++ 4482 stringLen |= uint64(b&0x7F) << shift 4483 if b < 0x80 { 4484 break 4485 } 4486 } 4487 intStringLen := int(stringLen) 4488 if intStringLen < 0 { 4489 return protohelpers.ErrInvalidLength 4490 } 4491 postIndex := iNdEx + intStringLen 4492 if postIndex < 0 { 4493 return protohelpers.ErrInvalidLength 4494 } 4495 if postIndex > l { 4496 return io.ErrUnexpectedEOF 4497 } 4498 m.SubjectIds = append(m.SubjectIds, string(dAtA[iNdEx:postIndex])) 4499 iNdEx = postIndex 4500 case 5: 4501 if wireType != 2 { 4502 return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType) 4503 } 4504 var msglen int 4505 for shift := uint(0); ; shift += 7 { 4506 if shift >= 64 { 4507 return protohelpers.ErrIntOverflow 4508 } 4509 if iNdEx >= l { 4510 return io.ErrUnexpectedEOF 4511 } 4512 b := dAtA[iNdEx] 4513 iNdEx++ 4514 msglen |= int(b&0x7F) << shift 4515 if b < 0x80 { 4516 break 4517 } 4518 } 4519 if msglen < 0 { 4520 return protohelpers.ErrInvalidLength 4521 } 4522 postIndex := iNdEx + msglen 4523 if postIndex < 0 { 4524 return protohelpers.ErrInvalidLength 4525 } 4526 if postIndex > l { 4527 return io.ErrUnexpectedEOF 4528 } 4529 if m.OptionalCursor == nil { 4530 m.OptionalCursor = &Cursor{} 4531 } 4532 if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4533 return err 4534 } 4535 iNdEx = postIndex 4536 case 6: 4537 if wireType != 0 { 4538 return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType) 4539 } 4540 m.OptionalLimit = 0 4541 for shift := uint(0); ; shift += 7 { 4542 if shift >= 64 { 4543 return protohelpers.ErrIntOverflow 4544 } 4545 if iNdEx >= l { 4546 return io.ErrUnexpectedEOF 4547 } 4548 b := dAtA[iNdEx] 4549 iNdEx++ 4550 m.OptionalLimit |= uint32(b&0x7F) << shift 4551 if b < 0x80 { 4552 break 4553 } 4554 } 4555 default: 4556 iNdEx = preIndex 4557 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4558 if err != nil { 4559 return err 4560 } 4561 if (skippy < 0) || (iNdEx+skippy) < 0 { 4562 return protohelpers.ErrInvalidLength 4563 } 4564 if (iNdEx + skippy) > l { 4565 return io.ErrUnexpectedEOF 4566 } 4567 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4568 iNdEx += skippy 4569 } 4570 } 4571 4572 if iNdEx > l { 4573 return io.ErrUnexpectedEOF 4574 } 4575 return nil 4576 } 4577 func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { 4578 l := len(dAtA) 4579 iNdEx := 0 4580 for iNdEx < l { 4581 preIndex := iNdEx 4582 var wire uint64 4583 for shift := uint(0); ; shift += 7 { 4584 if shift >= 64 { 4585 return protohelpers.ErrIntOverflow 4586 } 4587 if iNdEx >= l { 4588 return io.ErrUnexpectedEOF 4589 } 4590 b := dAtA[iNdEx] 4591 iNdEx++ 4592 wire |= uint64(b&0x7F) << shift 4593 if b < 0x80 { 4594 break 4595 } 4596 } 4597 fieldNum := int32(wire >> 3) 4598 wireType := int(wire & 0x7) 4599 if wireType == 4 { 4600 return fmt.Errorf("proto: ReachableResource: wiretype end group for non-group") 4601 } 4602 if fieldNum <= 0 { 4603 return fmt.Errorf("proto: ReachableResource: illegal tag %d (wire type %d)", fieldNum, wire) 4604 } 4605 switch fieldNum { 4606 case 1: 4607 if wireType != 2 { 4608 return fmt.Errorf("proto: wrong wireType = %d for field ResourceId", wireType) 4609 } 4610 var stringLen uint64 4611 for shift := uint(0); ; shift += 7 { 4612 if shift >= 64 { 4613 return protohelpers.ErrIntOverflow 4614 } 4615 if iNdEx >= l { 4616 return io.ErrUnexpectedEOF 4617 } 4618 b := dAtA[iNdEx] 4619 iNdEx++ 4620 stringLen |= uint64(b&0x7F) << shift 4621 if b < 0x80 { 4622 break 4623 } 4624 } 4625 intStringLen := int(stringLen) 4626 if intStringLen < 0 { 4627 return protohelpers.ErrInvalidLength 4628 } 4629 postIndex := iNdEx + intStringLen 4630 if postIndex < 0 { 4631 return protohelpers.ErrInvalidLength 4632 } 4633 if postIndex > l { 4634 return io.ErrUnexpectedEOF 4635 } 4636 m.ResourceId = string(dAtA[iNdEx:postIndex]) 4637 iNdEx = postIndex 4638 case 2: 4639 if wireType != 0 { 4640 return fmt.Errorf("proto: wrong wireType = %d for field ResultStatus", wireType) 4641 } 4642 m.ResultStatus = 0 4643 for shift := uint(0); ; shift += 7 { 4644 if shift >= 64 { 4645 return protohelpers.ErrIntOverflow 4646 } 4647 if iNdEx >= l { 4648 return io.ErrUnexpectedEOF 4649 } 4650 b := dAtA[iNdEx] 4651 iNdEx++ 4652 m.ResultStatus |= ReachableResource_ResultStatus(b&0x7F) << shift 4653 if b < 0x80 { 4654 break 4655 } 4656 } 4657 case 3: 4658 if wireType != 2 { 4659 return fmt.Errorf("proto: wrong wireType = %d for field ForSubjectIds", wireType) 4660 } 4661 var stringLen uint64 4662 for shift := uint(0); ; shift += 7 { 4663 if shift >= 64 { 4664 return protohelpers.ErrIntOverflow 4665 } 4666 if iNdEx >= l { 4667 return io.ErrUnexpectedEOF 4668 } 4669 b := dAtA[iNdEx] 4670 iNdEx++ 4671 stringLen |= uint64(b&0x7F) << shift 4672 if b < 0x80 { 4673 break 4674 } 4675 } 4676 intStringLen := int(stringLen) 4677 if intStringLen < 0 { 4678 return protohelpers.ErrInvalidLength 4679 } 4680 postIndex := iNdEx + intStringLen 4681 if postIndex < 0 { 4682 return protohelpers.ErrInvalidLength 4683 } 4684 if postIndex > l { 4685 return io.ErrUnexpectedEOF 4686 } 4687 m.ForSubjectIds = append(m.ForSubjectIds, string(dAtA[iNdEx:postIndex])) 4688 iNdEx = postIndex 4689 default: 4690 iNdEx = preIndex 4691 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4692 if err != nil { 4693 return err 4694 } 4695 if (skippy < 0) || (iNdEx+skippy) < 0 { 4696 return protohelpers.ErrInvalidLength 4697 } 4698 if (iNdEx + skippy) > l { 4699 return io.ErrUnexpectedEOF 4700 } 4701 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4702 iNdEx += skippy 4703 } 4704 } 4705 4706 if iNdEx > l { 4707 return io.ErrUnexpectedEOF 4708 } 4709 return nil 4710 } 4711 func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { 4712 l := len(dAtA) 4713 iNdEx := 0 4714 for iNdEx < l { 4715 preIndex := iNdEx 4716 var wire uint64 4717 for shift := uint(0); ; shift += 7 { 4718 if shift >= 64 { 4719 return protohelpers.ErrIntOverflow 4720 } 4721 if iNdEx >= l { 4722 return io.ErrUnexpectedEOF 4723 } 4724 b := dAtA[iNdEx] 4725 iNdEx++ 4726 wire |= uint64(b&0x7F) << shift 4727 if b < 0x80 { 4728 break 4729 } 4730 } 4731 fieldNum := int32(wire >> 3) 4732 wireType := int(wire & 0x7) 4733 if wireType == 4 { 4734 return fmt.Errorf("proto: DispatchReachableResourcesResponse: wiretype end group for non-group") 4735 } 4736 if fieldNum <= 0 { 4737 return fmt.Errorf("proto: DispatchReachableResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) 4738 } 4739 switch fieldNum { 4740 case 1: 4741 if wireType != 2 { 4742 return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) 4743 } 4744 var msglen int 4745 for shift := uint(0); ; shift += 7 { 4746 if shift >= 64 { 4747 return protohelpers.ErrIntOverflow 4748 } 4749 if iNdEx >= l { 4750 return io.ErrUnexpectedEOF 4751 } 4752 b := dAtA[iNdEx] 4753 iNdEx++ 4754 msglen |= int(b&0x7F) << shift 4755 if b < 0x80 { 4756 break 4757 } 4758 } 4759 if msglen < 0 { 4760 return protohelpers.ErrInvalidLength 4761 } 4762 postIndex := iNdEx + msglen 4763 if postIndex < 0 { 4764 return protohelpers.ErrInvalidLength 4765 } 4766 if postIndex > l { 4767 return io.ErrUnexpectedEOF 4768 } 4769 if m.Resource == nil { 4770 m.Resource = &ReachableResource{} 4771 } 4772 if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4773 return err 4774 } 4775 iNdEx = postIndex 4776 case 2: 4777 if wireType != 2 { 4778 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 4779 } 4780 var msglen int 4781 for shift := uint(0); ; shift += 7 { 4782 if shift >= 64 { 4783 return protohelpers.ErrIntOverflow 4784 } 4785 if iNdEx >= l { 4786 return io.ErrUnexpectedEOF 4787 } 4788 b := dAtA[iNdEx] 4789 iNdEx++ 4790 msglen |= int(b&0x7F) << shift 4791 if b < 0x80 { 4792 break 4793 } 4794 } 4795 if msglen < 0 { 4796 return protohelpers.ErrInvalidLength 4797 } 4798 postIndex := iNdEx + msglen 4799 if postIndex < 0 { 4800 return protohelpers.ErrInvalidLength 4801 } 4802 if postIndex > l { 4803 return io.ErrUnexpectedEOF 4804 } 4805 if m.Metadata == nil { 4806 m.Metadata = &ResponseMeta{} 4807 } 4808 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4809 return err 4810 } 4811 iNdEx = postIndex 4812 case 3: 4813 if wireType != 2 { 4814 return fmt.Errorf("proto: wrong wireType = %d for field AfterResponseCursor", wireType) 4815 } 4816 var msglen int 4817 for shift := uint(0); ; shift += 7 { 4818 if shift >= 64 { 4819 return protohelpers.ErrIntOverflow 4820 } 4821 if iNdEx >= l { 4822 return io.ErrUnexpectedEOF 4823 } 4824 b := dAtA[iNdEx] 4825 iNdEx++ 4826 msglen |= int(b&0x7F) << shift 4827 if b < 0x80 { 4828 break 4829 } 4830 } 4831 if msglen < 0 { 4832 return protohelpers.ErrInvalidLength 4833 } 4834 postIndex := iNdEx + msglen 4835 if postIndex < 0 { 4836 return protohelpers.ErrInvalidLength 4837 } 4838 if postIndex > l { 4839 return io.ErrUnexpectedEOF 4840 } 4841 if m.AfterResponseCursor == nil { 4842 m.AfterResponseCursor = &Cursor{} 4843 } 4844 if err := m.AfterResponseCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4845 return err 4846 } 4847 iNdEx = postIndex 4848 default: 4849 iNdEx = preIndex 4850 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 4851 if err != nil { 4852 return err 4853 } 4854 if (skippy < 0) || (iNdEx+skippy) < 0 { 4855 return protohelpers.ErrInvalidLength 4856 } 4857 if (iNdEx + skippy) > l { 4858 return io.ErrUnexpectedEOF 4859 } 4860 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 4861 iNdEx += skippy 4862 } 4863 } 4864 4865 if iNdEx > l { 4866 return io.ErrUnexpectedEOF 4867 } 4868 return nil 4869 } 4870 func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { 4871 l := len(dAtA) 4872 iNdEx := 0 4873 for iNdEx < l { 4874 preIndex := iNdEx 4875 var wire uint64 4876 for shift := uint(0); ; shift += 7 { 4877 if shift >= 64 { 4878 return protohelpers.ErrIntOverflow 4879 } 4880 if iNdEx >= l { 4881 return io.ErrUnexpectedEOF 4882 } 4883 b := dAtA[iNdEx] 4884 iNdEx++ 4885 wire |= uint64(b&0x7F) << shift 4886 if b < 0x80 { 4887 break 4888 } 4889 } 4890 fieldNum := int32(wire >> 3) 4891 wireType := int(wire & 0x7) 4892 if wireType == 4 { 4893 return fmt.Errorf("proto: DispatchLookupResourcesRequest: wiretype end group for non-group") 4894 } 4895 if fieldNum <= 0 { 4896 return fmt.Errorf("proto: DispatchLookupResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4897 } 4898 switch fieldNum { 4899 case 1: 4900 if wireType != 2 { 4901 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 4902 } 4903 var msglen int 4904 for shift := uint(0); ; shift += 7 { 4905 if shift >= 64 { 4906 return protohelpers.ErrIntOverflow 4907 } 4908 if iNdEx >= l { 4909 return io.ErrUnexpectedEOF 4910 } 4911 b := dAtA[iNdEx] 4912 iNdEx++ 4913 msglen |= int(b&0x7F) << shift 4914 if b < 0x80 { 4915 break 4916 } 4917 } 4918 if msglen < 0 { 4919 return protohelpers.ErrInvalidLength 4920 } 4921 postIndex := iNdEx + msglen 4922 if postIndex < 0 { 4923 return protohelpers.ErrInvalidLength 4924 } 4925 if postIndex > l { 4926 return io.ErrUnexpectedEOF 4927 } 4928 if m.Metadata == nil { 4929 m.Metadata = &ResolverMeta{} 4930 } 4931 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4932 return err 4933 } 4934 iNdEx = postIndex 4935 case 2: 4936 if wireType != 2 { 4937 return fmt.Errorf("proto: wrong wireType = %d for field ObjectRelation", wireType) 4938 } 4939 var msglen int 4940 for shift := uint(0); ; shift += 7 { 4941 if shift >= 64 { 4942 return protohelpers.ErrIntOverflow 4943 } 4944 if iNdEx >= l { 4945 return io.ErrUnexpectedEOF 4946 } 4947 b := dAtA[iNdEx] 4948 iNdEx++ 4949 msglen |= int(b&0x7F) << shift 4950 if b < 0x80 { 4951 break 4952 } 4953 } 4954 if msglen < 0 { 4955 return protohelpers.ErrInvalidLength 4956 } 4957 postIndex := iNdEx + msglen 4958 if postIndex < 0 { 4959 return protohelpers.ErrInvalidLength 4960 } 4961 if postIndex > l { 4962 return io.ErrUnexpectedEOF 4963 } 4964 if m.ObjectRelation == nil { 4965 m.ObjectRelation = &v1.RelationReference{} 4966 } 4967 if unmarshal, ok := interface{}(m.ObjectRelation).(interface { 4968 UnmarshalVT([]byte) error 4969 }); ok { 4970 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 4971 return err 4972 } 4973 } else { 4974 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ObjectRelation); err != nil { 4975 return err 4976 } 4977 } 4978 iNdEx = postIndex 4979 case 3: 4980 if wireType != 2 { 4981 return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) 4982 } 4983 var msglen int 4984 for shift := uint(0); ; shift += 7 { 4985 if shift >= 64 { 4986 return protohelpers.ErrIntOverflow 4987 } 4988 if iNdEx >= l { 4989 return io.ErrUnexpectedEOF 4990 } 4991 b := dAtA[iNdEx] 4992 iNdEx++ 4993 msglen |= int(b&0x7F) << shift 4994 if b < 0x80 { 4995 break 4996 } 4997 } 4998 if msglen < 0 { 4999 return protohelpers.ErrInvalidLength 5000 } 5001 postIndex := iNdEx + msglen 5002 if postIndex < 0 { 5003 return protohelpers.ErrInvalidLength 5004 } 5005 if postIndex > l { 5006 return io.ErrUnexpectedEOF 5007 } 5008 if m.Subject == nil { 5009 m.Subject = &v1.ObjectAndRelation{} 5010 } 5011 if unmarshal, ok := interface{}(m.Subject).(interface { 5012 UnmarshalVT([]byte) error 5013 }); ok { 5014 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5015 return err 5016 } 5017 } else { 5018 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Subject); err != nil { 5019 return err 5020 } 5021 } 5022 iNdEx = postIndex 5023 case 4: 5024 if wireType != 0 { 5025 return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType) 5026 } 5027 m.OptionalLimit = 0 5028 for shift := uint(0); ; shift += 7 { 5029 if shift >= 64 { 5030 return protohelpers.ErrIntOverflow 5031 } 5032 if iNdEx >= l { 5033 return io.ErrUnexpectedEOF 5034 } 5035 b := dAtA[iNdEx] 5036 iNdEx++ 5037 m.OptionalLimit |= uint32(b&0x7F) << shift 5038 if b < 0x80 { 5039 break 5040 } 5041 } 5042 case 5: 5043 if wireType != 2 { 5044 return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) 5045 } 5046 var msglen int 5047 for shift := uint(0); ; shift += 7 { 5048 if shift >= 64 { 5049 return protohelpers.ErrIntOverflow 5050 } 5051 if iNdEx >= l { 5052 return io.ErrUnexpectedEOF 5053 } 5054 b := dAtA[iNdEx] 5055 iNdEx++ 5056 msglen |= int(b&0x7F) << shift 5057 if b < 0x80 { 5058 break 5059 } 5060 } 5061 if msglen < 0 { 5062 return protohelpers.ErrInvalidLength 5063 } 5064 postIndex := iNdEx + msglen 5065 if postIndex < 0 { 5066 return protohelpers.ErrInvalidLength 5067 } 5068 if postIndex > l { 5069 return io.ErrUnexpectedEOF 5070 } 5071 if m.Context == nil { 5072 m.Context = &structpb.Struct{} 5073 } 5074 if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5075 return err 5076 } 5077 iNdEx = postIndex 5078 case 6: 5079 if wireType != 2 { 5080 return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType) 5081 } 5082 var msglen int 5083 for shift := uint(0); ; shift += 7 { 5084 if shift >= 64 { 5085 return protohelpers.ErrIntOverflow 5086 } 5087 if iNdEx >= l { 5088 return io.ErrUnexpectedEOF 5089 } 5090 b := dAtA[iNdEx] 5091 iNdEx++ 5092 msglen |= int(b&0x7F) << shift 5093 if b < 0x80 { 5094 break 5095 } 5096 } 5097 if msglen < 0 { 5098 return protohelpers.ErrInvalidLength 5099 } 5100 postIndex := iNdEx + msglen 5101 if postIndex < 0 { 5102 return protohelpers.ErrInvalidLength 5103 } 5104 if postIndex > l { 5105 return io.ErrUnexpectedEOF 5106 } 5107 if m.OptionalCursor == nil { 5108 m.OptionalCursor = &Cursor{} 5109 } 5110 if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5111 return err 5112 } 5113 iNdEx = postIndex 5114 default: 5115 iNdEx = preIndex 5116 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5117 if err != nil { 5118 return err 5119 } 5120 if (skippy < 0) || (iNdEx+skippy) < 0 { 5121 return protohelpers.ErrInvalidLength 5122 } 5123 if (iNdEx + skippy) > l { 5124 return io.ErrUnexpectedEOF 5125 } 5126 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5127 iNdEx += skippy 5128 } 5129 } 5130 5131 if iNdEx > l { 5132 return io.ErrUnexpectedEOF 5133 } 5134 return nil 5135 } 5136 func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { 5137 l := len(dAtA) 5138 iNdEx := 0 5139 for iNdEx < l { 5140 preIndex := iNdEx 5141 var wire uint64 5142 for shift := uint(0); ; shift += 7 { 5143 if shift >= 64 { 5144 return protohelpers.ErrIntOverflow 5145 } 5146 if iNdEx >= l { 5147 return io.ErrUnexpectedEOF 5148 } 5149 b := dAtA[iNdEx] 5150 iNdEx++ 5151 wire |= uint64(b&0x7F) << shift 5152 if b < 0x80 { 5153 break 5154 } 5155 } 5156 fieldNum := int32(wire >> 3) 5157 wireType := int(wire & 0x7) 5158 if wireType == 4 { 5159 return fmt.Errorf("proto: ResolvedResource: wiretype end group for non-group") 5160 } 5161 if fieldNum <= 0 { 5162 return fmt.Errorf("proto: ResolvedResource: illegal tag %d (wire type %d)", fieldNum, wire) 5163 } 5164 switch fieldNum { 5165 case 1: 5166 if wireType != 2 { 5167 return fmt.Errorf("proto: wrong wireType = %d for field ResourceId", wireType) 5168 } 5169 var stringLen uint64 5170 for shift := uint(0); ; shift += 7 { 5171 if shift >= 64 { 5172 return protohelpers.ErrIntOverflow 5173 } 5174 if iNdEx >= l { 5175 return io.ErrUnexpectedEOF 5176 } 5177 b := dAtA[iNdEx] 5178 iNdEx++ 5179 stringLen |= uint64(b&0x7F) << shift 5180 if b < 0x80 { 5181 break 5182 } 5183 } 5184 intStringLen := int(stringLen) 5185 if intStringLen < 0 { 5186 return protohelpers.ErrInvalidLength 5187 } 5188 postIndex := iNdEx + intStringLen 5189 if postIndex < 0 { 5190 return protohelpers.ErrInvalidLength 5191 } 5192 if postIndex > l { 5193 return io.ErrUnexpectedEOF 5194 } 5195 m.ResourceId = string(dAtA[iNdEx:postIndex]) 5196 iNdEx = postIndex 5197 case 2: 5198 if wireType != 0 { 5199 return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType) 5200 } 5201 m.Permissionship = 0 5202 for shift := uint(0); ; shift += 7 { 5203 if shift >= 64 { 5204 return protohelpers.ErrIntOverflow 5205 } 5206 if iNdEx >= l { 5207 return io.ErrUnexpectedEOF 5208 } 5209 b := dAtA[iNdEx] 5210 iNdEx++ 5211 m.Permissionship |= ResolvedResource_Permissionship(b&0x7F) << shift 5212 if b < 0x80 { 5213 break 5214 } 5215 } 5216 case 3: 5217 if wireType != 2 { 5218 return fmt.Errorf("proto: wrong wireType = %d for field MissingRequiredContext", wireType) 5219 } 5220 var stringLen uint64 5221 for shift := uint(0); ; shift += 7 { 5222 if shift >= 64 { 5223 return protohelpers.ErrIntOverflow 5224 } 5225 if iNdEx >= l { 5226 return io.ErrUnexpectedEOF 5227 } 5228 b := dAtA[iNdEx] 5229 iNdEx++ 5230 stringLen |= uint64(b&0x7F) << shift 5231 if b < 0x80 { 5232 break 5233 } 5234 } 5235 intStringLen := int(stringLen) 5236 if intStringLen < 0 { 5237 return protohelpers.ErrInvalidLength 5238 } 5239 postIndex := iNdEx + intStringLen 5240 if postIndex < 0 { 5241 return protohelpers.ErrInvalidLength 5242 } 5243 if postIndex > l { 5244 return io.ErrUnexpectedEOF 5245 } 5246 m.MissingRequiredContext = append(m.MissingRequiredContext, string(dAtA[iNdEx:postIndex])) 5247 iNdEx = postIndex 5248 default: 5249 iNdEx = preIndex 5250 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5251 if err != nil { 5252 return err 5253 } 5254 if (skippy < 0) || (iNdEx+skippy) < 0 { 5255 return protohelpers.ErrInvalidLength 5256 } 5257 if (iNdEx + skippy) > l { 5258 return io.ErrUnexpectedEOF 5259 } 5260 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5261 iNdEx += skippy 5262 } 5263 } 5264 5265 if iNdEx > l { 5266 return io.ErrUnexpectedEOF 5267 } 5268 return nil 5269 } 5270 func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { 5271 l := len(dAtA) 5272 iNdEx := 0 5273 for iNdEx < l { 5274 preIndex := iNdEx 5275 var wire uint64 5276 for shift := uint(0); ; shift += 7 { 5277 if shift >= 64 { 5278 return protohelpers.ErrIntOverflow 5279 } 5280 if iNdEx >= l { 5281 return io.ErrUnexpectedEOF 5282 } 5283 b := dAtA[iNdEx] 5284 iNdEx++ 5285 wire |= uint64(b&0x7F) << shift 5286 if b < 0x80 { 5287 break 5288 } 5289 } 5290 fieldNum := int32(wire >> 3) 5291 wireType := int(wire & 0x7) 5292 if wireType == 4 { 5293 return fmt.Errorf("proto: DispatchLookupResourcesResponse: wiretype end group for non-group") 5294 } 5295 if fieldNum <= 0 { 5296 return fmt.Errorf("proto: DispatchLookupResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5297 } 5298 switch fieldNum { 5299 case 1: 5300 if wireType != 2 { 5301 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 5302 } 5303 var msglen int 5304 for shift := uint(0); ; shift += 7 { 5305 if shift >= 64 { 5306 return protohelpers.ErrIntOverflow 5307 } 5308 if iNdEx >= l { 5309 return io.ErrUnexpectedEOF 5310 } 5311 b := dAtA[iNdEx] 5312 iNdEx++ 5313 msglen |= int(b&0x7F) << shift 5314 if b < 0x80 { 5315 break 5316 } 5317 } 5318 if msglen < 0 { 5319 return protohelpers.ErrInvalidLength 5320 } 5321 postIndex := iNdEx + msglen 5322 if postIndex < 0 { 5323 return protohelpers.ErrInvalidLength 5324 } 5325 if postIndex > l { 5326 return io.ErrUnexpectedEOF 5327 } 5328 if m.Metadata == nil { 5329 m.Metadata = &ResponseMeta{} 5330 } 5331 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5332 return err 5333 } 5334 iNdEx = postIndex 5335 case 2: 5336 if wireType != 2 { 5337 return fmt.Errorf("proto: wrong wireType = %d for field ResolvedResource", wireType) 5338 } 5339 var msglen int 5340 for shift := uint(0); ; shift += 7 { 5341 if shift >= 64 { 5342 return protohelpers.ErrIntOverflow 5343 } 5344 if iNdEx >= l { 5345 return io.ErrUnexpectedEOF 5346 } 5347 b := dAtA[iNdEx] 5348 iNdEx++ 5349 msglen |= int(b&0x7F) << shift 5350 if b < 0x80 { 5351 break 5352 } 5353 } 5354 if msglen < 0 { 5355 return protohelpers.ErrInvalidLength 5356 } 5357 postIndex := iNdEx + msglen 5358 if postIndex < 0 { 5359 return protohelpers.ErrInvalidLength 5360 } 5361 if postIndex > l { 5362 return io.ErrUnexpectedEOF 5363 } 5364 if m.ResolvedResource == nil { 5365 m.ResolvedResource = &ResolvedResource{} 5366 } 5367 if err := m.ResolvedResource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5368 return err 5369 } 5370 iNdEx = postIndex 5371 case 3: 5372 if wireType != 2 { 5373 return fmt.Errorf("proto: wrong wireType = %d for field AfterResponseCursor", wireType) 5374 } 5375 var msglen int 5376 for shift := uint(0); ; shift += 7 { 5377 if shift >= 64 { 5378 return protohelpers.ErrIntOverflow 5379 } 5380 if iNdEx >= l { 5381 return io.ErrUnexpectedEOF 5382 } 5383 b := dAtA[iNdEx] 5384 iNdEx++ 5385 msglen |= int(b&0x7F) << shift 5386 if b < 0x80 { 5387 break 5388 } 5389 } 5390 if msglen < 0 { 5391 return protohelpers.ErrInvalidLength 5392 } 5393 postIndex := iNdEx + msglen 5394 if postIndex < 0 { 5395 return protohelpers.ErrInvalidLength 5396 } 5397 if postIndex > l { 5398 return io.ErrUnexpectedEOF 5399 } 5400 if m.AfterResponseCursor == nil { 5401 m.AfterResponseCursor = &Cursor{} 5402 } 5403 if err := m.AfterResponseCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5404 return err 5405 } 5406 iNdEx = postIndex 5407 default: 5408 iNdEx = preIndex 5409 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5410 if err != nil { 5411 return err 5412 } 5413 if (skippy < 0) || (iNdEx+skippy) < 0 { 5414 return protohelpers.ErrInvalidLength 5415 } 5416 if (iNdEx + skippy) > l { 5417 return io.ErrUnexpectedEOF 5418 } 5419 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5420 iNdEx += skippy 5421 } 5422 } 5423 5424 if iNdEx > l { 5425 return io.ErrUnexpectedEOF 5426 } 5427 return nil 5428 } 5429 func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { 5430 l := len(dAtA) 5431 iNdEx := 0 5432 for iNdEx < l { 5433 preIndex := iNdEx 5434 var wire uint64 5435 for shift := uint(0); ; shift += 7 { 5436 if shift >= 64 { 5437 return protohelpers.ErrIntOverflow 5438 } 5439 if iNdEx >= l { 5440 return io.ErrUnexpectedEOF 5441 } 5442 b := dAtA[iNdEx] 5443 iNdEx++ 5444 wire |= uint64(b&0x7F) << shift 5445 if b < 0x80 { 5446 break 5447 } 5448 } 5449 fieldNum := int32(wire >> 3) 5450 wireType := int(wire & 0x7) 5451 if wireType == 4 { 5452 return fmt.Errorf("proto: DispatchLookupSubjectsRequest: wiretype end group for non-group") 5453 } 5454 if fieldNum <= 0 { 5455 return fmt.Errorf("proto: DispatchLookupSubjectsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 5456 } 5457 switch fieldNum { 5458 case 1: 5459 if wireType != 2 { 5460 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 5461 } 5462 var msglen int 5463 for shift := uint(0); ; shift += 7 { 5464 if shift >= 64 { 5465 return protohelpers.ErrIntOverflow 5466 } 5467 if iNdEx >= l { 5468 return io.ErrUnexpectedEOF 5469 } 5470 b := dAtA[iNdEx] 5471 iNdEx++ 5472 msglen |= int(b&0x7F) << shift 5473 if b < 0x80 { 5474 break 5475 } 5476 } 5477 if msglen < 0 { 5478 return protohelpers.ErrInvalidLength 5479 } 5480 postIndex := iNdEx + msglen 5481 if postIndex < 0 { 5482 return protohelpers.ErrInvalidLength 5483 } 5484 if postIndex > l { 5485 return io.ErrUnexpectedEOF 5486 } 5487 if m.Metadata == nil { 5488 m.Metadata = &ResolverMeta{} 5489 } 5490 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5491 return err 5492 } 5493 iNdEx = postIndex 5494 case 2: 5495 if wireType != 2 { 5496 return fmt.Errorf("proto: wrong wireType = %d for field ResourceRelation", wireType) 5497 } 5498 var msglen int 5499 for shift := uint(0); ; shift += 7 { 5500 if shift >= 64 { 5501 return protohelpers.ErrIntOverflow 5502 } 5503 if iNdEx >= l { 5504 return io.ErrUnexpectedEOF 5505 } 5506 b := dAtA[iNdEx] 5507 iNdEx++ 5508 msglen |= int(b&0x7F) << shift 5509 if b < 0x80 { 5510 break 5511 } 5512 } 5513 if msglen < 0 { 5514 return protohelpers.ErrInvalidLength 5515 } 5516 postIndex := iNdEx + msglen 5517 if postIndex < 0 { 5518 return protohelpers.ErrInvalidLength 5519 } 5520 if postIndex > l { 5521 return io.ErrUnexpectedEOF 5522 } 5523 if m.ResourceRelation == nil { 5524 m.ResourceRelation = &v1.RelationReference{} 5525 } 5526 if unmarshal, ok := interface{}(m.ResourceRelation).(interface { 5527 UnmarshalVT([]byte) error 5528 }); ok { 5529 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5530 return err 5531 } 5532 } else { 5533 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ResourceRelation); err != nil { 5534 return err 5535 } 5536 } 5537 iNdEx = postIndex 5538 case 3: 5539 if wireType != 2 { 5540 return fmt.Errorf("proto: wrong wireType = %d for field ResourceIds", wireType) 5541 } 5542 var stringLen uint64 5543 for shift := uint(0); ; shift += 7 { 5544 if shift >= 64 { 5545 return protohelpers.ErrIntOverflow 5546 } 5547 if iNdEx >= l { 5548 return io.ErrUnexpectedEOF 5549 } 5550 b := dAtA[iNdEx] 5551 iNdEx++ 5552 stringLen |= uint64(b&0x7F) << shift 5553 if b < 0x80 { 5554 break 5555 } 5556 } 5557 intStringLen := int(stringLen) 5558 if intStringLen < 0 { 5559 return protohelpers.ErrInvalidLength 5560 } 5561 postIndex := iNdEx + intStringLen 5562 if postIndex < 0 { 5563 return protohelpers.ErrInvalidLength 5564 } 5565 if postIndex > l { 5566 return io.ErrUnexpectedEOF 5567 } 5568 m.ResourceIds = append(m.ResourceIds, string(dAtA[iNdEx:postIndex])) 5569 iNdEx = postIndex 5570 case 4: 5571 if wireType != 2 { 5572 return fmt.Errorf("proto: wrong wireType = %d for field SubjectRelation", wireType) 5573 } 5574 var msglen int 5575 for shift := uint(0); ; shift += 7 { 5576 if shift >= 64 { 5577 return protohelpers.ErrIntOverflow 5578 } 5579 if iNdEx >= l { 5580 return io.ErrUnexpectedEOF 5581 } 5582 b := dAtA[iNdEx] 5583 iNdEx++ 5584 msglen |= int(b&0x7F) << shift 5585 if b < 0x80 { 5586 break 5587 } 5588 } 5589 if msglen < 0 { 5590 return protohelpers.ErrInvalidLength 5591 } 5592 postIndex := iNdEx + msglen 5593 if postIndex < 0 { 5594 return protohelpers.ErrInvalidLength 5595 } 5596 if postIndex > l { 5597 return io.ErrUnexpectedEOF 5598 } 5599 if m.SubjectRelation == nil { 5600 m.SubjectRelation = &v1.RelationReference{} 5601 } 5602 if unmarshal, ok := interface{}(m.SubjectRelation).(interface { 5603 UnmarshalVT([]byte) error 5604 }); ok { 5605 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5606 return err 5607 } 5608 } else { 5609 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.SubjectRelation); err != nil { 5610 return err 5611 } 5612 } 5613 iNdEx = postIndex 5614 case 5: 5615 if wireType != 0 { 5616 return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType) 5617 } 5618 m.OptionalLimit = 0 5619 for shift := uint(0); ; shift += 7 { 5620 if shift >= 64 { 5621 return protohelpers.ErrIntOverflow 5622 } 5623 if iNdEx >= l { 5624 return io.ErrUnexpectedEOF 5625 } 5626 b := dAtA[iNdEx] 5627 iNdEx++ 5628 m.OptionalLimit |= uint32(b&0x7F) << shift 5629 if b < 0x80 { 5630 break 5631 } 5632 } 5633 case 6: 5634 if wireType != 2 { 5635 return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType) 5636 } 5637 var msglen int 5638 for shift := uint(0); ; shift += 7 { 5639 if shift >= 64 { 5640 return protohelpers.ErrIntOverflow 5641 } 5642 if iNdEx >= l { 5643 return io.ErrUnexpectedEOF 5644 } 5645 b := dAtA[iNdEx] 5646 iNdEx++ 5647 msglen |= int(b&0x7F) << shift 5648 if b < 0x80 { 5649 break 5650 } 5651 } 5652 if msglen < 0 { 5653 return protohelpers.ErrInvalidLength 5654 } 5655 postIndex := iNdEx + msglen 5656 if postIndex < 0 { 5657 return protohelpers.ErrInvalidLength 5658 } 5659 if postIndex > l { 5660 return io.ErrUnexpectedEOF 5661 } 5662 if m.OptionalCursor == nil { 5663 m.OptionalCursor = &Cursor{} 5664 } 5665 if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5666 return err 5667 } 5668 iNdEx = postIndex 5669 default: 5670 iNdEx = preIndex 5671 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5672 if err != nil { 5673 return err 5674 } 5675 if (skippy < 0) || (iNdEx+skippy) < 0 { 5676 return protohelpers.ErrInvalidLength 5677 } 5678 if (iNdEx + skippy) > l { 5679 return io.ErrUnexpectedEOF 5680 } 5681 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5682 iNdEx += skippy 5683 } 5684 } 5685 5686 if iNdEx > l { 5687 return io.ErrUnexpectedEOF 5688 } 5689 return nil 5690 } 5691 func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { 5692 l := len(dAtA) 5693 iNdEx := 0 5694 for iNdEx < l { 5695 preIndex := iNdEx 5696 var wire uint64 5697 for shift := uint(0); ; shift += 7 { 5698 if shift >= 64 { 5699 return protohelpers.ErrIntOverflow 5700 } 5701 if iNdEx >= l { 5702 return io.ErrUnexpectedEOF 5703 } 5704 b := dAtA[iNdEx] 5705 iNdEx++ 5706 wire |= uint64(b&0x7F) << shift 5707 if b < 0x80 { 5708 break 5709 } 5710 } 5711 fieldNum := int32(wire >> 3) 5712 wireType := int(wire & 0x7) 5713 if wireType == 4 { 5714 return fmt.Errorf("proto: FoundSubject: wiretype end group for non-group") 5715 } 5716 if fieldNum <= 0 { 5717 return fmt.Errorf("proto: FoundSubject: illegal tag %d (wire type %d)", fieldNum, wire) 5718 } 5719 switch fieldNum { 5720 case 1: 5721 if wireType != 2 { 5722 return fmt.Errorf("proto: wrong wireType = %d for field SubjectId", wireType) 5723 } 5724 var stringLen uint64 5725 for shift := uint(0); ; shift += 7 { 5726 if shift >= 64 { 5727 return protohelpers.ErrIntOverflow 5728 } 5729 if iNdEx >= l { 5730 return io.ErrUnexpectedEOF 5731 } 5732 b := dAtA[iNdEx] 5733 iNdEx++ 5734 stringLen |= uint64(b&0x7F) << shift 5735 if b < 0x80 { 5736 break 5737 } 5738 } 5739 intStringLen := int(stringLen) 5740 if intStringLen < 0 { 5741 return protohelpers.ErrInvalidLength 5742 } 5743 postIndex := iNdEx + intStringLen 5744 if postIndex < 0 { 5745 return protohelpers.ErrInvalidLength 5746 } 5747 if postIndex > l { 5748 return io.ErrUnexpectedEOF 5749 } 5750 m.SubjectId = string(dAtA[iNdEx:postIndex]) 5751 iNdEx = postIndex 5752 case 2: 5753 if wireType != 2 { 5754 return fmt.Errorf("proto: wrong wireType = %d for field CaveatExpression", wireType) 5755 } 5756 var msglen int 5757 for shift := uint(0); ; shift += 7 { 5758 if shift >= 64 { 5759 return protohelpers.ErrIntOverflow 5760 } 5761 if iNdEx >= l { 5762 return io.ErrUnexpectedEOF 5763 } 5764 b := dAtA[iNdEx] 5765 iNdEx++ 5766 msglen |= int(b&0x7F) << shift 5767 if b < 0x80 { 5768 break 5769 } 5770 } 5771 if msglen < 0 { 5772 return protohelpers.ErrInvalidLength 5773 } 5774 postIndex := iNdEx + msglen 5775 if postIndex < 0 { 5776 return protohelpers.ErrInvalidLength 5777 } 5778 if postIndex > l { 5779 return io.ErrUnexpectedEOF 5780 } 5781 if m.CaveatExpression == nil { 5782 m.CaveatExpression = &v1.CaveatExpression{} 5783 } 5784 if unmarshal, ok := interface{}(m.CaveatExpression).(interface { 5785 UnmarshalVT([]byte) error 5786 }); ok { 5787 if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5788 return err 5789 } 5790 } else { 5791 if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.CaveatExpression); err != nil { 5792 return err 5793 } 5794 } 5795 iNdEx = postIndex 5796 case 3: 5797 if wireType != 2 { 5798 return fmt.Errorf("proto: wrong wireType = %d for field ExcludedSubjects", wireType) 5799 } 5800 var msglen int 5801 for shift := uint(0); ; shift += 7 { 5802 if shift >= 64 { 5803 return protohelpers.ErrIntOverflow 5804 } 5805 if iNdEx >= l { 5806 return io.ErrUnexpectedEOF 5807 } 5808 b := dAtA[iNdEx] 5809 iNdEx++ 5810 msglen |= int(b&0x7F) << shift 5811 if b < 0x80 { 5812 break 5813 } 5814 } 5815 if msglen < 0 { 5816 return protohelpers.ErrInvalidLength 5817 } 5818 postIndex := iNdEx + msglen 5819 if postIndex < 0 { 5820 return protohelpers.ErrInvalidLength 5821 } 5822 if postIndex > l { 5823 return io.ErrUnexpectedEOF 5824 } 5825 m.ExcludedSubjects = append(m.ExcludedSubjects, &FoundSubject{}) 5826 if err := m.ExcludedSubjects[len(m.ExcludedSubjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5827 return err 5828 } 5829 iNdEx = postIndex 5830 default: 5831 iNdEx = preIndex 5832 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5833 if err != nil { 5834 return err 5835 } 5836 if (skippy < 0) || (iNdEx+skippy) < 0 { 5837 return protohelpers.ErrInvalidLength 5838 } 5839 if (iNdEx + skippy) > l { 5840 return io.ErrUnexpectedEOF 5841 } 5842 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5843 iNdEx += skippy 5844 } 5845 } 5846 5847 if iNdEx > l { 5848 return io.ErrUnexpectedEOF 5849 } 5850 return nil 5851 } 5852 func (m *FoundSubjects) UnmarshalVT(dAtA []byte) error { 5853 l := len(dAtA) 5854 iNdEx := 0 5855 for iNdEx < l { 5856 preIndex := iNdEx 5857 var wire uint64 5858 for shift := uint(0); ; shift += 7 { 5859 if shift >= 64 { 5860 return protohelpers.ErrIntOverflow 5861 } 5862 if iNdEx >= l { 5863 return io.ErrUnexpectedEOF 5864 } 5865 b := dAtA[iNdEx] 5866 iNdEx++ 5867 wire |= uint64(b&0x7F) << shift 5868 if b < 0x80 { 5869 break 5870 } 5871 } 5872 fieldNum := int32(wire >> 3) 5873 wireType := int(wire & 0x7) 5874 if wireType == 4 { 5875 return fmt.Errorf("proto: FoundSubjects: wiretype end group for non-group") 5876 } 5877 if fieldNum <= 0 { 5878 return fmt.Errorf("proto: FoundSubjects: illegal tag %d (wire type %d)", fieldNum, wire) 5879 } 5880 switch fieldNum { 5881 case 1: 5882 if wireType != 2 { 5883 return fmt.Errorf("proto: wrong wireType = %d for field FoundSubjects", wireType) 5884 } 5885 var msglen int 5886 for shift := uint(0); ; shift += 7 { 5887 if shift >= 64 { 5888 return protohelpers.ErrIntOverflow 5889 } 5890 if iNdEx >= l { 5891 return io.ErrUnexpectedEOF 5892 } 5893 b := dAtA[iNdEx] 5894 iNdEx++ 5895 msglen |= int(b&0x7F) << shift 5896 if b < 0x80 { 5897 break 5898 } 5899 } 5900 if msglen < 0 { 5901 return protohelpers.ErrInvalidLength 5902 } 5903 postIndex := iNdEx + msglen 5904 if postIndex < 0 { 5905 return protohelpers.ErrInvalidLength 5906 } 5907 if postIndex > l { 5908 return io.ErrUnexpectedEOF 5909 } 5910 m.FoundSubjects = append(m.FoundSubjects, &FoundSubject{}) 5911 if err := m.FoundSubjects[len(m.FoundSubjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 5912 return err 5913 } 5914 iNdEx = postIndex 5915 default: 5916 iNdEx = preIndex 5917 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 5918 if err != nil { 5919 return err 5920 } 5921 if (skippy < 0) || (iNdEx+skippy) < 0 { 5922 return protohelpers.ErrInvalidLength 5923 } 5924 if (iNdEx + skippy) > l { 5925 return io.ErrUnexpectedEOF 5926 } 5927 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 5928 iNdEx += skippy 5929 } 5930 } 5931 5932 if iNdEx > l { 5933 return io.ErrUnexpectedEOF 5934 } 5935 return nil 5936 } 5937 func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { 5938 l := len(dAtA) 5939 iNdEx := 0 5940 for iNdEx < l { 5941 preIndex := iNdEx 5942 var wire uint64 5943 for shift := uint(0); ; shift += 7 { 5944 if shift >= 64 { 5945 return protohelpers.ErrIntOverflow 5946 } 5947 if iNdEx >= l { 5948 return io.ErrUnexpectedEOF 5949 } 5950 b := dAtA[iNdEx] 5951 iNdEx++ 5952 wire |= uint64(b&0x7F) << shift 5953 if b < 0x80 { 5954 break 5955 } 5956 } 5957 fieldNum := int32(wire >> 3) 5958 wireType := int(wire & 0x7) 5959 if wireType == 4 { 5960 return fmt.Errorf("proto: DispatchLookupSubjectsResponse: wiretype end group for non-group") 5961 } 5962 if fieldNum <= 0 { 5963 return fmt.Errorf("proto: DispatchLookupSubjectsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5964 } 5965 switch fieldNum { 5966 case 1: 5967 if wireType != 2 { 5968 return fmt.Errorf("proto: wrong wireType = %d for field FoundSubjectsByResourceId", wireType) 5969 } 5970 var msglen int 5971 for shift := uint(0); ; shift += 7 { 5972 if shift >= 64 { 5973 return protohelpers.ErrIntOverflow 5974 } 5975 if iNdEx >= l { 5976 return io.ErrUnexpectedEOF 5977 } 5978 b := dAtA[iNdEx] 5979 iNdEx++ 5980 msglen |= int(b&0x7F) << shift 5981 if b < 0x80 { 5982 break 5983 } 5984 } 5985 if msglen < 0 { 5986 return protohelpers.ErrInvalidLength 5987 } 5988 postIndex := iNdEx + msglen 5989 if postIndex < 0 { 5990 return protohelpers.ErrInvalidLength 5991 } 5992 if postIndex > l { 5993 return io.ErrUnexpectedEOF 5994 } 5995 if m.FoundSubjectsByResourceId == nil { 5996 m.FoundSubjectsByResourceId = make(map[string]*FoundSubjects) 5997 } 5998 var mapkey string 5999 var mapvalue *FoundSubjects 6000 for iNdEx < postIndex { 6001 entryPreIndex := iNdEx 6002 var wire uint64 6003 for shift := uint(0); ; shift += 7 { 6004 if shift >= 64 { 6005 return protohelpers.ErrIntOverflow 6006 } 6007 if iNdEx >= l { 6008 return io.ErrUnexpectedEOF 6009 } 6010 b := dAtA[iNdEx] 6011 iNdEx++ 6012 wire |= uint64(b&0x7F) << shift 6013 if b < 0x80 { 6014 break 6015 } 6016 } 6017 fieldNum := int32(wire >> 3) 6018 if fieldNum == 1 { 6019 var stringLenmapkey uint64 6020 for shift := uint(0); ; shift += 7 { 6021 if shift >= 64 { 6022 return protohelpers.ErrIntOverflow 6023 } 6024 if iNdEx >= l { 6025 return io.ErrUnexpectedEOF 6026 } 6027 b := dAtA[iNdEx] 6028 iNdEx++ 6029 stringLenmapkey |= uint64(b&0x7F) << shift 6030 if b < 0x80 { 6031 break 6032 } 6033 } 6034 intStringLenmapkey := int(stringLenmapkey) 6035 if intStringLenmapkey < 0 { 6036 return protohelpers.ErrInvalidLength 6037 } 6038 postStringIndexmapkey := iNdEx + intStringLenmapkey 6039 if postStringIndexmapkey < 0 { 6040 return protohelpers.ErrInvalidLength 6041 } 6042 if postStringIndexmapkey > l { 6043 return io.ErrUnexpectedEOF 6044 } 6045 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 6046 iNdEx = postStringIndexmapkey 6047 } else if fieldNum == 2 { 6048 var mapmsglen int 6049 for shift := uint(0); ; shift += 7 { 6050 if shift >= 64 { 6051 return protohelpers.ErrIntOverflow 6052 } 6053 if iNdEx >= l { 6054 return io.ErrUnexpectedEOF 6055 } 6056 b := dAtA[iNdEx] 6057 iNdEx++ 6058 mapmsglen |= int(b&0x7F) << shift 6059 if b < 0x80 { 6060 break 6061 } 6062 } 6063 if mapmsglen < 0 { 6064 return protohelpers.ErrInvalidLength 6065 } 6066 postmsgIndex := iNdEx + mapmsglen 6067 if postmsgIndex < 0 { 6068 return protohelpers.ErrInvalidLength 6069 } 6070 if postmsgIndex > l { 6071 return io.ErrUnexpectedEOF 6072 } 6073 mapvalue = &FoundSubjects{} 6074 if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { 6075 return err 6076 } 6077 iNdEx = postmsgIndex 6078 } else { 6079 iNdEx = entryPreIndex 6080 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6081 if err != nil { 6082 return err 6083 } 6084 if (skippy < 0) || (iNdEx+skippy) < 0 { 6085 return protohelpers.ErrInvalidLength 6086 } 6087 if (iNdEx + skippy) > postIndex { 6088 return io.ErrUnexpectedEOF 6089 } 6090 iNdEx += skippy 6091 } 6092 } 6093 m.FoundSubjectsByResourceId[mapkey] = mapvalue 6094 iNdEx = postIndex 6095 case 2: 6096 if wireType != 2 { 6097 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 6098 } 6099 var msglen int 6100 for shift := uint(0); ; shift += 7 { 6101 if shift >= 64 { 6102 return protohelpers.ErrIntOverflow 6103 } 6104 if iNdEx >= l { 6105 return io.ErrUnexpectedEOF 6106 } 6107 b := dAtA[iNdEx] 6108 iNdEx++ 6109 msglen |= int(b&0x7F) << shift 6110 if b < 0x80 { 6111 break 6112 } 6113 } 6114 if msglen < 0 { 6115 return protohelpers.ErrInvalidLength 6116 } 6117 postIndex := iNdEx + msglen 6118 if postIndex < 0 { 6119 return protohelpers.ErrInvalidLength 6120 } 6121 if postIndex > l { 6122 return io.ErrUnexpectedEOF 6123 } 6124 if m.Metadata == nil { 6125 m.Metadata = &ResponseMeta{} 6126 } 6127 if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6128 return err 6129 } 6130 iNdEx = postIndex 6131 case 3: 6132 if wireType != 2 { 6133 return fmt.Errorf("proto: wrong wireType = %d for field AfterResponseCursor", wireType) 6134 } 6135 var msglen int 6136 for shift := uint(0); ; shift += 7 { 6137 if shift >= 64 { 6138 return protohelpers.ErrIntOverflow 6139 } 6140 if iNdEx >= l { 6141 return io.ErrUnexpectedEOF 6142 } 6143 b := dAtA[iNdEx] 6144 iNdEx++ 6145 msglen |= int(b&0x7F) << shift 6146 if b < 0x80 { 6147 break 6148 } 6149 } 6150 if msglen < 0 { 6151 return protohelpers.ErrInvalidLength 6152 } 6153 postIndex := iNdEx + msglen 6154 if postIndex < 0 { 6155 return protohelpers.ErrInvalidLength 6156 } 6157 if postIndex > l { 6158 return io.ErrUnexpectedEOF 6159 } 6160 if m.AfterResponseCursor == nil { 6161 m.AfterResponseCursor = &Cursor{} 6162 } 6163 if err := m.AfterResponseCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6164 return err 6165 } 6166 iNdEx = postIndex 6167 default: 6168 iNdEx = preIndex 6169 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6170 if err != nil { 6171 return err 6172 } 6173 if (skippy < 0) || (iNdEx+skippy) < 0 { 6174 return protohelpers.ErrInvalidLength 6175 } 6176 if (iNdEx + skippy) > l { 6177 return io.ErrUnexpectedEOF 6178 } 6179 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 6180 iNdEx += skippy 6181 } 6182 } 6183 6184 if iNdEx > l { 6185 return io.ErrUnexpectedEOF 6186 } 6187 return nil 6188 } 6189 func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { 6190 l := len(dAtA) 6191 iNdEx := 0 6192 for iNdEx < l { 6193 preIndex := iNdEx 6194 var wire uint64 6195 for shift := uint(0); ; shift += 7 { 6196 if shift >= 64 { 6197 return protohelpers.ErrIntOverflow 6198 } 6199 if iNdEx >= l { 6200 return io.ErrUnexpectedEOF 6201 } 6202 b := dAtA[iNdEx] 6203 iNdEx++ 6204 wire |= uint64(b&0x7F) << shift 6205 if b < 0x80 { 6206 break 6207 } 6208 } 6209 fieldNum := int32(wire >> 3) 6210 wireType := int(wire & 0x7) 6211 if wireType == 4 { 6212 return fmt.Errorf("proto: ResolverMeta: wiretype end group for non-group") 6213 } 6214 if fieldNum <= 0 { 6215 return fmt.Errorf("proto: ResolverMeta: illegal tag %d (wire type %d)", fieldNum, wire) 6216 } 6217 switch fieldNum { 6218 case 1: 6219 if wireType != 2 { 6220 return fmt.Errorf("proto: wrong wireType = %d for field AtRevision", wireType) 6221 } 6222 var stringLen uint64 6223 for shift := uint(0); ; shift += 7 { 6224 if shift >= 64 { 6225 return protohelpers.ErrIntOverflow 6226 } 6227 if iNdEx >= l { 6228 return io.ErrUnexpectedEOF 6229 } 6230 b := dAtA[iNdEx] 6231 iNdEx++ 6232 stringLen |= uint64(b&0x7F) << shift 6233 if b < 0x80 { 6234 break 6235 } 6236 } 6237 intStringLen := int(stringLen) 6238 if intStringLen < 0 { 6239 return protohelpers.ErrInvalidLength 6240 } 6241 postIndex := iNdEx + intStringLen 6242 if postIndex < 0 { 6243 return protohelpers.ErrInvalidLength 6244 } 6245 if postIndex > l { 6246 return io.ErrUnexpectedEOF 6247 } 6248 m.AtRevision = string(dAtA[iNdEx:postIndex]) 6249 iNdEx = postIndex 6250 case 2: 6251 if wireType != 0 { 6252 return fmt.Errorf("proto: wrong wireType = %d for field DepthRemaining", wireType) 6253 } 6254 m.DepthRemaining = 0 6255 for shift := uint(0); ; shift += 7 { 6256 if shift >= 64 { 6257 return protohelpers.ErrIntOverflow 6258 } 6259 if iNdEx >= l { 6260 return io.ErrUnexpectedEOF 6261 } 6262 b := dAtA[iNdEx] 6263 iNdEx++ 6264 m.DepthRemaining |= uint32(b&0x7F) << shift 6265 if b < 0x80 { 6266 break 6267 } 6268 } 6269 case 3: 6270 if wireType != 2 { 6271 return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) 6272 } 6273 var stringLen uint64 6274 for shift := uint(0); ; shift += 7 { 6275 if shift >= 64 { 6276 return protohelpers.ErrIntOverflow 6277 } 6278 if iNdEx >= l { 6279 return io.ErrUnexpectedEOF 6280 } 6281 b := dAtA[iNdEx] 6282 iNdEx++ 6283 stringLen |= uint64(b&0x7F) << shift 6284 if b < 0x80 { 6285 break 6286 } 6287 } 6288 intStringLen := int(stringLen) 6289 if intStringLen < 0 { 6290 return protohelpers.ErrInvalidLength 6291 } 6292 postIndex := iNdEx + intStringLen 6293 if postIndex < 0 { 6294 return protohelpers.ErrInvalidLength 6295 } 6296 if postIndex > l { 6297 return io.ErrUnexpectedEOF 6298 } 6299 m.RequestId = string(dAtA[iNdEx:postIndex]) 6300 iNdEx = postIndex 6301 case 4: 6302 if wireType != 2 { 6303 return fmt.Errorf("proto: wrong wireType = %d for field TraversalBloom", wireType) 6304 } 6305 var byteLen int 6306 for shift := uint(0); ; shift += 7 { 6307 if shift >= 64 { 6308 return protohelpers.ErrIntOverflow 6309 } 6310 if iNdEx >= l { 6311 return io.ErrUnexpectedEOF 6312 } 6313 b := dAtA[iNdEx] 6314 iNdEx++ 6315 byteLen |= int(b&0x7F) << shift 6316 if b < 0x80 { 6317 break 6318 } 6319 } 6320 if byteLen < 0 { 6321 return protohelpers.ErrInvalidLength 6322 } 6323 postIndex := iNdEx + byteLen 6324 if postIndex < 0 { 6325 return protohelpers.ErrInvalidLength 6326 } 6327 if postIndex > l { 6328 return io.ErrUnexpectedEOF 6329 } 6330 m.TraversalBloom = append(m.TraversalBloom[:0], dAtA[iNdEx:postIndex]...) 6331 if m.TraversalBloom == nil { 6332 m.TraversalBloom = []byte{} 6333 } 6334 iNdEx = postIndex 6335 default: 6336 iNdEx = preIndex 6337 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6338 if err != nil { 6339 return err 6340 } 6341 if (skippy < 0) || (iNdEx+skippy) < 0 { 6342 return protohelpers.ErrInvalidLength 6343 } 6344 if (iNdEx + skippy) > l { 6345 return io.ErrUnexpectedEOF 6346 } 6347 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 6348 iNdEx += skippy 6349 } 6350 } 6351 6352 if iNdEx > l { 6353 return io.ErrUnexpectedEOF 6354 } 6355 return nil 6356 } 6357 func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { 6358 l := len(dAtA) 6359 iNdEx := 0 6360 for iNdEx < l { 6361 preIndex := iNdEx 6362 var wire uint64 6363 for shift := uint(0); ; shift += 7 { 6364 if shift >= 64 { 6365 return protohelpers.ErrIntOverflow 6366 } 6367 if iNdEx >= l { 6368 return io.ErrUnexpectedEOF 6369 } 6370 b := dAtA[iNdEx] 6371 iNdEx++ 6372 wire |= uint64(b&0x7F) << shift 6373 if b < 0x80 { 6374 break 6375 } 6376 } 6377 fieldNum := int32(wire >> 3) 6378 wireType := int(wire & 0x7) 6379 if wireType == 4 { 6380 return fmt.Errorf("proto: ResponseMeta: wiretype end group for non-group") 6381 } 6382 if fieldNum <= 0 { 6383 return fmt.Errorf("proto: ResponseMeta: illegal tag %d (wire type %d)", fieldNum, wire) 6384 } 6385 switch fieldNum { 6386 case 1: 6387 if wireType != 0 { 6388 return fmt.Errorf("proto: wrong wireType = %d for field DispatchCount", wireType) 6389 } 6390 m.DispatchCount = 0 6391 for shift := uint(0); ; shift += 7 { 6392 if shift >= 64 { 6393 return protohelpers.ErrIntOverflow 6394 } 6395 if iNdEx >= l { 6396 return io.ErrUnexpectedEOF 6397 } 6398 b := dAtA[iNdEx] 6399 iNdEx++ 6400 m.DispatchCount |= uint32(b&0x7F) << shift 6401 if b < 0x80 { 6402 break 6403 } 6404 } 6405 case 2: 6406 if wireType != 0 { 6407 return fmt.Errorf("proto: wrong wireType = %d for field DepthRequired", wireType) 6408 } 6409 m.DepthRequired = 0 6410 for shift := uint(0); ; shift += 7 { 6411 if shift >= 64 { 6412 return protohelpers.ErrIntOverflow 6413 } 6414 if iNdEx >= l { 6415 return io.ErrUnexpectedEOF 6416 } 6417 b := dAtA[iNdEx] 6418 iNdEx++ 6419 m.DepthRequired |= uint32(b&0x7F) << shift 6420 if b < 0x80 { 6421 break 6422 } 6423 } 6424 case 3: 6425 if wireType != 0 { 6426 return fmt.Errorf("proto: wrong wireType = %d for field CachedDispatchCount", wireType) 6427 } 6428 m.CachedDispatchCount = 0 6429 for shift := uint(0); ; shift += 7 { 6430 if shift >= 64 { 6431 return protohelpers.ErrIntOverflow 6432 } 6433 if iNdEx >= l { 6434 return io.ErrUnexpectedEOF 6435 } 6436 b := dAtA[iNdEx] 6437 iNdEx++ 6438 m.CachedDispatchCount |= uint32(b&0x7F) << shift 6439 if b < 0x80 { 6440 break 6441 } 6442 } 6443 case 6: 6444 if wireType != 2 { 6445 return fmt.Errorf("proto: wrong wireType = %d for field DebugInfo", wireType) 6446 } 6447 var msglen int 6448 for shift := uint(0); ; shift += 7 { 6449 if shift >= 64 { 6450 return protohelpers.ErrIntOverflow 6451 } 6452 if iNdEx >= l { 6453 return io.ErrUnexpectedEOF 6454 } 6455 b := dAtA[iNdEx] 6456 iNdEx++ 6457 msglen |= int(b&0x7F) << shift 6458 if b < 0x80 { 6459 break 6460 } 6461 } 6462 if msglen < 0 { 6463 return protohelpers.ErrInvalidLength 6464 } 6465 postIndex := iNdEx + msglen 6466 if postIndex < 0 { 6467 return protohelpers.ErrInvalidLength 6468 } 6469 if postIndex > l { 6470 return io.ErrUnexpectedEOF 6471 } 6472 if m.DebugInfo == nil { 6473 m.DebugInfo = &DebugInformation{} 6474 } 6475 if err := m.DebugInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6476 return err 6477 } 6478 iNdEx = postIndex 6479 default: 6480 iNdEx = preIndex 6481 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6482 if err != nil { 6483 return err 6484 } 6485 if (skippy < 0) || (iNdEx+skippy) < 0 { 6486 return protohelpers.ErrInvalidLength 6487 } 6488 if (iNdEx + skippy) > l { 6489 return io.ErrUnexpectedEOF 6490 } 6491 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 6492 iNdEx += skippy 6493 } 6494 } 6495 6496 if iNdEx > l { 6497 return io.ErrUnexpectedEOF 6498 } 6499 return nil 6500 } 6501 func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { 6502 l := len(dAtA) 6503 iNdEx := 0 6504 for iNdEx < l { 6505 preIndex := iNdEx 6506 var wire uint64 6507 for shift := uint(0); ; shift += 7 { 6508 if shift >= 64 { 6509 return protohelpers.ErrIntOverflow 6510 } 6511 if iNdEx >= l { 6512 return io.ErrUnexpectedEOF 6513 } 6514 b := dAtA[iNdEx] 6515 iNdEx++ 6516 wire |= uint64(b&0x7F) << shift 6517 if b < 0x80 { 6518 break 6519 } 6520 } 6521 fieldNum := int32(wire >> 3) 6522 wireType := int(wire & 0x7) 6523 if wireType == 4 { 6524 return fmt.Errorf("proto: DebugInformation: wiretype end group for non-group") 6525 } 6526 if fieldNum <= 0 { 6527 return fmt.Errorf("proto: DebugInformation: illegal tag %d (wire type %d)", fieldNum, wire) 6528 } 6529 switch fieldNum { 6530 case 1: 6531 if wireType != 2 { 6532 return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) 6533 } 6534 var msglen int 6535 for shift := uint(0); ; shift += 7 { 6536 if shift >= 64 { 6537 return protohelpers.ErrIntOverflow 6538 } 6539 if iNdEx >= l { 6540 return io.ErrUnexpectedEOF 6541 } 6542 b := dAtA[iNdEx] 6543 iNdEx++ 6544 msglen |= int(b&0x7F) << shift 6545 if b < 0x80 { 6546 break 6547 } 6548 } 6549 if msglen < 0 { 6550 return protohelpers.ErrInvalidLength 6551 } 6552 postIndex := iNdEx + msglen 6553 if postIndex < 0 { 6554 return protohelpers.ErrInvalidLength 6555 } 6556 if postIndex > l { 6557 return io.ErrUnexpectedEOF 6558 } 6559 if m.Check == nil { 6560 m.Check = &CheckDebugTrace{} 6561 } 6562 if err := m.Check.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6563 return err 6564 } 6565 iNdEx = postIndex 6566 default: 6567 iNdEx = preIndex 6568 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6569 if err != nil { 6570 return err 6571 } 6572 if (skippy < 0) || (iNdEx+skippy) < 0 { 6573 return protohelpers.ErrInvalidLength 6574 } 6575 if (iNdEx + skippy) > l { 6576 return io.ErrUnexpectedEOF 6577 } 6578 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 6579 iNdEx += skippy 6580 } 6581 } 6582 6583 if iNdEx > l { 6584 return io.ErrUnexpectedEOF 6585 } 6586 return nil 6587 } 6588 func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { 6589 l := len(dAtA) 6590 iNdEx := 0 6591 for iNdEx < l { 6592 preIndex := iNdEx 6593 var wire uint64 6594 for shift := uint(0); ; shift += 7 { 6595 if shift >= 64 { 6596 return protohelpers.ErrIntOverflow 6597 } 6598 if iNdEx >= l { 6599 return io.ErrUnexpectedEOF 6600 } 6601 b := dAtA[iNdEx] 6602 iNdEx++ 6603 wire |= uint64(b&0x7F) << shift 6604 if b < 0x80 { 6605 break 6606 } 6607 } 6608 fieldNum := int32(wire >> 3) 6609 wireType := int(wire & 0x7) 6610 if wireType == 4 { 6611 return fmt.Errorf("proto: CheckDebugTrace: wiretype end group for non-group") 6612 } 6613 if fieldNum <= 0 { 6614 return fmt.Errorf("proto: CheckDebugTrace: illegal tag %d (wire type %d)", fieldNum, wire) 6615 } 6616 switch fieldNum { 6617 case 1: 6618 if wireType != 2 { 6619 return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) 6620 } 6621 var msglen int 6622 for shift := uint(0); ; shift += 7 { 6623 if shift >= 64 { 6624 return protohelpers.ErrIntOverflow 6625 } 6626 if iNdEx >= l { 6627 return io.ErrUnexpectedEOF 6628 } 6629 b := dAtA[iNdEx] 6630 iNdEx++ 6631 msglen |= int(b&0x7F) << shift 6632 if b < 0x80 { 6633 break 6634 } 6635 } 6636 if msglen < 0 { 6637 return protohelpers.ErrInvalidLength 6638 } 6639 postIndex := iNdEx + msglen 6640 if postIndex < 0 { 6641 return protohelpers.ErrInvalidLength 6642 } 6643 if postIndex > l { 6644 return io.ErrUnexpectedEOF 6645 } 6646 if m.Request == nil { 6647 m.Request = &DispatchCheckRequest{} 6648 } 6649 if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6650 return err 6651 } 6652 iNdEx = postIndex 6653 case 2: 6654 if wireType != 0 { 6655 return fmt.Errorf("proto: wrong wireType = %d for field ResourceRelationType", wireType) 6656 } 6657 m.ResourceRelationType = 0 6658 for shift := uint(0); ; shift += 7 { 6659 if shift >= 64 { 6660 return protohelpers.ErrIntOverflow 6661 } 6662 if iNdEx >= l { 6663 return io.ErrUnexpectedEOF 6664 } 6665 b := dAtA[iNdEx] 6666 iNdEx++ 6667 m.ResourceRelationType |= CheckDebugTrace_RelationType(b&0x7F) << shift 6668 if b < 0x80 { 6669 break 6670 } 6671 } 6672 case 3: 6673 if wireType != 2 { 6674 return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) 6675 } 6676 var msglen int 6677 for shift := uint(0); ; shift += 7 { 6678 if shift >= 64 { 6679 return protohelpers.ErrIntOverflow 6680 } 6681 if iNdEx >= l { 6682 return io.ErrUnexpectedEOF 6683 } 6684 b := dAtA[iNdEx] 6685 iNdEx++ 6686 msglen |= int(b&0x7F) << shift 6687 if b < 0x80 { 6688 break 6689 } 6690 } 6691 if msglen < 0 { 6692 return protohelpers.ErrInvalidLength 6693 } 6694 postIndex := iNdEx + msglen 6695 if postIndex < 0 { 6696 return protohelpers.ErrInvalidLength 6697 } 6698 if postIndex > l { 6699 return io.ErrUnexpectedEOF 6700 } 6701 if m.Results == nil { 6702 m.Results = make(map[string]*ResourceCheckResult) 6703 } 6704 var mapkey string 6705 var mapvalue *ResourceCheckResult 6706 for iNdEx < postIndex { 6707 entryPreIndex := iNdEx 6708 var wire uint64 6709 for shift := uint(0); ; shift += 7 { 6710 if shift >= 64 { 6711 return protohelpers.ErrIntOverflow 6712 } 6713 if iNdEx >= l { 6714 return io.ErrUnexpectedEOF 6715 } 6716 b := dAtA[iNdEx] 6717 iNdEx++ 6718 wire |= uint64(b&0x7F) << shift 6719 if b < 0x80 { 6720 break 6721 } 6722 } 6723 fieldNum := int32(wire >> 3) 6724 if fieldNum == 1 { 6725 var stringLenmapkey uint64 6726 for shift := uint(0); ; shift += 7 { 6727 if shift >= 64 { 6728 return protohelpers.ErrIntOverflow 6729 } 6730 if iNdEx >= l { 6731 return io.ErrUnexpectedEOF 6732 } 6733 b := dAtA[iNdEx] 6734 iNdEx++ 6735 stringLenmapkey |= uint64(b&0x7F) << shift 6736 if b < 0x80 { 6737 break 6738 } 6739 } 6740 intStringLenmapkey := int(stringLenmapkey) 6741 if intStringLenmapkey < 0 { 6742 return protohelpers.ErrInvalidLength 6743 } 6744 postStringIndexmapkey := iNdEx + intStringLenmapkey 6745 if postStringIndexmapkey < 0 { 6746 return protohelpers.ErrInvalidLength 6747 } 6748 if postStringIndexmapkey > l { 6749 return io.ErrUnexpectedEOF 6750 } 6751 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 6752 iNdEx = postStringIndexmapkey 6753 } else if fieldNum == 2 { 6754 var mapmsglen int 6755 for shift := uint(0); ; shift += 7 { 6756 if shift >= 64 { 6757 return protohelpers.ErrIntOverflow 6758 } 6759 if iNdEx >= l { 6760 return io.ErrUnexpectedEOF 6761 } 6762 b := dAtA[iNdEx] 6763 iNdEx++ 6764 mapmsglen |= int(b&0x7F) << shift 6765 if b < 0x80 { 6766 break 6767 } 6768 } 6769 if mapmsglen < 0 { 6770 return protohelpers.ErrInvalidLength 6771 } 6772 postmsgIndex := iNdEx + mapmsglen 6773 if postmsgIndex < 0 { 6774 return protohelpers.ErrInvalidLength 6775 } 6776 if postmsgIndex > l { 6777 return io.ErrUnexpectedEOF 6778 } 6779 mapvalue = &ResourceCheckResult{} 6780 if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { 6781 return err 6782 } 6783 iNdEx = postmsgIndex 6784 } else { 6785 iNdEx = entryPreIndex 6786 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6787 if err != nil { 6788 return err 6789 } 6790 if (skippy < 0) || (iNdEx+skippy) < 0 { 6791 return protohelpers.ErrInvalidLength 6792 } 6793 if (iNdEx + skippy) > postIndex { 6794 return io.ErrUnexpectedEOF 6795 } 6796 iNdEx += skippy 6797 } 6798 } 6799 m.Results[mapkey] = mapvalue 6800 iNdEx = postIndex 6801 case 4: 6802 if wireType != 0 { 6803 return fmt.Errorf("proto: wrong wireType = %d for field IsCachedResult", wireType) 6804 } 6805 var v int 6806 for shift := uint(0); ; shift += 7 { 6807 if shift >= 64 { 6808 return protohelpers.ErrIntOverflow 6809 } 6810 if iNdEx >= l { 6811 return io.ErrUnexpectedEOF 6812 } 6813 b := dAtA[iNdEx] 6814 iNdEx++ 6815 v |= int(b&0x7F) << shift 6816 if b < 0x80 { 6817 break 6818 } 6819 } 6820 m.IsCachedResult = bool(v != 0) 6821 case 5: 6822 if wireType != 2 { 6823 return fmt.Errorf("proto: wrong wireType = %d for field SubProblems", wireType) 6824 } 6825 var msglen int 6826 for shift := uint(0); ; shift += 7 { 6827 if shift >= 64 { 6828 return protohelpers.ErrIntOverflow 6829 } 6830 if iNdEx >= l { 6831 return io.ErrUnexpectedEOF 6832 } 6833 b := dAtA[iNdEx] 6834 iNdEx++ 6835 msglen |= int(b&0x7F) << shift 6836 if b < 0x80 { 6837 break 6838 } 6839 } 6840 if msglen < 0 { 6841 return protohelpers.ErrInvalidLength 6842 } 6843 postIndex := iNdEx + msglen 6844 if postIndex < 0 { 6845 return protohelpers.ErrInvalidLength 6846 } 6847 if postIndex > l { 6848 return io.ErrUnexpectedEOF 6849 } 6850 m.SubProblems = append(m.SubProblems, &CheckDebugTrace{}) 6851 if err := m.SubProblems[len(m.SubProblems)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6852 return err 6853 } 6854 iNdEx = postIndex 6855 case 6: 6856 if wireType != 2 { 6857 return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) 6858 } 6859 var msglen int 6860 for shift := uint(0); ; shift += 7 { 6861 if shift >= 64 { 6862 return protohelpers.ErrIntOverflow 6863 } 6864 if iNdEx >= l { 6865 return io.ErrUnexpectedEOF 6866 } 6867 b := dAtA[iNdEx] 6868 iNdEx++ 6869 msglen |= int(b&0x7F) << shift 6870 if b < 0x80 { 6871 break 6872 } 6873 } 6874 if msglen < 0 { 6875 return protohelpers.ErrInvalidLength 6876 } 6877 postIndex := iNdEx + msglen 6878 if postIndex < 0 { 6879 return protohelpers.ErrInvalidLength 6880 } 6881 if postIndex > l { 6882 return io.ErrUnexpectedEOF 6883 } 6884 if m.Duration == nil { 6885 m.Duration = &durationpb.Duration{} 6886 } 6887 if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 6888 return err 6889 } 6890 iNdEx = postIndex 6891 default: 6892 iNdEx = preIndex 6893 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 6894 if err != nil { 6895 return err 6896 } 6897 if (skippy < 0) || (iNdEx+skippy) < 0 { 6898 return protohelpers.ErrInvalidLength 6899 } 6900 if (iNdEx + skippy) > l { 6901 return io.ErrUnexpectedEOF 6902 } 6903 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 6904 iNdEx += skippy 6905 } 6906 } 6907 6908 if iNdEx > l { 6909 return io.ErrUnexpectedEOF 6910 } 6911 return nil 6912 }