From 3c67ddaaa269f92d6434785cdf78691cfeab6c67 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 29 Sep 2022 14:56:17 -0400 Subject: [PATCH 1/2] Reorganize the dispatch check protos a bit in preparation for using MembershipSet for checks --- internal/dispatch/caching/caching.go | 9 +- .../dispatch/caching/cachingdispatch_test.go | 6 +- internal/dispatch/debug.go | 3 +- internal/dispatch/graph/check_test.go | 4 +- .../dispatch/graph/lookupsubjects_test.go | 2 +- internal/graph/check.go | 35 +- internal/graph/membershipset.go | 8 +- internal/graph/parallelchecker.go | 2 +- internal/services/consistency_test.go | 2 +- internal/services/v1/permissions.go | 9 +- pkg/development/assertions.go | 4 +- pkg/development/check.go | 6 +- pkg/development/wasm/operations.go | 3 +- pkg/proto/dispatch/v1/00_zerolog.go | 2 +- pkg/proto/dispatch/v1/dispatch.pb.go | 1096 ++++++++--------- pkg/proto/dispatch/v1/dispatch.pb.validate.go | 377 ++---- pkg/proto/dispatch/v1/dispatch_vtproto.pb.go | 519 +++----- proto/internal/dispatch/v1/dispatch.proto | 18 +- 18 files changed, 890 insertions(+), 1215 deletions(-) diff --git a/internal/dispatch/caching/caching.go b/internal/dispatch/caching/caching.go index 138f1dc558..f71e24a6a2 100644 --- a/internal/dispatch/caching/caching.go +++ b/internal/dispatch/caching/caching.go @@ -6,6 +6,8 @@ import ( "sync" "testing" + "golang.org/x/exp/maps" + "github.com/dustin/go-humanize" "github.com/prometheus/client_golang/prometheus" "github.com/rs/zerolog/log" @@ -253,12 +255,7 @@ func (cd *Dispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCheckRe // If debugging is requested, clone and add the req and the response to the trace. clone := cachedResult.response.CloneVT() - results := make(map[string]*v1.CheckDebugTrace_ResourceCheckResult, len(cachedResult.response.ResultsByResourceId)) - for resourceID, result := range cachedResult.response.ResultsByResourceId { - results[resourceID] = &v1.CheckDebugTrace_ResourceCheckResult{ - HasPermission: result.Membership == v1.DispatchCheckResponse_MEMBER, - } - } + results := maps.Clone(cachedResult.response.ResultsByResourceId) clone.Metadata.DebugInfo = &v1.DebugInformation{ Check: &v1.CheckDebugTrace{ diff --git a/internal/dispatch/caching/cachingdispatch_test.go b/internal/dispatch/caching/cachingdispatch_test.go index badb89dda4..de598e883d 100644 --- a/internal/dispatch/caching/cachingdispatch_test.go +++ b/internal/dispatch/caching/cachingdispatch_test.go @@ -103,9 +103,9 @@ func TestMaxDepthCaching(t *testing.T) { DepthRemaining: step.depthRemaining, }, }).Return(&v1.DispatchCheckResponse{ - ResultsByResourceId: map[string]*v1.DispatchCheckResponse_ResourceCheckResult{ + ResultsByResourceId: map[string]*v1.ResourceCheckResult{ parsed.ObjectId: { - Membership: v1.DispatchCheckResponse_MEMBER, + Membership: v1.ResourceCheckResult_MEMBER, }, }, Metadata: &v1.ResponseMeta{ @@ -133,7 +133,7 @@ func TestMaxDepthCaching(t *testing.T) { }, }) require.NoError(err) - require.Equal(v1.DispatchCheckResponse_MEMBER, resp.ResultsByResourceId[parsed.ObjectId].Membership) + require.Equal(v1.ResourceCheckResult_MEMBER, resp.ResultsByResourceId[parsed.ObjectId].Membership) // We have to sleep a while to let the cache converge: // https://github.com/dgraph-io/ristretto/blob/01b9f37dd0fd453225e042d6f3a27cd14f252cd0/cache_test.go#L17 diff --git a/internal/dispatch/debug.go b/internal/dispatch/debug.go index 3ceb10b984..232270debc 100644 --- a/internal/dispatch/debug.go +++ b/internal/dispatch/debug.go @@ -54,8 +54,9 @@ func convertCheckTrace(ct *dispatch.CheckDebugTrace) []*v1.CheckDebugTrace { subRelation = "" } + // TODO(jschorr): Support caveats here result := v1.CheckDebugTrace_PERMISSIONSHIP_NO_PERMISSION - if found, ok := ct.Results[resourceID]; ok && found.HasPermission { + if found, ok := ct.Results[resourceID]; ok && found.Membership == dispatch.ResourceCheckResult_MEMBER { result = v1.CheckDebugTrace_PERMISSIONSHIP_HAS_PERMISSION } diff --git a/internal/dispatch/graph/check_test.go b/internal/dispatch/graph/check_test.go index 71bfeacdf7..7346156512 100644 --- a/internal/dispatch/graph/check_test.go +++ b/internal/dispatch/graph/check_test.go @@ -137,7 +137,7 @@ func TestSimpleCheck(t *testing.T) { isMember := false if found, ok := checkResult.ResultsByResourceId[tc.objectID]; ok { - isMember = found.Membership == v1.DispatchCheckResponse_MEMBER + isMember = found.Membership == v1.ResourceCheckResult_MEMBER } require.Equal(expected.isMember, isMember, "For object %s in %v: ", tc.objectID, checkResult.ResultsByResourceId) @@ -271,7 +271,7 @@ func TestCheckMetadata(t *testing.T) { isMember := false if found, ok := checkResult.ResultsByResourceId[tc.objectID]; ok { - isMember = found.Membership == v1.DispatchCheckResponse_MEMBER + isMember = found.Membership == v1.ResourceCheckResult_MEMBER } require.Equal(expected.isMember, isMember) diff --git a/internal/dispatch/graph/lookupsubjects_test.go b/internal/dispatch/graph/lookupsubjects_test.go index bbe56d7226..a64a6d8de6 100644 --- a/internal/dispatch/graph/lookupsubjects_test.go +++ b/internal/dispatch/graph/lookupsubjects_test.go @@ -167,7 +167,7 @@ func TestSimpleLookupSubjects(t *testing.T) { }) require.NoError(err) - require.Equal(v1.DispatchCheckResponse_MEMBER, checkResult.ResultsByResourceId[tc.resourceID].Membership) + require.Equal(v1.ResourceCheckResult_MEMBER, checkResult.ResultsByResourceId[tc.resourceID].Membership) } }) } diff --git a/internal/graph/check.go b/internal/graph/check.go index ade12ffab8..4b44a53372 100644 --- a/internal/graph/check.go +++ b/internal/graph/check.go @@ -88,15 +88,10 @@ func (cc *ConcurrentChecker) Check(ctx context.Context, req ValidatedCheckReques } // Build the results for the debug trace. - results := make(map[string]*v1.CheckDebugTrace_ResourceCheckResult, len(req.DispatchCheckRequest.ResourceIds)) + results := make(map[string]*v1.ResourceCheckResult, len(req.DispatchCheckRequest.ResourceIds)) for _, resourceID := range req.DispatchCheckRequest.ResourceIds { - hasPermission := false - if found, ok := resolved.Resp.ResultsByResourceId[resourceID]; ok && found.Membership == v1.DispatchCheckResponse_MEMBER { - hasPermission = true - } - - results[resourceID] = &v1.CheckDebugTrace_ResourceCheckResult{ - HasPermission: hasPermission, + if found, ok := resolved.Resp.ResultsByResourceId[resourceID]; ok { + results[resourceID] = found } } @@ -255,7 +250,7 @@ func mapResourceIds(result CheckResult, resourceType *core.RelationReference, re // Map any resources found to the parent resource IDs. mappedResourceIds := []string{} for foundResourceID, result := range result.Resp.ResultsByResourceId { - if result.Membership != v1.DispatchCheckResponse_MEMBER { + if result.Membership != v1.ResourceCheckResult_MEMBER { continue } @@ -464,7 +459,7 @@ func union[T any]( }() responseMetadata := emptyMetadata - responseResults := make(map[string]*v1.DispatchCheckResponse_ResourceCheckResult, len(crc.filteredResourceIDs)) + responseResults := make(map[string]*v1.ResourceCheckResult, len(crc.filteredResourceIDs)) for i := 0; i < len(children); i++ { select { @@ -477,7 +472,7 @@ func union[T any]( for resourceID, result := range result.Resp.ResultsByResourceId { responseResults[resourceID] = result - if crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT && result.Membership == v1.DispatchCheckResponse_MEMBER { + if crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT && result.Membership == v1.ResourceCheckResult_MEMBER { return checkResults(responseResults, responseMetadata) } } @@ -687,10 +682,10 @@ func noMembers() CheckResult { } func checkResultsForResourceIds(resourceIds []string, subProblemMetadata *v1.ResponseMeta) CheckResult { - results := make(map[string]*v1.DispatchCheckResponse_ResourceCheckResult, len(resourceIds)) + results := make(map[string]*v1.ResourceCheckResult, len(resourceIds)) for _, resourceID := range resourceIds { - results[resourceID] = &v1.DispatchCheckResponse_ResourceCheckResult{ - Membership: v1.DispatchCheckResponse_MEMBER, + results[resourceID] = &v1.ResourceCheckResult{ + Membership: v1.ResourceCheckResult_MEMBER, } } return CheckResult{ @@ -702,7 +697,7 @@ func checkResultsForResourceIds(resourceIds []string, subProblemMetadata *v1.Res } } -func checkResults(results map[string]*v1.DispatchCheckResponse_ResourceCheckResult, subProblemMetadata *v1.ResponseMeta) CheckResult { +func checkResults(results map[string]*v1.ResourceCheckResult, subProblemMetadata *v1.ResponseMeta) CheckResult { return CheckResult{ &v1.DispatchCheckResponse{ Metadata: ensureMetadata(subProblemMetadata), @@ -721,10 +716,10 @@ func checkResultError(err error, subProblemMetadata *v1.ResponseMeta) CheckResul } } -func filterToResourceIdsWithMembership(results map[string]*v1.DispatchCheckResponse_ResourceCheckResult) []string { +func filterToResourceIdsWithMembership(results map[string]*v1.ResourceCheckResult) []string { members := []string{} for resourceID, result := range results { - if result.Membership == v1.DispatchCheckResponse_MEMBER { + if result.Membership == v1.ResourceCheckResult_MEMBER { members = append(members, resourceID) } } @@ -746,11 +741,11 @@ func combineResultWithFoundResourceIds(result CheckResult, foundResourceIds []st } if result.Resp.ResultsByResourceId == nil { - result.Resp.ResultsByResourceId = map[string]*v1.DispatchCheckResponse_ResourceCheckResult{} + result.Resp.ResultsByResourceId = map[string]*v1.ResourceCheckResult{} } - result.Resp.ResultsByResourceId[resourceID] = &v1.DispatchCheckResponse_ResourceCheckResult{ - Membership: v1.DispatchCheckResponse_MEMBER, + result.Resp.ResultsByResourceId[resourceID] = &v1.ResourceCheckResult{ + Membership: v1.ResourceCheckResult_MEMBER, } } diff --git a/internal/graph/membershipset.go b/internal/graph/membershipset.go index 19f61d8101..870e2d9843 100644 --- a/internal/graph/membershipset.go +++ b/internal/graph/membershipset.go @@ -8,7 +8,7 @@ import ( // CheckResultsMap defines a type that is a map from resource ID to ResourceCheckResult. // This must match that defined in the DispatchCheckResponse for the `results_by_resource_id` // field. -type CheckResultsMap map[string]*v1.DispatchCheckResponse_ResourceCheckResult +type CheckResultsMap map[string]*v1.ResourceCheckResult // NewMembershipSet constructs a new helper set for tracking the membership found for a dispatched // check request. @@ -149,12 +149,12 @@ func (ms *MembershipSet) HasDeterminedMember() bool { func (ms *MembershipSet) AsCheckResultsMap() CheckResultsMap { resultsMap := make(CheckResultsMap, len(ms.membersByID)) for resourceID, caveat := range ms.membersByID { - membership := v1.DispatchCheckResponse_MEMBER + membership := v1.ResourceCheckResult_MEMBER if caveat != nil { - membership = v1.DispatchCheckResponse_CAVEATED_MEMBER + membership = v1.ResourceCheckResult_CAVEATED_MEMBER } - resultsMap[resourceID] = &v1.DispatchCheckResponse_ResourceCheckResult{ + resultsMap[resourceID] = &v1.ResourceCheckResult{ Membership: membership, Expression: caveat, } diff --git a/internal/graph/parallelchecker.go b/internal/graph/parallelchecker.go index e86a0f2ad0..d3190669ba 100644 --- a/internal/graph/parallelchecker.go +++ b/internal/graph/parallelchecker.go @@ -120,7 +120,7 @@ func (pc *ParallelChecker) Start() { pc.mu.Lock() defer pc.mu.Unlock() resourceID := req.ResourceIds[0] - if found, ok := res.ResultsByResourceId[resourceID]; ok && found.Membership == v1.DispatchCheckResponse_MEMBER { + if found, ok := res.ResultsByResourceId[resourceID]; ok && found.Membership == v1.ResourceCheckResult_MEMBER { pc.addResultsUnsafe(&core.ObjectAndRelation{ Namespace: req.ResourceRelation.Namespace, ObjectId: resourceID, diff --git a/internal/services/consistency_test.go b/internal/services/consistency_test.go index 981dd29639..2352a774aa 100644 --- a/internal/services/consistency_test.go +++ b/internal/services/consistency_test.go @@ -504,7 +504,7 @@ func validateEditChecks(t *testing.T, devContext *development.DevContext, vctx * expectedMember := vctx.accessibilitySet.GetIsMember(resource, subject) vrequire.Equal(expectedMember == isMember || expectedMember == isMemberViaWildcard, - membership == dispatchv1.DispatchCheckResponse_MEMBER, + membership == dispatchv1.ResourceCheckResult_MEMBER, "Found unexpected membership difference for %s@%s. Expected %v, Found: %v", tuple.StringONR(resource), tuple.StringONR(subject), diff --git a/internal/services/v1/permissions.go b/internal/services/v1/permissions.go index 718dc50ba0..aa83903dc2 100644 --- a/internal/services/v1/permissions.go +++ b/internal/services/v1/permissions.go @@ -105,9 +105,14 @@ func (ps *permissionServer) CheckPermission(ctx context.Context, req *v1.CheckPe return nil, rewritePermissionsError(ctx, err) } + // TODO(jschorr): Support caveats here permissionship := v1.CheckPermissionResponse_PERMISSIONSHIP_NO_PERMISSION - if found, ok := cr.ResultsByResourceId[req.Resource.ObjectId]; ok && found.Membership == dispatch.DispatchCheckResponse_MEMBER { - permissionship = v1.CheckPermissionResponse_PERMISSIONSHIP_HAS_PERMISSION + if found, ok := cr.ResultsByResourceId[req.Resource.ObjectId]; ok { + if found.Membership == dispatch.ResourceCheckResult_MEMBER { + permissionship = v1.CheckPermissionResponse_PERMISSIONSHIP_HAS_PERMISSION + } else { + panic("caveats are not yet supported") + } } return &v1.CheckPermissionResponse{ diff --git a/pkg/development/assertions.go b/pkg/development/assertions.go index d4ad123983..5d269ef295 100644 --- a/pkg/development/assertions.go +++ b/pkg/development/assertions.go @@ -30,6 +30,8 @@ func RunAllAssertions(devContext *DevContext, assertions *blocks.Assertions) ([] func runAssertions(devContext *DevContext, assertions []blocks.Assertion, expected bool, fmtString string) ([]*devinterface.DeveloperError, error) { var failures []*devinterface.DeveloperError + + // TODO(jschorr): Support caveats via some sort of `assertMaybe`? for _, assertion := range assertions { tpl := tuple.MustFromRelationship(assertion.Relationship) cr, err := RunCheck(devContext, tpl.ResourceAndRelation, tpl.Subject) @@ -48,7 +50,7 @@ func runAssertions(devContext *DevContext, assertions []blocks.Assertion, expect if devErr != nil { failures = append(failures, devErr) } - } else if (cr == v1.DispatchCheckResponse_MEMBER) != expected { + } else if (cr == v1.ResourceCheckResult_MEMBER) != expected { failures = append(failures, &devinterface.DeveloperError{ Message: fmt.Sprintf(fmtString, tuple.String(tpl)), Source: devinterface.DeveloperError_ASSERTION, diff --git a/pkg/development/check.go b/pkg/development/check.go index f181c4dd8f..c05f8e24f3 100644 --- a/pkg/development/check.go +++ b/pkg/development/check.go @@ -10,7 +10,7 @@ import ( // // Note that it is up to the caller to call DistinguishGraphError on the error // if they want to distinguish between user errors and internal errors. -func RunCheck(devContext *DevContext, resource *core.ObjectAndRelation, subject *core.ObjectAndRelation) (v1.DispatchCheckResponse_Membership, error) { +func RunCheck(devContext *DevContext, resource *core.ObjectAndRelation, subject *core.ObjectAndRelation) (v1.ResourceCheckResult_Membership, error) { ctx := devContext.Ctx cr, err := devContext.Dispatcher.DispatchCheck(ctx, &v1.DispatchCheckRequest{ ResourceRelation: &core.RelationReference{ @@ -26,12 +26,12 @@ func RunCheck(devContext *DevContext, resource *core.ObjectAndRelation, subject }, }) if err != nil { - return v1.DispatchCheckResponse_NOT_MEMBER, err + return v1.ResourceCheckResult_NOT_MEMBER, err } if found, ok := cr.ResultsByResourceId[resource.ObjectId]; ok { return found.Membership, nil } - return v1.DispatchCheckResponse_NOT_MEMBER, nil + return v1.ResourceCheckResult_NOT_MEMBER, nil } diff --git a/pkg/development/wasm/operations.go b/pkg/development/wasm/operations.go index 3937a45b31..bbecf3e53a 100644 --- a/pkg/development/wasm/operations.go +++ b/pkg/development/wasm/operations.go @@ -56,8 +56,9 @@ func runOperation(devContext *development.DevContext, operation *devinterface.Op }, nil } + // TODO(jschorr): Support caveats here. membership := devinterface.CheckOperationsResult_NOT_MEMBER - if result == v1.DispatchCheckResponse_MEMBER { + if result == v1.ResourceCheckResult_MEMBER { membership = devinterface.CheckOperationsResult_MEMBER } diff --git a/pkg/proto/dispatch/v1/00_zerolog.go b/pkg/proto/dispatch/v1/00_zerolog.go index b345d1a7ca..dec1da7541 100644 --- a/pkg/proto/dispatch/v1/00_zerolog.go +++ b/pkg/proto/dispatch/v1/00_zerolog.go @@ -24,7 +24,7 @@ func (cr *DispatchCheckResponse) MarshalZerologObject(e *zerolog.Event) { results := zerolog.Dict() for resourceID, result := range cr.ResultsByResourceId { - results.Bool(resourceID, result.Membership == DispatchCheckResponse_MEMBER) + results.Str(resourceID, ResourceCheckResult_Membership_name[int32(result.Membership)]) } e.Dict("results", results) } diff --git a/pkg/proto/dispatch/v1/dispatch.pb.go b/pkg/proto/dispatch/v1/dispatch.pb.go index 066b4f0c99..09f52b2dd3 100644 --- a/pkg/proto/dispatch/v1/dispatch.pb.go +++ b/pkg/proto/dispatch/v1/dispatch.pb.go @@ -115,24 +115,24 @@ func (DispatchCheckRequest_ResultsSetting) EnumDescriptor() ([]byte, []int) { return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{0, 1} } -type DispatchCheckResponse_Membership int32 +type ResourceCheckResult_Membership int32 const ( - DispatchCheckResponse_UNKNOWN DispatchCheckResponse_Membership = 0 - DispatchCheckResponse_NOT_MEMBER DispatchCheckResponse_Membership = 1 - DispatchCheckResponse_MEMBER DispatchCheckResponse_Membership = 2 - DispatchCheckResponse_CAVEATED_MEMBER DispatchCheckResponse_Membership = 3 + ResourceCheckResult_UNKNOWN ResourceCheckResult_Membership = 0 + ResourceCheckResult_NOT_MEMBER ResourceCheckResult_Membership = 1 + ResourceCheckResult_MEMBER ResourceCheckResult_Membership = 2 + ResourceCheckResult_CAVEATED_MEMBER ResourceCheckResult_Membership = 3 ) -// Enum value maps for DispatchCheckResponse_Membership. +// Enum value maps for ResourceCheckResult_Membership. var ( - DispatchCheckResponse_Membership_name = map[int32]string{ + ResourceCheckResult_Membership_name = map[int32]string{ 0: "UNKNOWN", 1: "NOT_MEMBER", 2: "MEMBER", 3: "CAVEATED_MEMBER", } - DispatchCheckResponse_Membership_value = map[string]int32{ + ResourceCheckResult_Membership_value = map[string]int32{ "UNKNOWN": 0, "NOT_MEMBER": 1, "MEMBER": 2, @@ -140,31 +140,31 @@ var ( } ) -func (x DispatchCheckResponse_Membership) Enum() *DispatchCheckResponse_Membership { - p := new(DispatchCheckResponse_Membership) +func (x ResourceCheckResult_Membership) Enum() *ResourceCheckResult_Membership { + p := new(ResourceCheckResult_Membership) *p = x return p } -func (x DispatchCheckResponse_Membership) String() string { +func (x ResourceCheckResult_Membership) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (DispatchCheckResponse_Membership) Descriptor() protoreflect.EnumDescriptor { +func (ResourceCheckResult_Membership) Descriptor() protoreflect.EnumDescriptor { return file_dispatch_v1_dispatch_proto_enumTypes[2].Descriptor() } -func (DispatchCheckResponse_Membership) Type() protoreflect.EnumType { +func (ResourceCheckResult_Membership) Type() protoreflect.EnumType { return &file_dispatch_v1_dispatch_proto_enumTypes[2] } -func (x DispatchCheckResponse_Membership) Number() protoreflect.EnumNumber { +func (x ResourceCheckResult_Membership) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use DispatchCheckResponse_Membership.Descriptor instead. -func (DispatchCheckResponse_Membership) EnumDescriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{1, 0} +// Deprecated: Use ResourceCheckResult_Membership.Descriptor instead. +func (ResourceCheckResult_Membership) EnumDescriptor() ([]byte, []int) { + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{2, 0} } type CaveatOperation_Operation int32 @@ -216,7 +216,7 @@ func (x CaveatOperation_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use CaveatOperation_Operation.Descriptor instead. func (CaveatOperation_Operation) EnumDescriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{3, 0} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{4, 0} } type DispatchExpandRequest_ExpansionMode int32 @@ -262,7 +262,7 @@ func (x DispatchExpandRequest_ExpansionMode) Number() protoreflect.EnumNumber { // Deprecated: Use DispatchExpandRequest_ExpansionMode.Descriptor instead. func (DispatchExpandRequest_ExpansionMode) EnumDescriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{4, 0} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{5, 0} } type ReachableResource_ResultStatus int32 @@ -312,7 +312,7 @@ func (x ReachableResource_ResultStatus) Number() protoreflect.EnumNumber { // Deprecated: Use ReachableResource_ResultStatus.Descriptor instead. func (ReachableResource_ResultStatus) EnumDescriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{9, 0} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{10, 0} } type CheckDebugTrace_RelationType int32 @@ -361,7 +361,7 @@ func (x CheckDebugTrace_RelationType) Number() protoreflect.EnumNumber { // Deprecated: Use CheckDebugTrace_RelationType.Descriptor instead. func (CheckDebugTrace_RelationType) EnumDescriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{17, 0} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{18, 0} } type DispatchCheckRequest struct { @@ -456,8 +456,8 @@ type DispatchCheckResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ResultsByResourceId map[string]*DispatchCheckResponse_ResourceCheckResult `protobuf:"bytes,2,rep,name=results_by_resource_id,json=resultsByResourceId,proto3" json:"results_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Metadata *ResponseMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResultsByResourceId map[string]*ResourceCheckResult `protobuf:"bytes,2,rep,name=results_by_resource_id,json=resultsByResourceId,proto3" json:"results_by_resource_id,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *DispatchCheckResponse) Reset() { @@ -499,13 +499,68 @@ func (x *DispatchCheckResponse) GetMetadata() *ResponseMeta { return nil } -func (x *DispatchCheckResponse) GetResultsByResourceId() map[string]*DispatchCheckResponse_ResourceCheckResult { +func (x *DispatchCheckResponse) GetResultsByResourceId() map[string]*ResourceCheckResult { if x != nil { return x.ResultsByResourceId } return nil } +type ResourceCheckResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Membership ResourceCheckResult_Membership `protobuf:"varint,1,opt,name=membership,proto3,enum=dispatch.v1.ResourceCheckResult_Membership" json:"membership,omitempty"` + Expression *CaveatExpression `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` +} + +func (x *ResourceCheckResult) Reset() { + *x = ResourceCheckResult{} + if protoimpl.UnsafeEnabled { + mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceCheckResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceCheckResult) ProtoMessage() {} + +func (x *ResourceCheckResult) ProtoReflect() protoreflect.Message { + mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceCheckResult.ProtoReflect.Descriptor instead. +func (*ResourceCheckResult) Descriptor() ([]byte, []int) { + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{2} +} + +func (x *ResourceCheckResult) GetMembership() ResourceCheckResult_Membership { + if x != nil { + return x.Membership + } + return ResourceCheckResult_UNKNOWN +} + +func (x *ResourceCheckResult) GetExpression() *CaveatExpression { + if x != nil { + return x.Expression + } + return nil +} + type CaveatExpression struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -521,7 +576,7 @@ type CaveatExpression struct { func (x *CaveatExpression) Reset() { *x = CaveatExpression{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -534,7 +589,7 @@ func (x *CaveatExpression) String() string { func (*CaveatExpression) ProtoMessage() {} func (x *CaveatExpression) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[2] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -547,7 +602,7 @@ func (x *CaveatExpression) ProtoReflect() protoreflect.Message { // Deprecated: Use CaveatExpression.ProtoReflect.Descriptor instead. func (*CaveatExpression) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{2} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{3} } func (m *CaveatExpression) GetOperationOrCaveat() isCaveatExpression_OperationOrCaveat { @@ -599,7 +654,7 @@ type CaveatOperation struct { func (x *CaveatOperation) Reset() { *x = CaveatOperation{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -612,7 +667,7 @@ func (x *CaveatOperation) String() string { func (*CaveatOperation) ProtoMessage() {} func (x *CaveatOperation) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[3] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -625,7 +680,7 @@ func (x *CaveatOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use CaveatOperation.ProtoReflect.Descriptor instead. func (*CaveatOperation) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{3} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{4} } func (x *CaveatOperation) GetOp() CaveatOperation_Operation { @@ -655,7 +710,7 @@ type DispatchExpandRequest struct { func (x *DispatchExpandRequest) Reset() { *x = DispatchExpandRequest{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -668,7 +723,7 @@ func (x *DispatchExpandRequest) String() string { func (*DispatchExpandRequest) ProtoMessage() {} func (x *DispatchExpandRequest) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[4] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -681,7 +736,7 @@ func (x *DispatchExpandRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchExpandRequest.ProtoReflect.Descriptor instead. func (*DispatchExpandRequest) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{4} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{5} } func (x *DispatchExpandRequest) GetMetadata() *ResolverMeta { @@ -717,7 +772,7 @@ type DispatchExpandResponse struct { func (x *DispatchExpandResponse) Reset() { *x = DispatchExpandResponse{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -730,7 +785,7 @@ func (x *DispatchExpandResponse) String() string { func (*DispatchExpandResponse) ProtoMessage() {} func (x *DispatchExpandResponse) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[5] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -743,7 +798,7 @@ func (x *DispatchExpandResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchExpandResponse.ProtoReflect.Descriptor instead. func (*DispatchExpandResponse) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{5} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{6} } func (x *DispatchExpandResponse) GetMetadata() *ResponseMeta { @@ -776,7 +831,7 @@ type DispatchLookupRequest struct { func (x *DispatchLookupRequest) Reset() { *x = DispatchLookupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -789,7 +844,7 @@ func (x *DispatchLookupRequest) String() string { func (*DispatchLookupRequest) ProtoMessage() {} func (x *DispatchLookupRequest) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[6] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -802,7 +857,7 @@ func (x *DispatchLookupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchLookupRequest.ProtoReflect.Descriptor instead. func (*DispatchLookupRequest) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{6} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{7} } func (x *DispatchLookupRequest) GetMetadata() *ResolverMeta { @@ -860,7 +915,7 @@ type DispatchLookupResponse struct { func (x *DispatchLookupResponse) Reset() { *x = DispatchLookupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -873,7 +928,7 @@ func (x *DispatchLookupResponse) String() string { func (*DispatchLookupResponse) ProtoMessage() {} func (x *DispatchLookupResponse) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[7] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -886,7 +941,7 @@ func (x *DispatchLookupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchLookupResponse.ProtoReflect.Descriptor instead. func (*DispatchLookupResponse) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{7} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{8} } func (x *DispatchLookupResponse) GetMetadata() *ResponseMeta { @@ -924,7 +979,7 @@ type DispatchReachableResourcesRequest struct { func (x *DispatchReachableResourcesRequest) Reset() { *x = DispatchReachableResourcesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -937,7 +992,7 @@ func (x *DispatchReachableResourcesRequest) String() string { func (*DispatchReachableResourcesRequest) ProtoMessage() {} func (x *DispatchReachableResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[8] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -950,7 +1005,7 @@ func (x *DispatchReachableResourcesRequest) ProtoReflect() protoreflect.Message // Deprecated: Use DispatchReachableResourcesRequest.ProtoReflect.Descriptor instead. func (*DispatchReachableResourcesRequest) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{8} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{9} } func (x *DispatchReachableResourcesRequest) GetMetadata() *ResolverMeta { @@ -993,7 +1048,7 @@ type ReachableResource struct { func (x *ReachableResource) Reset() { *x = ReachableResource{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1006,7 +1061,7 @@ func (x *ReachableResource) String() string { func (*ReachableResource) ProtoMessage() {} func (x *ReachableResource) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[9] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1019,7 +1074,7 @@ func (x *ReachableResource) ProtoReflect() protoreflect.Message { // Deprecated: Use ReachableResource.ProtoReflect.Descriptor instead. func (*ReachableResource) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{9} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{10} } func (x *ReachableResource) GetResourceIds() []string { @@ -1048,7 +1103,7 @@ type DispatchReachableResourcesResponse struct { func (x *DispatchReachableResourcesResponse) Reset() { *x = DispatchReachableResourcesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1061,7 +1116,7 @@ func (x *DispatchReachableResourcesResponse) String() string { func (*DispatchReachableResourcesResponse) ProtoMessage() {} func (x *DispatchReachableResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[10] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1074,7 +1129,7 @@ func (x *DispatchReachableResourcesResponse) ProtoReflect() protoreflect.Message // Deprecated: Use DispatchReachableResourcesResponse.ProtoReflect.Descriptor instead. func (*DispatchReachableResourcesResponse) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{10} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{11} } func (x *DispatchReachableResourcesResponse) GetResource() *ReachableResource { @@ -1105,7 +1160,7 @@ type DispatchLookupSubjectsRequest struct { func (x *DispatchLookupSubjectsRequest) Reset() { *x = DispatchLookupSubjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1118,7 +1173,7 @@ func (x *DispatchLookupSubjectsRequest) String() string { func (*DispatchLookupSubjectsRequest) ProtoMessage() {} func (x *DispatchLookupSubjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[11] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1131,7 +1186,7 @@ func (x *DispatchLookupSubjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchLookupSubjectsRequest.ProtoReflect.Descriptor instead. func (*DispatchLookupSubjectsRequest) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{11} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{12} } func (x *DispatchLookupSubjectsRequest) GetMetadata() *ResolverMeta { @@ -1174,7 +1229,7 @@ type FoundSubject struct { func (x *FoundSubject) Reset() { *x = FoundSubject{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1242,7 @@ func (x *FoundSubject) String() string { func (*FoundSubject) ProtoMessage() {} func (x *FoundSubject) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[12] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1255,7 @@ func (x *FoundSubject) ProtoReflect() protoreflect.Message { // Deprecated: Use FoundSubject.ProtoReflect.Descriptor instead. func (*FoundSubject) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{12} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{13} } func (x *FoundSubject) GetSubjectId() string { @@ -1229,7 +1284,7 @@ type DispatchLookupSubjectsResponse struct { func (x *DispatchLookupSubjectsResponse) Reset() { *x = DispatchLookupSubjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1242,7 +1297,7 @@ func (x *DispatchLookupSubjectsResponse) String() string { func (*DispatchLookupSubjectsResponse) ProtoMessage() {} func (x *DispatchLookupSubjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[13] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1255,7 +1310,7 @@ func (x *DispatchLookupSubjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchLookupSubjectsResponse.ProtoReflect.Descriptor instead. func (*DispatchLookupSubjectsResponse) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{13} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{14} } func (x *DispatchLookupSubjectsResponse) GetFoundSubjects() []*FoundSubject { @@ -1284,7 +1339,7 @@ type ResolverMeta struct { func (x *ResolverMeta) Reset() { *x = ResolverMeta{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1297,7 +1352,7 @@ func (x *ResolverMeta) String() string { func (*ResolverMeta) ProtoMessage() {} func (x *ResolverMeta) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[14] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1310,7 +1365,7 @@ func (x *ResolverMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolverMeta.ProtoReflect.Descriptor instead. func (*ResolverMeta) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{14} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{15} } func (x *ResolverMeta) GetAtRevision() string { @@ -1341,7 +1396,7 @@ type ResponseMeta struct { func (x *ResponseMeta) Reset() { *x = ResponseMeta{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1354,7 +1409,7 @@ func (x *ResponseMeta) String() string { func (*ResponseMeta) ProtoMessage() {} func (x *ResponseMeta) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[15] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1367,7 +1422,7 @@ func (x *ResponseMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use ResponseMeta.ProtoReflect.Descriptor instead. func (*ResponseMeta) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{15} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{16} } func (x *ResponseMeta) GetDispatchCount() uint32 { @@ -1409,7 +1464,7 @@ type DebugInformation struct { func (x *DebugInformation) Reset() { *x = DebugInformation{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1422,7 +1477,7 @@ func (x *DebugInformation) String() string { func (*DebugInformation) ProtoMessage() {} func (x *DebugInformation) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[16] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1435,7 +1490,7 @@ func (x *DebugInformation) ProtoReflect() protoreflect.Message { // Deprecated: Use DebugInformation.ProtoReflect.Descriptor instead. func (*DebugInformation) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{16} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{17} } func (x *DebugInformation) GetCheck() *CheckDebugTrace { @@ -1450,17 +1505,17 @@ type CheckDebugTrace struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Request *DispatchCheckRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - ResourceRelationType CheckDebugTrace_RelationType `protobuf:"varint,2,opt,name=resource_relation_type,json=resourceRelationType,proto3,enum=dispatch.v1.CheckDebugTrace_RelationType" json:"resource_relation_type,omitempty"` - Results map[string]*CheckDebugTrace_ResourceCheckResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - IsCachedResult bool `protobuf:"varint,4,opt,name=is_cached_result,json=isCachedResult,proto3" json:"is_cached_result,omitempty"` - SubProblems []*CheckDebugTrace `protobuf:"bytes,5,rep,name=sub_problems,json=subProblems,proto3" json:"sub_problems,omitempty"` + Request *DispatchCheckRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + ResourceRelationType CheckDebugTrace_RelationType `protobuf:"varint,2,opt,name=resource_relation_type,json=resourceRelationType,proto3,enum=dispatch.v1.CheckDebugTrace_RelationType" json:"resource_relation_type,omitempty"` + Results map[string]*ResourceCheckResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + IsCachedResult bool `protobuf:"varint,4,opt,name=is_cached_result,json=isCachedResult,proto3" json:"is_cached_result,omitempty"` + SubProblems []*CheckDebugTrace `protobuf:"bytes,5,rep,name=sub_problems,json=subProblems,proto3" json:"sub_problems,omitempty"` } func (x *CheckDebugTrace) Reset() { *x = CheckDebugTrace{} if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1473,7 +1528,7 @@ func (x *CheckDebugTrace) String() string { func (*CheckDebugTrace) ProtoMessage() {} func (x *CheckDebugTrace) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[17] + mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1486,7 +1541,7 @@ func (x *CheckDebugTrace) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckDebugTrace.ProtoReflect.Descriptor instead. func (*CheckDebugTrace) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{17} + return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{18} } func (x *CheckDebugTrace) GetRequest() *DispatchCheckRequest { @@ -1503,7 +1558,7 @@ func (x *CheckDebugTrace) GetResourceRelationType() CheckDebugTrace_RelationType return CheckDebugTrace_UNKNOWN } -func (x *CheckDebugTrace) GetResults() map[string]*CheckDebugTrace_ResourceCheckResult { +func (x *CheckDebugTrace) GetResults() map[string]*ResourceCheckResult { if x != nil { return x.Results } @@ -1524,108 +1579,6 @@ func (x *CheckDebugTrace) GetSubProblems() []*CheckDebugTrace { return nil } -type DispatchCheckResponse_ResourceCheckResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Membership DispatchCheckResponse_Membership `protobuf:"varint,1,opt,name=membership,proto3,enum=dispatch.v1.DispatchCheckResponse_Membership" json:"membership,omitempty"` - Expression *CaveatExpression `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` -} - -func (x *DispatchCheckResponse_ResourceCheckResult) Reset() { - *x = DispatchCheckResponse_ResourceCheckResult{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DispatchCheckResponse_ResourceCheckResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DispatchCheckResponse_ResourceCheckResult) ProtoMessage() {} - -func (x *DispatchCheckResponse_ResourceCheckResult) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DispatchCheckResponse_ResourceCheckResult.ProtoReflect.Descriptor instead. -func (*DispatchCheckResponse_ResourceCheckResult) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *DispatchCheckResponse_ResourceCheckResult) GetMembership() DispatchCheckResponse_Membership { - if x != nil { - return x.Membership - } - return DispatchCheckResponse_UNKNOWN -} - -func (x *DispatchCheckResponse_ResourceCheckResult) GetExpression() *CaveatExpression { - if x != nil { - return x.Expression - } - return nil -} - -type CheckDebugTrace_ResourceCheckResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HasPermission bool `protobuf:"varint,2,opt,name=has_permission,json=hasPermission,proto3" json:"has_permission,omitempty"` -} - -func (x *CheckDebugTrace_ResourceCheckResult) Reset() { - *x = CheckDebugTrace_ResourceCheckResult{} - if protoimpl.UnsafeEnabled { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckDebugTrace_ResourceCheckResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckDebugTrace_ResourceCheckResult) ProtoMessage() {} - -func (x *CheckDebugTrace_ResourceCheckResult) ProtoReflect() protoreflect.Message { - mi := &file_dispatch_v1_dispatch_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckDebugTrace_ResourceCheckResult.ProtoReflect.Descriptor instead. -func (*CheckDebugTrace_ResourceCheckResult) Descriptor() ([]byte, []int) { - return file_dispatch_v1_dispatch_proto_rawDescGZIP(), []int{17, 0} -} - -func (x *CheckDebugTrace_ResourceCheckResult) GetHasPermission() bool { - if x != nil { - return x.HasPermission - } - return false -} - var File_dispatch_v1_dispatch_proto protoreflect.FileDescriptor var file_dispatch_v1_dispatch_proto_rawDesc = []byte{ @@ -1670,7 +1623,7 @@ var file_dispatch_v1_dispatch_proto_rawDesc = []byte{ 0x75, 0x6c, 0x74, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x53, 0x49, - 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x22, 0xb2, 0x04, + 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, @@ -1683,299 +1636,293 @@ var file_dispatch_v1_dispatch_proto_rawDesc = []byte{ 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, - 0x1a, 0xa3, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, - 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x7e, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, - 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, - 0x10, 0x03, 0x22, 0xa0, 0x01, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x15, - 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x63, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x02, 0x6f, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, - 0x70, 0x12, 0x39, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x09, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, 0x10, 0x03, - 0x22, 0xb8, 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x15, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x0d, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2b, - 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x52, 0x45, 0x43, 0x55, 0x52, 0x53, 0x49, 0x56, 0x45, 0x10, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x16, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, - 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x08, 0x74, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0xf5, 0x02, 0x0a, 0x15, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, - 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x37, 0x0a, 0x09, 0x74, 0x74, 0x75, - 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x74, 0x74, 0x75, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x22, 0xc0, 0x01, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, - 0x5f, 0x6f, 0x6e, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x4f, 0x6e, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x21, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x1a, 0x68, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x11, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xed, 0x01, 0x0a, 0x13, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x4b, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, + 0x3d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4a, + 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, + 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, + 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, + 0x44, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x22, 0xa0, 0x01, 0x0a, 0x10, 0x43, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x3c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, + 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x22, 0xb8, 0x01, + 0x0a, 0x0f, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x36, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, + 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, + 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, + 0x0a, 0x02, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, + 0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, 0x10, 0x03, 0x22, 0xb8, 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, + 0x0e, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x48, 0x41, 0x4c, 0x4c, + 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x43, 0x55, 0x52, 0x53, 0x49, 0x56, + 0x45, 0x10, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x74, 0x72, 0x65, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x22, 0xf5, 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, + 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, + 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x12, 0x37, 0x0a, 0x09, 0x74, 0x74, 0x75, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x08, 0x74, 0x74, 0x75, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x22, 0xc0, 0x01, 0x0a, 0x16, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x0d, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x4f, 0x6e, 0x72, 0x73, 0x12, 0x2e, 0x0a, + 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xa9, 0x02, + 0x0a, 0x21, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x11, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x64, 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x36, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x53, + 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x41, 0x53, 0x5f, + 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x22, 0x97, 0x01, 0x0a, + 0x22, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa7, 0x02, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, - 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x36, 0x0a, 0x0c, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, - 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x53, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x00, - 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x41, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x22, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, - 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa7, - 0x02, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x0c, 0x46, 0x6f, 0x75, 0x6e, - 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x1e, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, - 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x0d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x35, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7d, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, - 0x15, 0x32, 0x13, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x5c, 0x2e, 0x5b, 0x30, 0x2d, - 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x24, 0x52, 0x0a, 0x61, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6d, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x6d, 0x61, 0x69, - 0x6e, 0x69, 0x6e, 0x67, 0x22, 0xda, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x64, 0x65, 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x13, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, - 0x06, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x52, 0x05, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x22, 0xc6, 0x04, 0x0a, 0x0f, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x3b, 0x0a, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x16, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, + 0x22, 0x5f, 0x0a, 0x0c, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x30, 0x0a, 0x14, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x73, 0x22, 0x99, 0x01, 0x0a, 0x1e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x75, 0x6e, 0x64, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7d, 0x0a, + 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3b, 0x0a, + 0x0b, 0x61, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x32, 0x13, 0x5e, 0x5b, 0x30, 0x2d, 0x39, + 0x5d, 0x2b, 0x28, 0x5c, 0x2e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x24, 0x52, 0x0a, + 0x61, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x0f, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0xda, 0x01, 0x0a, + 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x25, 0x0a, + 0x0e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x74, 0x68, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x3c, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x65, 0x62, + 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, + 0x05, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x75, - 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x0b, - 0x73, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x1a, 0x3c, 0x0a, 0x13, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x68, 0x61, 0x73, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x6c, 0x0a, 0x0c, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x10, 0x02, 0x32, 0xa0, 0x04, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5b, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, - 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, - 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x1a, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x69, 0x73, 0x70, + 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x22, 0xf8, 0x03, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, + 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x62, 0x6c, + 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x39, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x32, 0xa0, 0x04, 0x0a, + 0x0f, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x58, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0e, 0x44, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x75, - 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0xaa, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, - 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0b, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x1a, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x75, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, + 0xaa, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1991,97 +1938,96 @@ func file_dispatch_v1_dispatch_proto_rawDescGZIP() []byte { } var file_dispatch_v1_dispatch_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_dispatch_v1_dispatch_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_dispatch_v1_dispatch_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_dispatch_v1_dispatch_proto_goTypes = []interface{}{ - (DispatchCheckRequest_DebugSetting)(0), // 0: dispatch.v1.DispatchCheckRequest.DebugSetting - (DispatchCheckRequest_ResultsSetting)(0), // 1: dispatch.v1.DispatchCheckRequest.ResultsSetting - (DispatchCheckResponse_Membership)(0), // 2: dispatch.v1.DispatchCheckResponse.Membership - (CaveatOperation_Operation)(0), // 3: dispatch.v1.CaveatOperation.Operation - (DispatchExpandRequest_ExpansionMode)(0), // 4: dispatch.v1.DispatchExpandRequest.ExpansionMode - (ReachableResource_ResultStatus)(0), // 5: dispatch.v1.ReachableResource.ResultStatus - (CheckDebugTrace_RelationType)(0), // 6: dispatch.v1.CheckDebugTrace.RelationType - (*DispatchCheckRequest)(nil), // 7: dispatch.v1.DispatchCheckRequest - (*DispatchCheckResponse)(nil), // 8: dispatch.v1.DispatchCheckResponse - (*CaveatExpression)(nil), // 9: dispatch.v1.CaveatExpression - (*CaveatOperation)(nil), // 10: dispatch.v1.CaveatOperation - (*DispatchExpandRequest)(nil), // 11: dispatch.v1.DispatchExpandRequest - (*DispatchExpandResponse)(nil), // 12: dispatch.v1.DispatchExpandResponse - (*DispatchLookupRequest)(nil), // 13: dispatch.v1.DispatchLookupRequest - (*DispatchLookupResponse)(nil), // 14: dispatch.v1.DispatchLookupResponse - (*DispatchReachableResourcesRequest)(nil), // 15: dispatch.v1.DispatchReachableResourcesRequest - (*ReachableResource)(nil), // 16: dispatch.v1.ReachableResource - (*DispatchReachableResourcesResponse)(nil), // 17: dispatch.v1.DispatchReachableResourcesResponse - (*DispatchLookupSubjectsRequest)(nil), // 18: dispatch.v1.DispatchLookupSubjectsRequest - (*FoundSubject)(nil), // 19: dispatch.v1.FoundSubject - (*DispatchLookupSubjectsResponse)(nil), // 20: dispatch.v1.DispatchLookupSubjectsResponse - (*ResolverMeta)(nil), // 21: dispatch.v1.ResolverMeta - (*ResponseMeta)(nil), // 22: dispatch.v1.ResponseMeta - (*DebugInformation)(nil), // 23: dispatch.v1.DebugInformation - (*CheckDebugTrace)(nil), // 24: dispatch.v1.CheckDebugTrace - (*DispatchCheckResponse_ResourceCheckResult)(nil), // 25: dispatch.v1.DispatchCheckResponse.ResourceCheckResult - nil, // 26: dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntry - (*CheckDebugTrace_ResourceCheckResult)(nil), // 27: dispatch.v1.CheckDebugTrace.ResourceCheckResult - nil, // 28: dispatch.v1.CheckDebugTrace.ResultsEntry - (*v1.RelationReference)(nil), // 29: core.v1.RelationReference - (*v1.ObjectAndRelation)(nil), // 30: core.v1.ObjectAndRelation - (*v1.ContextualizedCaveat)(nil), // 31: core.v1.ContextualizedCaveat - (*v1.RelationTupleTreeNode)(nil), // 32: core.v1.RelationTupleTreeNode + (DispatchCheckRequest_DebugSetting)(0), // 0: dispatch.v1.DispatchCheckRequest.DebugSetting + (DispatchCheckRequest_ResultsSetting)(0), // 1: dispatch.v1.DispatchCheckRequest.ResultsSetting + (ResourceCheckResult_Membership)(0), // 2: dispatch.v1.ResourceCheckResult.Membership + (CaveatOperation_Operation)(0), // 3: dispatch.v1.CaveatOperation.Operation + (DispatchExpandRequest_ExpansionMode)(0), // 4: dispatch.v1.DispatchExpandRequest.ExpansionMode + (ReachableResource_ResultStatus)(0), // 5: dispatch.v1.ReachableResource.ResultStatus + (CheckDebugTrace_RelationType)(0), // 6: dispatch.v1.CheckDebugTrace.RelationType + (*DispatchCheckRequest)(nil), // 7: dispatch.v1.DispatchCheckRequest + (*DispatchCheckResponse)(nil), // 8: dispatch.v1.DispatchCheckResponse + (*ResourceCheckResult)(nil), // 9: dispatch.v1.ResourceCheckResult + (*CaveatExpression)(nil), // 10: dispatch.v1.CaveatExpression + (*CaveatOperation)(nil), // 11: dispatch.v1.CaveatOperation + (*DispatchExpandRequest)(nil), // 12: dispatch.v1.DispatchExpandRequest + (*DispatchExpandResponse)(nil), // 13: dispatch.v1.DispatchExpandResponse + (*DispatchLookupRequest)(nil), // 14: dispatch.v1.DispatchLookupRequest + (*DispatchLookupResponse)(nil), // 15: dispatch.v1.DispatchLookupResponse + (*DispatchReachableResourcesRequest)(nil), // 16: dispatch.v1.DispatchReachableResourcesRequest + (*ReachableResource)(nil), // 17: dispatch.v1.ReachableResource + (*DispatchReachableResourcesResponse)(nil), // 18: dispatch.v1.DispatchReachableResourcesResponse + (*DispatchLookupSubjectsRequest)(nil), // 19: dispatch.v1.DispatchLookupSubjectsRequest + (*FoundSubject)(nil), // 20: dispatch.v1.FoundSubject + (*DispatchLookupSubjectsResponse)(nil), // 21: dispatch.v1.DispatchLookupSubjectsResponse + (*ResolverMeta)(nil), // 22: dispatch.v1.ResolverMeta + (*ResponseMeta)(nil), // 23: dispatch.v1.ResponseMeta + (*DebugInformation)(nil), // 24: dispatch.v1.DebugInformation + (*CheckDebugTrace)(nil), // 25: dispatch.v1.CheckDebugTrace + nil, // 26: dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntry + nil, // 27: dispatch.v1.CheckDebugTrace.ResultsEntry + (*v1.RelationReference)(nil), // 28: core.v1.RelationReference + (*v1.ObjectAndRelation)(nil), // 29: core.v1.ObjectAndRelation + (*v1.ContextualizedCaveat)(nil), // 30: core.v1.ContextualizedCaveat + (*v1.RelationTupleTreeNode)(nil), // 31: core.v1.RelationTupleTreeNode } var file_dispatch_v1_dispatch_proto_depIdxs = []int32{ - 21, // 0: dispatch.v1.DispatchCheckRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 29, // 1: dispatch.v1.DispatchCheckRequest.resource_relation:type_name -> core.v1.RelationReference - 30, // 2: dispatch.v1.DispatchCheckRequest.subject:type_name -> core.v1.ObjectAndRelation + 22, // 0: dispatch.v1.DispatchCheckRequest.metadata:type_name -> dispatch.v1.ResolverMeta + 28, // 1: dispatch.v1.DispatchCheckRequest.resource_relation:type_name -> core.v1.RelationReference + 29, // 2: dispatch.v1.DispatchCheckRequest.subject:type_name -> core.v1.ObjectAndRelation 1, // 3: dispatch.v1.DispatchCheckRequest.results_setting:type_name -> dispatch.v1.DispatchCheckRequest.ResultsSetting 0, // 4: dispatch.v1.DispatchCheckRequest.debug:type_name -> dispatch.v1.DispatchCheckRequest.DebugSetting - 22, // 5: dispatch.v1.DispatchCheckResponse.metadata:type_name -> dispatch.v1.ResponseMeta + 23, // 5: dispatch.v1.DispatchCheckResponse.metadata:type_name -> dispatch.v1.ResponseMeta 26, // 6: dispatch.v1.DispatchCheckResponse.results_by_resource_id:type_name -> dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntry - 10, // 7: dispatch.v1.CaveatExpression.operation:type_name -> dispatch.v1.CaveatOperation - 31, // 8: dispatch.v1.CaveatExpression.caveat:type_name -> core.v1.ContextualizedCaveat - 3, // 9: dispatch.v1.CaveatOperation.op:type_name -> dispatch.v1.CaveatOperation.Operation - 9, // 10: dispatch.v1.CaveatOperation.children:type_name -> dispatch.v1.CaveatExpression - 21, // 11: dispatch.v1.DispatchExpandRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 30, // 12: dispatch.v1.DispatchExpandRequest.resource_and_relation:type_name -> core.v1.ObjectAndRelation - 4, // 13: dispatch.v1.DispatchExpandRequest.expansion_mode:type_name -> dispatch.v1.DispatchExpandRequest.ExpansionMode - 22, // 14: dispatch.v1.DispatchExpandResponse.metadata:type_name -> dispatch.v1.ResponseMeta - 32, // 15: dispatch.v1.DispatchExpandResponse.tree_node:type_name -> core.v1.RelationTupleTreeNode - 21, // 16: dispatch.v1.DispatchLookupRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 29, // 17: dispatch.v1.DispatchLookupRequest.object_relation:type_name -> core.v1.RelationReference - 30, // 18: dispatch.v1.DispatchLookupRequest.subject:type_name -> core.v1.ObjectAndRelation - 29, // 19: dispatch.v1.DispatchLookupRequest.direct_stack:type_name -> core.v1.RelationReference - 29, // 20: dispatch.v1.DispatchLookupRequest.ttu_stack:type_name -> core.v1.RelationReference - 22, // 21: dispatch.v1.DispatchLookupResponse.metadata:type_name -> dispatch.v1.ResponseMeta - 30, // 22: dispatch.v1.DispatchLookupResponse.resolved_onrs:type_name -> core.v1.ObjectAndRelation - 21, // 23: dispatch.v1.DispatchReachableResourcesRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 29, // 24: dispatch.v1.DispatchReachableResourcesRequest.resource_relation:type_name -> core.v1.RelationReference - 29, // 25: dispatch.v1.DispatchReachableResourcesRequest.subject_relation:type_name -> core.v1.RelationReference - 5, // 26: dispatch.v1.ReachableResource.result_status:type_name -> dispatch.v1.ReachableResource.ResultStatus - 16, // 27: dispatch.v1.DispatchReachableResourcesResponse.resource:type_name -> dispatch.v1.ReachableResource - 22, // 28: dispatch.v1.DispatchReachableResourcesResponse.metadata:type_name -> dispatch.v1.ResponseMeta - 21, // 29: dispatch.v1.DispatchLookupSubjectsRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 29, // 30: dispatch.v1.DispatchLookupSubjectsRequest.resource_relation:type_name -> core.v1.RelationReference - 29, // 31: dispatch.v1.DispatchLookupSubjectsRequest.subject_relation:type_name -> core.v1.RelationReference - 19, // 32: dispatch.v1.DispatchLookupSubjectsResponse.found_subjects:type_name -> dispatch.v1.FoundSubject - 22, // 33: dispatch.v1.DispatchLookupSubjectsResponse.metadata:type_name -> dispatch.v1.ResponseMeta - 23, // 34: dispatch.v1.ResponseMeta.debug_info:type_name -> dispatch.v1.DebugInformation - 24, // 35: dispatch.v1.DebugInformation.check:type_name -> dispatch.v1.CheckDebugTrace - 7, // 36: dispatch.v1.CheckDebugTrace.request:type_name -> dispatch.v1.DispatchCheckRequest - 6, // 37: dispatch.v1.CheckDebugTrace.resource_relation_type:type_name -> dispatch.v1.CheckDebugTrace.RelationType - 28, // 38: dispatch.v1.CheckDebugTrace.results:type_name -> dispatch.v1.CheckDebugTrace.ResultsEntry - 24, // 39: dispatch.v1.CheckDebugTrace.sub_problems:type_name -> dispatch.v1.CheckDebugTrace - 2, // 40: dispatch.v1.DispatchCheckResponse.ResourceCheckResult.membership:type_name -> dispatch.v1.DispatchCheckResponse.Membership - 9, // 41: dispatch.v1.DispatchCheckResponse.ResourceCheckResult.expression:type_name -> dispatch.v1.CaveatExpression - 25, // 42: dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntry.value:type_name -> dispatch.v1.DispatchCheckResponse.ResourceCheckResult - 27, // 43: dispatch.v1.CheckDebugTrace.ResultsEntry.value:type_name -> dispatch.v1.CheckDebugTrace.ResourceCheckResult + 2, // 7: dispatch.v1.ResourceCheckResult.membership:type_name -> dispatch.v1.ResourceCheckResult.Membership + 10, // 8: dispatch.v1.ResourceCheckResult.expression:type_name -> dispatch.v1.CaveatExpression + 11, // 9: dispatch.v1.CaveatExpression.operation:type_name -> dispatch.v1.CaveatOperation + 30, // 10: dispatch.v1.CaveatExpression.caveat:type_name -> core.v1.ContextualizedCaveat + 3, // 11: dispatch.v1.CaveatOperation.op:type_name -> dispatch.v1.CaveatOperation.Operation + 10, // 12: dispatch.v1.CaveatOperation.children:type_name -> dispatch.v1.CaveatExpression + 22, // 13: dispatch.v1.DispatchExpandRequest.metadata:type_name -> dispatch.v1.ResolverMeta + 29, // 14: dispatch.v1.DispatchExpandRequest.resource_and_relation:type_name -> core.v1.ObjectAndRelation + 4, // 15: dispatch.v1.DispatchExpandRequest.expansion_mode:type_name -> dispatch.v1.DispatchExpandRequest.ExpansionMode + 23, // 16: dispatch.v1.DispatchExpandResponse.metadata:type_name -> dispatch.v1.ResponseMeta + 31, // 17: dispatch.v1.DispatchExpandResponse.tree_node:type_name -> core.v1.RelationTupleTreeNode + 22, // 18: dispatch.v1.DispatchLookupRequest.metadata:type_name -> dispatch.v1.ResolverMeta + 28, // 19: dispatch.v1.DispatchLookupRequest.object_relation:type_name -> core.v1.RelationReference + 29, // 20: dispatch.v1.DispatchLookupRequest.subject:type_name -> core.v1.ObjectAndRelation + 28, // 21: dispatch.v1.DispatchLookupRequest.direct_stack:type_name -> core.v1.RelationReference + 28, // 22: dispatch.v1.DispatchLookupRequest.ttu_stack:type_name -> core.v1.RelationReference + 23, // 23: dispatch.v1.DispatchLookupResponse.metadata:type_name -> dispatch.v1.ResponseMeta + 29, // 24: dispatch.v1.DispatchLookupResponse.resolved_onrs:type_name -> core.v1.ObjectAndRelation + 22, // 25: dispatch.v1.DispatchReachableResourcesRequest.metadata:type_name -> dispatch.v1.ResolverMeta + 28, // 26: dispatch.v1.DispatchReachableResourcesRequest.resource_relation:type_name -> core.v1.RelationReference + 28, // 27: dispatch.v1.DispatchReachableResourcesRequest.subject_relation:type_name -> core.v1.RelationReference + 5, // 28: dispatch.v1.ReachableResource.result_status:type_name -> dispatch.v1.ReachableResource.ResultStatus + 17, // 29: dispatch.v1.DispatchReachableResourcesResponse.resource:type_name -> dispatch.v1.ReachableResource + 23, // 30: dispatch.v1.DispatchReachableResourcesResponse.metadata:type_name -> dispatch.v1.ResponseMeta + 22, // 31: dispatch.v1.DispatchLookupSubjectsRequest.metadata:type_name -> dispatch.v1.ResolverMeta + 28, // 32: dispatch.v1.DispatchLookupSubjectsRequest.resource_relation:type_name -> core.v1.RelationReference + 28, // 33: dispatch.v1.DispatchLookupSubjectsRequest.subject_relation:type_name -> core.v1.RelationReference + 20, // 34: dispatch.v1.DispatchLookupSubjectsResponse.found_subjects:type_name -> dispatch.v1.FoundSubject + 23, // 35: dispatch.v1.DispatchLookupSubjectsResponse.metadata:type_name -> dispatch.v1.ResponseMeta + 24, // 36: dispatch.v1.ResponseMeta.debug_info:type_name -> dispatch.v1.DebugInformation + 25, // 37: dispatch.v1.DebugInformation.check:type_name -> dispatch.v1.CheckDebugTrace + 7, // 38: dispatch.v1.CheckDebugTrace.request:type_name -> dispatch.v1.DispatchCheckRequest + 6, // 39: dispatch.v1.CheckDebugTrace.resource_relation_type:type_name -> dispatch.v1.CheckDebugTrace.RelationType + 27, // 40: dispatch.v1.CheckDebugTrace.results:type_name -> dispatch.v1.CheckDebugTrace.ResultsEntry + 25, // 41: dispatch.v1.CheckDebugTrace.sub_problems:type_name -> dispatch.v1.CheckDebugTrace + 9, // 42: dispatch.v1.DispatchCheckResponse.ResultsByResourceIdEntry.value:type_name -> dispatch.v1.ResourceCheckResult + 9, // 43: dispatch.v1.CheckDebugTrace.ResultsEntry.value:type_name -> dispatch.v1.ResourceCheckResult 7, // 44: dispatch.v1.DispatchService.DispatchCheck:input_type -> dispatch.v1.DispatchCheckRequest - 11, // 45: dispatch.v1.DispatchService.DispatchExpand:input_type -> dispatch.v1.DispatchExpandRequest - 13, // 46: dispatch.v1.DispatchService.DispatchLookup:input_type -> dispatch.v1.DispatchLookupRequest - 15, // 47: dispatch.v1.DispatchService.DispatchReachableResources:input_type -> dispatch.v1.DispatchReachableResourcesRequest - 18, // 48: dispatch.v1.DispatchService.DispatchLookupSubjects:input_type -> dispatch.v1.DispatchLookupSubjectsRequest + 12, // 45: dispatch.v1.DispatchService.DispatchExpand:input_type -> dispatch.v1.DispatchExpandRequest + 14, // 46: dispatch.v1.DispatchService.DispatchLookup:input_type -> dispatch.v1.DispatchLookupRequest + 16, // 47: dispatch.v1.DispatchService.DispatchReachableResources:input_type -> dispatch.v1.DispatchReachableResourcesRequest + 19, // 48: dispatch.v1.DispatchService.DispatchLookupSubjects:input_type -> dispatch.v1.DispatchLookupSubjectsRequest 8, // 49: dispatch.v1.DispatchService.DispatchCheck:output_type -> dispatch.v1.DispatchCheckResponse - 12, // 50: dispatch.v1.DispatchService.DispatchExpand:output_type -> dispatch.v1.DispatchExpandResponse - 14, // 51: dispatch.v1.DispatchService.DispatchLookup:output_type -> dispatch.v1.DispatchLookupResponse - 17, // 52: dispatch.v1.DispatchService.DispatchReachableResources:output_type -> dispatch.v1.DispatchReachableResourcesResponse - 20, // 53: dispatch.v1.DispatchService.DispatchLookupSubjects:output_type -> dispatch.v1.DispatchLookupSubjectsResponse + 13, // 50: dispatch.v1.DispatchService.DispatchExpand:output_type -> dispatch.v1.DispatchExpandResponse + 15, // 51: dispatch.v1.DispatchService.DispatchLookup:output_type -> dispatch.v1.DispatchLookupResponse + 18, // 52: dispatch.v1.DispatchService.DispatchReachableResources:output_type -> dispatch.v1.DispatchReachableResourcesResponse + 21, // 53: dispatch.v1.DispatchService.DispatchLookupSubjects:output_type -> dispatch.v1.DispatchLookupSubjectsResponse 49, // [49:54] is the sub-list for method output_type 44, // [44:49] is the sub-list for method input_type 44, // [44:44] is the sub-list for extension type_name @@ -2120,7 +2066,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaveatExpression); i { + switch v := v.(*ResourceCheckResult); i { case 0: return &v.state case 1: @@ -2132,7 +2078,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaveatOperation); i { + switch v := v.(*CaveatExpression); i { case 0: return &v.state case 1: @@ -2144,7 +2090,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchExpandRequest); i { + switch v := v.(*CaveatOperation); i { case 0: return &v.state case 1: @@ -2156,7 +2102,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchExpandResponse); i { + switch v := v.(*DispatchExpandRequest); i { case 0: return &v.state case 1: @@ -2168,7 +2114,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchLookupRequest); i { + switch v := v.(*DispatchExpandResponse); i { case 0: return &v.state case 1: @@ -2180,7 +2126,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchLookupResponse); i { + switch v := v.(*DispatchLookupRequest); i { case 0: return &v.state case 1: @@ -2192,7 +2138,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchReachableResourcesRequest); i { + switch v := v.(*DispatchLookupResponse); i { case 0: return &v.state case 1: @@ -2204,7 +2150,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReachableResource); i { + switch v := v.(*DispatchReachableResourcesRequest); i { case 0: return &v.state case 1: @@ -2216,7 +2162,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchReachableResourcesResponse); i { + switch v := v.(*ReachableResource); i { case 0: return &v.state case 1: @@ -2228,7 +2174,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchLookupSubjectsRequest); i { + switch v := v.(*DispatchReachableResourcesResponse); i { case 0: return &v.state case 1: @@ -2240,7 +2186,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FoundSubject); i { + switch v := v.(*DispatchLookupSubjectsRequest); i { case 0: return &v.state case 1: @@ -2252,7 +2198,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchLookupSubjectsResponse); i { + switch v := v.(*FoundSubject); i { case 0: return &v.state case 1: @@ -2264,7 +2210,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolverMeta); i { + switch v := v.(*DispatchLookupSubjectsResponse); i { case 0: return &v.state case 1: @@ -2276,7 +2222,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMeta); i { + switch v := v.(*ResolverMeta); i { case 0: return &v.state case 1: @@ -2288,7 +2234,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DebugInformation); i { + switch v := v.(*ResponseMeta); i { case 0: return &v.state case 1: @@ -2300,7 +2246,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckDebugTrace); i { + switch v := v.(*DebugInformation); i { case 0: return &v.state case 1: @@ -2312,19 +2258,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } file_dispatch_v1_dispatch_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchCheckResponse_ResourceCheckResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dispatch_v1_dispatch_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckDebugTrace_ResourceCheckResult); i { + switch v := v.(*CheckDebugTrace); i { case 0: return &v.state case 1: @@ -2336,7 +2270,7 @@ func file_dispatch_v1_dispatch_proto_init() { } } } - file_dispatch_v1_dispatch_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_dispatch_v1_dispatch_proto_msgTypes[3].OneofWrappers = []interface{}{ (*CaveatExpression_Operation)(nil), (*CaveatExpression_Caveat)(nil), } @@ -2346,7 +2280,7 @@ func file_dispatch_v1_dispatch_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dispatch_v1_dispatch_proto_rawDesc, NumEnums: 7, - NumMessages: 22, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/proto/dispatch/v1/dispatch.pb.validate.go b/pkg/proto/dispatch/v1/dispatch.pb.validate.go index 4c70499703..c456de8e55 100644 --- a/pkg/proto/dispatch/v1/dispatch.pb.validate.go +++ b/pkg/proto/dispatch/v1/dispatch.pb.validate.go @@ -438,6 +438,139 @@ var _ interface { ErrorName() string } = DispatchCheckResponseValidationError{} +// Validate checks the field values on ResourceCheckResult with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ResourceCheckResult) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceCheckResult with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceCheckResultMultiError, or nil if none found. +func (m *ResourceCheckResult) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceCheckResult) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Membership + + if all { + switch v := interface{}(m.GetExpression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceCheckResultValidationError{ + field: "Expression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceCheckResultValidationError{ + field: "Expression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceCheckResultValidationError{ + field: "Expression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ResourceCheckResultMultiError(errors) + } + + return nil +} + +// ResourceCheckResultMultiError is an error wrapping multiple validation +// errors returned by ResourceCheckResult.ValidateAll() if the designated +// constraints aren't met. +type ResourceCheckResultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceCheckResultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceCheckResultMultiError) AllErrors() []error { return m } + +// ResourceCheckResultValidationError is the validation error returned by +// ResourceCheckResult.Validate if the designated constraints aren't met. +type ResourceCheckResultValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceCheckResultValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceCheckResultValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceCheckResultValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceCheckResultValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceCheckResultValidationError) ErrorName() string { + return "ResourceCheckResultValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceCheckResultValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceCheckResult.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceCheckResultValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceCheckResultValidationError{} + // Validate checks the field values on CaveatExpression with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. @@ -3123,247 +3256,3 @@ var _ interface { Cause() error ErrorName() string } = CheckDebugTraceValidationError{} - -// Validate checks the field values on -// DispatchCheckResponse_ResourceCheckResult with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DispatchCheckResponse_ResourceCheckResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// DispatchCheckResponse_ResourceCheckResult with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// DispatchCheckResponse_ResourceCheckResultMultiError, or nil if none found. -func (m *DispatchCheckResponse_ResourceCheckResult) ValidateAll() error { - return m.validate(true) -} - -func (m *DispatchCheckResponse_ResourceCheckResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Membership - - if all { - switch v := interface{}(m.GetExpression()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DispatchCheckResponse_ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DispatchCheckResponse_ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DispatchCheckResponse_ResourceCheckResultValidationError{ - field: "Expression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DispatchCheckResponse_ResourceCheckResultMultiError(errors) - } - - return nil -} - -// DispatchCheckResponse_ResourceCheckResultMultiError is an error wrapping -// multiple validation errors returned by -// DispatchCheckResponse_ResourceCheckResult.ValidateAll() if the designated -// constraints aren't met. -type DispatchCheckResponse_ResourceCheckResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DispatchCheckResponse_ResourceCheckResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DispatchCheckResponse_ResourceCheckResultMultiError) AllErrors() []error { return m } - -// DispatchCheckResponse_ResourceCheckResultValidationError is the validation -// error returned by DispatchCheckResponse_ResourceCheckResult.Validate if the -// designated constraints aren't met. -type DispatchCheckResponse_ResourceCheckResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DispatchCheckResponse_ResourceCheckResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DispatchCheckResponse_ResourceCheckResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DispatchCheckResponse_ResourceCheckResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DispatchCheckResponse_ResourceCheckResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DispatchCheckResponse_ResourceCheckResultValidationError) ErrorName() string { - return "DispatchCheckResponse_ResourceCheckResultValidationError" -} - -// Error satisfies the builtin error interface -func (e DispatchCheckResponse_ResourceCheckResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDispatchCheckResponse_ResourceCheckResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DispatchCheckResponse_ResourceCheckResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DispatchCheckResponse_ResourceCheckResultValidationError{} - -// Validate checks the field values on CheckDebugTrace_ResourceCheckResult with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *CheckDebugTrace_ResourceCheckResult) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckDebugTrace_ResourceCheckResult -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// CheckDebugTrace_ResourceCheckResultMultiError, or nil if none found. -func (m *CheckDebugTrace_ResourceCheckResult) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckDebugTrace_ResourceCheckResult) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for HasPermission - - if len(errors) > 0 { - return CheckDebugTrace_ResourceCheckResultMultiError(errors) - } - - return nil -} - -// CheckDebugTrace_ResourceCheckResultMultiError is an error wrapping multiple -// validation errors returned by -// CheckDebugTrace_ResourceCheckResult.ValidateAll() if the designated -// constraints aren't met. -type CheckDebugTrace_ResourceCheckResultMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckDebugTrace_ResourceCheckResultMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckDebugTrace_ResourceCheckResultMultiError) AllErrors() []error { return m } - -// CheckDebugTrace_ResourceCheckResultValidationError is the validation error -// returned by CheckDebugTrace_ResourceCheckResult.Validate if the designated -// constraints aren't met. -type CheckDebugTrace_ResourceCheckResultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckDebugTrace_ResourceCheckResultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckDebugTrace_ResourceCheckResultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckDebugTrace_ResourceCheckResultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckDebugTrace_ResourceCheckResultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckDebugTrace_ResourceCheckResultValidationError) ErrorName() string { - return "CheckDebugTrace_ResourceCheckResultValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckDebugTrace_ResourceCheckResultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckDebugTrace_ResourceCheckResult.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckDebugTrace_ResourceCheckResultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckDebugTrace_ResourceCheckResultValidationError{} diff --git a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go index b328e93ec0..41663e7139 100644 --- a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go +++ b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go @@ -59,13 +59,19 @@ func (m *DispatchCheckRequest) CloneGenericVT() proto.Message { return m.CloneVT() } -func (m *DispatchCheckResponse_ResourceCheckResult) CloneVT() *DispatchCheckResponse_ResourceCheckResult { +func (m *DispatchCheckResponse) CloneVT() *DispatchCheckResponse { if m == nil { - return (*DispatchCheckResponse_ResourceCheckResult)(nil) + return (*DispatchCheckResponse)(nil) } - r := &DispatchCheckResponse_ResourceCheckResult{ - Membership: m.Membership, - Expression: m.Expression.CloneVT(), + r := &DispatchCheckResponse{ + Metadata: m.Metadata.CloneVT(), + } + if rhs := m.ResultsByResourceId; rhs != nil { + tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.ResultsByResourceId = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -74,23 +80,17 @@ func (m *DispatchCheckResponse_ResourceCheckResult) CloneVT() *DispatchCheckResp return r } -func (m *DispatchCheckResponse_ResourceCheckResult) CloneGenericVT() proto.Message { +func (m *DispatchCheckResponse) CloneGenericVT() proto.Message { return m.CloneVT() } -func (m *DispatchCheckResponse) CloneVT() *DispatchCheckResponse { +func (m *ResourceCheckResult) CloneVT() *ResourceCheckResult { if m == nil { - return (*DispatchCheckResponse)(nil) + return (*ResourceCheckResult)(nil) } - r := &DispatchCheckResponse{ - Metadata: m.Metadata.CloneVT(), - } - if rhs := m.ResultsByResourceId; rhs != nil { - tmpContainer := make(map[string]*DispatchCheckResponse_ResourceCheckResult, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.ResultsByResourceId = tmpContainer + r := &ResourceCheckResult{ + Membership: m.Membership, + Expression: m.Expression.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -99,7 +99,7 @@ func (m *DispatchCheckResponse) CloneVT() *DispatchCheckResponse { return r } -func (m *DispatchCheckResponse) CloneGenericVT() proto.Message { +func (m *ResourceCheckResult) CloneGenericVT() proto.Message { return m.CloneVT() } @@ -536,24 +536,6 @@ func (m *DebugInformation) CloneGenericVT() proto.Message { return m.CloneVT() } -func (m *CheckDebugTrace_ResourceCheckResult) CloneVT() *CheckDebugTrace_ResourceCheckResult { - if m == nil { - return (*CheckDebugTrace_ResourceCheckResult)(nil) - } - r := &CheckDebugTrace_ResourceCheckResult{ - HasPermission: m.HasPermission, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CheckDebugTrace_ResourceCheckResult) CloneGenericVT() proto.Message { - return m.CloneVT() -} - func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace { if m == nil { return (*CheckDebugTrace)(nil) @@ -564,7 +546,7 @@ func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace { IsCachedResult: m.IsCachedResult, } if rhs := m.Results; rhs != nil { - tmpContainer := make(map[string]*CheckDebugTrace_ResourceCheckResult, len(rhs)) + tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } @@ -694,7 +676,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *DispatchCheckResponse_ResourceCheckResult) MarshalVT() (dAtA []byte, err error) { +func (m *DispatchCheckResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -707,12 +689,12 @@ func (m *DispatchCheckResponse_ResourceCheckResult) MarshalVT() (dAtA []byte, er return dAtA[:n], nil } -func (m *DispatchCheckResponse_ResourceCheckResult) MarshalToVT(dAtA []byte) (int, error) { +func (m *DispatchCheckResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *DispatchCheckResponse_ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -724,25 +706,42 @@ func (m *DispatchCheckResponse_ResourceCheckResult) MarshalToSizedBufferVT(dAtA i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Expression != nil { - size, err := m.Expression.MarshalToSizedBufferVT(dAtA[:i]) + if len(m.ResultsByResourceId) > 0 { + for k := range m.ResultsByResourceId { + v := m.ResultsByResourceId[k] + baseI := i + size, err := v.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.Metadata != nil { + size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 - } - if m.Membership != 0 { - i = encodeVarint(dAtA, i, uint64(m.Membership)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DispatchCheckResponse) MarshalVT() (dAtA []byte, err error) { +func (m *ResourceCheckResult) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -755,12 +754,12 @@ func (m *DispatchCheckResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DispatchCheckResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *ResourceCheckResult) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -772,37 +771,20 @@ func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ResultsByResourceId) > 0 { - for k := range m.ResultsByResourceId { - v := m.ResultsByResourceId[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.Metadata != nil { - size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) + if m.Expression != nil { + size, err := m.Expression.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if m.Membership != 0 { + i = encodeVarint(dAtA, i, uint64(m.Membership)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -1840,49 +1822,6 @@ func (m *DebugInformation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *CheckDebugTrace_ResourceCheckResult) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckDebugTrace_ResourceCheckResult) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CheckDebugTrace_ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.HasPermission { - i-- - if m.HasPermission { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - func (m *CheckDebugTrace) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2032,23 +1971,6 @@ func (m *DispatchCheckRequest) SizeVT() (n int) { return n } -func (m *DispatchCheckResponse_ResourceCheckResult) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Membership != 0 { - n += 1 + sov(uint64(m.Membership)) - } - if m.Expression != nil { - l = m.Expression.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - func (m *DispatchCheckResponse) SizeVT() (n int) { if m == nil { return 0 @@ -2076,6 +1998,23 @@ func (m *DispatchCheckResponse) SizeVT() (n int) { return n } +func (m *ResourceCheckResult) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Membership != 0 { + n += 1 + sov(uint64(m.Membership)) + } + if m.Expression != nil { + l = m.Expression.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *CaveatExpression) SizeVT() (n int) { if m == nil { return 0 @@ -2491,19 +2430,6 @@ func (m *DebugInformation) SizeVT() (n int) { return n } -func (m *CheckDebugTrace_ResourceCheckResult) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HasPermission { - n += 2 - } - n += len(m.unknownFields) - return n -} - func (m *CheckDebugTrace) SizeVT() (n int) { if m == nil { return 0 @@ -2794,112 +2720,6 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *DispatchCheckResponse_ResourceCheckResult) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DispatchCheckResponse_ResourceCheckResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DispatchCheckResponse_ResourceCheckResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType) - } - m.Membership = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Membership |= DispatchCheckResponse_Membership(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expression == nil { - m.Expression = &CaveatExpression{} - } - if err := m.Expression.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2995,10 +2815,10 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ResultsByResourceId == nil { - m.ResultsByResourceId = make(map[string]*DispatchCheckResponse_ResourceCheckResult) + m.ResultsByResourceId = make(map[string]*ResourceCheckResult) } var mapkey string - var mapvalue *DispatchCheckResponse_ResourceCheckResult + var mapvalue *ResourceCheckResult for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -3072,7 +2892,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &DispatchCheckResponse_ResourceCheckResult{} + mapvalue = &ResourceCheckResult{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -3116,6 +2936,112 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceCheckResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceCheckResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType) + } + m.Membership = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Membership |= ResourceCheckResult_Membership(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Expression == nil { + m.Expression = &CaveatExpression{} + } + if err := m.Expression.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5297,77 +5223,6 @@ func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CheckDebugTrace_ResourceCheckResult) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckDebugTrace_ResourceCheckResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckDebugTrace_ResourceCheckResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasPermission", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasPermission = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5482,10 +5337,10 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Results == nil { - m.Results = make(map[string]*CheckDebugTrace_ResourceCheckResult) + m.Results = make(map[string]*ResourceCheckResult) } var mapkey string - var mapvalue *CheckDebugTrace_ResourceCheckResult + var mapvalue *ResourceCheckResult for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -5559,7 +5414,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &CheckDebugTrace_ResourceCheckResult{} + mapvalue = &ResourceCheckResult{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } diff --git a/proto/internal/dispatch/v1/dispatch.proto b/proto/internal/dispatch/v1/dispatch.proto index a8ad5f1972..25c33256ba 100644 --- a/proto/internal/dispatch/v1/dispatch.proto +++ b/proto/internal/dispatch/v1/dispatch.proto @@ -41,6 +41,11 @@ message DispatchCheckRequest { } message DispatchCheckResponse { + ResponseMeta metadata = 1; + map results_by_resource_id = 2; +} + +message ResourceCheckResult { enum Membership { UNKNOWN = 0; NOT_MEMBER = 1; @@ -48,13 +53,8 @@ message DispatchCheckResponse { CAVEATED_MEMBER = 3; } - message ResourceCheckResult { - Membership membership = 1; - CaveatExpression expression = 2; - } - - ResponseMeta metadata = 1; - map results_by_resource_id = 2; + Membership membership = 1; + CaveatExpression expression = 2; } message CaveatExpression { @@ -196,10 +196,6 @@ message CheckDebugTrace { PERMISSION = 2; } - message ResourceCheckResult { - bool has_permission = 2; - } - DispatchCheckRequest request = 1; RelationType resource_relation_type = 2; map results = 3; From 7b8c29c3f875cada635035dcd6b09386c3e3c443 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 29 Sep 2022 17:08:42 -0400 Subject: [PATCH 2/2] Switch check dispatching to use the new MembershipSet This set automatically tracks caveats, even though they are not yet used --- internal/graph/check.go | 181 +++++++++++++------------------- internal/graph/membershipset.go | 8 ++ 2 files changed, 81 insertions(+), 108 deletions(-) diff --git a/internal/graph/check.go b/internal/graph/check.go index 4b44a53372..0a0b52eb02 100644 --- a/internal/graph/check.go +++ b/internal/graph/check.go @@ -129,9 +129,9 @@ func (cc *ConcurrentChecker) checkInternal(ctx context.Context, req ValidatedChe // // If the filtering results in no further resource IDs to check, or a result is found and a single // result is allowed, we terminate early. - foundResourceIds, filteredResourcesIds := filterForFoundMemberResource(req.ResourceRelation, req.ResourceIds, req.Subject) - if len(foundResourceIds) > 0 && req.DispatchCheckRequest.ResultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT { - return checkResultsForResourceIds(foundResourceIds, emptyMetadata) + membershipSet, filteredResourcesIds := filterForFoundMemberResource(req.ResourceRelation, req.ResourceIds, req.Subject) + if membershipSet.HasDeterminedMember() && req.DispatchCheckRequest.ResultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT { + return checkResultsForMembership(membershipSet, emptyMetadata) } if len(filteredResourcesIds) == 0 { @@ -152,10 +152,10 @@ func (cc *ConcurrentChecker) checkInternal(ctx context.Context, req ValidatedChe } if relation.UsersetRewrite == nil { - return combineResultWithFoundResourceIds(cc.checkDirect(ctx, crc), foundResourceIds) + return combineResultWithFoundResources(cc.checkDirect(ctx, crc), membershipSet) } - return combineResultWithFoundResourceIds(cc.checkUsersetRewrite(ctx, crc, relation.UsersetRewrite), foundResourceIds) + return combineResultWithFoundResources(cc.checkUsersetRewrite(ctx, crc, relation.UsersetRewrite), membershipSet) } func onrEqual(lhs, rhs *core.ObjectAndRelation) bool { @@ -188,26 +188,29 @@ func (cc *ConcurrentChecker) checkDirect(ctx context.Context, crc currentRequest defer it.Close() // Find the subjects over which to dispatch. - foundResourceIds := []string{} + foundResources := NewMembershipSet() subjectsToDispatch := tuple.NewONRByTypeSet() - resourceIDsBySubjectID := util.NewMultiMap[string, string]() + relationshipsBySubjectONR := util.NewMultiMap[string, *core.RelationTuple]() for tpl := it.Next(); tpl != nil; tpl = it.Next() { if it.Err() != nil { return checkResultError(NewCheckFailureErr(it.Err()), emptyMetadata) } + // If the subject of the relationship matches the target subject, then we've found + // a result. if onrEqualOrWildcard(tpl.Subject, crc.parentReq.Subject) { - foundResourceIds = append(foundResourceIds, tpl.ResourceAndRelation.ObjectId) - if crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT { - return checkResultsForResourceIds(foundResourceIds, emptyMetadata) + foundResources.AddDirectMember(tpl.ResourceAndRelation.ObjectId, tpl.Caveat) + if crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT && foundResources.HasDeterminedMember() { + return checkResultsForMembership(foundResources, emptyMetadata) } continue } + // If the subject of the relationship is a non-terminal, add to be dispatched. if tpl.Subject.Relation != Ellipsis { subjectsToDispatch.Add(tpl.Subject) - resourceIDsBySubjectID.Add(tuple.StringONR(tpl.Subject), tpl.ResourceAndRelation.ObjectId) + relationshipsBySubjectONR.Add(tuple.StringONR(tpl.Subject), tpl) } } @@ -240,33 +243,32 @@ func (cc *ConcurrentChecker) checkDirect(ctx context.Context, crc currentRequest return childResult } - return mapResourceIds(childResult, dd.resourceType, resourceIDsBySubjectID) + return mapFoundResources(childResult, dd.resourceType, relationshipsBySubjectONR) }, cc.concurrencyLimit) - return combineResultWithFoundResourceIds(result, foundResourceIds) + return combineResultWithFoundResources(result, foundResources) } -func mapResourceIds(result CheckResult, resourceType *core.RelationReference, resourceIDsBySubjectID *util.MultiMap[string, string]) CheckResult { +func mapFoundResources(result CheckResult, resourceType *core.RelationReference, relationshipsBySubjectONR *util.MultiMap[string, *core.RelationTuple]) CheckResult { // Map any resources found to the parent resource IDs. - mappedResourceIds := []string{} + membershipSet := NewMembershipSet() for foundResourceID, result := range result.Resp.ResultsByResourceId { - if result.Membership != v1.ResourceCheckResult_MEMBER { - continue - } + subjectKey := tuple.StringONR(&core.ObjectAndRelation{ + Namespace: resourceType.Namespace, + ObjectId: foundResourceID, + Relation: resourceType.Relation, + }) - mappedResourceIds = append(mappedResourceIds, - resourceIDsBySubjectID.Get(tuple.StringONR(&core.ObjectAndRelation{ - Namespace: resourceType.Namespace, - ObjectId: foundResourceID, - Relation: resourceType.Relation, - }))...) + for _, relationTuple := range relationshipsBySubjectONR.Get(subjectKey) { + membershipSet.AddMemberViaRelationship(relationTuple.ResourceAndRelation.ObjectId, result.Expression, relationTuple) + } } - if len(mappedResourceIds) == 0 { + if membershipSet.IsEmpty() { return noMembers() } - return checkResultsForResourceIds(mappedResourceIds, result.Resp.Metadata) + return checkResultsForMembership(membershipSet, result.Resp.Metadata) } func (cc *ConcurrentChecker) checkUsersetRewrite(ctx context.Context, crc currentRequestContext, rewrite *core.UsersetRewrite) CheckResult { @@ -330,9 +332,9 @@ func (cc *ConcurrentChecker) checkComputedUserset(ctx context.Context, crc curre } // If we will be dispatching to the goal's ONR, then we know that the ONR is a member. - foundResourceIds, updatedTargetResourceIds := filterForFoundMemberResource(targetRR, targetResourceIds, crc.parentReq.Subject) - if (len(foundResourceIds) > 0 && crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT) || len(updatedTargetResourceIds) == 0 { - return checkResultsForResourceIds(foundResourceIds, emptyMetadata) + membershipSet, updatedTargetResourceIds := filterForFoundMemberResource(targetRR, targetResourceIds, crc.parentReq.Subject) + if (membershipSet.HasDeterminedMember() && crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT) || len(updatedTargetResourceIds) == 0 { + return checkResultsForMembership(membershipSet, emptyMetadata) } // Check if the target relation exists. If not, return nothing. @@ -357,17 +359,19 @@ func (cc *ConcurrentChecker) checkComputedUserset(ctx context.Context, crc curre }, crc.parentReq.Revision, }) - return combineResultWithFoundResourceIds(result, foundResourceIds) + return combineResultWithFoundResources(result, membershipSet) } -func filterForFoundMemberResource(resourceRelation *core.RelationReference, resourceIds []string, subject *core.ObjectAndRelation) ([]string, []string) { +func filterForFoundMemberResource(resourceRelation *core.RelationReference, resourceIds []string, subject *core.ObjectAndRelation) (*MembershipSet, []string) { if resourceRelation.Namespace != subject.Namespace || resourceRelation.Relation != subject.Relation { return nil, resourceIds } for index, resourceID := range resourceIds { if subject.ObjectId == resourceID { - return []string{resourceID}, removeIndexFromSlice(resourceIds, index) + membershipSet := NewMembershipSet() + membershipSet.AddDirectMember(resourceID, nil) + return membershipSet, removeIndexFromSlice(resourceIds, index) } } @@ -394,14 +398,14 @@ func (cc *ConcurrentChecker) checkTupleToUserset(ctx context.Context, crc curren defer it.Close() subjectsToDispatch := tuple.NewONRByTypeSet() - resourceIDsBySubjectID := util.NewMultiMap[string, string]() + relationshipsBySubjectONR := util.NewMultiMap[string, *core.RelationTuple]() for tpl := it.Next(); tpl != nil; tpl = it.Next() { if it.Err() != nil { return checkResultError(NewCheckFailureErr(it.Err()), emptyMetadata) } subjectsToDispatch.Add(tpl.Subject) - resourceIDsBySubjectID.Add(tuple.StringONR(tpl.Subject), tpl.ResourceAndRelation.ObjectId) + relationshipsBySubjectONR.Add(tuple.StringONR(tpl.Subject), tpl) } // Convert the subjects into batched requests. @@ -429,7 +433,7 @@ func (cc *ConcurrentChecker) checkTupleToUserset(ctx context.Context, crc curren return childResult } - return mapResourceIds(childResult, dd.resourceType, resourceIDsBySubjectID) + return mapFoundResources(childResult, dd.resourceType, relationshipsBySubjectONR) }, cc.concurrencyLimit, ) @@ -459,7 +463,7 @@ func union[T any]( }() responseMetadata := emptyMetadata - responseResults := make(map[string]*v1.ResourceCheckResult, len(crc.filteredResourceIDs)) + membershipSet := NewMembershipSet() for i := 0; i < len(children); i++ { select { @@ -470,11 +474,9 @@ func union[T any]( return checkResultError(result.Err, responseMetadata) } - for resourceID, result := range result.Resp.ResultsByResourceId { - responseResults[resourceID] = result - if crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT && result.Membership == v1.ResourceCheckResult_MEMBER { - return checkResults(responseResults, responseMetadata) - } + membershipSet.UnionWith(result.Resp.ResultsByResourceId) + if membershipSet.HasDeterminedMember() && crc.resultsSetting == v1.DispatchCheckRequest_ALLOW_SINGLE_RESULT { + return checkResultsForMembership(membershipSet, responseMetadata) } case <-ctx.Done(): @@ -483,7 +485,7 @@ func union[T any]( } } - return checkResults(responseResults, responseMetadata) + return checkResultsForMembership(membershipSet, responseMetadata) } // all returns whether all of the lazy checks pass, and is used for intersection. @@ -514,8 +516,7 @@ func all[T any]( close(resultChan) }() - var foundForResourceIds *util.Set[string] - + var membershipSet *MembershipSet for i := 0; i < len(children); i++ { select { case result := <-resultChan: @@ -524,23 +525,22 @@ func all[T any]( return checkResultError(result.Err, responseMetadata) } - resourceIdsWithMembership := util.NewSet[string]() - resourceIdsWithMembership.Extend(filterToResourceIdsWithMembership(result.Resp.ResultsByResourceId)) - - if foundForResourceIds == nil { - foundForResourceIds = resourceIdsWithMembership + if membershipSet == nil { + membershipSet = NewMembershipSet() + membershipSet.UnionWith(result.Resp.ResultsByResourceId) } else { - foundForResourceIds.IntersectionDifference(resourceIdsWithMembership) - if foundForResourceIds.IsEmpty() { - return noMembers() - } + membershipSet.IntersectWith(result.Resp.ResultsByResourceId) + } + + if membershipSet.IsEmpty() { + return noMembers() } case <-ctx.Done(): return checkResultError(NewRequestCanceledErr(), responseMetadata) } } - return checkResultsForResourceIds(foundForResourceIds.AsSlice(), responseMetadata) + return checkResultsForMembership(membershipSet, responseMetadata) } // difference returns whether the first lazy check passes and none of the supsequent checks pass. @@ -587,7 +587,7 @@ func difference[T any]( }() responseMetadata := emptyMetadata - foundResourceIds := util.NewSet[string]() + membershipSet := NewMembershipSet() // Wait for the base set to return. select { @@ -598,8 +598,8 @@ func difference[T any]( return checkResultError(base.Err, responseMetadata) } - foundResourceIds.Extend(filterToResourceIdsWithMembership(base.Resp.ResultsByResourceId)) - if foundResourceIds.IsEmpty() { + membershipSet.UnionWith(base.Resp.ResultsByResourceId) + if membershipSet.IsEmpty() { return noMembers() } @@ -607,7 +607,7 @@ func difference[T any]( return checkResultError(NewRequestCanceledErr(), responseMetadata) } - // For the remaining sets to return. + // Subtract the remaining sets. for i := 1; i < len(children); i++ { select { case sub := <-othersChan: @@ -617,19 +617,17 @@ func difference[T any]( return checkResultError(sub.Err, responseMetadata) } - resourceIdsWithMembership := util.NewSet[string]() - resourceIdsWithMembership.Extend(filterToResourceIdsWithMembership(sub.Resp.ResultsByResourceId)) - - foundResourceIds.RemoveAll(resourceIdsWithMembership) - if foundResourceIds.IsEmpty() { + membershipSet.Subtract(sub.Resp.ResultsByResourceId) + if membershipSet.IsEmpty() { return noMembers() } + case <-ctx.Done(): return checkResultError(NewRequestCanceledErr(), responseMetadata) } } - return checkResultsForResourceIds(foundResourceIds.AsSlice(), responseMetadata) + return checkResultsForMembership(membershipSet, responseMetadata) } func dispatchAllAsync[T any]( @@ -681,27 +679,11 @@ func noMembers() CheckResult { } } -func checkResultsForResourceIds(resourceIds []string, subProblemMetadata *v1.ResponseMeta) CheckResult { - results := make(map[string]*v1.ResourceCheckResult, len(resourceIds)) - for _, resourceID := range resourceIds { - results[resourceID] = &v1.ResourceCheckResult{ - Membership: v1.ResourceCheckResult_MEMBER, - } - } +func checkResultsForMembership(foundMembership *MembershipSet, subProblemMetadata *v1.ResponseMeta) CheckResult { return CheckResult{ &v1.DispatchCheckResponse{ Metadata: ensureMetadata(subProblemMetadata), - ResultsByResourceId: results, - }, - nil, - } -} - -func checkResults(results map[string]*v1.ResourceCheckResult, subProblemMetadata *v1.ResponseMeta) CheckResult { - return CheckResult{ - &v1.DispatchCheckResponse{ - Metadata: ensureMetadata(subProblemMetadata), - ResultsByResourceId: results, + ResultsByResourceId: foundMembership.AsCheckResultsMap(), }, nil, } @@ -716,40 +698,23 @@ func checkResultError(err error, subProblemMetadata *v1.ResponseMeta) CheckResul } } -func filterToResourceIdsWithMembership(results map[string]*v1.ResourceCheckResult) []string { - members := []string{} - for resourceID, result := range results { - if result.Membership == v1.ResourceCheckResult_MEMBER { - members = append(members, resourceID) - } - } - return members -} - -func combineResultWithFoundResourceIds(result CheckResult, foundResourceIds []string) CheckResult { +func combineResultWithFoundResources(result CheckResult, foundResources *MembershipSet) CheckResult { if result.Err != nil { return result } - if len(foundResourceIds) == 0 { + if foundResources.IsEmpty() { return result } - for _, resourceID := range foundResourceIds { - if len(resourceID) == 0 { - panic("given empty resource id") - } - - if result.Resp.ResultsByResourceId == nil { - result.Resp.ResultsByResourceId = map[string]*v1.ResourceCheckResult{} - } - - result.Resp.ResultsByResourceId[resourceID] = &v1.ResourceCheckResult{ - Membership: v1.ResourceCheckResult_MEMBER, - } + foundResources.UnionWith(result.Resp.ResultsByResourceId) + return CheckResult{ + Resp: &v1.DispatchCheckResponse{ + ResultsByResourceId: foundResources.AsCheckResultsMap(), + Metadata: result.Resp.Metadata, + }, + Err: result.Err, } - - return result } func combineResponseMetadata(existing *v1.ResponseMeta, responseMetadata *v1.ResponseMeta) *v1.ResponseMeta { diff --git a/internal/graph/membershipset.go b/internal/graph/membershipset.go index 870e2d9843..b8fa22f2e7 100644 --- a/internal/graph/membershipset.go +++ b/internal/graph/membershipset.go @@ -136,11 +136,19 @@ func (ms *MembershipSet) Subtract(resultsMap CheckResultsMap) { // IsEmpty returns true if the set is empty. func (ms *MembershipSet) IsEmpty() bool { + if ms == nil { + return true + } + return len(ms.membersByID) == 0 } // HasDeterminedMember returns whether there exists at least one non-caveated member of the set. func (ms *MembershipSet) HasDeterminedMember() bool { + if ms == nil { + return false + } + return ms.hasDeterminedMember }