diff --git a/internal/datastore/common/sql.go b/internal/datastore/common/sql.go index 130bbcec53..7e1625113b 100644 --- a/internal/datastore/common/sql.go +++ b/internal/datastore/common/sql.go @@ -247,21 +247,16 @@ func NewPGXExecutor(txSource TxFactory) ExecuteQueryFunc { var tuples []*core.RelationTuple for rows.Next() { nextTuple := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{}, - }, - }, + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } - userset := nextTuple.User.GetUserset() err := rows.Scan( - &nextTuple.ObjectAndRelation.Namespace, - &nextTuple.ObjectAndRelation.ObjectId, - &nextTuple.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &nextTuple.ResourceAndRelation.Namespace, + &nextTuple.ResourceAndRelation.ObjectId, + &nextTuple.ResourceAndRelation.Relation, + &nextTuple.Subject.Namespace, + &nextTuple.Subject.ObjectId, + &nextTuple.Subject.Relation, ) if err != nil { return nil, fmt.Errorf(errUnableToQueryTuples, err) diff --git a/internal/datastore/crdb/watch.go b/internal/datastore/crdb/watch.go index 1001d140a6..a2e14c0db5 100644 --- a/internal/datastore/crdb/watch.go +++ b/internal/datastore/crdb/watch.go @@ -113,19 +113,15 @@ func (cds *crdbDatastore) Watch(ctx context.Context, afterRevision datastore.Rev oneChange := &core.RelationTupleUpdate{ Tuple: &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: pkValues[0], ObjectId: pkValues[1], Relation: pkValues[2], }, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{ - Namespace: pkValues[3], - ObjectId: pkValues[4], - Relation: pkValues[5], - }, - }, + Subject: &core.ObjectAndRelation{ + Namespace: pkValues[3], + ObjectId: pkValues[4], + Relation: pkValues[5], }, }, } diff --git a/internal/datastore/memdb/schema.go b/internal/datastore/memdb/schema.go index dbed020662..2f61c76bdb 100644 --- a/internal/datastore/memdb/schema.go +++ b/internal/datastore/memdb/schema.go @@ -80,16 +80,16 @@ func (r relationship) Relationship() *v1.Relationship { func (r relationship) RelationTuple() *core.RelationTuple { return &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: r.namespace, ObjectId: r.resourceID, Relation: r.relation, }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: r.subjectNamespace, ObjectId: r.subjectObjectID, Relation: r.subjectRelation, - }}}, + }, } } diff --git a/internal/datastore/mysql/datastore.go b/internal/datastore/mysql/datastore.go index 39b65ef75a..8c469f1eee 100644 --- a/internal/datastore/mysql/datastore.go +++ b/internal/datastore/mysql/datastore.go @@ -337,21 +337,17 @@ func newMySQLExecutor(tx querier) common.ExecuteQueryFunc { var tuples []*core.RelationTuple for rows.Next() { nextTuple := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{}, - }, - }, + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } - userset := nextTuple.User.GetUserset() + err := rows.Scan( - &nextTuple.ObjectAndRelation.Namespace, - &nextTuple.ObjectAndRelation.ObjectId, - &nextTuple.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &nextTuple.ResourceAndRelation.Namespace, + &nextTuple.ResourceAndRelation.ObjectId, + &nextTuple.ResourceAndRelation.Relation, + &nextTuple.Subject.Namespace, + &nextTuple.Subject.ObjectId, + &nextTuple.Subject.Relation, ) if err != nil { return nil, fmt.Errorf(errUnableToQueryTuples, err) diff --git a/internal/datastore/mysql/datastore_test.go b/internal/datastore/mysql/datastore_test.go index 13265f1d0f..ee4fa247dd 100644 --- a/internal/datastore/mysql/datastore_test.go +++ b/internal/datastore/mysql/datastore_test.go @@ -173,16 +173,16 @@ func GarbageCollectionTest(t *testing.T, ds datastore.Datastore) { // Write a relationship. tpl := &corev1.RelationTuple{ - ObjectAndRelation: &corev1.ObjectAndRelation{ + ResourceAndRelation: &corev1.ObjectAndRelation{ Namespace: "resource", ObjectId: "someresource", Relation: "reader", }, - User: &corev1.User{UserOneof: &corev1.User_Userset{Userset: &corev1.ObjectAndRelation{ + Subject: &corev1.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } relationship := tuple.ToRelationship(tpl) @@ -321,16 +321,16 @@ func GarbageCollectionByTimeTest(t *testing.T, ds datastore.Datastore) { // Write a relationship. tpl := &corev1.RelationTuple{ - ObjectAndRelation: &corev1.ObjectAndRelation{ + ResourceAndRelation: &corev1.ObjectAndRelation{ Namespace: "resource", ObjectId: "someresource", Relation: "reader", }, - User: &corev1.User{UserOneof: &corev1.User_Userset{Userset: &corev1.ObjectAndRelation{ + Subject: &corev1.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } relationship := tuple.ToRelationship(tpl) @@ -406,16 +406,16 @@ func ChunkedGarbageCollectionTest(t *testing.T, ds datastore.Datastore) { var tuples []*corev1.RelationTuple for i := 0; i < chunkRelationshipCount; i++ { tpl := &corev1.RelationTuple{ - ObjectAndRelation: &corev1.ObjectAndRelation{ + ResourceAndRelation: &corev1.ObjectAndRelation{ Namespace: "resource", ObjectId: fmt.Sprintf("resource-%d", i), Relation: "reader", }, - User: &corev1.User{UserOneof: &corev1.User_Userset{Userset: &corev1.ObjectAndRelation{ + Subject: &corev1.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } tuples = append(tuples, tpl) } diff --git a/internal/datastore/mysql/watch.go b/internal/datastore/mysql/watch.go index 6f14b739d6..4922b18ec7 100644 --- a/internal/datastore/mysql/watch.go +++ b/internal/datastore/mysql/watch.go @@ -113,25 +113,20 @@ func (mds *Datastore) loadChanges( stagedChanges := common.NewChanges() for rows.Next() { - userset := &core.ObjectAndRelation{} - tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: userset, - }, - }, + nextTuple := &core.RelationTuple{ + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } var createdTxn uint64 var deletedTxn uint64 err = rows.Scan( - &tpl.ObjectAndRelation.Namespace, - &tpl.ObjectAndRelation.ObjectId, - &tpl.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &nextTuple.ResourceAndRelation.Namespace, + &nextTuple.ResourceAndRelation.ObjectId, + &nextTuple.ResourceAndRelation.Relation, + &nextTuple.Subject.Namespace, + &nextTuple.Subject.ObjectId, + &nextTuple.Subject.Relation, &createdTxn, &deletedTxn, ) @@ -140,11 +135,11 @@ func (mds *Datastore) loadChanges( } if createdTxn > afterRevision && createdTxn <= newRevision { - stagedChanges.AddChange(ctx, revisionFromTransaction(createdTxn), tpl, core.RelationTupleUpdate_TOUCH) + stagedChanges.AddChange(ctx, revisionFromTransaction(createdTxn), nextTuple, core.RelationTupleUpdate_TOUCH) } if deletedTxn > afterRevision && deletedTxn <= newRevision { - stagedChanges.AddChange(ctx, revisionFromTransaction(deletedTxn), tpl, core.RelationTupleUpdate_DELETE) + stagedChanges.AddChange(ctx, revisionFromTransaction(deletedTxn), nextTuple, core.RelationTupleUpdate_DELETE) } } if err = rows.Err(); err != nil { diff --git a/internal/datastore/postgres/postgres_test.go b/internal/datastore/postgres/postgres_test.go index 32989e1e01..1d1fcf1a70 100644 --- a/internal/datastore/postgres/postgres_test.go +++ b/internal/datastore/postgres/postgres_test.go @@ -139,16 +139,16 @@ func GarbageCollectionTest(t *testing.T, ds datastore.Datastore) { // Write a relationship. tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: "resource", ObjectId: "someresource", Relation: "reader", }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } relationship := tuple.ToRelationship(tpl) @@ -312,16 +312,16 @@ func GarbageCollectionByTimeTest(t *testing.T, ds datastore.Datastore) { // Write a relationship. tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: "resource", ObjectId: "someresource", Relation: "reader", }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } relationship := tuple.ToRelationship(tpl) @@ -396,16 +396,16 @@ func ChunkedGarbageCollectionTest(t *testing.T, ds datastore.Datastore) { var tpls []*core.RelationTuple for i := 0; i < chunkRelationshipCount; i++ { tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: "resource", ObjectId: fmt.Sprintf("resource-%d", i), Relation: "reader", }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: "user", ObjectId: "someuser", Relation: "...", - }}}, + }, } tpls = append(tpls, tpl) } @@ -611,7 +611,7 @@ func BenchmarkPostgresQuery(b *testing.B) { defer iter.Close() for tpl := iter.Next(); tpl != nil; tpl = iter.Next() { - require.Equal(testfixtures.DocumentNS.Name, tpl.ObjectAndRelation.Namespace) + require.Equal(testfixtures.DocumentNS.Name, tpl.ResourceAndRelation.Namespace) } require.NoError(iter.Err()) } diff --git a/internal/datastore/postgres/watch.go b/internal/datastore/postgres/watch.go index 24ecf4b44d..a4e3b31a19 100644 --- a/internal/datastore/postgres/watch.go +++ b/internal/datastore/postgres/watch.go @@ -118,25 +118,20 @@ func (pgd *pgDatastore) loadChanges( stagedChanges := common.NewChanges() for rows.Next() { - userset := &core.ObjectAndRelation{} - tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: userset, - }, - }, + nextTuple := &core.RelationTuple{ + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } var createdTxn uint64 var deletedTxn uint64 err = rows.Scan( - &tpl.ObjectAndRelation.Namespace, - &tpl.ObjectAndRelation.ObjectId, - &tpl.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &nextTuple.ResourceAndRelation.Namespace, + &nextTuple.ResourceAndRelation.ObjectId, + &nextTuple.ResourceAndRelation.Relation, + &nextTuple.Subject.Namespace, + &nextTuple.Subject.ObjectId, + &nextTuple.Subject.Relation, &createdTxn, &deletedTxn, ) @@ -145,11 +140,11 @@ func (pgd *pgDatastore) loadChanges( } if createdTxn > afterRevision && createdTxn <= newRevision { - stagedChanges.AddChange(ctx, revisionFromTransaction(createdTxn), tpl, core.RelationTupleUpdate_TOUCH) + stagedChanges.AddChange(ctx, revisionFromTransaction(createdTxn), nextTuple, core.RelationTupleUpdate_TOUCH) } if deletedTxn > afterRevision && deletedTxn <= newRevision { - stagedChanges.AddChange(ctx, revisionFromTransaction(deletedTxn), tpl, core.RelationTupleUpdate_DELETE) + stagedChanges.AddChange(ctx, revisionFromTransaction(deletedTxn), nextTuple, core.RelationTupleUpdate_DELETE) } } if err = rows.Err(); err != nil { diff --git a/internal/datastore/proxy/hedging_test.go b/internal/datastore/proxy/hedging_test.go index e99f2bbcab..b101fbd113 100644 --- a/internal/datastore/proxy/hedging_test.go +++ b/internal/datastore/proxy/hedging_test.go @@ -295,19 +295,15 @@ func TestDatastoreE2E(t *testing.T) { expectedTuples := []*core.RelationTuple{ { - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: "test", ObjectId: "test", Relation: "test", }, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{ - Namespace: "test", - ObjectId: "test", - Relation: "test", - }, - }, + Subject: &core.ObjectAndRelation{ + Namespace: "test", + ObjectId: "test", + Relation: "test", }, }, } diff --git a/internal/datastore/spanner/reader.go b/internal/datastore/spanner/reader.go index 8ad87f9cca..a51abb2fa9 100644 --- a/internal/datastore/spanner/reader.go +++ b/internal/datastore/spanner/reader.go @@ -94,21 +94,16 @@ func queryExecutor(txSource txFactory) common.ExecuteQueryFunc { if err := iter.Do(func(row *spanner.Row) error { nextTuple := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{}, - }, - }, + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } - userset := nextTuple.User.GetUserset() err := row.Columns( - &nextTuple.ObjectAndRelation.Namespace, - &nextTuple.ObjectAndRelation.ObjectId, - &nextTuple.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &nextTuple.ResourceAndRelation.Namespace, + &nextTuple.ResourceAndRelation.ObjectId, + &nextTuple.ResourceAndRelation.Relation, + &nextTuple.Subject.Namespace, + &nextTuple.Subject.ObjectId, + &nextTuple.Subject.Relation, ) if err != nil { return err diff --git a/internal/datastore/spanner/watch.go b/internal/datastore/spanner/watch.go index d8abc74c10..5508a286b9 100644 --- a/internal/datastore/spanner/watch.go +++ b/internal/datastore/spanner/watch.go @@ -84,14 +84,9 @@ func (sd spannerDatastore) loadChanges( newTimestamp := afterTimestamp err = rows.Do(func(r *spanner.Row) error { - userset := &core.ObjectAndRelation{} tpl := &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{}, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: userset, - }, - }, + ResourceAndRelation: &core.ObjectAndRelation{}, + Subject: &core.ObjectAndRelation{}, } var op int64 @@ -101,12 +96,12 @@ func (sd spannerDatastore) loadChanges( ×tamp, &colChangeUUID, &op, - &tpl.ObjectAndRelation.Namespace, - &tpl.ObjectAndRelation.ObjectId, - &tpl.ObjectAndRelation.Relation, - &userset.Namespace, - &userset.ObjectId, - &userset.Relation, + &tpl.ResourceAndRelation.Namespace, + &tpl.ResourceAndRelation.ObjectId, + &tpl.ResourceAndRelation.Relation, + &tpl.Subject.Namespace, + &tpl.Subject.ObjectId, + &tpl.Subject.Relation, ) if err != nil { return err diff --git a/internal/dispatch/caching/cachingdispatch_test.go b/internal/dispatch/caching/cachingdispatch_test.go index 9e93867d6e..8213ffb026 100644 --- a/internal/dispatch/caching/cachingdispatch_test.go +++ b/internal/dispatch/caching/cachingdispatch_test.go @@ -86,8 +86,8 @@ func TestMaxDepthCaching(t *testing.T) { for _, step := range tc.script { if step.expectPassthrough { delegate.On("DispatchCheck", &v1.DispatchCheckRequest{ - ObjectAndRelation: tuple.ParseONR(step.start), - Subject: tuple.ParseSubjectONR(step.goal), + ResourceAndRelation: tuple.ParseONR(step.start), + Subject: tuple.ParseSubjectONR(step.goal), Metadata: &v1.ResolverMeta{ AtRevision: step.atRevision.String(), DepthRemaining: step.depthRemaining, @@ -109,8 +109,8 @@ func TestMaxDepthCaching(t *testing.T) { for _, step := range tc.script { resp, err := dispatch.DispatchCheck(context.Background(), &v1.DispatchCheckRequest{ - ObjectAndRelation: tuple.ParseONR(step.start), - Subject: tuple.ParseSubjectONR(step.goal), + ResourceAndRelation: tuple.ParseONR(step.start), + Subject: tuple.ParseSubjectONR(step.goal), Metadata: &v1.ResolverMeta{ AtRevision: step.atRevision.String(), DepthRemaining: step.depthRemaining, diff --git a/internal/dispatch/dispatch.go b/internal/dispatch/dispatch.go index b8a5eaf024..b298965b34 100644 --- a/internal/dispatch/dispatch.go +++ b/internal/dispatch/dispatch.go @@ -95,18 +95,18 @@ var cachePrefixes = []cachePrefix{checkViaRelationPrefix, checkViaCanonicalPrefi // CheckRequestToKey converts a check request into a cache key based on the relation func CheckRequestToKey(req *v1.DispatchCheckRequest) string { - return fmt.Sprintf("%s//%s@%s@%s", checkViaRelationPrefix, tuple.StringONR(req.ObjectAndRelation), tuple.StringONR(req.Subject), req.Metadata.AtRevision) + return fmt.Sprintf("%s//%s@%s@%s", checkViaRelationPrefix, tuple.StringONR(req.ResourceAndRelation), tuple.StringONR(req.Subject), req.Metadata.AtRevision) } // CheckRequestToKeyWithCanonical converts a check request into a cache key based // on the canonical key. func CheckRequestToKeyWithCanonical(req *v1.DispatchCheckRequest, canonicalKey string) string { if canonicalKey == "" { - panic(fmt.Sprintf("given empty canonical key for request: %s => %s", req.ObjectAndRelation, tuple.StringONR(req.Subject))) + panic(fmt.Sprintf("given empty canonical key for request: %s => %s", req.ResourceAndRelation, tuple.StringONR(req.Subject))) } // NOTE: canonical cache keys are only unique *within* a version of a namespace. - return fmt.Sprintf("%s//%s:%s#%s@%s@%s", checkViaCanonicalPrefix, req.ObjectAndRelation.Namespace, req.ObjectAndRelation.ObjectId, canonicalKey, tuple.StringONR(req.Subject), req.Metadata.AtRevision) + return fmt.Sprintf("%s//%s:%s#%s@%s@%s", checkViaCanonicalPrefix, req.ResourceAndRelation.Namespace, req.ResourceAndRelation.ObjectId, canonicalKey, tuple.StringONR(req.Subject), req.Metadata.AtRevision) } // LookupRequestToKey converts a lookup request into a cache key @@ -116,7 +116,7 @@ func LookupRequestToKey(req *v1.DispatchLookupRequest) string { // ExpandRequestToKey converts an expand request into a cache key func ExpandRequestToKey(req *v1.DispatchExpandRequest) string { - return fmt.Sprintf("%s//%s@%s", expandPrefix, tuple.StringONR(req.ObjectAndRelation), req.Metadata.AtRevision) + return fmt.Sprintf("%s//%s@%s", expandPrefix, tuple.StringONR(req.ResourceAndRelation), req.Metadata.AtRevision) } // ReachableResourcesRequestToKey converts a reachable resources request into a cache key diff --git a/internal/dispatch/graph/check_test.go b/internal/dispatch/graph/check_test.go index 111e93dcdd..788dc3f7b2 100644 --- a/internal/dispatch/graph/check_test.go +++ b/internal/dispatch/graph/check_test.go @@ -126,8 +126,8 @@ func TestSimpleCheck(t *testing.T) { ctx, dispatch, revision := newLocalDispatcher(require) checkResult, err := dispatch.DispatchCheck(ctx, &v1.DispatchCheckRequest{ - ObjectAndRelation: ONR(tc.namespace, tc.objectID, expected.relation), - Subject: userset.userset, + ResourceAndRelation: ONR(tc.namespace, tc.objectID, expected.relation), + Subject: userset.userset, Metadata: &v1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 50, @@ -181,8 +181,8 @@ func TestMaxDepth(t *testing.T) { dispatch := NewLocalOnlyDispatcher() checkResult, err := dispatch.DispatchCheck(ctx, &v1.DispatchCheckRequest{ - ObjectAndRelation: ONR("folder", "oops", "owner"), - Subject: ONR("user", "fake", graph.Ellipsis), + ResourceAndRelation: ONR("folder", "oops", "owner"), + Subject: ONR("user", "fake", graph.Ellipsis), Metadata: &v1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 50, @@ -269,8 +269,8 @@ func TestCheckMetadata(t *testing.T) { ctx, dispatch, revision := newLocalDispatcher(require) checkResult, err := dispatch.DispatchCheck(ctx, &v1.DispatchCheckRequest{ - ObjectAndRelation: ONR(tc.namespace, tc.objectID, expected.relation), - Subject: userset.userset, + ResourceAndRelation: ONR(tc.namespace, tc.objectID, expected.relation), + Subject: userset.userset, Metadata: &v1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 50, diff --git a/internal/dispatch/graph/expand_test.go b/internal/dispatch/graph/expand_test.go index 9d58ab25c1..6eb64d927e 100644 --- a/internal/dispatch/graph/expand_test.go +++ b/internal/dispatch/graph/expand_test.go @@ -29,7 +29,7 @@ import ( var ( companyOwner = graph.Leaf(ONR("folder", "company", "owner"), - tuple.User(ONR("user", "owner", expand.Ellipsis)), + (ONR("user", "owner", expand.Ellipsis)), ) companyEditor = graph.Leaf(ONR("folder", "company", "editor")) @@ -39,8 +39,8 @@ var ( ) companyViewer = graph.Leaf(ONR("folder", "company", "viewer"), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("folder", "auditors", "viewer")), + (ONR("user", "legal", "...")), + (ONR("folder", "auditors", "viewer")), ) companyView = graph.Union(ONR("folder", "company", "view"), @@ -59,7 +59,7 @@ var ( ) auditorsViewer = graph.Leaf(ONR("folder", "auditors", "viewer"), - tuple.User(ONR("user", "auditor", "...")), + (ONR("user", "auditor", "...")), ) auditorsViewRecursive = graph.Union(ONR("folder", "auditors", "view"), @@ -71,18 +71,18 @@ var ( companyViewRecursive = graph.Union(ONR("folder", "company", "view"), graph.Union(ONR("folder", "company", "viewer"), graph.Leaf(ONR("folder", "auditors", "viewer"), - tuple.User(ONR("user", "auditor", "..."))), + (ONR("user", "auditor", "..."))), graph.Leaf(ONR("folder", "company", "viewer"), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("folder", "auditors", "viewer")))), + (ONR("user", "legal", "...")), + (ONR("folder", "auditors", "viewer")))), graph.Union(ONR("folder", "company", "edit"), graph.Leaf(ONR("folder", "company", "editor")), graph.Leaf(ONR("folder", "company", "owner"), - tuple.User(ONR("user", "owner", "...")))), + (ONR("user", "owner", "...")))), graph.Union(ONR("folder", "company", "view"))) docOwner = graph.Leaf(ONR("document", "masterplan", "owner"), - tuple.User(ONR("user", "product_manager", "...")), + (ONR("user", "product_manager", "...")), ) docEditor = graph.Leaf(ONR("document", "masterplan", "editor")) @@ -92,7 +92,7 @@ var ( ) docViewer = graph.Leaf(ONR("document", "masterplan", "viewer"), - tuple.User(ONR("user", "eng_lead", "...")), + (ONR("user", "eng_lead", "...")), ) docView = graph.Union(ONR("document", "masterplan", "view"), @@ -101,7 +101,7 @@ var ( graph.Union(ONR("document", "masterplan", "view"), graph.Union(ONR("folder", "plans", "view"), graph.Leaf(ONR("folder", "plans", "viewer"), - tuple.User(ONR("user", "chief_financial_officer", "...")), + (ONR("user", "chief_financial_officer", "...")), ), graph.Union(ONR("folder", "plans", "edit"), graph.Leaf(ONR("folder", "plans", "editor")), @@ -112,16 +112,16 @@ var ( graph.Union(ONR("folder", "strategy", "edit"), graph.Leaf(ONR("folder", "strategy", "editor")), graph.Leaf(ONR("folder", "strategy", "owner"), - tuple.User(ONR("user", "vp_product", "...")))), + (ONR("user", "vp_product", "...")))), graph.Union(ONR("folder", "strategy", "view"), graph.Union(ONR("folder", "company", "view"), graph.Leaf(ONR("folder", "company", "viewer"), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("folder", "auditors", "viewer"))), + (ONR("user", "legal", "...")), + (ONR("folder", "auditors", "viewer"))), graph.Union(ONR("folder", "company", "edit"), graph.Leaf(ONR("folder", "company", "editor")), graph.Leaf(ONR("folder", "company", "owner"), - tuple.User(ONR("user", "owner", "...")))), + (ONR("user", "owner", "...")))), graph.Union(ONR("folder", "company", "view")), ), ), @@ -161,7 +161,7 @@ func TestExpand(t *testing.T) { ctx, dispatch, revision := newLocalDispatcher(require) expandResult, err := dispatch.DispatchExpand(ctx, &v1.DispatchExpandRequest{ - ObjectAndRelation: tc.start, + ResourceAndRelation: tc.start, Metadata: &v1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 50, @@ -239,10 +239,10 @@ func serialize(node *core.RelationTupleTreeNode) *ast.CallExpr { case *core.RelationTupleTreeNode_LeafNode: fName = "graph.Leaf" - for _, user := range node.GetLeafNode().Users { - onrExpr := onrExpr(user.GetUserset()) + for _, subject := range node.GetLeafNode().Subjects { + onrExpr := onrExpr(subject) children = append(children, &ast.CallExpr{ - Fun: ast.NewIdent("tuple.User"), + Fun: ast.NewIdent(""), Args: []ast.Expr{onrExpr}, }) } @@ -302,7 +302,7 @@ func TestMaxDepthExpand(t *testing.T) { dispatch := NewLocalOnlyDispatcher() _, err = dispatch.DispatchExpand(ctx, &v1.DispatchExpandRequest{ - ObjectAndRelation: ONR("folder", "oops", "view"), + ResourceAndRelation: ONR("folder", "oops", "view"), Metadata: &v1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 50, diff --git a/internal/dispatch/graph/graph.go b/internal/dispatch/graph/graph.go index 25b9948583..ced129b008 100644 --- a/internal/dispatch/graph/graph.go +++ b/internal/dispatch/graph/graph.go @@ -105,7 +105,7 @@ func (rr stringableRelRef) String() string { // DispatchCheck implements dispatch.Check interface func (ld *localDispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCheckRequest) (*v1.DispatchCheckResponse, error) { ctx, span := tracer.Start(ctx, "DispatchCheck", trace.WithAttributes( - attribute.Stringer("start", stringableOnr{req.ObjectAndRelation}), + attribute.Stringer("start", stringableOnr{req.ResourceAndRelation}), attribute.Stringer("subject", stringableOnr{req.Subject}), )) defer span.End() @@ -120,12 +120,12 @@ func (ld *localDispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCh return &v1.DispatchCheckResponse{Metadata: emptyMetadata}, err } - ns, err := ld.loadNamespace(ctx, req.ObjectAndRelation.Namespace, revision) + ns, err := ld.loadNamespace(ctx, req.ResourceAndRelation.Namespace, revision) if err != nil { return &v1.DispatchCheckResponse{Metadata: emptyMetadata}, err } - relation, err := ld.lookupRelation(ctx, ns, req.ObjectAndRelation.Relation, revision) + relation, err := ld.lookupRelation(ctx, ns, req.ResourceAndRelation.Relation, revision) if err != nil { return &v1.DispatchCheckResponse{Metadata: emptyMetadata}, err } @@ -134,7 +134,7 @@ func (ld *localDispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCh // resource, load the aliased relation and dispatch to it. We cannot use the alias if the // resource and subject types are the same because a check on the *exact same* resource and // subject must pass, and we don't know how many intermediate steps may hit that case. - if relation.AliasingRelation != "" && req.ObjectAndRelation.Namespace != req.Subject.Namespace { + if relation.AliasingRelation != "" && req.ResourceAndRelation.Namespace != req.Subject.Namespace { relation, err := ld.lookupRelation(ctx, ns, relation.AliasingRelation, revision) if err != nil { return &v1.DispatchCheckResponse{Metadata: emptyMetadata}, err @@ -143,9 +143,9 @@ func (ld *localDispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCh // Rewrite the request over the aliased relation. validatedReq := graph.ValidatedCheckRequest{ DispatchCheckRequest: &v1.DispatchCheckRequest{ - ObjectAndRelation: &core.ObjectAndRelation{ - Namespace: req.ObjectAndRelation.Namespace, - ObjectId: req.ObjectAndRelation.ObjectId, + ResourceAndRelation: &core.ObjectAndRelation{ + Namespace: req.ResourceAndRelation.Namespace, + ObjectId: req.ResourceAndRelation.ObjectId, Relation: relation.Name, }, Subject: req.Subject, @@ -168,7 +168,7 @@ func (ld *localDispatcher) DispatchCheck(ctx context.Context, req *v1.DispatchCh // DispatchExpand implements dispatch.Expand interface func (ld *localDispatcher) DispatchExpand(ctx context.Context, req *v1.DispatchExpandRequest) (*v1.DispatchExpandResponse, error) { ctx, span := tracer.Start(ctx, "DispatchExpand", trace.WithAttributes( - attribute.Stringer("start", stringableOnr{req.ObjectAndRelation}), + attribute.Stringer("start", stringableOnr{req.ResourceAndRelation}), )) defer span.End() @@ -182,12 +182,12 @@ func (ld *localDispatcher) DispatchExpand(ctx context.Context, req *v1.DispatchE return &v1.DispatchExpandResponse{Metadata: emptyMetadata}, err } - ns, err := ld.loadNamespace(ctx, req.ObjectAndRelation.Namespace, revision) + ns, err := ld.loadNamespace(ctx, req.ResourceAndRelation.Namespace, revision) if err != nil { return &v1.DispatchExpandResponse{Metadata: emptyMetadata}, err } - relation, err := ld.lookupRelation(ctx, ns, req.ObjectAndRelation.Relation, revision) + relation, err := ld.lookupRelation(ctx, ns, req.ResourceAndRelation.Relation, revision) if err != nil { return &v1.DispatchExpandResponse{Metadata: emptyMetadata}, err } diff --git a/internal/dispatch/keys/keys.go b/internal/dispatch/keys/keys.go index fab580ad1a..2bcda7b307 100644 --- a/internal/dispatch/keys/keys.go +++ b/internal/dispatch/keys/keys.go @@ -32,7 +32,7 @@ func (c *CanonicalKeyHandler) ComputeCheckKey(ctx context.Context, req *v1.Dispa // NOTE: We do not use the canonicalized cache key when checking within the same namespace, as // we may get different results if the subject being checked matches the resource exactly, e.g. // a check for `somenamespace:someobject#somerel@somenamespace:someobject#somerel`. - if req.ObjectAndRelation.Namespace != req.Subject.Namespace { + if req.ResourceAndRelation.Namespace != req.Subject.Namespace { // Load the relation to get its computed cache key, if any. revision, err := decimal.NewFromString(req.Metadata.AtRevision) if err != nil { @@ -43,8 +43,8 @@ func (c *CanonicalKeyHandler) ComputeCheckKey(ctx context.Context, req *v1.Dispa _, relation, err := namespace.ReadNamespaceAndRelation( ctx, - req.ObjectAndRelation.Namespace, - req.ObjectAndRelation.Relation, + req.ResourceAndRelation.Namespace, + req.ResourceAndRelation.Relation, ds, ) if err != nil { diff --git a/internal/graph/check.go b/internal/graph/check.go index dfba229989..36304323c3 100644 --- a/internal/graph/check.go +++ b/internal/graph/check.go @@ -50,7 +50,7 @@ func (cc *ConcurrentChecker) Check(ctx context.Context, req ValidatedCheckReques } else { if req.Subject.ObjectId == tuple.PublicWildcard { directFunc = checkError(NewErrInvalidArgument(errors.New("cannot perform check on wildcard"))) - } else if onrEqual(req.Subject, req.ObjectAndRelation) { + } else if onrEqual(req.Subject, req.ResourceAndRelation) { // If we have found the goal's ONR, then we know that the ONR is a member. directFunc = alwaysMember() } else if relation.UsersetRewrite == nil { @@ -84,9 +84,9 @@ func (cc *ConcurrentChecker) checkDirect(ctx context.Context, req ValidatedCheck // TODO(jschorr): Use type information to further optimize this query. it, err := ds.QueryRelationships(ctx, &v1_proto.RelationshipFilter{ - ResourceType: req.ObjectAndRelation.Namespace, - OptionalResourceId: req.ObjectAndRelation.ObjectId, - OptionalRelation: req.ObjectAndRelation.Relation, + ResourceType: req.ResourceAndRelation.Namespace, + OptionalResourceId: req.ResourceAndRelation.ObjectId, + OptionalRelation: req.ResourceAndRelation.Relation, }) if err != nil { resultChan <- checkResultError(NewCheckFailureErr(err), emptyMetadata) @@ -96,17 +96,16 @@ func (cc *ConcurrentChecker) checkDirect(ctx context.Context, req ValidatedCheck var requestsToDispatch []ReduceableCheckFunc for tpl := it.Next(); tpl != nil; tpl = it.Next() { - tplUserset := tpl.User.GetUserset() - if onrEqualOrWildcard(tplUserset, req.Subject) { + if onrEqualOrWildcard(tpl.Subject, req.Subject) { resultChan <- checkResult(v1.DispatchCheckResponse_MEMBER, emptyMetadata) return } - if tplUserset.Relation != Ellipsis { + if tpl.Subject.Relation != Ellipsis { // We need to recursively call check here, potentially changing namespaces requestsToDispatch = append(requestsToDispatch, cc.dispatch(ValidatedCheckRequest{ &v1.DispatchCheckRequest{ - ObjectAndRelation: tplUserset, - Subject: req.Subject, + ResourceAndRelation: tpl.Subject, + Subject: req.Subject, Metadata: decrementDepth(req.Metadata), }, @@ -166,12 +165,12 @@ func (cc *ConcurrentChecker) checkComputedUserset(ctx context.Context, req Valid panic("computed userset for tupleset without tuple") } - start = tpl.User.GetUserset() + start = tpl.Subject } else if cu.Object == core.ComputedUserset_TUPLE_OBJECT { if tpl != nil { - start = tpl.ObjectAndRelation + start = tpl.ResourceAndRelation } else { - start = req.ObjectAndRelation + start = req.ResourceAndRelation } } @@ -199,9 +198,9 @@ func (cc *ConcurrentChecker) checkComputedUserset(ctx context.Context, req Valid return cc.dispatch(ValidatedCheckRequest{ &v1.DispatchCheckRequest{ - ObjectAndRelation: targetOnr, - Subject: req.Subject, - Metadata: decrementDepth(req.Metadata), + ResourceAndRelation: targetOnr, + Subject: req.Subject, + Metadata: decrementDepth(req.Metadata), }, req.Revision, }) @@ -212,8 +211,8 @@ func (cc *ConcurrentChecker) checkTupleToUserset(ctx context.Context, req Valida log.Ctx(ctx).Trace().Object("ttu", req).Send() ds := datastoremw.MustFromContext(ctx).SnapshotReader(req.Revision) it, err := ds.QueryRelationships(ctx, &v1_proto.RelationshipFilter{ - ResourceType: req.ObjectAndRelation.Namespace, - OptionalResourceId: req.ObjectAndRelation.ObjectId, + ResourceType: req.ResourceAndRelation.Namespace, + OptionalResourceId: req.ResourceAndRelation.ObjectId, OptionalRelation: ttu.Tupleset.Relation, }) if err != nil { diff --git a/internal/graph/expand.go b/internal/graph/expand.go index eb6c143910..1f1fbff874 100644 --- a/internal/graph/expand.go +++ b/internal/graph/expand.go @@ -59,9 +59,9 @@ func (ce *ConcurrentExpander) expandDirect( return func(ctx context.Context, resultChan chan<- ExpandResult) { ds := datastoremw.MustFromContext(ctx).SnapshotReader(req.Revision) it, err := ds.QueryRelationships(ctx, &v1_proto.RelationshipFilter{ - ResourceType: req.ObjectAndRelation.Namespace, - OptionalResourceId: req.ObjectAndRelation.ObjectId, - OptionalRelation: req.ObjectAndRelation.Relation, + ResourceType: req.ResourceAndRelation.Namespace, + OptionalResourceId: req.ResourceAndRelation.ObjectId, + OptionalRelation: req.ResourceAndRelation.Relation, }) if err != nil { resultChan <- expandResultError(NewExpansionFailureErr(err), emptyMetadata) @@ -69,13 +69,13 @@ func (ce *ConcurrentExpander) expandDirect( } defer it.Close() - var foundNonTerminalUsersets []*core.User - var foundTerminalUsersets []*core.User + var foundNonTerminalUsersets []*core.ObjectAndRelation + var foundTerminalUsersets []*core.ObjectAndRelation for tpl := it.Next(); tpl != nil; tpl = it.Next() { - if tpl.User.GetUserset().Relation == Ellipsis { - foundTerminalUsersets = append(foundTerminalUsersets, tpl.User) + if tpl.Subject.Relation == Ellipsis { + foundTerminalUsersets = append(foundTerminalUsersets, tpl.Subject) } else { - foundNonTerminalUsersets = append(foundNonTerminalUsersets, tpl.User) + foundNonTerminalUsersets = append(foundNonTerminalUsersets, tpl.Subject) } } if it.Err() != nil { @@ -89,11 +89,11 @@ func (ce *ConcurrentExpander) expandDirect( resultChan <- expandResult( &core.RelationTupleTreeNode{ NodeType: &core.RelationTupleTreeNode_LeafNode{ - LeafNode: &core.DirectUserset{ - Users: append(foundTerminalUsersets, foundNonTerminalUsersets...), + LeafNode: &core.DirectSubjects{ + Subjects: append(foundTerminalUsersets, foundNonTerminalUsersets...), }, }, - Expanded: req.ObjectAndRelation, + Expanded: req.ResourceAndRelation, }, emptyMetadata, ) @@ -106,15 +106,15 @@ func (ce *ConcurrentExpander) expandDirect( for _, nonTerminalUser := range foundNonTerminalUsersets { requestsToDispatch = append(requestsToDispatch, ce.dispatch(ValidatedExpandRequest{ &v1.DispatchExpandRequest{ - ObjectAndRelation: nonTerminalUser.GetUserset(), - Metadata: decrementDepth(req.Metadata), - ExpansionMode: req.ExpansionMode, + ResourceAndRelation: nonTerminalUser, + Metadata: decrementDepth(req.Metadata), + ExpansionMode: req.ExpansionMode, }, req.Revision, })) } - result := expandAny(ctx, req.ObjectAndRelation, requestsToDispatch) + result := expandAny(ctx, req.ResourceAndRelation, requestsToDispatch) if result.Err != nil { resultChan <- result return @@ -123,11 +123,11 @@ func (ce *ConcurrentExpander) expandDirect( unionNode := result.Resp.TreeNode.GetIntermediateNode() unionNode.ChildNodes = append(unionNode.ChildNodes, &core.RelationTupleTreeNode{ NodeType: &core.RelationTupleTreeNode_LeafNode{ - LeafNode: &core.DirectUserset{ - Users: append(foundTerminalUsersets, foundNonTerminalUsersets...), + LeafNode: &core.DirectSubjects{ + Subjects: append(foundTerminalUsersets, foundNonTerminalUsersets...), }, }, - Expanded: req.ObjectAndRelation, + Expanded: req.ResourceAndRelation, }) resultChan <- result } @@ -162,13 +162,13 @@ func (ce *ConcurrentExpander) expandSetOperation(ctx context.Context, req Valida case *core.SetOperation_Child_TupleToUserset: requests = append(requests, ce.expandTupleToUserset(ctx, req, child.TupleToUserset)) case *core.SetOperation_Child_XNil: - requests = append(requests, emptyExpansion(req.ObjectAndRelation)) + requests = append(requests, emptyExpansion(req.ResourceAndRelation)) default: return expandError(fmt.Errorf("unknown set operation child `%T` in expand", child)) } } return func(ctx context.Context, resultChan chan<- ExpandResult) { - resultChan <- reducer(ctx, req.ObjectAndRelation, requests) + resultChan <- reducer(ctx, req.ResourceAndRelation, requests) } } @@ -189,12 +189,12 @@ func (ce *ConcurrentExpander) expandComputedUserset(ctx context.Context, req Val panic("computed userset for tupleset without tuple") } - start = tpl.User.GetUserset() + start = tpl.Subject } else if cu.Object == core.ComputedUserset_TUPLE_OBJECT { if tpl != nil { - start = tpl.ObjectAndRelation + start = tpl.ResourceAndRelation } else { - start = req.ObjectAndRelation + start = req.ResourceAndRelation } } @@ -203,7 +203,7 @@ func (ce *ConcurrentExpander) expandComputedUserset(ctx context.Context, req Val err := namespace.CheckNamespaceAndRelation(ctx, start.Namespace, cu.Relation, true, ds) if err != nil { if errors.As(err, &namespace.ErrRelationNotFound{}) { - return emptyExpansion(req.ObjectAndRelation) + return emptyExpansion(req.ResourceAndRelation) } return expandError(err) @@ -211,7 +211,7 @@ func (ce *ConcurrentExpander) expandComputedUserset(ctx context.Context, req Val return ce.dispatch(ValidatedExpandRequest{ &v1.DispatchExpandRequest{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: start.Namespace, ObjectId: start.ObjectId, Relation: cu.Relation, @@ -227,8 +227,8 @@ func (ce *ConcurrentExpander) expandTupleToUserset(ctx context.Context, req Vali return func(ctx context.Context, resultChan chan<- ExpandResult) { ds := datastoremw.MustFromContext(ctx).SnapshotReader(req.Revision) it, err := ds.QueryRelationships(ctx, &v1_proto.RelationshipFilter{ - ResourceType: req.ObjectAndRelation.Namespace, - OptionalResourceId: req.ObjectAndRelation.ObjectId, + ResourceType: req.ResourceAndRelation.Namespace, + OptionalResourceId: req.ResourceAndRelation.ObjectId, OptionalRelation: ttu.Tupleset.Relation, }) if err != nil { @@ -246,7 +246,7 @@ func (ce *ConcurrentExpander) expandTupleToUserset(ctx context.Context, req Vali return } - resultChan <- expandAny(ctx, req.ObjectAndRelation, requestsToDispatch) + resultChan <- expandAny(ctx, req.ResourceAndRelation, requestsToDispatch) } } @@ -314,7 +314,7 @@ func emptyExpansion(start *core.ObjectAndRelation) ReduceableExpandFunc { return func(ctx context.Context, resultChan chan<- ExpandResult) { resultChan <- expandResult(&core.RelationTupleTreeNode{ NodeType: &core.RelationTupleTreeNode_LeafNode{ - LeafNode: &core.DirectUserset{}, + LeafNode: &core.DirectSubjects{}, }, Expanded: start, }, emptyMetadata) diff --git a/internal/graph/parallelchecker.go b/internal/graph/parallelchecker.go index 17d563df18..146ebae33d 100644 --- a/internal/graph/parallelchecker.go +++ b/internal/graph/parallelchecker.go @@ -85,9 +85,9 @@ func (pc *ParallelChecker) QueueCheck(resource *core.ObjectAndRelation, meta *v1 } pc.toCheck <- &v1.DispatchCheckRequest{ - Metadata: meta, - ObjectAndRelation: resource, - Subject: pc.subject, + Metadata: meta, + ResourceAndRelation: resource, + Subject: pc.subject, } } @@ -116,7 +116,7 @@ func (pc *ParallelChecker) Start() { pc.mu.Lock() defer pc.mu.Unlock() if res.Membership == v1.DispatchCheckResponse_MEMBER { - pc.addResultsUnsafe(req.ObjectAndRelation) + pc.addResultsUnsafe(req.ResourceAndRelation) } pc.updateStatsUnsafe(res.Metadata) }() diff --git a/internal/graph/reachableresources.go b/internal/graph/reachableresources.go index fc5a09f49a..bbf663f6c0 100644 --- a/internal/graph/reachableresources.go +++ b/internal/graph/reachableresources.go @@ -162,7 +162,7 @@ func (crr *ConcurrentReachableResources) ReachableResources( rewrittenObjectTpl := &core.ObjectAndRelation{ Namespace: containingRelation.Namespace, - ObjectId: tpl.ObjectAndRelation.ObjectId, + ObjectId: tpl.ResourceAndRelation.ObjectId, Relation: containingRelation.Relation, } @@ -231,7 +231,7 @@ func (crr *ConcurrentReachableResources) lookupRelationEntrypoint(ctx context.Co return it.Err() } - err := crr.redispatchOrReport(ctx, tpl.ObjectAndRelation, rg, g, entrypoint, stream, req, dispatched) + err := crr.redispatchOrReport(ctx, tpl.ResourceAndRelation, rg, g, entrypoint, stream, req, dispatched) if err != nil { return err } diff --git a/internal/membership/membership.go b/internal/membership/membership.go index 97655f4e59..d9f86a6c9c 100644 --- a/internal/membership/membership.go +++ b/internal/membership/membership.go @@ -127,8 +127,8 @@ func populateFoundSubjects(rootONR *core.ObjectAndRelation, treeNode *core.Relat case *core.RelationTupleTreeNode_LeafNode: toReturn := NewTrackingSubjectSet() - for _, user := range typed.LeafNode.Users { - fs := NewFoundSubject(user.GetUserset()) + for _, subject := range typed.LeafNode.Subjects { + fs := NewFoundSubject(subject) toReturn.Add(fs) fs.relationships.Add(resource) } diff --git a/internal/membership/membership_test.go b/internal/membership/membership_test.go index 0536fbd2c0..acdb41f0af 100644 --- a/internal/membership/membership_test.go +++ b/internal/membership/membership_test.go @@ -22,10 +22,10 @@ var ( _this *core.ObjectAndRelation companyOwner = graph.Leaf(ONR("folder", "company", "owner"), - tuple.User(ONR("user", "owner", Ellipsis)), + (ONR("user", "owner", Ellipsis)), ) companyEditor = graph.Union(ONR("folder", "company", "editor"), - graph.Leaf(_this, tuple.User(ONR("user", "writer", Ellipsis))), + graph.Leaf(_this, (ONR("user", "writer", Ellipsis))), companyOwner, ) @@ -38,7 +38,7 @@ var ( auditorsViewerRecursive = graph.Union(ONR("folder", "auditors", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "auditor", "...")), + (ONR("user", "auditor", "...")), ), auditorsEditor, graph.Union(ONR("folder", "auditors", "viewer")), @@ -48,8 +48,8 @@ var ( graph.Union(ONR("folder", "company", "viewer"), auditorsViewerRecursive, graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("folder", "auditors", "viewer")), + (ONR("user", "legal", "...")), + (ONR("folder", "auditors", "viewer")), ), ), companyEditor, @@ -84,11 +84,11 @@ func TestMembershipSetIntersectionBasic(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), ) @@ -104,11 +104,11 @@ func TestMembershipSetExclusion(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), ) @@ -124,15 +124,15 @@ func TestMembershipSetExclusionMultiple(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("user", "third", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), + (ONR("user", "third", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), + (ONR("user", "owner", "...")), ), ) @@ -148,14 +148,14 @@ func TestMembershipSetExclusionMultipleWithWildcard(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) @@ -171,15 +171,15 @@ func TestMembershipSetExclusionMultipleMiddle(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("user", "third", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), + (ONR("user", "third", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "another", "...")), + (ONR("user", "another", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), + (ONR("user", "owner", "...")), ), ) @@ -195,11 +195,11 @@ func TestMembershipSetIntersectionWithOneWildcard(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "*", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), ) @@ -215,11 +215,11 @@ func TestMembershipSetIntersectionWithAllWildcardLeft(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "*", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) @@ -235,11 +235,11 @@ func TestMembershipSetIntersectionWithAllWildcardRight(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "*", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "*", "...")), ), ) @@ -255,11 +255,11 @@ func TestMembershipSetExclusionWithLeftWildcard(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "*", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "legal", "...")), ), ) @@ -275,11 +275,11 @@ func TestMembershipSetExclusionWithRightWildcard(t *testing.T) { exclusion := graph.Exclusion(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) @@ -295,14 +295,14 @@ func TestMembershipSetIntersectionWithThreeWildcards(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) @@ -318,15 +318,15 @@ func TestMembershipSetIntersectionWithOneBranchMissingWildcards(t *testing.T) { intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), - tuple.User(ONR("user", "*", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), + (ONR("user", "*", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), + (ONR("user", "owner", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) @@ -342,14 +342,14 @@ func TestMembershipSetIntersectionWithTwoBranchesMissingWildcards(t *testing.T) intersection := graph.Intersection(ONR("folder", "company", "viewer"), graph.Leaf(_this, - tuple.User(ONR("user", "owner", "...")), - tuple.User(ONR("user", "legal", "...")), + (ONR("user", "owner", "...")), + (ONR("user", "legal", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "another", "...")), + (ONR("user", "another", "...")), ), graph.Leaf(_this, - tuple.User(ONR("user", "*", "...")), + (ONR("user", "*", "...")), ), ) diff --git a/internal/services/consistency_test.go b/internal/services/consistency_test.go index 051cf4801f..e69e1071c4 100644 --- a/internal/services/consistency_test.go +++ b/internal/services/consistency_test.go @@ -94,7 +94,7 @@ func TestConsistency(t *testing.T) { // Build the list of tuples per namespace. tuplesPerNamespace := slicemultimap.New() for _, tpl := range fullyResolved.Tuples { - tuplesPerNamespace.Put(tpl.ObjectAndRelation.Namespace, tpl) + tuplesPerNamespace.Put(tpl.ResourceAndRelation.Namespace, tpl) } // Run the consistency tests for each service. @@ -140,17 +140,17 @@ func runAssertions(t *testing.T, for _, assertTrue := range parsedFile.Assertions.AssertTrue { // Ensure the assertion passes Check. rel := tuple.MustFromRelationship(assertTrue.Relationship) - result, err := tester.Check(context.Background(), rel.ObjectAndRelation, rel.User.GetUserset(), revision) + result, err := tester.Check(context.Background(), rel.ResourceAndRelation, rel.Subject, revision) require.NoError(t, err) require.True(t, result, "Assertion `%s` returned false; true expected", tuple.String(rel)) // Ensure the assertion passes Lookup. resolvedObjectIds, err := tester.Lookup(context.Background(), &core.RelationReference{ - Namespace: rel.ObjectAndRelation.Namespace, - Relation: rel.ObjectAndRelation.Relation, - }, rel.User.GetUserset(), revision) + Namespace: rel.ResourceAndRelation.Namespace, + Relation: rel.ResourceAndRelation.Relation, + }, rel.Subject, revision) require.NoError(t, err) - require.Contains(t, resolvedObjectIds, rel.ObjectAndRelation.ObjectId, "Missing object %s in lookup for assertion %s", rel.ObjectAndRelation, rel) + require.Contains(t, resolvedObjectIds, rel.ResourceAndRelation.ObjectId, "Missing object %s in lookup for assertion %s", rel.ResourceAndRelation, rel) } for _, assertFalse := range parsedFile.Assertions.AssertFalse { @@ -158,17 +158,17 @@ func runAssertions(t *testing.T, rel := tuple.MustFromRelationship(assertFalse.Relationship) // Ensure the assertion does not pass Check. - result, err := tester.Check(context.Background(), rel.ObjectAndRelation, rel.User.GetUserset(), revision) + result, err := tester.Check(context.Background(), rel.ResourceAndRelation, rel.Subject, revision) require.NoError(t, err) require.False(t, result, "Assertion `%s` returned true; false expected", tuple.String(rel)) // Ensure the assertion does not pass Lookup. resolvedObjectIds, err := tester.Lookup(context.Background(), &core.RelationReference{ - Namespace: rel.ObjectAndRelation.Namespace, - Relation: rel.ObjectAndRelation.Relation, - }, rel.User.GetUserset(), revision) + Namespace: rel.ResourceAndRelation.Namespace, + Relation: rel.ResourceAndRelation.Relation, + }, rel.Subject, revision) require.NoError(t, err) - require.NotContains(t, resolvedObjectIds, rel.ObjectAndRelation.ObjectId, "Found unexpected object %s in lookup for false assertion %s", rel.ObjectAndRelation, rel) + require.NotContains(t, resolvedObjectIds, rel.ResourceAndRelation.ObjectId, "Found unexpected object %s in lookup for false assertion %s", rel.ResourceAndRelation, rel) } } } @@ -190,7 +190,7 @@ func runCrossVersionTests(t *testing.T, }) for _, tpl := range fullyResolved.Tuples { - if tpl.ObjectAndRelation.Namespace != nsDef.Name { + if tpl.ResourceAndRelation.Namespace != nsDef.Name { continue } @@ -198,7 +198,7 @@ func runCrossVersionTests(t *testing.T, return tester.Expand(context.Background(), &core.ObjectAndRelation{ Namespace: nsDef.Name, Relation: relation.Name, - ObjectId: tpl.ObjectAndRelation.ObjectId, + ObjectId: tpl.ResourceAndRelation.ObjectId, }, revision) }) @@ -207,9 +207,9 @@ func runCrossVersionTests(t *testing.T, Namespace: nsDef.Name, Relation: relation.Name, }, &core.ObjectAndRelation{ - Namespace: tpl.ObjectAndRelation.Namespace, - Relation: tpl.ObjectAndRelation.Relation, - ObjectId: tpl.ObjectAndRelation.ObjectId, + Namespace: tpl.ResourceAndRelation.Namespace, + Relation: tpl.ResourceAndRelation.Relation, + ObjectId: tpl.ResourceAndRelation.ObjectId, }, revision) }) } @@ -272,16 +272,12 @@ func runConsistencyTests(t *testing.T, subjects := tuple.NewONRSet() subjectsNoWildcard := tuple.NewONRSet() for _, tpl := range fullyResolved.Tuples { - objectsPerNamespace.Put(tpl.ObjectAndRelation.Namespace, tpl.ObjectAndRelation.ObjectId) - - switch m := tpl.User.UserOneof.(type) { - case *core.User_Userset: - // NOTE: we skip adding wildcards as subjects or object IDs. - subjects.Add(m.Userset) - if m.Userset.ObjectId != tuple.PublicWildcard { - objectsPerNamespace.Put(m.Userset.Namespace, m.Userset.ObjectId) - subjectsNoWildcard.Add(m.Userset) - } + objectsPerNamespace.Put(tpl.ResourceAndRelation.Namespace, tpl.ResourceAndRelation.ObjectId) + subjects.Add(tpl.Subject) + + if tpl.Subject.ObjectId != tuple.PublicWildcard { + objectsPerNamespace.Put(tpl.Subject.Namespace, tpl.Subject.ObjectId) + subjectsNoWildcard.Add(tpl.Subject) } } @@ -362,7 +358,7 @@ func accessibleViaWildcardOnly(t *testing.T, ds datastore.Datastore, dispatch di require.NoError(t, datastoremw.SetInContext(ctx, ds)) resp, err := dispatch.DispatchExpand(ctx, &dispatchv1.DispatchExpandRequest{ - ObjectAndRelation: onr, + ResourceAndRelation: onr, Metadata: &dispatchv1.ResolverMeta{ AtRevision: revision.String(), DepthRemaining: 100, @@ -498,16 +494,12 @@ func validateEditChecks(t *testing.T, dev v0.DeveloperServiceServer, reqContext for _, objectID := range allObjectIds { objectIDStr := objectID.(string) checkRelationships = append(checkRelationships, &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: nsDef.Name, Relation: relation.Name, ObjectId: objectIDStr, }, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: subject, - }, - }, + Subject: subject, }) } @@ -637,7 +629,7 @@ func validateExpansionSubjects(t *testing.T, ds datastore.Datastore, vctx *valid // Run a non-recursive expansion to verify no errors are raised. _, err := vctx.dispatch.DispatchExpand(ctx, &dispatchv1.DispatchExpandRequest{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: nsDef.Name, Relation: relation.Name, ObjectId: objectIDStr, @@ -652,7 +644,7 @@ func validateExpansionSubjects(t *testing.T, ds datastore.Datastore, vctx *valid // Run a *recursive* expansion and ensure that the subjects found matches those found via Check. resp, err := vctx.dispatch.DispatchExpand(ctx, &dispatchv1.DispatchExpandRequest{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: nsDef.Name, Relation: relation.Name, ObjectId: objectIDStr, diff --git a/internal/services/servicetester_test.go b/internal/services/servicetester_test.go index b01197f6a1..1f91c632fc 100644 --- a/internal/services/servicetester_test.go +++ b/internal/services/servicetester_test.go @@ -135,19 +135,15 @@ func (v1st v1ServiceTester) Read(ctx context.Context, namespaceName string, atRe } tuples = append(tuples, &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: resp.Relationship.Resource.ObjectType, ObjectId: resp.Relationship.Resource.ObjectId, Relation: resp.Relationship.Relation, }, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{ - Namespace: resp.Relationship.Subject.Object.ObjectType, - ObjectId: resp.Relationship.Subject.Object.ObjectId, - Relation: deoptionalizeRelation(resp.Relationship.Subject.OptionalRelation), - }, - }, + Subject: &core.ObjectAndRelation{ + Namespace: resp.Relationship.Subject.Object.ObjectType, + ObjectId: resp.Relationship.Subject.Object.ObjectId, + Relation: deoptionalizeRelation(resp.Relationship.Subject.OptionalRelation), }, }) } diff --git a/internal/services/v0/developer_test.go b/internal/services/v0/developer_test.go index e68424c5b7..f625f74b4c 100644 --- a/internal/services/v0/developer_test.go +++ b/internal/services/v0/developer_test.go @@ -968,7 +968,7 @@ func TestDeveloperValidateONR(t *testing.T) { require.NoError(err) require.Equal(1, len(resp.RequestErrors)) require.Equal(&v0.DeveloperError{ - Message: "invalid RelationTuple.ObjectAndRelation: embedded message failed validation | caused by: invalid ObjectAndRelation.Relation: value does not match regex pattern \"^(\\\\.\\\\.\\\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + Message: "invalid RelationTuple.ResourceAndRelation: embedded message failed validation | caused by: invalid ObjectAndRelation.Relation: value does not match regex pattern \"^(\\\\.\\\\.\\\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$\"", Kind: v0.DeveloperError_PARSE_ERROR, Source: v0.DeveloperError_RELATIONSHIP, Context: `document:somedoc#writerIsNotValid@user:jimmy`, diff --git a/internal/services/v1/permissions.go b/internal/services/v1/permissions.go index 1ca22e7bc3..369bcfbfb1 100644 --- a/internal/services/v1/permissions.go +++ b/internal/services/v1/permissions.go @@ -50,7 +50,7 @@ func (ps *permissionServer) CheckPermission(ctx context.Context, req *v1.CheckPe AtRevision: atRevision.String(), DepthRemaining: ps.defaultDepth, }, - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: req.Resource.ObjectType, ObjectId: req.Resource.ObjectId, Relation: req.Permission, @@ -96,7 +96,7 @@ func (ps *permissionServer) ExpandPermissionTree(ctx context.Context, req *v1.Ex AtRevision: atRevision.String(), DepthRemaining: ps.defaultDepth, }, - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: req.Resource.ObjectType, ObjectId: req.Resource.ObjectId, Relation: req.Permission, @@ -157,22 +157,18 @@ func TranslateRelationshipTree(tree *v1.PermissionRelationshipTree) *core.Relati } case *v1.PermissionRelationshipTree_Leaf: - var users []*core.User + var subjects []*core.ObjectAndRelation for _, subj := range t.Leaf.Subjects { - users = append(users, &core.User{ - UserOneof: &core.User_Userset{ - Userset: &core.ObjectAndRelation{ - Namespace: subj.Object.ObjectType, - ObjectId: subj.Object.ObjectId, - Relation: stringz.DefaultEmpty(subj.OptionalRelation, graph.Ellipsis), - }, - }, + subjects = append(subjects, &core.ObjectAndRelation{ + Namespace: subj.Object.ObjectType, + ObjectId: subj.Object.ObjectId, + Relation: stringz.DefaultEmpty(subj.OptionalRelation, graph.Ellipsis), }) } return &core.RelationTupleTreeNode{ NodeType: &core.RelationTupleTreeNode_LeafNode{ - LeafNode: &core.DirectUserset{Users: users}, + LeafNode: &core.DirectSubjects{Subjects: subjects}, }, Expanded: expanded, } @@ -225,13 +221,13 @@ func TranslateExpansionTree(node *core.RelationTupleTreeNode) *v1.PermissionRela case *core.RelationTupleTreeNode_LeafNode: var subjects []*v1.SubjectReference - for _, found := range t.LeafNode.Users { + for _, found := range t.LeafNode.Subjects { subjects = append(subjects, &v1.SubjectReference{ Object: &v1.ObjectReference{ - ObjectType: found.GetUserset().Namespace, - ObjectId: found.GetUserset().ObjectId, + ObjectType: found.Namespace, + ObjectId: found.ObjectId, }, - OptionalRelation: denormalizeSubjectRelation(found.GetUserset().Relation), + OptionalRelation: denormalizeSubjectRelation(found.Relation), }) } diff --git a/internal/services/v1/permissions_test.go b/internal/services/v1/permissions_test.go index df7b2c00c5..c52fa263fb 100644 --- a/internal/services/v1/permissions_test.go +++ b/internal/services/v1/permissions_test.go @@ -511,38 +511,35 @@ func countLeafs(node *v1.PermissionRelationshipTree) int { } func TestTranslateExpansionTree(t *testing.T) { - var ( - ONR = tuple.ObjectAndRelation - User = tuple.User - ) + ONR := tuple.ObjectAndRelation table := []struct { name string input *core.RelationTupleTreeNode }{ - {"simple leaf", pgraph.Leaf(nil, User(ONR("user", "user1", "...")))}, + {"simple leaf", pgraph.Leaf(nil, (ONR("user", "user1", "...")))}, { "simple union", pgraph.Union(nil, - pgraph.Leaf(nil, User(ONR("user", "user1", "..."))), - pgraph.Leaf(nil, User(ONR("user", "user2", "..."))), - pgraph.Leaf(nil, User(ONR("user", "user3", "..."))), + pgraph.Leaf(nil, (ONR("user", "user1", "..."))), + pgraph.Leaf(nil, (ONR("user", "user2", "..."))), + pgraph.Leaf(nil, (ONR("user", "user3", "..."))), ), }, { "simple intersection", pgraph.Intersection(nil, pgraph.Leaf(nil, - User(ONR("user", "user1", "...")), - User(ONR("user", "user2", "...")), + (ONR("user", "user1", "...")), + (ONR("user", "user2", "...")), ), pgraph.Leaf(nil, - User(ONR("user", "user2", "...")), - User(ONR("user", "user3", "...")), + (ONR("user", "user2", "...")), + (ONR("user", "user3", "...")), ), pgraph.Leaf(nil, - User(ONR("user", "user2", "...")), - User(ONR("user", "user4", "...")), + (ONR("user", "user2", "...")), + (ONR("user", "user4", "...")), ), ), }, @@ -550,12 +547,12 @@ func TestTranslateExpansionTree(t *testing.T) { "empty intersection", pgraph.Intersection(nil, pgraph.Leaf(nil, - User(ONR("user", "user1", "...")), - User(ONR("user", "user2", "...")), + (ONR("user", "user1", "...")), + (ONR("user", "user2", "...")), ), pgraph.Leaf(nil, - User(ONR("user", "user3", "...")), - User(ONR("user", "user4", "...")), + (ONR("user", "user3", "...")), + (ONR("user", "user4", "...")), ), ), }, @@ -563,22 +560,22 @@ func TestTranslateExpansionTree(t *testing.T) { "simple exclusion", pgraph.Exclusion(nil, pgraph.Leaf(nil, - User(ONR("user", "user1", "...")), - User(ONR("user", "user2", "...")), + (ONR("user", "user1", "...")), + (ONR("user", "user2", "...")), ), - pgraph.Leaf(nil, User(ONR("user", "user2", "..."))), - pgraph.Leaf(nil, User(ONR("user", "user3", "..."))), + pgraph.Leaf(nil, (ONR("user", "user2", "..."))), + pgraph.Leaf(nil, (ONR("user", "user3", "..."))), ), }, { "empty exclusion", pgraph.Exclusion(nil, pgraph.Leaf(nil, - User(ONR("user", "user1", "...")), - User(ONR("user", "user2", "...")), + (ONR("user", "user1", "...")), + (ONR("user", "user2", "...")), ), - pgraph.Leaf(nil, User(ONR("user", "user1", "..."))), - pgraph.Leaf(nil, User(ONR("user", "user2", "..."))), + pgraph.Leaf(nil, (ONR("user", "user1", "..."))), + pgraph.Leaf(nil, (ONR("user", "user2", "..."))), ), }, } diff --git a/internal/services/v1/relationships.go b/internal/services/v1/relationships.go index 26d8462307..b25cfa535b 100644 --- a/internal/services/v1/relationships.go +++ b/internal/services/v1/relationships.go @@ -103,25 +103,25 @@ func (ps *permissionServer) ReadRelationships(req *v1.ReadRelationshipsRequest, defer tupleIterator.Close() for tuple := tupleIterator.Next(); tuple != nil; tuple = tupleIterator.Next() { - tupleUserset := tuple.User.GetUserset() + subject := tuple.Subject subjectRelation := "" - if tupleUserset.Relation != datastore.Ellipsis { - subjectRelation = tupleUserset.Relation + if subject.Relation != datastore.Ellipsis { + subjectRelation = subject.Relation } err := resp.Send(&v1.ReadRelationshipsResponse{ ReadAt: revisionReadAt, Relationship: &v1.Relationship{ Resource: &v1.ObjectReference{ - ObjectType: tuple.ObjectAndRelation.Namespace, - ObjectId: tuple.ObjectAndRelation.ObjectId, + ObjectType: tuple.ResourceAndRelation.Namespace, + ObjectId: tuple.ResourceAndRelation.ObjectId, }, - Relation: tuple.ObjectAndRelation.Relation, + Relation: tuple.ResourceAndRelation.Relation, Subject: &v1.SubjectReference{ Object: &v1.ObjectReference{ - ObjectType: tupleUserset.Namespace, - ObjectId: tupleUserset.ObjectId, + ObjectType: subject.Namespace, + ObjectId: subject.ObjectId, }, OptionalRelation: subjectRelation, }, diff --git a/pkg/datastore/test/datastore.go b/pkg/datastore/test/datastore.go index fac2898fb1..0f3e80486c 100644 --- a/pkg/datastore/test/datastore.go +++ b/pkg/datastore/test/datastore.go @@ -62,16 +62,16 @@ var testUserNS = namespace.Namespace(testUserNamespace) func makeTestTuple(resourceID, userID string) *core.RelationTuple { return &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: testResourceNamespace, ObjectId: resourceID, Relation: testReaderRelation, }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: testUserNamespace, ObjectId: userID, Relation: ellipsis, - }}}, + }, } } diff --git a/pkg/datastore/test/tuples.go b/pkg/datastore/test/tuples.go index 7faa07cf72..fe92047bc3 100644 --- a/pkg/datastore/test/tuples.go +++ b/pkg/datastore/test/tuples.go @@ -91,57 +91,57 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { dsReader := ds.SnapshotReader(lastRevision) for _, tupleToFind := range testTuples { - tupleUserset := tupleToFind.User.GetUserset() + tupleSubject := tupleToFind.Subject // Check that we can find the tuple a number of ways iter, err := dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, }) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - }, options.WithUsersets(tupleUserset)) + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + }, options.WithUsersets(tupleSubject)) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, }) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, - }, options.WithUsersets(tupleUserset)) + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, + }, options.WithUsersets(tupleSubject)) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, - }, options.WithUsersets(tupleUserset)) + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, + }, options.WithUsersets(tupleSubject)) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, - }, options.WithUsersets(tupleUserset), options.WithLimit(options.LimitOne)) + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, + }, options.WithUsersets(tupleSubject), options.WithLimit(options.LimitOne)) require.NoError(err) tRequire.VerifyIteratorResults(iter, tupleToFind) iter, err = dsReader.ReverseQueryRelationships( ctx, - tuple.UsersetToSubjectFilter(tupleUserset), + tuple.UsersetToSubjectFilter(tupleSubject), options.WithResRelation(&options.ResourceRelation{ - Namespace: tupleToFind.ObjectAndRelation.Namespace, - Relation: tupleToFind.ObjectAndRelation.Relation, + Namespace: tupleToFind.ResourceAndRelation.Namespace, + Relation: tupleToFind.ResourceAndRelation.Relation, }), ) require.NoError(err) @@ -149,10 +149,10 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { iter, err = dsReader.ReverseQueryRelationships( ctx, - tuple.UsersetToSubjectFilter(tupleUserset), + tuple.UsersetToSubjectFilter(tupleSubject), options.WithResRelation(&options.ResourceRelation{ - Namespace: tupleToFind.ObjectAndRelation.Namespace, - Relation: tupleToFind.ObjectAndRelation.Relation, + Namespace: tupleToFind.ResourceAndRelation.Namespace, + Relation: tupleToFind.ResourceAndRelation.Relation, }), options.WithReverseLimit(options.LimitOne), ) @@ -161,53 +161,53 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { // Check that we fail to find the tuple with the wrong filters iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, OptionalRelation: "fake", }) require.NoError(err) tRequire.VerifyIteratorResults(iter) incorrectUserset := &core.ObjectAndRelation{ - Namespace: tupleUserset.Namespace, - ObjectId: tupleUserset.ObjectId, + Namespace: tupleSubject.Namespace, + ObjectId: tupleSubject.ObjectId, Relation: "fake", } iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, }, options.WithUsersets(incorrectUserset)) require.NoError(err) tRequire.VerifyIteratorResults(iter) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, }, options.WithUsersets(incorrectUserset)) require.NoError(err) tRequire.VerifyIteratorResults(iter) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, - OptionalResourceId: tupleToFind.ObjectAndRelation.ObjectId, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, + OptionalResourceId: tupleToFind.ResourceAndRelation.ObjectId, OptionalRelation: "fake", - }, options.WithUsersets(tupleUserset)) + }, options.WithUsersets(tupleSubject)) require.NoError(err) tRequire.VerifyIteratorResults(iter) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, OptionalResourceId: "fake", - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, - }, options.WithUsersets(tupleUserset)) + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, + }, options.WithUsersets(tupleSubject)) require.NoError(err) tRequire.VerifyIteratorResults(iter) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: tupleToFind.ObjectAndRelation.Namespace, + ResourceType: tupleToFind.ResourceAndRelation.Namespace, OptionalResourceId: "fake", - OptionalRelation: tupleToFind.ObjectAndRelation.Relation, - }, options.WithUsersets(tupleUserset), options.WithLimit(options.LimitOne)) + OptionalRelation: tupleToFind.ResourceAndRelation.Relation, + }, options.WithUsersets(tupleSubject), options.WithLimit(options.LimitOne)) require.NoError(err) tRequire.VerifyIteratorResults(iter) @@ -215,8 +215,8 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { ctx, tuple.UsersetToSubjectFilter(incorrectUserset), options.WithResRelation(&options.ResourceRelation{ - Namespace: tupleToFind.ObjectAndRelation.Namespace, - Relation: tupleToFind.ObjectAndRelation.Relation, + Namespace: tupleToFind.ResourceAndRelation.Namespace, + Relation: tupleToFind.ResourceAndRelation.Relation, }), ) require.NoError(err) @@ -260,28 +260,28 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { // Check that we can find the group of tuples too iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: testTuples[0].ObjectAndRelation.Namespace, + ResourceType: testTuples[0].ResourceAndRelation.Namespace, }) require.NoError(err) tRequire.VerifyIteratorResults(iter, testTuples...) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: testTuples[0].ObjectAndRelation.Namespace, - OptionalRelation: testTuples[0].ObjectAndRelation.Relation, + ResourceType: testTuples[0].ResourceAndRelation.Namespace, + OptionalRelation: testTuples[0].ResourceAndRelation.Relation, }) require.NoError(err) tRequire.VerifyIteratorResults(iter, testTuples...) // Try some bad queries iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: testTuples[0].ObjectAndRelation.Namespace, + ResourceType: testTuples[0].ResourceAndRelation.Namespace, OptionalResourceId: "fakeobectid", }) require.NoError(err) tRequire.VerifyIteratorResults(iter) iter, err = dsReader.QueryRelationships(ctx, &v1.RelationshipFilter{ - ResourceType: testTuples[0].ObjectAndRelation.Namespace, + ResourceType: testTuples[0].ResourceAndRelation.Namespace, }, options.WithUsersets(&core.ObjectAndRelation{ Namespace: "test/user", ObjectId: "fakeuser", @@ -324,7 +324,7 @@ func SimpleTest(t *testing.T, tester DatastoreTester) { alreadyDeletedIter, err := ds.SnapshotReader(deletedAt).QueryRelationships( ctx, &v1.RelationshipFilter{ - ResourceType: testTuples[0].ObjectAndRelation.Namespace, + ResourceType: testTuples[0].ResourceAndRelation.Namespace, }, ) require.NoError(err) @@ -366,7 +366,7 @@ func DeleteRelationshipsTest(t *testing.T, tester DatastoreTester) { newTuple := makeTestTuple(fmt.Sprintf("resource%d", i), fmt.Sprintf("user%d", i%2)) testTuples = append(testTuples, newTuple) } - testTuples[len(testTuples)-1].ObjectAndRelation.Relation = "writer" + testTuples[len(testTuples)-1].ResourceAndRelation.Relation = "writer" table := []struct { name string @@ -572,7 +572,7 @@ func UsersetsTest(t *testing.T, tester DatastoreTester) { newTuple := makeTestTuple(resourceName, userName) testTuples = append(testTuples, newTuple) - usersets = append(usersets, newTuple.User.GetUserset()) + usersets = append(usersets, newTuple.Subject) writtenAt, err := ds.ReadWriteTx(ctx, func(ctx context.Context, rwt datastore.ReadWriteTransaction) error { err := rwt.WriteRelationships([]*v1.RelationshipUpdate{{ diff --git a/pkg/development/assertions.go b/pkg/development/assertions.go index cbb5c998cb..04258718bd 100644 --- a/pkg/development/assertions.go +++ b/pkg/development/assertions.go @@ -38,7 +38,7 @@ func runAssertions(devContext *DevContext, assertions []blocks.Assertion, expect var failures []*devinterface.DeveloperError for _, assertion := range assertions { tpl := tuple.MustFromRelationship(assertion.Relationship) - cr, err := RunCheck(devContext, tpl.ObjectAndRelation, tpl.User.GetUserset()) + cr, err := RunCheck(devContext, tpl.ResourceAndRelation, tpl.Subject) if err != nil { devErr, wireErr := DistinguishGraphError( devContext, diff --git a/pkg/development/check.go b/pkg/development/check.go index 397f1c51dc..dccf7c8446 100644 --- a/pkg/development/check.go +++ b/pkg/development/check.go @@ -13,8 +13,8 @@ import ( func RunCheck(devContext *DevContext, resource *core.ObjectAndRelation, subject *core.ObjectAndRelation) (v1.DispatchCheckResponse_Membership, error) { ctx := devContext.Ctx cr, err := devContext.Dispatcher.DispatchCheck(ctx, &v1.DispatchCheckRequest{ - ObjectAndRelation: resource, - Subject: subject, + ResourceAndRelation: resource, + Subject: subject, Metadata: &v1.ResolverMeta{ AtRevision: devContext.Revision.String(), DepthRemaining: maxDispatchDepth, diff --git a/pkg/development/internal.go b/pkg/development/internal.go index 3eb63914f1..94e5ca0fa8 100644 --- a/pkg/development/internal.go +++ b/pkg/development/internal.go @@ -22,20 +22,20 @@ func validateTupleWrite( tpl *core.RelationTuple, ds datastore.Reader, ) error { - err := tuple.ValidateResourceID(tpl.ObjectAndRelation.ObjectId) + err := tuple.ValidateResourceID(tpl.ResourceAndRelation.ObjectId) if err != nil { return err } - err = tuple.ValidateSubjectID(tpl.User.GetUserset().ObjectId) + err = tuple.ValidateSubjectID(tpl.Subject.ObjectId) if err != nil { return err } if err := namespace.CheckNamespaceAndRelation( ctx, - tpl.ObjectAndRelation.Namespace, - tpl.ObjectAndRelation.Relation, + tpl.ResourceAndRelation.Namespace, + tpl.ResourceAndRelation.Relation, false, // Disallow ellipsis ds, ); err != nil { @@ -43,68 +43,68 @@ func validateTupleWrite( } // Ensure wildcard writes have no subject relation. - if tpl.User.GetUserset().ObjectId == tuple.PublicWildcard { - if tpl.User.GetUserset().Relation != tuple.Ellipsis { + if tpl.Subject.ObjectId == tuple.PublicWildcard { + if tpl.Subject.Relation != tuple.Ellipsis { return invalidRelationError{ - error: fmt.Errorf("wildcard relationships require a subject relation of `...` on %v", tpl.ObjectAndRelation), - subject: tpl.User.GetUserset(), - onr: tpl.ObjectAndRelation, + error: fmt.Errorf("wildcard relationships require a subject relation of `...` on %v", tpl.ResourceAndRelation), + subject: tpl.Subject, + onr: tpl.ResourceAndRelation, } } } if err := namespace.CheckNamespaceAndRelation( ctx, - tpl.User.GetUserset().Namespace, - tpl.User.GetUserset().Relation, + tpl.Subject.Namespace, + tpl.Subject.Relation, true, // Allow Ellipsis ds, ); err != nil { return err } - _, ts, err := namespace.ReadNamespaceAndTypes(ctx, tpl.ObjectAndRelation.Namespace, ds) + _, ts, err := namespace.ReadNamespaceAndTypes(ctx, tpl.ResourceAndRelation.Namespace, ds) if err != nil { return err } - if ts.IsPermission(tpl.ObjectAndRelation.Relation) { + if ts.IsPermission(tpl.ResourceAndRelation.Relation) { return invalidRelationError{ - error: fmt.Errorf("cannot write a relationship to permission %s", tpl.ObjectAndRelation), - subject: tpl.User.GetUserset(), - onr: tpl.ObjectAndRelation, + error: fmt.Errorf("cannot write a relationship to permission %s", tpl.ResourceAndRelation), + subject: tpl.Subject, + onr: tpl.ResourceAndRelation, } } - if tpl.User.GetUserset().ObjectId == tuple.PublicWildcard { + if tpl.Subject.ObjectId == tuple.PublicWildcard { isAllowed, err := ts.IsAllowedPublicNamespace( - tpl.ObjectAndRelation.Relation, - tpl.User.GetUserset().Namespace) + tpl.ResourceAndRelation.Relation, + tpl.Subject.Namespace) if err != nil { return err } if isAllowed != namespace.PublicSubjectAllowed { return invalidRelationError{ - error: fmt.Errorf("wildcard subjects of type %s are not allowed on %v", tpl.User.GetUserset().Namespace, tpl.ObjectAndRelation), - subject: tpl.User.GetUserset(), - onr: tpl.ObjectAndRelation, + error: fmt.Errorf("wildcard subjects of type `%s` are not allowed on `%s`", tpl.Subject.Namespace, tuple.StringONR(tpl.ResourceAndRelation)), + subject: tpl.Subject, + onr: tpl.ResourceAndRelation, } } } else { isAllowed, err := ts.IsAllowedDirectRelation( - tpl.ObjectAndRelation.Relation, - tpl.User.GetUserset().Namespace, - tpl.User.GetUserset().Relation) + tpl.ResourceAndRelation.Relation, + tpl.Subject.Namespace, + tpl.Subject.Relation) if err != nil { return err } if isAllowed == namespace.DirectRelationNotValid { return invalidRelationError{ - error: fmt.Errorf("relation/permission %v is not allowed as the subject of %v", tpl.User, tpl.ObjectAndRelation), - subject: tpl.User.GetUserset(), - onr: tpl.ObjectAndRelation, + error: fmt.Errorf("relation/permission `%s` is not allowed as the subject of `%s`", tuple.StringONR(tpl.Subject), tuple.StringONR(tpl.ResourceAndRelation)), + subject: tpl.Subject, + onr: tpl.ResourceAndRelation, } } } diff --git a/pkg/development/validation.go b/pkg/development/validation.go index c7fd5e7228..26a4234e00 100644 --- a/pkg/development/validation.go +++ b/pkg/development/validation.go @@ -28,7 +28,7 @@ func RunValidation(devContext *DevContext, validation *blocks.ParsedExpectedRela // Run a full recursive expansion over the ONR. er, derr := devContext.Dispatcher.DispatchExpand(ctx, &v1.DispatchExpandRequest{ - ObjectAndRelation: onrKey.ObjectAndRelation, + ResourceAndRelation: onrKey.ObjectAndRelation, Metadata: &v1.ResolverMeta{ AtRevision: devContext.Revision.String(), DepthRemaining: maxDispatchDepth, diff --git a/pkg/graph/tree.go b/pkg/graph/tree.go index d5821db7ed..6e84f0a8cb 100644 --- a/pkg/graph/tree.go +++ b/pkg/graph/tree.go @@ -5,11 +5,11 @@ import ( ) // Leaf constructs a RelationTupleTreeNode leaf. -func Leaf(start *core.ObjectAndRelation, children ...*core.User) *core.RelationTupleTreeNode { +func Leaf(start *core.ObjectAndRelation, subjects ...*core.ObjectAndRelation) *core.RelationTupleTreeNode { return &core.RelationTupleTreeNode{ NodeType: &core.RelationTupleTreeNode_LeafNode{ - LeafNode: &core.DirectUserset{ - Users: children, + LeafNode: &core.DirectSubjects{ + Subjects: subjects, }, }, Expanded: start, diff --git a/pkg/proto/core/v1/core.pb.go b/pkg/proto/core/v1/core.pb.go index e9322d9862..f14e661420 100644 --- a/pkg/proto/core/v1/core.pb.go +++ b/pkg/proto/core/v1/core.pb.go @@ -71,7 +71,7 @@ func (x RelationTupleUpdate_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use RelationTupleUpdate_Operation.Descriptor instead. func (RelationTupleUpdate_Operation) EnumDescriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{5, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{4, 0} } type SetOperationUserset_Operation int32 @@ -123,7 +123,7 @@ func (x SetOperationUserset_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use SetOperationUserset_Operation.Descriptor instead. func (SetOperationUserset_Operation) EnumDescriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{7, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{6, 0} } type ReachabilityEntrypoint_ReachabilityEntrypointKind int32 @@ -181,7 +181,7 @@ func (x ReachabilityEntrypoint_ReachabilityEntrypointKind) Number() protoreflect // Deprecated: Use ReachabilityEntrypoint_ReachabilityEntrypointKind.Descriptor instead. func (ReachabilityEntrypoint_ReachabilityEntrypointKind) EnumDescriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{14, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{13, 0} } type ReachabilityEntrypoint_EntrypointResultStatus int32 @@ -234,7 +234,7 @@ func (x ReachabilityEntrypoint_EntrypointResultStatus) Number() protoreflect.Enu // Deprecated: Use ReachabilityEntrypoint_EntrypointResultStatus.Descriptor instead. func (ReachabilityEntrypoint_EntrypointResultStatus) EnumDescriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{14, 1} + return file_core_v1_core_proto_rawDescGZIP(), []int{13, 1} } type ComputedUserset_Object int32 @@ -280,7 +280,7 @@ func (x ComputedUserset_Object) Number() protoreflect.EnumNumber { // Deprecated: Use ComputedUserset_Object.Descriptor instead. func (ComputedUserset_Object) EnumDescriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{20, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{19, 0} } type RelationTuple struct { @@ -288,10 +288,10 @@ type RelationTuple struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // object_and_relation is the resource for the tuple - ObjectAndRelation *ObjectAndRelation `protobuf:"bytes,1,opt,name=object_and_relation,json=objectAndRelation,proto3" json:"object_and_relation,omitempty"` - // user is the subject for the tuple - User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + // resource_and_relation is the resource for the tuple + ResourceAndRelation *ObjectAndRelation `protobuf:"bytes,1,opt,name=resource_and_relation,json=resourceAndRelation,proto3" json:"resource_and_relation,omitempty"` + // subject is the subject for the tuple + Subject *ObjectAndRelation `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` } func (x *RelationTuple) Reset() { @@ -326,16 +326,16 @@ func (*RelationTuple) Descriptor() ([]byte, []int) { return file_core_v1_core_proto_rawDescGZIP(), []int{0} } -func (x *RelationTuple) GetObjectAndRelation() *ObjectAndRelation { +func (x *RelationTuple) GetResourceAndRelation() *ObjectAndRelation { if x != nil { - return x.ObjectAndRelation + return x.ResourceAndRelation } return nil } -func (x *RelationTuple) GetUser() *User { +func (x *RelationTuple) GetSubject() *ObjectAndRelation { if x != nil { - return x.User + return x.Subject } return nil } @@ -463,74 +463,6 @@ func (x *RelationReference) GetRelation() string { return "" } -type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // NOTE: deprecated, as only usersets are supported now. - // - // Types that are assignable to UserOneof: - // *User_Userset - UserOneof isUser_UserOneof `protobuf_oneof:"user_oneof"` -} - -func (x *User) Reset() { - *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *User) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*User) ProtoMessage() {} - -func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[3] - 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 User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{3} -} - -func (m *User) GetUserOneof() isUser_UserOneof { - if m != nil { - return m.UserOneof - } - return nil -} - -func (x *User) GetUserset() *ObjectAndRelation { - if x, ok := x.GetUserOneof().(*User_Userset); ok { - return x.Userset - } - return nil -} - -type isUser_UserOneof interface { - isUser_UserOneof() -} - -type User_Userset struct { - Userset *ObjectAndRelation `protobuf:"bytes,2,opt,name=userset,proto3,oneof"` -} - -func (*User_Userset) isUser_UserOneof() {} - type Zookie struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -542,7 +474,7 @@ type Zookie struct { func (x *Zookie) Reset() { *x = Zookie{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[4] + mi := &file_core_v1_core_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -555,7 +487,7 @@ func (x *Zookie) String() string { func (*Zookie) ProtoMessage() {} func (x *Zookie) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[4] + mi := &file_core_v1_core_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -568,7 +500,7 @@ func (x *Zookie) ProtoReflect() protoreflect.Message { // Deprecated: Use Zookie.ProtoReflect.Descriptor instead. func (*Zookie) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{4} + return file_core_v1_core_proto_rawDescGZIP(), []int{3} } func (x *Zookie) GetToken() string { @@ -590,7 +522,7 @@ type RelationTupleUpdate struct { func (x *RelationTupleUpdate) Reset() { *x = RelationTupleUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[5] + mi := &file_core_v1_core_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -603,7 +535,7 @@ func (x *RelationTupleUpdate) String() string { func (*RelationTupleUpdate) ProtoMessage() {} func (x *RelationTupleUpdate) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[5] + mi := &file_core_v1_core_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -616,7 +548,7 @@ func (x *RelationTupleUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationTupleUpdate.ProtoReflect.Descriptor instead. func (*RelationTupleUpdate) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{5} + return file_core_v1_core_proto_rawDescGZIP(), []int{4} } func (x *RelationTupleUpdate) GetOperation() RelationTupleUpdate_Operation { @@ -648,7 +580,7 @@ type RelationTupleTreeNode struct { func (x *RelationTupleTreeNode) Reset() { *x = RelationTupleTreeNode{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[6] + mi := &file_core_v1_core_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -661,7 +593,7 @@ func (x *RelationTupleTreeNode) String() string { func (*RelationTupleTreeNode) ProtoMessage() {} func (x *RelationTupleTreeNode) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[6] + mi := &file_core_v1_core_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -674,7 +606,7 @@ func (x *RelationTupleTreeNode) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationTupleTreeNode.ProtoReflect.Descriptor instead. func (*RelationTupleTreeNode) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{6} + return file_core_v1_core_proto_rawDescGZIP(), []int{5} } func (m *RelationTupleTreeNode) GetNodeType() isRelationTupleTreeNode_NodeType { @@ -691,7 +623,7 @@ func (x *RelationTupleTreeNode) GetIntermediateNode() *SetOperationUserset { return nil } -func (x *RelationTupleTreeNode) GetLeafNode() *DirectUserset { +func (x *RelationTupleTreeNode) GetLeafNode() *DirectSubjects { if x, ok := x.GetNodeType().(*RelationTupleTreeNode_LeafNode); ok { return x.LeafNode } @@ -714,7 +646,7 @@ type RelationTupleTreeNode_IntermediateNode struct { } type RelationTupleTreeNode_LeafNode struct { - LeafNode *DirectUserset `protobuf:"bytes,2,opt,name=leaf_node,json=leafNode,proto3,oneof"` + LeafNode *DirectSubjects `protobuf:"bytes,2,opt,name=leaf_node,json=leafNode,proto3,oneof"` } func (*RelationTupleTreeNode_IntermediateNode) isRelationTupleTreeNode_NodeType() {} @@ -733,7 +665,7 @@ type SetOperationUserset struct { func (x *SetOperationUserset) Reset() { *x = SetOperationUserset{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[7] + mi := &file_core_v1_core_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -746,7 +678,7 @@ func (x *SetOperationUserset) String() string { func (*SetOperationUserset) ProtoMessage() {} func (x *SetOperationUserset) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[7] + mi := &file_core_v1_core_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -759,7 +691,7 @@ func (x *SetOperationUserset) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOperationUserset.ProtoReflect.Descriptor instead. func (*SetOperationUserset) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{7} + return file_core_v1_core_proto_rawDescGZIP(), []int{6} } func (x *SetOperationUserset) GetOperation() SetOperationUserset_Operation { @@ -776,31 +708,31 @@ func (x *SetOperationUserset) GetChildNodes() []*RelationTupleTreeNode { return nil } -type DirectUserset struct { +type DirectSubjects struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` + Subjects []*ObjectAndRelation `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` } -func (x *DirectUserset) Reset() { - *x = DirectUserset{} +func (x *DirectSubjects) Reset() { + *x = DirectSubjects{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[8] + mi := &file_core_v1_core_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DirectUserset) String() string { +func (x *DirectSubjects) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DirectUserset) ProtoMessage() {} +func (*DirectSubjects) ProtoMessage() {} -func (x *DirectUserset) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[8] +func (x *DirectSubjects) ProtoReflect() protoreflect.Message { + mi := &file_core_v1_core_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -811,14 +743,14 @@ func (x *DirectUserset) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DirectUserset.ProtoReflect.Descriptor instead. -func (*DirectUserset) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{8} +// Deprecated: Use DirectSubjects.ProtoReflect.Descriptor instead. +func (*DirectSubjects) Descriptor() ([]byte, []int) { + return file_core_v1_core_proto_rawDescGZIP(), []int{7} } -func (x *DirectUserset) GetUsers() []*User { +func (x *DirectSubjects) GetSubjects() []*ObjectAndRelation { if x != nil { - return x.Users + return x.Subjects } return nil } @@ -837,7 +769,7 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[9] + mi := &file_core_v1_core_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -850,7 +782,7 @@ func (x *Metadata) String() string { func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[9] + mi := &file_core_v1_core_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -863,7 +795,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{9} + return file_core_v1_core_proto_rawDescGZIP(), []int{8} } func (x *Metadata) GetMetadataMessage() []*anypb.Any { @@ -893,7 +825,7 @@ type NamespaceDefinition struct { func (x *NamespaceDefinition) Reset() { *x = NamespaceDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[10] + mi := &file_core_v1_core_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -906,7 +838,7 @@ func (x *NamespaceDefinition) String() string { func (*NamespaceDefinition) ProtoMessage() {} func (x *NamespaceDefinition) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[10] + mi := &file_core_v1_core_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -919,7 +851,7 @@ func (x *NamespaceDefinition) ProtoReflect() protoreflect.Message { // Deprecated: Use NamespaceDefinition.ProtoReflect.Descriptor instead. func (*NamespaceDefinition) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{10} + return file_core_v1_core_proto_rawDescGZIP(), []int{9} } func (x *NamespaceDefinition) GetName() string { @@ -976,7 +908,7 @@ type Relation struct { func (x *Relation) Reset() { *x = Relation{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[11] + mi := &file_core_v1_core_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -989,7 +921,7 @@ func (x *Relation) String() string { func (*Relation) ProtoMessage() {} func (x *Relation) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[11] + mi := &file_core_v1_core_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1002,7 +934,7 @@ func (x *Relation) ProtoReflect() protoreflect.Message { // Deprecated: Use Relation.ProtoReflect.Descriptor instead. func (*Relation) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{11} + return file_core_v1_core_proto_rawDescGZIP(), []int{10} } func (x *Relation) GetName() string { @@ -1102,7 +1034,7 @@ type ReachabilityGraph struct { func (x *ReachabilityGraph) Reset() { *x = ReachabilityGraph{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[12] + mi := &file_core_v1_core_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1115,7 +1047,7 @@ func (x *ReachabilityGraph) String() string { func (*ReachabilityGraph) ProtoMessage() {} func (x *ReachabilityGraph) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[12] + mi := &file_core_v1_core_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1128,7 +1060,7 @@ func (x *ReachabilityGraph) ProtoReflect() protoreflect.Message { // Deprecated: Use ReachabilityGraph.ProtoReflect.Descriptor instead. func (*ReachabilityGraph) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{12} + return file_core_v1_core_proto_rawDescGZIP(), []int{11} } func (x *ReachabilityGraph) GetEntrypointsBySubjectType() map[string]*ReachabilityEntrypoints { @@ -1169,7 +1101,7 @@ type ReachabilityEntrypoints struct { func (x *ReachabilityEntrypoints) Reset() { *x = ReachabilityEntrypoints{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[13] + mi := &file_core_v1_core_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1182,7 +1114,7 @@ func (x *ReachabilityEntrypoints) String() string { func (*ReachabilityEntrypoints) ProtoMessage() {} func (x *ReachabilityEntrypoints) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[13] + mi := &file_core_v1_core_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1195,7 +1127,7 @@ func (x *ReachabilityEntrypoints) ProtoReflect() protoreflect.Message { // Deprecated: Use ReachabilityEntrypoints.ProtoReflect.Descriptor instead. func (*ReachabilityEntrypoints) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{13} + return file_core_v1_core_proto_rawDescGZIP(), []int{12} } func (x *ReachabilityEntrypoints) GetEntrypoints() []*ReachabilityEntrypoint { @@ -1246,7 +1178,7 @@ type ReachabilityEntrypoint struct { func (x *ReachabilityEntrypoint) Reset() { *x = ReachabilityEntrypoint{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[14] + mi := &file_core_v1_core_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1259,7 +1191,7 @@ func (x *ReachabilityEntrypoint) String() string { func (*ReachabilityEntrypoint) ProtoMessage() {} func (x *ReachabilityEntrypoint) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[14] + mi := &file_core_v1_core_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1272,7 +1204,7 @@ func (x *ReachabilityEntrypoint) ProtoReflect() protoreflect.Message { // Deprecated: Use ReachabilityEntrypoint.ProtoReflect.Descriptor instead. func (*ReachabilityEntrypoint) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{14} + return file_core_v1_core_proto_rawDescGZIP(), []int{13} } func (x *ReachabilityEntrypoint) GetKind() ReachabilityEntrypoint_ReachabilityEntrypointKind { @@ -1319,7 +1251,7 @@ type TypeInformation struct { func (x *TypeInformation) Reset() { *x = TypeInformation{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[15] + mi := &file_core_v1_core_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1332,7 +1264,7 @@ func (x *TypeInformation) String() string { func (*TypeInformation) ProtoMessage() {} func (x *TypeInformation) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[15] + mi := &file_core_v1_core_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1345,7 +1277,7 @@ func (x *TypeInformation) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeInformation.ProtoReflect.Descriptor instead. func (*TypeInformation) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{15} + return file_core_v1_core_proto_rawDescGZIP(), []int{14} } func (x *TypeInformation) GetAllowedDirectRelations() []*AllowedRelation { @@ -1378,7 +1310,7 @@ type AllowedRelation struct { func (x *AllowedRelation) Reset() { *x = AllowedRelation{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[16] + mi := &file_core_v1_core_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1391,7 +1323,7 @@ func (x *AllowedRelation) String() string { func (*AllowedRelation) ProtoMessage() {} func (x *AllowedRelation) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[16] + mi := &file_core_v1_core_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1404,7 +1336,7 @@ func (x *AllowedRelation) ProtoReflect() protoreflect.Message { // Deprecated: Use AllowedRelation.ProtoReflect.Descriptor instead. func (*AllowedRelation) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{16} + return file_core_v1_core_proto_rawDescGZIP(), []int{15} } func (x *AllowedRelation) GetNamespace() string { @@ -1474,7 +1406,7 @@ type UsersetRewrite struct { func (x *UsersetRewrite) Reset() { *x = UsersetRewrite{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[17] + mi := &file_core_v1_core_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1487,7 +1419,7 @@ func (x *UsersetRewrite) String() string { func (*UsersetRewrite) ProtoMessage() {} func (x *UsersetRewrite) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[17] + mi := &file_core_v1_core_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1500,7 +1432,7 @@ func (x *UsersetRewrite) ProtoReflect() protoreflect.Message { // Deprecated: Use UsersetRewrite.ProtoReflect.Descriptor instead. func (*UsersetRewrite) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{17} + return file_core_v1_core_proto_rawDescGZIP(), []int{16} } func (m *UsersetRewrite) GetRewriteOperation() isUsersetRewrite_RewriteOperation { @@ -1571,7 +1503,7 @@ type SetOperation struct { func (x *SetOperation) Reset() { *x = SetOperation{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[18] + mi := &file_core_v1_core_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1584,7 +1516,7 @@ func (x *SetOperation) String() string { func (*SetOperation) ProtoMessage() {} func (x *SetOperation) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[18] + mi := &file_core_v1_core_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1597,7 +1529,7 @@ func (x *SetOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOperation.ProtoReflect.Descriptor instead. func (*SetOperation) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{18} + return file_core_v1_core_proto_rawDescGZIP(), []int{17} } func (x *SetOperation) GetChild() []*SetOperation_Child { @@ -1620,7 +1552,7 @@ type TupleToUserset struct { func (x *TupleToUserset) Reset() { *x = TupleToUserset{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[19] + mi := &file_core_v1_core_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1633,7 +1565,7 @@ func (x *TupleToUserset) String() string { func (*TupleToUserset) ProtoMessage() {} func (x *TupleToUserset) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[19] + mi := &file_core_v1_core_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1578,7 @@ func (x *TupleToUserset) ProtoReflect() protoreflect.Message { // Deprecated: Use TupleToUserset.ProtoReflect.Descriptor instead. func (*TupleToUserset) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{19} + return file_core_v1_core_proto_rawDescGZIP(), []int{18} } func (x *TupleToUserset) GetTupleset() *TupleToUserset_Tupleset { @@ -1683,7 +1615,7 @@ type ComputedUserset struct { func (x *ComputedUserset) Reset() { *x = ComputedUserset{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[20] + mi := &file_core_v1_core_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1696,7 +1628,7 @@ func (x *ComputedUserset) String() string { func (*ComputedUserset) ProtoMessage() {} func (x *ComputedUserset) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[20] + mi := &file_core_v1_core_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1709,7 +1641,7 @@ func (x *ComputedUserset) ProtoReflect() protoreflect.Message { // Deprecated: Use ComputedUserset.ProtoReflect.Descriptor instead. func (*ComputedUserset) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{20} + return file_core_v1_core_proto_rawDescGZIP(), []int{19} } func (x *ComputedUserset) GetObject() ComputedUserset_Object { @@ -1745,7 +1677,7 @@ type SourcePosition struct { func (x *SourcePosition) Reset() { *x = SourcePosition{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[21] + mi := &file_core_v1_core_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1758,7 +1690,7 @@ func (x *SourcePosition) String() string { func (*SourcePosition) ProtoMessage() {} func (x *SourcePosition) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[21] + mi := &file_core_v1_core_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1771,7 +1703,7 @@ func (x *SourcePosition) ProtoReflect() protoreflect.Message { // Deprecated: Use SourcePosition.ProtoReflect.Descriptor instead. func (*SourcePosition) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{21} + return file_core_v1_core_proto_rawDescGZIP(), []int{20} } func (x *SourcePosition) GetZeroIndexedLineNumber() uint64 { @@ -1797,7 +1729,7 @@ type AllowedRelation_PublicWildcard struct { func (x *AllowedRelation_PublicWildcard) Reset() { *x = AllowedRelation_PublicWildcard{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[24] + mi := &file_core_v1_core_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1810,7 +1742,7 @@ func (x *AllowedRelation_PublicWildcard) String() string { func (*AllowedRelation_PublicWildcard) ProtoMessage() {} func (x *AllowedRelation_PublicWildcard) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[24] + mi := &file_core_v1_core_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1823,7 +1755,7 @@ func (x *AllowedRelation_PublicWildcard) ProtoReflect() protoreflect.Message { // Deprecated: Use AllowedRelation_PublicWildcard.ProtoReflect.Descriptor instead. func (*AllowedRelation_PublicWildcard) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{16, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{15, 0} } type SetOperation_Child struct { @@ -1850,7 +1782,7 @@ type SetOperation_Child struct { func (x *SetOperation_Child) Reset() { *x = SetOperation_Child{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[25] + mi := &file_core_v1_core_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1863,7 +1795,7 @@ func (x *SetOperation_Child) String() string { func (*SetOperation_Child) ProtoMessage() {} func (x *SetOperation_Child) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[25] + mi := &file_core_v1_core_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1876,7 +1808,7 @@ func (x *SetOperation_Child) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOperation_Child.ProtoReflect.Descriptor instead. func (*SetOperation_Child) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{18, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{17, 0} } func (m *SetOperation_Child) GetChildType() isSetOperation_Child_ChildType { @@ -1978,7 +1910,7 @@ type SetOperation_Child_This struct { func (x *SetOperation_Child_This) Reset() { *x = SetOperation_Child_This{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[26] + mi := &file_core_v1_core_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1991,7 +1923,7 @@ func (x *SetOperation_Child_This) String() string { func (*SetOperation_Child_This) ProtoMessage() {} func (x *SetOperation_Child_This) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[26] + mi := &file_core_v1_core_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2004,7 +1936,7 @@ func (x *SetOperation_Child_This) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOperation_Child_This.ProtoReflect.Descriptor instead. func (*SetOperation_Child_This) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{18, 0, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{17, 0, 0} } type SetOperation_Child_Nil struct { @@ -2016,7 +1948,7 @@ type SetOperation_Child_Nil struct { func (x *SetOperation_Child_Nil) Reset() { *x = SetOperation_Child_Nil{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[27] + mi := &file_core_v1_core_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2029,7 +1961,7 @@ func (x *SetOperation_Child_Nil) String() string { func (*SetOperation_Child_Nil) ProtoMessage() {} func (x *SetOperation_Child_Nil) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[27] + mi := &file_core_v1_core_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2042,7 +1974,7 @@ func (x *SetOperation_Child_Nil) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOperation_Child_Nil.ProtoReflect.Descriptor instead. func (*SetOperation_Child_Nil) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{18, 0, 1} + return file_core_v1_core_proto_rawDescGZIP(), []int{17, 0, 1} } type TupleToUserset_Tupleset struct { @@ -2056,7 +1988,7 @@ type TupleToUserset_Tupleset struct { func (x *TupleToUserset_Tupleset) Reset() { *x = TupleToUserset_Tupleset{} if protoimpl.UnsafeEnabled { - mi := &file_core_v1_core_proto_msgTypes[28] + mi := &file_core_v1_core_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2069,7 +2001,7 @@ func (x *TupleToUserset_Tupleset) String() string { func (*TupleToUserset_Tupleset) ProtoMessage() {} func (x *TupleToUserset_Tupleset) ProtoReflect() protoreflect.Message { - mi := &file_core_v1_core_proto_msgTypes[28] + mi := &file_core_v1_core_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2082,7 +2014,7 @@ func (x *TupleToUserset_Tupleset) ProtoReflect() protoreflect.Message { // Deprecated: Use TupleToUserset_Tupleset.ProtoReflect.Descriptor instead. func (*TupleToUserset_Tupleset) Descriptor() ([]byte, []int) { - return file_core_v1_core_proto_rawDescGZIP(), []int{19, 0} + return file_core_v1_core_proto_rawDescGZIP(), []int{18, 0} } func (x *TupleToUserset_Tupleset) GetRelation() string { @@ -2100,375 +2032,372 @@ var file_core_v1_core_proto_rawDesc = []byte{ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6e, - 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 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, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x9d, 0x02, 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x7a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, - 0x01, 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, - 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, - 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x08, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, - 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, - 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, - 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x7a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, - 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x65, 0x74, 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, 0x48, 0x00, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x11, 0x0a, 0x0a, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, - 0x27, 0x0a, 0x06, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, - 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x4e, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x36, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x3b, 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, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x54, 0x4f, 0x55, 0x43, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, - 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0xe0, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x4b, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x09, - 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 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, 0x52, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x0a, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x34, 0x0a, - 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x23, - 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0xab, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x42, 0x6a, 0xfa, 0x42, 0x67, 0x92, 0x01, 0x64, 0x08, 0x01, 0x22, 0x60, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0xa2, 0x01, 0x58, 0x08, 0x01, 0x12, 0x26, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x2c, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, - 0x02, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, - 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, - 0x3f, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, - 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, - 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x12, 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, - 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x4b, 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x77, 0x0a, 0x1b, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x1f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x1d, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 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, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x71, 0x0a, 0x21, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, - 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 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, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x04, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, - 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 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, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 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, - 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, - 0x1a, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x52, - 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, - 0x4e, 0x54, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, - 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, - 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x53, 0x45, - 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, - 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x57, 0x0a, 0x16, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, - 0x5f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, - 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, - 0x10, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x65, 0x0a, 0x0f, 0x54, 0x79, 0x70, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x18, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x89, 0x03, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 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, 0x01, 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, 0x3e, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9d, 0x02, + 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x08, 0x72, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, + 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, 0x01, 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, + 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, + 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, + 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, + 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, + 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x2f, 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, - 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x48, - 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x0f, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, 0x00, 0x52, - 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, - 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x10, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, - 0x61, 0x72, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6f, 0x72, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0xad, 0x02, 0x0a, 0x0e, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x37, - 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, - 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc4, 0x04, 0x0a, 0x0c, - 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x92, 0x01, 0x09, - 0x08, 0x01, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x1a, 0xef, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x5f, 0x74, - 0x68, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x48, 0x00, 0x52, 0x04, 0x54, - 0x68, 0x69, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x34, 0x0a, 0x04, 0x5f, 0x6e, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x4e, 0x69, 0x6c, - 0x48, 0x00, 0x52, 0x03, 0x4e, 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, - 0x1a, 0x06, 0x0a, 0x04, 0x54, 0x68, 0x69, 0x73, 0x1a, 0x05, 0x0a, 0x03, 0x4e, 0x69, 0x6c, 0x42, - 0x11, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x22, 0xba, 0x02, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, - 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, - 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x91, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, - 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, - 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, - 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, + 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x06, 0x5a, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x22, 0x3b, 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, 0x0a, 0x0a, 0x06, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4f, 0x55, 0x43, + 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, + 0xe1, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, + 0x0a, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 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, 0x52, 0x08, 0x65, 0x78, + 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 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, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x22, 0x44, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, + 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x58, 0x43, + 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x48, 0x0a, 0x0e, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 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, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0xab, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x42, 0x6a, 0xfa, 0x42, 0x67, 0x92, 0x01, 0x64, 0x08, 0x01, 0x22, 0x60, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0xa2, 0x01, 0x58, 0x08, 0x01, 0x12, 0x26, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, 0x02, + 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, + 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, + 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x3f, + 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, + 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, + 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, + 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, + 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, + 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, + 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, + 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x77, 0x0a, 0x1b, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x83, 0x01, 0x0a, 0x1f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x1d, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 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, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x71, 0x0a, 0x21, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 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, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x92, 0x04, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, 0x0a, + 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 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, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 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, 0x12, + 0x2b, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1a, + 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, + 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, + 0x54, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, + 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, + 0x4e, 0x54, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x53, 0x45, 0x54, + 0x5f, 0x54, 0x4f, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, + 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x57, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x5f, + 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, + 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x65, 0x0a, 0x0f, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x18, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, + 0x03, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, + 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, + 0x29, 0x3f, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, + 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, + 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, + 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, + 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x48, 0x00, + 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x0f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x40, + 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x10, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, + 0x72, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x72, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0xad, 0x02, 0x0a, 0x0e, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x37, 0x0a, + 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, + 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, + 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x18, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc4, 0x04, 0x0a, 0x0c, 0x53, + 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x92, 0x01, 0x09, 0x08, + 0x01, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x1a, + 0xef, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x5f, 0x74, 0x68, + 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x48, 0x00, 0x52, 0x04, 0x54, 0x68, + 0x69, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, + 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x12, 0x34, 0x0a, 0x04, 0x5f, 0x6e, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x4e, 0x69, 0x6c, 0x48, + 0x00, 0x52, 0x03, 0x4e, 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x1a, + 0x06, 0x0a, 0x04, 0x54, 0x68, 0x69, 0x73, 0x1a, 0x05, 0x0a, 0x03, 0x4e, 0x69, 0x6c, 0x42, 0x11, + 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0xba, 0x02, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, - 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x55, 0x50, 0x4c, 0x45, - 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x55, 0x50, - 0x4c, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x3f, 0x0a, 0x1c, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x42, 0x09, 0x43, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x43, - 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x08, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, 0x0a, + 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, + 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, + 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, + 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, + 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x06, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x5f, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x55, 0x50, 0x4c, + 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, + 0x10, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3f, + 0x0a, 0x1c, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x09, 0x43, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x43, 0x6f, + 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x08, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2484,7 +2413,7 @@ func file_core_v1_core_proto_rawDescGZIP() []byte { } var file_core_v1_core_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_core_v1_core_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_core_v1_core_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_core_v1_core_proto_goTypes = []interface{}{ (RelationTupleUpdate_Operation)(0), // 0: core.v1.RelationTupleUpdate.Operation (SetOperationUserset_Operation)(0), // 1: core.v1.SetOperationUserset.Operation @@ -2494,87 +2423,85 @@ var file_core_v1_core_proto_goTypes = []interface{}{ (*RelationTuple)(nil), // 5: core.v1.RelationTuple (*ObjectAndRelation)(nil), // 6: core.v1.ObjectAndRelation (*RelationReference)(nil), // 7: core.v1.RelationReference - (*User)(nil), // 8: core.v1.User - (*Zookie)(nil), // 9: core.v1.Zookie - (*RelationTupleUpdate)(nil), // 10: core.v1.RelationTupleUpdate - (*RelationTupleTreeNode)(nil), // 11: core.v1.RelationTupleTreeNode - (*SetOperationUserset)(nil), // 12: core.v1.SetOperationUserset - (*DirectUserset)(nil), // 13: core.v1.DirectUserset - (*Metadata)(nil), // 14: core.v1.Metadata - (*NamespaceDefinition)(nil), // 15: core.v1.NamespaceDefinition - (*Relation)(nil), // 16: core.v1.Relation - (*ReachabilityGraph)(nil), // 17: core.v1.ReachabilityGraph - (*ReachabilityEntrypoints)(nil), // 18: core.v1.ReachabilityEntrypoints - (*ReachabilityEntrypoint)(nil), // 19: core.v1.ReachabilityEntrypoint - (*TypeInformation)(nil), // 20: core.v1.TypeInformation - (*AllowedRelation)(nil), // 21: core.v1.AllowedRelation - (*UsersetRewrite)(nil), // 22: core.v1.UsersetRewrite - (*SetOperation)(nil), // 23: core.v1.SetOperation - (*TupleToUserset)(nil), // 24: core.v1.TupleToUserset - (*ComputedUserset)(nil), // 25: core.v1.ComputedUserset - (*SourcePosition)(nil), // 26: core.v1.SourcePosition - nil, // 27: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry - nil, // 28: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry - (*AllowedRelation_PublicWildcard)(nil), // 29: core.v1.AllowedRelation.PublicWildcard - (*SetOperation_Child)(nil), // 30: core.v1.SetOperation.Child - (*SetOperation_Child_This)(nil), // 31: core.v1.SetOperation.Child.This - (*SetOperation_Child_Nil)(nil), // 32: core.v1.SetOperation.Child.Nil - (*TupleToUserset_Tupleset)(nil), // 33: core.v1.TupleToUserset.Tupleset - (*anypb.Any)(nil), // 34: google.protobuf.Any + (*Zookie)(nil), // 8: core.v1.Zookie + (*RelationTupleUpdate)(nil), // 9: core.v1.RelationTupleUpdate + (*RelationTupleTreeNode)(nil), // 10: core.v1.RelationTupleTreeNode + (*SetOperationUserset)(nil), // 11: core.v1.SetOperationUserset + (*DirectSubjects)(nil), // 12: core.v1.DirectSubjects + (*Metadata)(nil), // 13: core.v1.Metadata + (*NamespaceDefinition)(nil), // 14: core.v1.NamespaceDefinition + (*Relation)(nil), // 15: core.v1.Relation + (*ReachabilityGraph)(nil), // 16: core.v1.ReachabilityGraph + (*ReachabilityEntrypoints)(nil), // 17: core.v1.ReachabilityEntrypoints + (*ReachabilityEntrypoint)(nil), // 18: core.v1.ReachabilityEntrypoint + (*TypeInformation)(nil), // 19: core.v1.TypeInformation + (*AllowedRelation)(nil), // 20: core.v1.AllowedRelation + (*UsersetRewrite)(nil), // 21: core.v1.UsersetRewrite + (*SetOperation)(nil), // 22: core.v1.SetOperation + (*TupleToUserset)(nil), // 23: core.v1.TupleToUserset + (*ComputedUserset)(nil), // 24: core.v1.ComputedUserset + (*SourcePosition)(nil), // 25: core.v1.SourcePosition + nil, // 26: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry + nil, // 27: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry + (*AllowedRelation_PublicWildcard)(nil), // 28: core.v1.AllowedRelation.PublicWildcard + (*SetOperation_Child)(nil), // 29: core.v1.SetOperation.Child + (*SetOperation_Child_This)(nil), // 30: core.v1.SetOperation.Child.This + (*SetOperation_Child_Nil)(nil), // 31: core.v1.SetOperation.Child.Nil + (*TupleToUserset_Tupleset)(nil), // 32: core.v1.TupleToUserset.Tupleset + (*anypb.Any)(nil), // 33: google.protobuf.Any } var file_core_v1_core_proto_depIdxs = []int32{ - 6, // 0: core.v1.RelationTuple.object_and_relation:type_name -> core.v1.ObjectAndRelation - 8, // 1: core.v1.RelationTuple.user:type_name -> core.v1.User - 6, // 2: core.v1.User.userset:type_name -> core.v1.ObjectAndRelation - 0, // 3: core.v1.RelationTupleUpdate.operation:type_name -> core.v1.RelationTupleUpdate.Operation - 5, // 4: core.v1.RelationTupleUpdate.tuple:type_name -> core.v1.RelationTuple - 12, // 5: core.v1.RelationTupleTreeNode.intermediate_node:type_name -> core.v1.SetOperationUserset - 13, // 6: core.v1.RelationTupleTreeNode.leaf_node:type_name -> core.v1.DirectUserset - 6, // 7: core.v1.RelationTupleTreeNode.expanded:type_name -> core.v1.ObjectAndRelation - 1, // 8: core.v1.SetOperationUserset.operation:type_name -> core.v1.SetOperationUserset.Operation - 11, // 9: core.v1.SetOperationUserset.child_nodes:type_name -> core.v1.RelationTupleTreeNode - 8, // 10: core.v1.DirectUserset.users:type_name -> core.v1.User - 34, // 11: core.v1.Metadata.metadata_message:type_name -> google.protobuf.Any - 16, // 12: core.v1.NamespaceDefinition.relation:type_name -> core.v1.Relation - 14, // 13: core.v1.NamespaceDefinition.metadata:type_name -> core.v1.Metadata - 26, // 14: core.v1.NamespaceDefinition.source_position:type_name -> core.v1.SourcePosition - 22, // 15: core.v1.Relation.userset_rewrite:type_name -> core.v1.UsersetRewrite - 20, // 16: core.v1.Relation.type_information:type_name -> core.v1.TypeInformation - 14, // 17: core.v1.Relation.metadata:type_name -> core.v1.Metadata - 26, // 18: core.v1.Relation.source_position:type_name -> core.v1.SourcePosition - 27, // 19: core.v1.ReachabilityGraph.entrypoints_by_subject_type:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry - 28, // 20: core.v1.ReachabilityGraph.entrypoints_by_subject_relation:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry - 19, // 21: core.v1.ReachabilityEntrypoints.entrypoints:type_name -> core.v1.ReachabilityEntrypoint - 7, // 22: core.v1.ReachabilityEntrypoints.subject_relation:type_name -> core.v1.RelationReference - 2, // 23: core.v1.ReachabilityEntrypoint.kind:type_name -> core.v1.ReachabilityEntrypoint.ReachabilityEntrypointKind - 7, // 24: core.v1.ReachabilityEntrypoint.target_relation:type_name -> core.v1.RelationReference - 3, // 25: core.v1.ReachabilityEntrypoint.result_status:type_name -> core.v1.ReachabilityEntrypoint.EntrypointResultStatus - 21, // 26: core.v1.TypeInformation.allowed_direct_relations:type_name -> core.v1.AllowedRelation - 29, // 27: core.v1.AllowedRelation.public_wildcard:type_name -> core.v1.AllowedRelation.PublicWildcard - 26, // 28: core.v1.AllowedRelation.source_position:type_name -> core.v1.SourcePosition - 23, // 29: core.v1.UsersetRewrite.union:type_name -> core.v1.SetOperation - 23, // 30: core.v1.UsersetRewrite.intersection:type_name -> core.v1.SetOperation - 23, // 31: core.v1.UsersetRewrite.exclusion:type_name -> core.v1.SetOperation - 26, // 32: core.v1.UsersetRewrite.source_position:type_name -> core.v1.SourcePosition - 30, // 33: core.v1.SetOperation.child:type_name -> core.v1.SetOperation.Child - 33, // 34: core.v1.TupleToUserset.tupleset:type_name -> core.v1.TupleToUserset.Tupleset - 25, // 35: core.v1.TupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset - 26, // 36: core.v1.TupleToUserset.source_position:type_name -> core.v1.SourcePosition - 4, // 37: core.v1.ComputedUserset.object:type_name -> core.v1.ComputedUserset.Object - 26, // 38: core.v1.ComputedUserset.source_position:type_name -> core.v1.SourcePosition - 18, // 39: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry.value:type_name -> core.v1.ReachabilityEntrypoints - 18, // 40: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry.value:type_name -> core.v1.ReachabilityEntrypoints - 31, // 41: core.v1.SetOperation.Child._this:type_name -> core.v1.SetOperation.Child.This - 25, // 42: core.v1.SetOperation.Child.computed_userset:type_name -> core.v1.ComputedUserset - 24, // 43: core.v1.SetOperation.Child.tuple_to_userset:type_name -> core.v1.TupleToUserset - 22, // 44: core.v1.SetOperation.Child.userset_rewrite:type_name -> core.v1.UsersetRewrite - 32, // 45: core.v1.SetOperation.Child._nil:type_name -> core.v1.SetOperation.Child.Nil - 26, // 46: core.v1.SetOperation.Child.source_position:type_name -> core.v1.SourcePosition - 47, // [47:47] is the sub-list for method output_type - 47, // [47:47] is the sub-list for method input_type - 47, // [47:47] is the sub-list for extension type_name - 47, // [47:47] is the sub-list for extension extendee - 0, // [0:47] is the sub-list for field type_name + 6, // 0: core.v1.RelationTuple.resource_and_relation:type_name -> core.v1.ObjectAndRelation + 6, // 1: core.v1.RelationTuple.subject:type_name -> core.v1.ObjectAndRelation + 0, // 2: core.v1.RelationTupleUpdate.operation:type_name -> core.v1.RelationTupleUpdate.Operation + 5, // 3: core.v1.RelationTupleUpdate.tuple:type_name -> core.v1.RelationTuple + 11, // 4: core.v1.RelationTupleTreeNode.intermediate_node:type_name -> core.v1.SetOperationUserset + 12, // 5: core.v1.RelationTupleTreeNode.leaf_node:type_name -> core.v1.DirectSubjects + 6, // 6: core.v1.RelationTupleTreeNode.expanded:type_name -> core.v1.ObjectAndRelation + 1, // 7: core.v1.SetOperationUserset.operation:type_name -> core.v1.SetOperationUserset.Operation + 10, // 8: core.v1.SetOperationUserset.child_nodes:type_name -> core.v1.RelationTupleTreeNode + 6, // 9: core.v1.DirectSubjects.subjects:type_name -> core.v1.ObjectAndRelation + 33, // 10: core.v1.Metadata.metadata_message:type_name -> google.protobuf.Any + 15, // 11: core.v1.NamespaceDefinition.relation:type_name -> core.v1.Relation + 13, // 12: core.v1.NamespaceDefinition.metadata:type_name -> core.v1.Metadata + 25, // 13: core.v1.NamespaceDefinition.source_position:type_name -> core.v1.SourcePosition + 21, // 14: core.v1.Relation.userset_rewrite:type_name -> core.v1.UsersetRewrite + 19, // 15: core.v1.Relation.type_information:type_name -> core.v1.TypeInformation + 13, // 16: core.v1.Relation.metadata:type_name -> core.v1.Metadata + 25, // 17: core.v1.Relation.source_position:type_name -> core.v1.SourcePosition + 26, // 18: core.v1.ReachabilityGraph.entrypoints_by_subject_type:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry + 27, // 19: core.v1.ReachabilityGraph.entrypoints_by_subject_relation:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry + 18, // 20: core.v1.ReachabilityEntrypoints.entrypoints:type_name -> core.v1.ReachabilityEntrypoint + 7, // 21: core.v1.ReachabilityEntrypoints.subject_relation:type_name -> core.v1.RelationReference + 2, // 22: core.v1.ReachabilityEntrypoint.kind:type_name -> core.v1.ReachabilityEntrypoint.ReachabilityEntrypointKind + 7, // 23: core.v1.ReachabilityEntrypoint.target_relation:type_name -> core.v1.RelationReference + 3, // 24: core.v1.ReachabilityEntrypoint.result_status:type_name -> core.v1.ReachabilityEntrypoint.EntrypointResultStatus + 20, // 25: core.v1.TypeInformation.allowed_direct_relations:type_name -> core.v1.AllowedRelation + 28, // 26: core.v1.AllowedRelation.public_wildcard:type_name -> core.v1.AllowedRelation.PublicWildcard + 25, // 27: core.v1.AllowedRelation.source_position:type_name -> core.v1.SourcePosition + 22, // 28: core.v1.UsersetRewrite.union:type_name -> core.v1.SetOperation + 22, // 29: core.v1.UsersetRewrite.intersection:type_name -> core.v1.SetOperation + 22, // 30: core.v1.UsersetRewrite.exclusion:type_name -> core.v1.SetOperation + 25, // 31: core.v1.UsersetRewrite.source_position:type_name -> core.v1.SourcePosition + 29, // 32: core.v1.SetOperation.child:type_name -> core.v1.SetOperation.Child + 32, // 33: core.v1.TupleToUserset.tupleset:type_name -> core.v1.TupleToUserset.Tupleset + 24, // 34: core.v1.TupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset + 25, // 35: core.v1.TupleToUserset.source_position:type_name -> core.v1.SourcePosition + 4, // 36: core.v1.ComputedUserset.object:type_name -> core.v1.ComputedUserset.Object + 25, // 37: core.v1.ComputedUserset.source_position:type_name -> core.v1.SourcePosition + 17, // 38: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry.value:type_name -> core.v1.ReachabilityEntrypoints + 17, // 39: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry.value:type_name -> core.v1.ReachabilityEntrypoints + 30, // 40: core.v1.SetOperation.Child._this:type_name -> core.v1.SetOperation.Child.This + 24, // 41: core.v1.SetOperation.Child.computed_userset:type_name -> core.v1.ComputedUserset + 23, // 42: core.v1.SetOperation.Child.tuple_to_userset:type_name -> core.v1.TupleToUserset + 21, // 43: core.v1.SetOperation.Child.userset_rewrite:type_name -> core.v1.UsersetRewrite + 31, // 44: core.v1.SetOperation.Child._nil:type_name -> core.v1.SetOperation.Child.Nil + 25, // 45: core.v1.SetOperation.Child.source_position:type_name -> core.v1.SourcePosition + 46, // [46:46] is the sub-list for method output_type + 46, // [46:46] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name } func init() { file_core_v1_core_proto_init() } @@ -2620,7 +2547,7 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*User); i { + switch v := v.(*Zookie); i { case 0: return &v.state case 1: @@ -2632,7 +2559,7 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Zookie); i { + switch v := v.(*RelationTupleUpdate); i { case 0: return &v.state case 1: @@ -2644,7 +2571,7 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationTupleUpdate); i { + switch v := v.(*RelationTupleTreeNode); i { case 0: return &v.state case 1: @@ -2656,7 +2583,7 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationTupleTreeNode); i { + switch v := v.(*SetOperationUserset); i { case 0: return &v.state case 1: @@ -2668,7 +2595,7 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetOperationUserset); i { + switch v := v.(*DirectSubjects); i { case 0: return &v.state case 1: @@ -2680,18 +2607,6 @@ func file_core_v1_core_proto_init() { } } file_core_v1_core_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DirectUserset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_v1_core_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Metadata); i { case 0: return &v.state @@ -2703,7 +2618,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NamespaceDefinition); i { case 0: return &v.state @@ -2715,7 +2630,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Relation); i { case 0: return &v.state @@ -2727,7 +2642,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReachabilityGraph); i { case 0: return &v.state @@ -2739,7 +2654,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReachabilityEntrypoints); i { case 0: return &v.state @@ -2751,7 +2666,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReachabilityEntrypoint); i { case 0: return &v.state @@ -2763,7 +2678,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TypeInformation); i { case 0: return &v.state @@ -2775,7 +2690,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllowedRelation); i { case 0: return &v.state @@ -2787,7 +2702,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UsersetRewrite); i { case 0: return &v.state @@ -2799,7 +2714,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetOperation); i { case 0: return &v.state @@ -2811,7 +2726,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TupleToUserset); i { case 0: return &v.state @@ -2823,7 +2738,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ComputedUserset); i { case 0: return &v.state @@ -2835,7 +2750,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SourcePosition); i { case 0: return &v.state @@ -2847,7 +2762,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllowedRelation_PublicWildcard); i { case 0: return &v.state @@ -2859,7 +2774,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetOperation_Child); i { case 0: return &v.state @@ -2871,7 +2786,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetOperation_Child_This); i { case 0: return &v.state @@ -2883,7 +2798,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetOperation_Child_Nil); i { case 0: return &v.state @@ -2895,7 +2810,7 @@ func file_core_v1_core_proto_init() { return nil } } - file_core_v1_core_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_core_v1_core_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TupleToUserset_Tupleset); i { case 0: return &v.state @@ -2908,23 +2823,20 @@ func file_core_v1_core_proto_init() { } } } - file_core_v1_core_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*User_Userset)(nil), - } - file_core_v1_core_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_core_v1_core_proto_msgTypes[5].OneofWrappers = []interface{}{ (*RelationTupleTreeNode_IntermediateNode)(nil), (*RelationTupleTreeNode_LeafNode)(nil), } - file_core_v1_core_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_core_v1_core_proto_msgTypes[15].OneofWrappers = []interface{}{ (*AllowedRelation_Relation)(nil), (*AllowedRelation_PublicWildcard_)(nil), } - file_core_v1_core_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_core_v1_core_proto_msgTypes[16].OneofWrappers = []interface{}{ (*UsersetRewrite_Union)(nil), (*UsersetRewrite_Intersection)(nil), (*UsersetRewrite_Exclusion)(nil), } - file_core_v1_core_proto_msgTypes[25].OneofWrappers = []interface{}{ + file_core_v1_core_proto_msgTypes[24].OneofWrappers = []interface{}{ (*SetOperation_Child_XThis)(nil), (*SetOperation_Child_ComputedUserset)(nil), (*SetOperation_Child_TupleToUserset)(nil), @@ -2937,7 +2849,7 @@ func file_core_v1_core_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_core_v1_core_proto_rawDesc, NumEnums: 5, - NumMessages: 29, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/core/v1/core.pb.validate.go b/pkg/proto/core/v1/core.pb.validate.go index dc2c8b38c8..8b93a5310b 100644 --- a/pkg/proto/core/v1/core.pb.validate.go +++ b/pkg/proto/core/v1/core.pb.validate.go @@ -57,9 +57,9 @@ func (m *RelationTuple) validate(all bool) error { var errors []error - if m.GetObjectAndRelation() == nil { + if m.GetResourceAndRelation() == nil { err := RelationTupleValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "value is required", } if !all { @@ -69,11 +69,11 @@ func (m *RelationTuple) validate(all bool) error { } if all { - switch v := interface{}(m.GetObjectAndRelation()).(type) { + switch v := interface{}(m.GetResourceAndRelation()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RelationTupleValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) @@ -81,25 +81,25 @@ func (m *RelationTuple) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RelationTupleValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetObjectAndRelation()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetResourceAndRelation()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RelationTupleValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, } } } - if m.GetUser() == nil { + if m.GetSubject() == nil { err := RelationTupleValidationError{ - field: "User", + field: "Subject", reason: "value is required", } if !all { @@ -109,11 +109,11 @@ func (m *RelationTuple) validate(all bool) error { } if all { - switch v := interface{}(m.GetUser()).(type) { + switch v := interface{}(m.GetSubject()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RelationTupleValidationError{ - field: "User", + field: "Subject", reason: "embedded message failed validation", cause: err, }) @@ -121,16 +121,16 @@ func (m *RelationTuple) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RelationTupleValidationError{ - field: "User", + field: "Subject", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RelationTupleValidationError{ - field: "User", + field: "Subject", reason: "embedded message failed validation", cause: err, } @@ -539,160 +539,6 @@ var _RelationReference_Namespace_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{ var _RelationReference_Relation_Pattern = regexp.MustCompile("^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on User 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 *User) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on User 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 UserMultiError, or nil if none found. -func (m *User) ValidateAll() error { - return m.validate(true) -} - -func (m *User) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch m.UserOneof.(type) { - - case *User_Userset: - - if m.GetUserset() == nil { - err := UserValidationError{ - field: "Userset", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUserset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UserValidationError{ - field: "Userset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UserValidationError{ - field: "Userset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUserset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UserValidationError{ - field: "Userset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - err := UserValidationError{ - field: "UserOneof", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - - } - - if len(errors) > 0 { - return UserMultiError(errors) - } - - return nil -} - -// UserMultiError is an error wrapping multiple validation errors returned by -// User.ValidateAll() if the designated constraints aren't met. -type UserMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UserMultiError) 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 UserMultiError) AllErrors() []error { return m } - -// UserValidationError is the validation error returned by User.Validate if the -// designated constraints aren't met. -type UserValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UserValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UserValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UserValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UserValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UserValidationError) ErrorName() string { return "UserValidationError" } - -// Error satisfies the builtin error interface -func (e UserValidationError) 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 %sUser.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UserValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UserValidationError{} - // Validate checks the field values on Zookie 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. @@ -1290,45 +1136,45 @@ var _ interface { ErrorName() string } = SetOperationUsersetValidationError{} -// Validate checks the field values on DirectUserset with the rules defined in +// Validate checks the field values on DirectSubjects 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 *DirectUserset) Validate() error { +func (m *DirectSubjects) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on DirectUserset with the rules defined +// ValidateAll checks the field values on DirectSubjects 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 DirectUsersetMultiError, or -// nil if none found. -func (m *DirectUserset) ValidateAll() error { +// result is a list of violation errors wrapped in DirectSubjectsMultiError, +// or nil if none found. +func (m *DirectSubjects) ValidateAll() error { return m.validate(true) } -func (m *DirectUserset) validate(all bool) error { +func (m *DirectSubjects) validate(all bool) error { if m == nil { return nil } var errors []error - for idx, item := range m.GetUsers() { + for idx, item := range m.GetSubjects() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectUsersetValidationError{ - field: fmt.Sprintf("Users[%v]", idx), + errors = append(errors, DirectSubjectsValidationError{ + field: fmt.Sprintf("Subjects[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, DirectUsersetValidationError{ - field: fmt.Sprintf("Users[%v]", idx), + errors = append(errors, DirectSubjectsValidationError{ + field: fmt.Sprintf("Subjects[%v]", idx), reason: "embedded message failed validation", cause: err, }) @@ -1336,8 +1182,8 @@ func (m *DirectUserset) validate(all bool) error { } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return DirectUsersetValidationError{ - field: fmt.Sprintf("Users[%v]", idx), + return DirectSubjectsValidationError{ + field: fmt.Sprintf("Subjects[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -1347,19 +1193,19 @@ func (m *DirectUserset) validate(all bool) error { } if len(errors) > 0 { - return DirectUsersetMultiError(errors) + return DirectSubjectsMultiError(errors) } return nil } -// DirectUsersetMultiError is an error wrapping multiple validation errors -// returned by DirectUserset.ValidateAll() if the designated constraints +// DirectSubjectsMultiError is an error wrapping multiple validation errors +// returned by DirectSubjects.ValidateAll() if the designated constraints // aren't met. -type DirectUsersetMultiError []error +type DirectSubjectsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m DirectUsersetMultiError) Error() string { +func (m DirectSubjectsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1368,11 +1214,11 @@ func (m DirectUsersetMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m DirectUsersetMultiError) AllErrors() []error { return m } +func (m DirectSubjectsMultiError) AllErrors() []error { return m } -// DirectUsersetValidationError is the validation error returned by -// DirectUserset.Validate if the designated constraints aren't met. -type DirectUsersetValidationError struct { +// DirectSubjectsValidationError is the validation error returned by +// DirectSubjects.Validate if the designated constraints aren't met. +type DirectSubjectsValidationError struct { field string reason string cause error @@ -1380,22 +1226,22 @@ type DirectUsersetValidationError struct { } // Field function returns field value. -func (e DirectUsersetValidationError) Field() string { return e.field } +func (e DirectSubjectsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e DirectUsersetValidationError) Reason() string { return e.reason } +func (e DirectSubjectsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e DirectUsersetValidationError) Cause() error { return e.cause } +func (e DirectSubjectsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e DirectUsersetValidationError) Key() bool { return e.key } +func (e DirectSubjectsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e DirectUsersetValidationError) ErrorName() string { return "DirectUsersetValidationError" } +func (e DirectSubjectsValidationError) ErrorName() string { return "DirectSubjectsValidationError" } // Error satisfies the builtin error interface -func (e DirectUsersetValidationError) Error() string { +func (e DirectSubjectsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1407,14 +1253,14 @@ func (e DirectUsersetValidationError) Error() string { } return fmt.Sprintf( - "invalid %sDirectUserset.%s: %s%s", + "invalid %sDirectSubjects.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = DirectUsersetValidationError{} +var _ error = DirectSubjectsValidationError{} var _ interface { Field() string @@ -1422,7 +1268,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = DirectUsersetValidationError{} +} = DirectSubjectsValidationError{} // Validate checks the field values on Metadata with the rules defined in the // proto definition for this message. If any rules are violated, the first diff --git a/pkg/proto/core/v1/util.go b/pkg/proto/core/v1/util.go index 2b770e6320..2c919913d4 100644 --- a/pkg/proto/core/v1/util.go +++ b/pkg/proto/core/v1/util.go @@ -1,28 +1,15 @@ package corev1 import ( - "github.com/rs/zerolog/log" - "google.golang.org/protobuf/proto" - v0 "github.com/authzed/authzed-go/proto/authzed/api/v0" ) -func panicOnError(err error) { - if err != nil { - log.Panic().Msgf("error while converting message: %s", err) - } -} - // ToCoreRelationTuple converts the input to a core RelationTuple. func ToCoreRelationTuple(tuple *v0.RelationTuple) *RelationTuple { - coreTuple := RelationTuple{} - bytes, err := proto.Marshal(tuple) - panicOnError(err) - - err = proto.Unmarshal(bytes, &coreTuple) - panicOnError(err) - - return &coreTuple + return &RelationTuple{ + ResourceAndRelation: ToCoreObjectAndRelation(tuple.ObjectAndRelation), + Subject: ToCoreObjectAndRelation(tuple.User.GetUserset()), + } } // ToCoreRelationTuples converts the input slice elements to core RelationTuple. @@ -36,50 +23,39 @@ func ToCoreRelationTuples(tuples []*v0.RelationTuple) []*RelationTuple { // ToCoreObjectAndRelation converts the input to a core ToCoreObjectAndRelation. func ToCoreObjectAndRelation(onr *v0.ObjectAndRelation) *ObjectAndRelation { - coreOnr := ObjectAndRelation{} - bytes, err := proto.Marshal(onr) - panicOnError(err) - - err = proto.Unmarshal(bytes, &coreOnr) - panicOnError(err) - - return &coreOnr + return &ObjectAndRelation{ + Namespace: onr.Namespace, + ObjectId: onr.ObjectId, + Relation: onr.Relation, + } } // ToCoreRelationReference converts the input to a core ToCoreRelationReference. func ToCoreRelationReference(ref *v0.RelationReference) *RelationReference { - coreRef := RelationReference{} - bytes, err := proto.Marshal(ref) - panicOnError(err) - - err = proto.Unmarshal(bytes, &coreRef) - panicOnError(err) - - return &coreRef -} - -// ToV0ObjectAndRelation converts the input to a v0 ToV0ObjectAndRelation. -func ToV0ObjectAndRelation(onr *ObjectAndRelation) *v0.ObjectAndRelation { - v0Onr := v0.ObjectAndRelation{} - bytes, err := proto.Marshal(onr) - panicOnError(err) - - err = proto.Unmarshal(bytes, &v0Onr) - panicOnError(err) - - return &v0Onr + return &RelationReference{ + Namespace: ref.Namespace, + Relation: ref.Relation, + } } // ToV0RelationTuple converts the input to a v0 ToV0RelationTuple. func ToV0RelationTuple(tuple *RelationTuple) *v0.RelationTuple { - v0Tuple := v0.RelationTuple{} - bytes, err := proto.Marshal(tuple) - panicOnError(err) - - err = proto.Unmarshal(bytes, &v0Tuple) - panicOnError(err) - - return &v0Tuple + return &v0.RelationTuple{ + ObjectAndRelation: &v0.ObjectAndRelation{ + Namespace: tuple.ResourceAndRelation.Namespace, + ObjectId: tuple.ResourceAndRelation.ObjectId, + Relation: tuple.ResourceAndRelation.Relation, + }, + User: &v0.User{ + UserOneof: &v0.User_Userset{ + Userset: &v0.ObjectAndRelation{ + Namespace: tuple.Subject.Namespace, + ObjectId: tuple.Subject.ObjectId, + Relation: tuple.Subject.Relation, + }, + }, + }, + } } // ToV0RelationTuples converts the input slice elements to v0 RelationTuple. @@ -90,15 +66,3 @@ func ToV0RelationTuples(tuples []*RelationTuple) []*v0.RelationTuple { } return v0Tuples } - -// ToV0RelationReference converts the input to a v0 RelationReference. -func ToV0RelationReference(ref *RelationReference) *v0.RelationReference { - v0Ref := v0.RelationReference{} - bytes, err := proto.Marshal(ref) - panicOnError(err) - - err = proto.Unmarshal(bytes, &v0Ref) - panicOnError(err) - - return &v0Ref -} diff --git a/pkg/proto/dispatch/v1/00_zerolog.go b/pkg/proto/dispatch/v1/00_zerolog.go index 268ec1bf87..c7a8e0b3ff 100644 --- a/pkg/proto/dispatch/v1/00_zerolog.go +++ b/pkg/proto/dispatch/v1/00_zerolog.go @@ -14,12 +14,8 @@ import ( func (cr *DispatchCheckRequest) MarshalZerologObject(e *zerolog.Event) { e.Object("metadata", cr.Metadata) e.Str("request", tuple.String(&core.RelationTuple{ - ObjectAndRelation: cr.ObjectAndRelation, - User: &core.User{ - UserOneof: &core.User_Userset{ - Userset: cr.Subject, - }, - }, + ResourceAndRelation: cr.ResourceAndRelation, + Subject: cr.Subject, })) } @@ -32,7 +28,7 @@ func (cr *DispatchCheckResponse) MarshalZerologObject(e *zerolog.Event) { // MarshalZerologObject implements zerolog object marshalling. func (er *DispatchExpandRequest) MarshalZerologObject(e *zerolog.Event) { e.Object("metadata", er.Metadata) - e.Str("expand", tuple.StringONR(er.ObjectAndRelation)) + e.Str("expand", tuple.StringONR(er.ResourceAndRelation)) e.Stringer("mode", er.ExpansionMode) } diff --git a/pkg/proto/dispatch/v1/dispatch.pb.go b/pkg/proto/dispatch/v1/dispatch.pb.go index 5e0bcc5f9b..04dc512c59 100644 --- a/pkg/proto/dispatch/v1/dispatch.pb.go +++ b/pkg/proto/dispatch/v1/dispatch.pb.go @@ -174,9 +174,9 @@ type DispatchCheckRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ObjectAndRelation *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=object_and_relation,json=objectAndRelation,proto3" json:"object_and_relation,omitempty"` - Subject *v1.ObjectAndRelation `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResourceAndRelation *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=resource_and_relation,json=resourceAndRelation,proto3" json:"resource_and_relation,omitempty"` + Subject *v1.ObjectAndRelation `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` } func (x *DispatchCheckRequest) Reset() { @@ -218,9 +218,9 @@ func (x *DispatchCheckRequest) GetMetadata() *ResolverMeta { return nil } -func (x *DispatchCheckRequest) GetObjectAndRelation() *v1.ObjectAndRelation { +func (x *DispatchCheckRequest) GetResourceAndRelation() *v1.ObjectAndRelation { if x != nil { - return x.ObjectAndRelation + return x.ResourceAndRelation } return nil } @@ -292,9 +292,9 @@ type DispatchExpandRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ObjectAndRelation *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=object_and_relation,json=objectAndRelation,proto3" json:"object_and_relation,omitempty"` - ExpansionMode DispatchExpandRequest_ExpansionMode `protobuf:"varint,3,opt,name=expansion_mode,json=expansionMode,proto3,enum=dispatch.v1.DispatchExpandRequest_ExpansionMode" json:"expansion_mode,omitempty"` + Metadata *ResolverMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ResourceAndRelation *v1.ObjectAndRelation `protobuf:"bytes,2,opt,name=resource_and_relation,json=resourceAndRelation,proto3" json:"resource_and_relation,omitempty"` + ExpansionMode DispatchExpandRequest_ExpansionMode `protobuf:"varint,3,opt,name=expansion_mode,json=expansionMode,proto3,enum=dispatch.v1.DispatchExpandRequest_ExpansionMode" json:"expansion_mode,omitempty"` } func (x *DispatchExpandRequest) Reset() { @@ -336,9 +336,9 @@ func (x *DispatchExpandRequest) GetMetadata() *ResolverMeta { return nil } -func (x *DispatchExpandRequest) GetObjectAndRelation() *v1.ObjectAndRelation { +func (x *DispatchExpandRequest) GetResourceAndRelation() *v1.ObjectAndRelation { if x != nil { - return x.ObjectAndRelation + return x.ResourceAndRelation } return nil } @@ -871,204 +871,204 @@ var file_dispatch_v1_dispatch_proto_rawDesc = []byte{ 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x70, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 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, 0x54, 0x0a, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 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, 0x22, 0xd4, 0x01, 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, 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, 0x4d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 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, 0x22, 0x35, 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, 0x22, 0xb4, 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, + 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, 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, 0x22, 0xd4, 0x01, 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, 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, 0x4d, 0x0a, 0x0a, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 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, 0x22, 0x35, 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, 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, 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, 0x54, 0x0a, 0x13, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 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, 0x11, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 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, + 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, - 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, 0xf3, - 0x01, 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, 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, 0x22, 0xdf, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, + 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, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, + 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, 0xf3, 0x01, 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, 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, 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, - 0xae, 0x02, 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, 0x50, 0x0a, 0x16, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 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, 0x14, - 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x74, 0x75, 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, 0x11, 0x6c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x54, 0x74, 0x75, - 0x32, 0xa9, 0x03, 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, + 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, 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, 0x22, 0xdf, 0x01, 0x0a, + 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, + 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, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 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, 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, 0xae, 0x02, 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, 0x50, 0x0a, 0x16, 0x6c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 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, 0x14, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x4a, 0x0a, 0x13, + 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, + 0x74, 0x74, 0x75, 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, 0x11, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x54, 0x74, 0x75, 0x32, 0xa9, 0x03, 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, 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, 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, + 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, 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, 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 ( @@ -1106,12 +1106,12 @@ var file_dispatch_v1_dispatch_proto_goTypes = []interface{}{ } var file_dispatch_v1_dispatch_proto_depIdxs = []int32{ 12, // 0: dispatch.v1.DispatchCheckRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 14, // 1: dispatch.v1.DispatchCheckRequest.object_and_relation:type_name -> core.v1.ObjectAndRelation + 14, // 1: dispatch.v1.DispatchCheckRequest.resource_and_relation:type_name -> core.v1.ObjectAndRelation 14, // 2: dispatch.v1.DispatchCheckRequest.subject:type_name -> core.v1.ObjectAndRelation 13, // 3: dispatch.v1.DispatchCheckResponse.metadata:type_name -> dispatch.v1.ResponseMeta 0, // 4: dispatch.v1.DispatchCheckResponse.membership:type_name -> dispatch.v1.DispatchCheckResponse.Membership 12, // 5: dispatch.v1.DispatchExpandRequest.metadata:type_name -> dispatch.v1.ResolverMeta - 14, // 6: dispatch.v1.DispatchExpandRequest.object_and_relation:type_name -> core.v1.ObjectAndRelation + 14, // 6: dispatch.v1.DispatchExpandRequest.resource_and_relation:type_name -> core.v1.ObjectAndRelation 1, // 7: dispatch.v1.DispatchExpandRequest.expansion_mode:type_name -> dispatch.v1.DispatchExpandRequest.ExpansionMode 13, // 8: dispatch.v1.DispatchExpandResponse.metadata:type_name -> dispatch.v1.ResponseMeta 15, // 9: dispatch.v1.DispatchExpandResponse.tree_node:type_name -> core.v1.RelationTupleTreeNode diff --git a/pkg/proto/dispatch/v1/dispatch.pb.validate.go b/pkg/proto/dispatch/v1/dispatch.pb.validate.go index 1a8cf6ef9e..21e207d881 100644 --- a/pkg/proto/dispatch/v1/dispatch.pb.validate.go +++ b/pkg/proto/dispatch/v1/dispatch.pb.validate.go @@ -97,9 +97,9 @@ func (m *DispatchCheckRequest) validate(all bool) error { } } - if m.GetObjectAndRelation() == nil { + if m.GetResourceAndRelation() == nil { err := DispatchCheckRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "value is required", } if !all { @@ -109,11 +109,11 @@ func (m *DispatchCheckRequest) validate(all bool) error { } if all { - switch v := interface{}(m.GetObjectAndRelation()).(type) { + switch v := interface{}(m.GetResourceAndRelation()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, DispatchCheckRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) @@ -121,16 +121,16 @@ func (m *DispatchCheckRequest) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, DispatchCheckRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetObjectAndRelation()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetResourceAndRelation()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DispatchCheckRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, } @@ -452,9 +452,9 @@ func (m *DispatchExpandRequest) validate(all bool) error { } } - if m.GetObjectAndRelation() == nil { + if m.GetResourceAndRelation() == nil { err := DispatchExpandRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "value is required", } if !all { @@ -464,11 +464,11 @@ func (m *DispatchExpandRequest) validate(all bool) error { } if all { - switch v := interface{}(m.GetObjectAndRelation()).(type) { + switch v := interface{}(m.GetResourceAndRelation()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, DispatchExpandRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) @@ -476,16 +476,16 @@ func (m *DispatchExpandRequest) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, DispatchExpandRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetObjectAndRelation()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetResourceAndRelation()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DispatchExpandRequestValidationError{ - field: "ObjectAndRelation", + field: "ResourceAndRelation", reason: "embedded message failed validation", cause: err, } diff --git a/pkg/testutil/require.go b/pkg/testutil/require.go index 5ada6bbcb8..5439409010 100644 --- a/pkg/testutil/require.go +++ b/pkg/testutil/require.go @@ -31,12 +31,10 @@ func RequireEqualEmptyNil(t *testing.T, expected, actual interface{}, msgAndArgs core.ObjectAndRelation{}, core.RelationReference{}, core.Relation{}, - core.User_Userset{}, - core.User{}, core.RelationTupleTreeNode_IntermediateNode{}, core.RelationTupleTreeNode{}, core.RelationTupleTreeNode_LeafNode{}, - core.DirectUserset{}, + core.DirectSubjects{}, core.SetOperationUserset{}), cmpopts.EquateEmpty(), } diff --git a/pkg/tuple/onr.go b/pkg/tuple/onr.go index 307c401700..717cd1793c 100644 --- a/pkg/tuple/onr.go +++ b/pkg/tuple/onr.go @@ -26,11 +26,6 @@ func ObjectAndRelation(ns, oid, rel string) *core.ObjectAndRelation { } } -// User creates a user wrapping a userset ONR. -func User(userset *core.ObjectAndRelation) *core.User { - return &core.User{UserOneof: &core.User_Userset{Userset: userset}} -} - // ParseSubjectONR converts a string representation of a Subject ONR to a proto object. Unlike // ParseONR, this method allows for objects without relations. If an object without a relation // is given, the relation will be set to ellipsis. diff --git a/pkg/tuple/tuple.go b/pkg/tuple/tuple.go index 676db0d86e..f64de915bc 100644 --- a/pkg/tuple/tuple.go +++ b/pkg/tuple/tuple.go @@ -75,11 +75,11 @@ func ValidateSubjectID(subjectID string) error { // String converts a tuple to a string. If the tuple is nil or empty, returns empty string. func String(tpl *core.RelationTuple) string { - if tpl == nil || tpl.ObjectAndRelation == nil || tpl.User == nil || tpl.User.GetUserset() == nil { + if tpl == nil || tpl.ResourceAndRelation == nil || tpl.Subject == nil { return "" } - return fmt.Sprintf("%s@%s", StringONR(tpl.ObjectAndRelation), StringONR(tpl.User.GetUserset())) + return fmt.Sprintf("%s@%s", StringONR(tpl.ResourceAndRelation), StringONR(tpl.Subject)) } // MustRelString converts a relationship into a string. Will panic if @@ -119,16 +119,16 @@ func Parse(tpl string) *core.RelationTuple { } return &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: groups[stringz.SliceIndex(parserRegex.SubexpNames(), "resourceType")], ObjectId: groups[stringz.SliceIndex(parserRegex.SubexpNames(), "resourceID")], Relation: groups[stringz.SliceIndex(parserRegex.SubexpNames(), "resourceRel")], }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: groups[stringz.SliceIndex(parserRegex.SubexpNames(), "subjectType")], ObjectId: groups[stringz.SliceIndex(parserRegex.SubexpNames(), "subjectID")], Relation: subjectRelation, - }}}, + }, } } @@ -175,16 +175,16 @@ func MustToRelationship(tpl *core.RelationTuple) *v1.Relationship { func ToRelationship(tpl *core.RelationTuple) *v1.Relationship { return &v1.Relationship{ Resource: &v1.ObjectReference{ - ObjectType: tpl.ObjectAndRelation.Namespace, - ObjectId: tpl.ObjectAndRelation.ObjectId, + ObjectType: tpl.ResourceAndRelation.Namespace, + ObjectId: tpl.ResourceAndRelation.ObjectId, }, - Relation: tpl.ObjectAndRelation.Relation, + Relation: tpl.ResourceAndRelation.Relation, Subject: &v1.SubjectReference{ Object: &v1.ObjectReference{ - ObjectType: tpl.User.GetUserset().Namespace, - ObjectId: tpl.User.GetUserset().ObjectId, + ObjectType: tpl.Subject.Namespace, + ObjectId: tpl.Subject.ObjectId, }, - OptionalRelation: stringz.Default(tpl.User.GetUserset().Relation, "", Ellipsis), + OptionalRelation: stringz.Default(tpl.Subject.Relation, "", Ellipsis), }, } } @@ -202,10 +202,10 @@ func MustToFilter(tpl *core.RelationTuple) *v1.RelationshipFilter { // ToFilter converts a RelationTuple into a RelationshipFilter. func ToFilter(tpl *core.RelationTuple) *v1.RelationshipFilter { return &v1.RelationshipFilter{ - ResourceType: tpl.ObjectAndRelation.Namespace, - OptionalResourceId: tpl.ObjectAndRelation.ObjectId, - OptionalRelation: tpl.ObjectAndRelation.Relation, - OptionalSubjectFilter: UsersetToSubjectFilter(tpl.User.GetUserset()), + ResourceType: tpl.ResourceAndRelation.Namespace, + OptionalResourceId: tpl.ResourceAndRelation.ObjectId, + OptionalRelation: tpl.ResourceAndRelation.Relation, + OptionalSubjectFilter: UsersetToSubjectFilter(tpl.Subject), } } @@ -290,16 +290,16 @@ func MustFromRelationship(r *v1.Relationship) *core.RelationTuple { // FromRelationship converts a Relationship into a RelationTuple. func FromRelationship(r *v1.Relationship) *core.RelationTuple { return &core.RelationTuple{ - ObjectAndRelation: &core.ObjectAndRelation{ + ResourceAndRelation: &core.ObjectAndRelation{ Namespace: r.Resource.ObjectType, ObjectId: r.Resource.ObjectId, Relation: r.Relation, }, - User: &core.User{UserOneof: &core.User_Userset{Userset: &core.ObjectAndRelation{ + Subject: &core.ObjectAndRelation{ Namespace: r.Subject.Object.ObjectType, ObjectId: r.Subject.Object.ObjectId, Relation: stringz.DefaultEmpty(r.Subject.OptionalRelation, Ellipsis), - }}}, + }, } } diff --git a/pkg/tuple/tuple_test.go b/pkg/tuple/tuple_test.go index f9b98ce42a..f54a2f81bb 100644 --- a/pkg/tuple/tuple_test.go +++ b/pkg/tuple/tuple_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/require" ) -func makeTuple(onr *core.ObjectAndRelation, userset *core.ObjectAndRelation) *core.RelationTuple { +func makeTuple(onr *core.ObjectAndRelation, subject *core.ObjectAndRelation) *core.RelationTuple { return &core.RelationTuple{ - ObjectAndRelation: onr, - User: &core.User{UserOneof: &core.User_Userset{Userset: userset}}, + ResourceAndRelation: onr, + Subject: subject, } } diff --git a/proto/internal/core/v1/core.proto b/proto/internal/core/v1/core.proto index 2d94591f7a..d1d9595079 100644 --- a/proto/internal/core/v1/core.proto +++ b/proto/internal/core/v1/core.proto @@ -7,23 +7,11 @@ import "google/protobuf/any.proto"; import "validate/validate.proto"; message RelationTuple { - // Each tupleset specifies keys of a set of relation tuples. The set can - // include a single tuple key, or all tuples with a given object ID or - // userset in a namespace, optionally constrained by a relation name. - // - // examples: - // doc:readme#viewer@group:eng#member (fully specified) - // doc:*#*#group:eng#member (all tuples that this userset relates to) - // doc:12345#*#* (all tuples with a direct relationship to a document) - // doc:12345#writer#* (all tuples with direct write relationship with the - // document) doc:#writer#group:eng#member (all tuples that eng group has write - // relationship) - - /** object_and_relation is the resource for the tuple */ - ObjectAndRelation object_and_relation = 1 [ (validate.rules).message.required = true ]; - - /** user is the subject for the tuple */ - User user = 2 [ (validate.rules).message.required = true ]; + /** resource_and_relation is the resource for the tuple */ + ObjectAndRelation resource_and_relation = 1 [ (validate.rules).message.required = true ]; + + /** subject is the subject for the tuple */ + ObjectAndRelation subject = 2 [ (validate.rules).message.required = true ]; } message ObjectAndRelation { @@ -60,15 +48,6 @@ message RelationReference { } ]; } -message User { - // NOTE: deprecated, as only usersets are supported now. - oneof user_oneof { - option (validate.required) = true; - - ObjectAndRelation userset = 2 [ (validate.rules).message.required = true ]; - } -} - message Zookie { string token = 1 [ (validate.rules).string = { min_bytes : 1, @@ -89,7 +68,7 @@ message RelationTupleUpdate { message RelationTupleTreeNode { oneof node_type { SetOperationUserset intermediate_node = 1; - DirectUserset leaf_node = 2; + DirectSubjects leaf_node = 2; } ObjectAndRelation expanded = 3; } @@ -106,7 +85,7 @@ message SetOperationUserset { repeated RelationTupleTreeNode child_nodes = 2; } -message DirectUserset { repeated User users = 1; } +message DirectSubjects { repeated ObjectAndRelation subjects = 1; } /** * Metadata is compiler metadata added to namespace definitions, such as doc comments and diff --git a/proto/internal/dispatch/v1/dispatch.proto b/proto/internal/dispatch/v1/dispatch.proto index 1600c9ec24..937ad3c07b 100644 --- a/proto/internal/dispatch/v1/dispatch.proto +++ b/proto/internal/dispatch/v1/dispatch.proto @@ -16,7 +16,7 @@ service DispatchService { message DispatchCheckRequest { ResolverMeta metadata = 1 [ (validate.rules).message.required = true ]; - core.v1.ObjectAndRelation object_and_relation = 2 + core.v1.ObjectAndRelation resource_and_relation = 2 [ (validate.rules).message.required = true ]; core.v1.ObjectAndRelation subject = 3 [ (validate.rules).message.required = true ]; @@ -41,7 +41,7 @@ message DispatchExpandRequest { ResolverMeta metadata = 1 [ (validate.rules).message.required = true ]; - core.v1.ObjectAndRelation object_and_relation = 2 + core.v1.ObjectAndRelation resource_and_relation = 2 [ (validate.rules).message.required = true ]; ExpansionMode expansion_mode = 3; }