diff --git a/api/roles/role_test.go b/api/roles/role_test.go index 5e5192385..b62be2ea7 100644 --- a/api/roles/role_test.go +++ b/api/roles/role_test.go @@ -1,45 +1,63 @@ package roles_test -/* -type roleCrud interface { - CreateGroup(context.Context, *groups.Group) (*groups.Group, *api.Error, error) - CreateRole(context.Context, *roles.Role) (*roles.Role, *api.Error, error) - ReadRole(context.Context, *roles.Role) (*roles.Role, *api.Error, error) - UpdateRole(context.Context, *roles.Role) (*roles.Role, *api.Error, error) - DeleteRole(context.Context, *roles.Role) (bool, *api.Error, error) - ListRoles(ctx context.Context) ([]*roles.Role, *api.Error, error) -} +import ( + "fmt" + "net/http" + "testing" + + "github.com/hashicorp/watchtower/api" + "github.com/hashicorp/watchtower/api/groups" + "github.com/hashicorp/watchtower/api/internal/strutil" + "github.com/hashicorp/watchtower/api/roles" + "github.com/hashicorp/watchtower/api/scopes" + "github.com/hashicorp/watchtower/api/users" + "github.com/hashicorp/watchtower/internal/iam" + "github.com/hashicorp/watchtower/internal/servers/controller" + "github.com/kr/pretty" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) func TestCustom(t *testing.T) { - tc := controller.NewTestController(t, &controller.TestControllerOpts{DisableAuthorizationFailures: true}) + assert, require := assert.New(t), require.New(t) + orgId := "o_1234567890" + amId := "paum_1234567890" + tc := controller.NewTestController(t, &controller.TestControllerOpts{ + DisableAuthorizationFailures: true, + DefaultOrgId: orgId, + DefaultAuthMethodId: amId, + DefaultUsername: "user", + DefaultPassword: "passpass", + }) defer tc.Shutdown() client := tc.Client() - org := &scopes.Org{ - Client: client, - } - proj, apiErr, err := org.CreateProject(context.Background(), &scopes.Project{}) - require.NoError(t, err) - require.Nil(t, apiErr) - user, apiErr, err := org.CreateUser(context.Background(), &users.User{}) - require.NoError(t, err) - require.Nil(t, apiErr) + proj, apiErr, err := scopes.NewScopesClient(client).Create(tc.Context(), orgId) + require.NoError(err) + require.Nil(apiErr) + + projClient := client.Clone() + projClient.SetScopeId(proj.Id) cases := []struct { - name string - scope roleCrud + name string + scopeClient *api.Client }{ { - name: "org", - scope: org, + name: "org", + scopeClient: client, }, { - name: "proj", - scope: proj, + name: "proj", + scopeClient: projClient, }, } + user, apiErr, err := users.NewUsersClient(client).Create(tc.Context()) + require.NoError(err) + require.Nil(apiErr) + hasPrincipal := func(role *roles.Role, principalId string) bool { var foundInPrincipals bool var foundInPrincipalIds bool @@ -56,100 +74,112 @@ func TestCustom(t *testing.T) { return foundInPrincipals && foundInPrincipalIds } - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - require := require.New(t) - ctx := context.Background() - g, apiErr, err := tc.scope.CreateGroup(ctx, &groups.Group{}) + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + g, apiErr, err := groups.NewGroupsClient(tt.scopeClient).Create(tc.Context()) require.NoError(err) require.Nil(apiErr) require.NotNil(g) - r, apiErr, err := tc.scope.CreateRole(ctx, &roles.Role{Name: api.String("foo")}) + rc := roles.NewRolesClient(tt.scopeClient) + var version uint32 = 1 + + r, apiErr, err := rc.Create(tc.Context(), roles.WithName("foo")) require.NoError(err) require.Nil(apiErr) require.NotNil(r) + require.EqualValues(r.Version, version) + version++ - updatedRole, apiErr, err := r.AddPrincipals(ctx, []string{g.Id}) + updatedRole, apiErr, err := rc.AddPrincipals(tc.Context(), r.Id, r.Version, []string{g.Id}) + require.NoError(err) + require.Nil(apiErr, "Got error ", pretty.Sprint(apiErr)) + assert.EqualValues(updatedRole.Version, version) + assert.True(hasPrincipal(updatedRole, g.Id)) + version++ + + updatedRole, apiErr, err = rc.SetPrincipals(tc.Context(), updatedRole.Id, updatedRole.Version, []string{user.Id}) require.NoError(err) require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.True(t, hasPrincipal(updatedRole, g.Id)) + assert.EqualValues(updatedRole.Version, version) + assert.True(hasPrincipal(updatedRole, user.Id)) + version++ - r = updatedRole - updatedRole, apiErr, err = r.SetPrincipals(ctx, []string{user.Id}) + updatedRole, apiErr, err = rc.RemovePrincipals(tc.Context(), updatedRole.Id, updatedRole.Version, []string{user.Id}) require.NoError(err) require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.True(t, hasPrincipal(updatedRole, user.Id)) + assert.EqualValues(updatedRole.Version, version) + assert.Empty(updatedRole.Principals) + version++ - r = updatedRole - updatedRole, apiErr, err = r.RemovePrincipals(ctx, []string{user.Id}) + updatedRole, apiErr, err = rc.AddGrants(tc.Context(), updatedRole.Id, updatedRole.Version, []string{"id=*;actions=read"}) require.NoError(err) require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.Empty(t, updatedRole.Principals) + assert.EqualValues(updatedRole.Version, version) + assert.Contains(updatedRole.GrantStrings, "id=*;actions=read") + version++ - r = updatedRole - updatedRole, apiErr, err = r.AddGrants(ctx, []string{"id=*;actions=read"}) + updatedRole, apiErr, err = rc.SetGrants(tc.Context(), updatedRole.Id, updatedRole.Version, []string{"id=*;actions=*"}) require.NoError(err) require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.Contains(t, updatedRole.GrantStrings, "id=*;actions=read") + assert.EqualValues(updatedRole.Version, version) + assert.Contains(updatedRole.GrantStrings, "id=*;actions=*") + version++ - r = updatedRole - updatedRole, apiErr, err = r.SetGrants(ctx, []string{"id=*;actions=*"}) + updatedRole, apiErr, err = rc.RemoveGrants(tc.Context(), updatedRole.Id, updatedRole.Version, []string{"id=*;actions=*"}) require.NoError(err) require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.Contains(t, updatedRole.GrantStrings, "id=*;actions=*") - - r = updatedRole - updatedRole, apiErr, err = r.RemoveGrants(ctx, []string{"id=*;actions=*"}) - require.NoError(err) - require.Nil(apiErr, "Got error ", apiErr) - assert.Equal(t, updatedRole.Version, r.Version+1) - assert.Empty(t, updatedRole.Grants) + assert.EqualValues(updatedRole.Version, version) + assert.Empty(updatedRole.Grants) + version++ }) } } func TestRole_List(t *testing.T) { - tc := controller.NewTestController(t, &controller.TestControllerOpts{DisableAuthorizationFailures: true}) + assert, require := assert.New(t), require.New(t) + orgId := "o_1234567890" + amId := "paum_1234567890" + tc := controller.NewTestController(t, &controller.TestControllerOpts{ + DisableAuthorizationFailures: true, + DefaultOrgId: orgId, + DefaultAuthMethodId: amId, + DefaultUsername: "user", + DefaultPassword: "passpass", + }) defer tc.Shutdown() client := tc.Client() - org := &scopes.Org{ - Client: client, - } - proj, apiErr, err := org.CreateProject(context.Background(), &scopes.Project{}) - require.NoError(t, err) - require.Nil(t, apiErr) + + proj, apiErr, err := scopes.NewScopesClient(client).Create(tc.Context(), orgId) + require.NoError(err) + require.Nil(apiErr) + + projClient := client.Clone() + projClient.SetScopeId(proj.Id) cases := []struct { - name string - scope roleCrud + name string + scopeClient *api.Client }{ { - name: "org", - scope: org, + name: "org", + scopeClient: client, }, { - name: "proj", - scope: proj, + name: "proj", + scopeClient: projClient, }, } - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - assert, require := assert.New(t), require.New(t) - ctx := context.Background() - - p1, apiErr, err := tc.scope.ListRoles(ctx) + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + roleClient := roles.NewRolesClient(tt.scopeClient) + p1, apiErr, err := roleClient.List(tc.Context()) require.NoError(err) assert.Nil(apiErr) var defaultRoleIds []string - if tc.name == "org" { + if tt.name == "org" { require.True(2 == len(p1)) defaultRoleIds = []string{p1[0].Id, p1[1].Id} } else { @@ -158,14 +188,14 @@ func TestRole_List(t *testing.T) { var expected []*roles.Role for i := 0; i < 10; i++ { - expected = append(expected, &roles.Role{Name: api.String(fmt.Sprint(i))}) + expected = append(expected, &roles.Role{Name: fmt.Sprint(i)}) } - expected[0], apiErr, err = tc.scope.CreateRole(ctx, expected[0]) + expected[0], apiErr, err = roleClient.Create(tc.Context(), roles.WithName(expected[0].Name)) require.NoError(err) assert.Nil(apiErr) - p2, apiErr, err := tc.scope.ListRoles(ctx) + p2, apiErr, err := roleClient.List(tc.Context()) assert.NoError(err) assert.Nil(apiErr) var p2ForComparison []*roles.Role @@ -177,11 +207,11 @@ func TestRole_List(t *testing.T) { assert.ElementsMatch(comparableSlice(expected[:1]), comparableSlice(p2ForComparison)) for i := 1; i < 10; i++ { - expected[i], apiErr, err = tc.scope.CreateRole(ctx, expected[i]) + expected[i], apiErr, err = roleClient.Create(tc.Context(), roles.WithName(expected[i].Name)) assert.NoError(err) assert.Nil(apiErr) } - p3, apiErr, err := tc.scope.ListRoles(ctx) + p3, apiErr, err := roleClient.List(tc.Context()) require.NoError(err) assert.Nil(apiErr) var p3ForComparison []*roles.Role @@ -212,71 +242,76 @@ func comparableSlice(in []*roles.Role) []roles.Role { } func TestRole_Crud(t *testing.T) { - tc := controller.NewTestController(t, &controller.TestControllerOpts{DisableAuthorizationFailures: true}) + assert, require := assert.New(t), require.New(t) + orgId := "o_1234567890" + amId := "paum_1234567890" + tc := controller.NewTestController(t, &controller.TestControllerOpts{ + DisableAuthorizationFailures: true, + DefaultOrgId: orgId, + DefaultAuthMethodId: amId, + DefaultUsername: "user", + DefaultPassword: "passpass", + }) defer tc.Shutdown() client := tc.Client() - org := &scopes.Org{ - Client: client, + + proj, apiErr, err := scopes.NewScopesClient(client).Create(tc.Context(), orgId) + require.NoError(err) + require.Nil(apiErr) + + projClient := client.Clone() + projClient.SetScopeId(proj.Id) + + cases := []struct { + name string + scopeClient *api.Client + }{ + { + name: "org", + scopeClient: client, + }, + { + name: "proj", + scopeClient: projClient, + }, } - proj, apiErr, err := org.CreateProject(tc.Context(), &scopes.Project{}) - require.NoError(t, err) - require.Nil(t, apiErr) - - checkRole := func(step string, g *roles.Role, apiErr *api.Error, err error, wantedName string) { - assert := assert.New(t) + checkRole := func(step string, g *roles.Role, apiErr *api.Error, err error, wantedName string, wantedVersion uint32) { assert.NoError(err, step) if !assert.Nil(apiErr, step) && apiErr.Message != "" { t.Errorf("ApiError message: %q", apiErr.Message) } assert.NotNil(g, "returned no resource", step) gotName := "" - if g.Name != nil { - gotName = *g.Name + if g.Name != "" { + gotName = g.Name } assert.Equal(wantedName, gotName, step) - } - - cases := []struct { - name string - scope roleCrud - }{ - { - name: "org", - scope: org, - }, - { - name: "project", - scope: proj, - }, + assert.EqualValues(wantedVersion, g.Version) } for _, tt := range cases { t.Run(tt.name, func(t *testing.T) { - assert, require := assert.New(t), require.New(t) - g, apiErr, err := tt.scope.CreateRole(tc.Context(), &roles.Role{Name: api.String("foo")}) - checkRole("create", g, apiErr, err, "foo") + roleClient := roles.NewRolesClient(tt.scopeClient) + g, apiErr, err := roleClient.Create(tc.Context(), roles.WithName("foo")) + checkRole("create", g, apiErr, err, "foo", 1) - g, apiErr, err = tt.scope.ReadRole(tc.Context(), &roles.Role{Id: g.Id}) - checkRole("read", g, apiErr, err, "foo") + g, apiErr, err = roleClient.Read(tc.Context(), g.Id) + checkRole("read", g, apiErr, err, "foo", 1) - g = &roles.Role{Id: g.Id} - g.Name = api.String("bar") - g, apiErr, err = tt.scope.UpdateRole(tc.Context(), g) - checkRole("update", g, apiErr, err, "bar") + g, apiErr, err = roleClient.Update(tc.Context(), g.Id, g.Version, roles.WithName("bar")) + checkRole("update", g, apiErr, err, "bar", 2) - g = &roles.Role{Id: g.Id} - g.SetDefault("name") - g, apiErr, err = tt.scope.UpdateRole(tc.Context(), g) - checkRole("update", g, apiErr, err, "") + g, apiErr, err = roleClient.Update(tc.Context(), g.Id, g.Version, roles.DefaultName()) + checkRole("update", g, apiErr, err, "", 3) - existed, apiErr, err := tt.scope.DeleteRole(tc.Context(), g) + existed, apiErr, err := roleClient.Delete(tc.Context(), g.Id) require.NoError(err) assert.Nil(apiErr) assert.True(existed, "Expected existing user when deleted, but it wasn't.") - existed, apiErr, err = tt.scope.DeleteRole(tc.Context(), g) + existed, apiErr, err = roleClient.Delete(tc.Context(), g.Id) require.NoError(err) assert.Nil(apiErr) assert.False(existed, "Expected user to not exist when deleted, but it did.") @@ -285,61 +320,68 @@ func TestRole_Crud(t *testing.T) { } func TestRole_Errors(t *testing.T) { - tc := controller.NewTestController(t, &controller.TestControllerOpts{DisableAuthorizationFailures: true}) + assert, require := assert.New(t), require.New(t) + orgId := "o_1234567890" + amId := "paum_1234567890" + tc := controller.NewTestController(t, &controller.TestControllerOpts{ + DisableAuthorizationFailures: true, + DefaultOrgId: orgId, + DefaultAuthMethodId: amId, + DefaultUsername: "user", + DefaultPassword: "passpass", + }) defer tc.Shutdown() - ctx := tc.Context() client := tc.Client() - org := &scopes.Org{ - Client: client, - } - proj, apiErr, err := org.CreateProject(tc.Context(), &scopes.Project{}) - require.NoError(t, err) - require.Nil(t, apiErr) + proj, apiErr, err := scopes.NewScopesClient(client).Create(tc.Context(), orgId) + require.NoError(err) + require.Nil(apiErr) + + projClient := client.Clone() + projClient.SetScopeId(proj.Id) cases := []struct { - name string - scope roleCrud + name string + scopeClient *api.Client }{ { - name: "org", - scope: org, + name: "org", + scopeClient: client, }, { - name: "project", - scope: proj, + name: "proj", + scopeClient: projClient, }, } for _, tt := range cases { t.Run(tt.name, func(t *testing.T) { - assert, require := assert.New(t), require.New(t) - u, apiErr, err := tt.scope.CreateRole(ctx, &roles.Role{Name: api.String("first")}) + roleClient := roles.NewRolesClient(tt.scopeClient) + u, apiErr, err := roleClient.Create(tc.Context(), roles.WithName("first")) require.NoError(err) assert.Nil(apiErr) assert.NotNil(u) // Create another resource with the same name. - _, apiErr, err = tt.scope.CreateRole(ctx, &roles.Role{Name: api.String("first")}) + _, apiErr, err = roleClient.Create(tc.Context(), roles.WithName("first")) require.NoError(err) assert.NotNil(apiErr) - _, apiErr, err = tt.scope.ReadRole(ctx, &roles.Role{Id: iam.RolePrefix + "_doesntexis"}) + _, apiErr, err = roleClient.Read(tc.Context(), iam.RolePrefix+"_doesntexis") require.NoError(err) assert.NotNil(apiErr) assert.EqualValues(http.StatusNotFound, apiErr.Status) - _, apiErr, err = tt.scope.ReadRole(ctx, &roles.Role{Id: "invalid id"}) + _, apiErr, err = roleClient.Read(tc.Context(), "invalid id") require.NoError(err) assert.NotNil(apiErr) - assert.EqualValues(http.StatusBadRequest, apiErr.Status) + assert.EqualValues(http.StatusForbidden, apiErr.Status) - _, apiErr, err = tt.scope.UpdateRole(ctx, &roles.Role{Id: u.Id}) + _, apiErr, err = roleClient.Update(tc.Context(), u.Id, u.Version) require.NoError(err) assert.NotNil(apiErr) assert.EqualValues(http.StatusBadRequest, apiErr.Status) }) } } -*/ diff --git a/internal/gen/controller.swagger.json b/internal/gen/controller.swagger.json index 4790e7ca0..a4a6d2385 100644 --- a/internal/gen/controller.swagger.json +++ b/internal/gen/controller.swagger.json @@ -1410,7 +1410,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.AddRoleGrantsRequest" + "$ref": "#/definitions/controller.api.services.v1.GrantStringsMessage" } } ], @@ -1443,7 +1443,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.AddRolePrincipalsRequest" + "$ref": "#/definitions/controller.api.services.v1.PrincipalIdsMessage" } } ], @@ -1476,7 +1476,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.RemoveRoleGrantsRequest" + "$ref": "#/definitions/controller.api.services.v1.GrantStringsMessage" } } ], @@ -1509,7 +1509,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.RemoveRolePrincipalsRequest" + "$ref": "#/definitions/controller.api.services.v1.PrincipalIdsMessage" } } ], @@ -1542,7 +1542,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.SetRoleGrantsRequest" + "$ref": "#/definitions/controller.api.services.v1.GrantStringsMessage" } } ], @@ -1575,7 +1575,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controller.api.services.v1.SetRolePrincipalsRequest" + "$ref": "#/definitions/controller.api.services.v1.PrincipalIdsMessage" } } ], @@ -2496,25 +2496,6 @@ } } }, - "controller.api.services.v1.AddRoleGrantsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "grant_strings": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.AddRoleGrantsResponse": { "type": "object", "properties": { @@ -2523,25 +2504,6 @@ } } }, - "controller.api.services.v1.AddRolePrincipalsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "principal_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.AddRolePrincipalsResponse": { "type": "object", "properties": { @@ -2847,6 +2809,17 @@ } } }, + "controller.api.services.v1.GrantStringsMessage": { + "type": "object", + "properties": { + "grant_strings": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "controller.api.services.v1.ListAccountsResponse": { "type": "object", "properties": { @@ -2957,6 +2930,17 @@ } } }, + "controller.api.services.v1.PrincipalIdsMessage": { + "type": "object", + "properties": { + "principal_ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "controller.api.services.v1.RemoveFromHostSetResponse": { "type": "object" }, @@ -2987,25 +2971,6 @@ } } }, - "controller.api.services.v1.RemoveRoleGrantsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "grant_strings": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.RemoveRoleGrantsResponse": { "type": "object", "properties": { @@ -3014,25 +2979,6 @@ } } }, - "controller.api.services.v1.RemoveRolePrincipalsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "principal_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.RemoveRolePrincipalsResponse": { "type": "object", "properties": { @@ -3068,25 +3014,6 @@ } } }, - "controller.api.services.v1.SetRoleGrantsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "grant_strings": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.SetRoleGrantsResponse": { "type": "object", "properties": { @@ -3095,25 +3022,6 @@ } } }, - "controller.api.services.v1.SetRolePrincipalsRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64", - "description": "The version ensures the role hasn't changed since it was last retrieved and if\nit has the request will fail." - }, - "principal_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "controller.api.services.v1.SetRolePrincipalsResponse": { "type": "object", "properties": { diff --git a/internal/gen/controller/api/services/role_service.pb.go b/internal/gen/controller/api/services/role_service.pb.go index 1ee252c57..aea7d9145 100644 --- a/internal/gen/controller/api/services/role_service.pb.go +++ b/internal/gen/controller/api/services/role_service.pb.go @@ -545,6 +545,53 @@ func (x *DeleteRoleResponse) GetExisted() bool { return false } +type PrincipalIdsMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrincipalIds []string `protobuf:"bytes,1,rep,name=principal_ids,proto3" json:"principal_ids,omitempty"` +} + +func (x *PrincipalIdsMessage) Reset() { + *x = PrincipalIdsMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrincipalIdsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrincipalIdsMessage) ProtoMessage() {} + +func (x *PrincipalIdsMessage) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[10] + 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 PrincipalIdsMessage.ProtoReflect.Descriptor instead. +func (*PrincipalIdsMessage) Descriptor() ([]byte, []int) { + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{10} +} + +func (x *PrincipalIdsMessage) GetPrincipalIds() []string { + if x != nil { + return x.PrincipalIds + } + return nil +} + type AddRolePrincipalsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -553,14 +600,14 @@ type AddRolePrincipalsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - PrincipalIds []string `protobuf:"bytes,3,rep,name=principal_ids,proto3" json:"principal_ids,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *PrincipalIdsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *AddRolePrincipalsRequest) Reset() { *x = AddRolePrincipalsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[10] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -573,7 +620,7 @@ func (x *AddRolePrincipalsRequest) String() string { func (*AddRolePrincipalsRequest) ProtoMessage() {} func (x *AddRolePrincipalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[10] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -586,7 +633,7 @@ func (x *AddRolePrincipalsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRolePrincipalsRequest.ProtoReflect.Descriptor instead. func (*AddRolePrincipalsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{10} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{11} } func (x *AddRolePrincipalsRequest) GetRoleId() string { @@ -603,9 +650,9 @@ func (x *AddRolePrincipalsRequest) GetVersion() uint32 { return 0 } -func (x *AddRolePrincipalsRequest) GetPrincipalIds() []string { +func (x *AddRolePrincipalsRequest) GetItem() *PrincipalIdsMessage { if x != nil { - return x.PrincipalIds + return x.Item } return nil } @@ -621,7 +668,7 @@ type AddRolePrincipalsResponse struct { func (x *AddRolePrincipalsResponse) Reset() { *x = AddRolePrincipalsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[11] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -634,7 +681,7 @@ func (x *AddRolePrincipalsResponse) String() string { func (*AddRolePrincipalsResponse) ProtoMessage() {} func (x *AddRolePrincipalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[11] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -647,7 +694,7 @@ func (x *AddRolePrincipalsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRolePrincipalsResponse.ProtoReflect.Descriptor instead. func (*AddRolePrincipalsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{11} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{12} } func (x *AddRolePrincipalsResponse) GetItem() *roles.Role { @@ -665,14 +712,14 @@ type SetRolePrincipalsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - PrincipalIds []string `protobuf:"bytes,3,rep,name=principal_ids,proto3" json:"principal_ids,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *PrincipalIdsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *SetRolePrincipalsRequest) Reset() { *x = SetRolePrincipalsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[12] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -685,7 +732,7 @@ func (x *SetRolePrincipalsRequest) String() string { func (*SetRolePrincipalsRequest) ProtoMessage() {} func (x *SetRolePrincipalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[12] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -698,7 +745,7 @@ func (x *SetRolePrincipalsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRolePrincipalsRequest.ProtoReflect.Descriptor instead. func (*SetRolePrincipalsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{12} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{13} } func (x *SetRolePrincipalsRequest) GetRoleId() string { @@ -715,9 +762,9 @@ func (x *SetRolePrincipalsRequest) GetVersion() uint32 { return 0 } -func (x *SetRolePrincipalsRequest) GetPrincipalIds() []string { +func (x *SetRolePrincipalsRequest) GetItem() *PrincipalIdsMessage { if x != nil { - return x.PrincipalIds + return x.Item } return nil } @@ -733,7 +780,7 @@ type SetRolePrincipalsResponse struct { func (x *SetRolePrincipalsResponse) Reset() { *x = SetRolePrincipalsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[13] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -746,7 +793,7 @@ func (x *SetRolePrincipalsResponse) String() string { func (*SetRolePrincipalsResponse) ProtoMessage() {} func (x *SetRolePrincipalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[13] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -759,7 +806,7 @@ func (x *SetRolePrincipalsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRolePrincipalsResponse.ProtoReflect.Descriptor instead. func (*SetRolePrincipalsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{13} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{14} } func (x *SetRolePrincipalsResponse) GetItem() *roles.Role { @@ -777,14 +824,14 @@ type RemoveRolePrincipalsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - PrincipalIds []string `protobuf:"bytes,3,rep,name=principal_ids,proto3" json:"principal_ids,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *PrincipalIdsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *RemoveRolePrincipalsRequest) Reset() { *x = RemoveRolePrincipalsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[14] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -797,7 +844,7 @@ func (x *RemoveRolePrincipalsRequest) String() string { func (*RemoveRolePrincipalsRequest) ProtoMessage() {} func (x *RemoveRolePrincipalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[14] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -810,7 +857,7 @@ func (x *RemoveRolePrincipalsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRolePrincipalsRequest.ProtoReflect.Descriptor instead. func (*RemoveRolePrincipalsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{14} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{15} } func (x *RemoveRolePrincipalsRequest) GetRoleId() string { @@ -827,9 +874,9 @@ func (x *RemoveRolePrincipalsRequest) GetVersion() uint32 { return 0 } -func (x *RemoveRolePrincipalsRequest) GetPrincipalIds() []string { +func (x *RemoveRolePrincipalsRequest) GetItem() *PrincipalIdsMessage { if x != nil { - return x.PrincipalIds + return x.Item } return nil } @@ -845,7 +892,7 @@ type RemoveRolePrincipalsResponse struct { func (x *RemoveRolePrincipalsResponse) Reset() { *x = RemoveRolePrincipalsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[15] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -858,7 +905,7 @@ func (x *RemoveRolePrincipalsResponse) String() string { func (*RemoveRolePrincipalsResponse) ProtoMessage() {} func (x *RemoveRolePrincipalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[15] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -871,7 +918,7 @@ func (x *RemoveRolePrincipalsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRolePrincipalsResponse.ProtoReflect.Descriptor instead. func (*RemoveRolePrincipalsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{15} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{16} } func (x *RemoveRolePrincipalsResponse) GetItem() *roles.Role { @@ -881,6 +928,53 @@ func (x *RemoveRolePrincipalsResponse) GetItem() *roles.Role { return nil } +type GrantStringsMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GrantStrings []string `protobuf:"bytes,1,rep,name=grant_strings,proto3" json:"grant_strings,omitempty"` +} + +func (x *GrantStringsMessage) Reset() { + *x = GrantStringsMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrantStringsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrantStringsMessage) ProtoMessage() {} + +func (x *GrantStringsMessage) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[17] + 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 GrantStringsMessage.ProtoReflect.Descriptor instead. +func (*GrantStringsMessage) Descriptor() ([]byte, []int) { + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{17} +} + +func (x *GrantStringsMessage) GetGrantStrings() []string { + if x != nil { + return x.GrantStrings + } + return nil +} + type AddRoleGrantsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -889,14 +983,14 @@ type AddRoleGrantsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - GrantStrings []string `protobuf:"bytes,3,rep,name=grant_strings,proto3" json:"grant_strings,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *GrantStringsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *AddRoleGrantsRequest) Reset() { *x = AddRoleGrantsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[16] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -909,7 +1003,7 @@ func (x *AddRoleGrantsRequest) String() string { func (*AddRoleGrantsRequest) ProtoMessage() {} func (x *AddRoleGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[16] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -922,7 +1016,7 @@ func (x *AddRoleGrantsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRoleGrantsRequest.ProtoReflect.Descriptor instead. func (*AddRoleGrantsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{16} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{18} } func (x *AddRoleGrantsRequest) GetRoleId() string { @@ -939,9 +1033,9 @@ func (x *AddRoleGrantsRequest) GetVersion() uint32 { return 0 } -func (x *AddRoleGrantsRequest) GetGrantStrings() []string { +func (x *AddRoleGrantsRequest) GetItem() *GrantStringsMessage { if x != nil { - return x.GrantStrings + return x.Item } return nil } @@ -957,7 +1051,7 @@ type AddRoleGrantsResponse struct { func (x *AddRoleGrantsResponse) Reset() { *x = AddRoleGrantsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[17] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -970,7 +1064,7 @@ func (x *AddRoleGrantsResponse) String() string { func (*AddRoleGrantsResponse) ProtoMessage() {} func (x *AddRoleGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[17] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -983,7 +1077,7 @@ func (x *AddRoleGrantsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRoleGrantsResponse.ProtoReflect.Descriptor instead. func (*AddRoleGrantsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{17} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{19} } func (x *AddRoleGrantsResponse) GetItem() *roles.Role { @@ -1001,14 +1095,14 @@ type SetRoleGrantsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - GrantStrings []string `protobuf:"bytes,3,rep,name=grant_strings,proto3" json:"grant_strings,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *GrantStringsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *SetRoleGrantsRequest) Reset() { *x = SetRoleGrantsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[18] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1021,7 +1115,7 @@ func (x *SetRoleGrantsRequest) String() string { func (*SetRoleGrantsRequest) ProtoMessage() {} func (x *SetRoleGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[18] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1034,7 +1128,7 @@ func (x *SetRoleGrantsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRoleGrantsRequest.ProtoReflect.Descriptor instead. func (*SetRoleGrantsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{18} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{20} } func (x *SetRoleGrantsRequest) GetRoleId() string { @@ -1051,9 +1145,9 @@ func (x *SetRoleGrantsRequest) GetVersion() uint32 { return 0 } -func (x *SetRoleGrantsRequest) GetGrantStrings() []string { +func (x *SetRoleGrantsRequest) GetItem() *GrantStringsMessage { if x != nil { - return x.GrantStrings + return x.Item } return nil } @@ -1069,7 +1163,7 @@ type SetRoleGrantsResponse struct { func (x *SetRoleGrantsResponse) Reset() { *x = SetRoleGrantsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[19] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1082,7 +1176,7 @@ func (x *SetRoleGrantsResponse) String() string { func (*SetRoleGrantsResponse) ProtoMessage() {} func (x *SetRoleGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[19] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1095,7 +1189,7 @@ func (x *SetRoleGrantsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRoleGrantsResponse.ProtoReflect.Descriptor instead. func (*SetRoleGrantsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{19} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{21} } func (x *SetRoleGrantsResponse) GetItem() *roles.Role { @@ -1113,14 +1207,14 @@ type RemoveRoleGrantsRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. - Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - GrantStrings []string `protobuf:"bytes,3,rep,name=grant_strings,proto3" json:"grant_strings,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Item *GrantStringsMessage `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` } func (x *RemoveRoleGrantsRequest) Reset() { *x = RemoveRoleGrantsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[20] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1133,7 +1227,7 @@ func (x *RemoveRoleGrantsRequest) String() string { func (*RemoveRoleGrantsRequest) ProtoMessage() {} func (x *RemoveRoleGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[20] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1146,7 +1240,7 @@ func (x *RemoveRoleGrantsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRoleGrantsRequest.ProtoReflect.Descriptor instead. func (*RemoveRoleGrantsRequest) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{20} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{22} } func (x *RemoveRoleGrantsRequest) GetRoleId() string { @@ -1163,9 +1257,9 @@ func (x *RemoveRoleGrantsRequest) GetVersion() uint32 { return 0 } -func (x *RemoveRoleGrantsRequest) GetGrantStrings() []string { +func (x *RemoveRoleGrantsRequest) GetItem() *GrantStringsMessage { if x != nil { - return x.GrantStrings + return x.Item } return nil } @@ -1181,7 +1275,7 @@ type RemoveRoleGrantsResponse struct { func (x *RemoveRoleGrantsResponse) Reset() { *x = RemoveRoleGrantsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[21] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1194,7 +1288,7 @@ func (x *RemoveRoleGrantsResponse) String() string { func (*RemoveRoleGrantsResponse) ProtoMessage() {} func (x *RemoveRoleGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_api_services_v1_role_service_proto_msgTypes[21] + mi := &file_controller_api_services_v1_role_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1207,7 +1301,7 @@ func (x *RemoveRoleGrantsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRoleGrantsResponse.ProtoReflect.Descriptor instead. func (*RemoveRoleGrantsResponse) Descriptor() ([]byte, []int) { - return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{21} + return file_controller_api_services_v1_role_service_proto_rawDescGZIP(), []int{23} } func (x *RemoveRoleGrantsResponse) GetItem() *roles.Role { @@ -1286,170 +1380,190 @@ var file_controller_api_services_v1_role_service_proto_rawDesc = []byte{ 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x22, 0x73, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x58, 0x0a, 0x19, 0x41, 0x64, 0x64, - 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, - 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, - 0x74, 0x65, 0x6d, 0x22, 0x73, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, + 0x73, 0x74, 0x65, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x49, 0x64, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x73, 0x22, 0x92, 0x01, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x58, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x22, 0x92, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x43, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x58, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, + 0x95, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x58, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x52, - 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, - 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, - 0x65, 0x6d, 0x22, 0x76, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x5b, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, + 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x22, 0x54, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x69, - 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x5b, 0x0a, 0x1c, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, - 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x6f, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x6f, - 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x54, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x52, - 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x6f, - 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x22, - 0x54, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x72, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, - 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x57, 0x0a, 0x18, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, - 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, - 0x65, 0x6d, 0x32, 0x93, 0x12, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2a, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, - 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, - 0x14, 0x12, 0x12, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, - 0x6c, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x92, 0x41, 0x11, 0x12, - 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, - 0x12, 0xad, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, - 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, - 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x17, 0x12, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x52, 0x6f, 0x6c, 0x65, - 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, - 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, - 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x10, 0x12, 0x0e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x9f, - 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2d, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x54, 0x0a, 0x15, 0x53, 0x65, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, + 0x91, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, + 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, + 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, - 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x92, 0x41, 0x10, - 0x12, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, - 0x12, 0xe5, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x22, 0x57, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x32, 0xa5, 0x12, 0x0a, + 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x14, 0x12, 0x12, 0x47, 0x65, 0x74, + 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, + 0x98, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2c, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x92, 0x41, 0x11, 0x12, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x73, + 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x92, 0x41, 0x17, 0x12, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, + 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x10, 0x12, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x92, 0x41, 0x10, 0x12, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0xe8, 0x01, 0x0a, 0x11, 0x41, + 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, + 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, + 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, - 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x2b, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, - 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, - 0x6d, 0x92, 0x41, 0x24, 0x12, 0x22, 0x41, 0x64, 0x64, 0x73, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, - 0x6f, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0xa5, 0x02, 0x0a, 0x11, 0x53, 0x65, 0x74, - 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x34, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, - 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x36, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, - 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x73, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x63, 0x12, 0x61, 0x53, + 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, + 0x24, 0x12, 0x22, 0x41, 0x64, 0x64, 0x73, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, + 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, + 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0xa8, 0x02, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x39, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, + 0x73, 0x65, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x3a, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x63, 0x12, 0x61, 0x53, 0x65, 0x74, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x12, 0x85, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, + 0x12, 0x88, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, @@ -1457,64 +1571,64 @@ var file_controller_api_services_v1_role_service_proto_rawDesc = []byte{ 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x38, - 0x12, 0x36, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, - 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, - 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x12, 0xc8, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, - 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, - 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x17, 0x12, 0x15, 0x41, 0x64, - 0x64, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x72, - 0x6f, 0x6c, 0x65, 0x12, 0x85, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x32, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, - 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x2d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x62, - 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x53, 0x12, 0x51, 0x53, 0x65, 0x74, 0x20, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x2c, - 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x12, 0xda, 0x01, 0x0a, 0x10, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x35, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, - 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x3a, - 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x1d, 0x12, 0x1b, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, - 0x20, 0x61, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x61, 0x6c, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x92, 0x41, 0x38, 0x12, 0x36, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x66, + 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x12, 0xcb, 0x01, 0x0a, 0x0d, + 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, + 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x55, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, + 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, + 0x41, 0x17, 0x12, 0x15, 0x41, 0x64, 0x64, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x61, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x88, 0x02, 0x0a, 0x0d, 0x53, 0x65, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x91, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x72, + 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x2d, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, + 0x53, 0x12, 0x51, 0x53, 0x65, 0x74, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x61, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x69, + 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x12, 0xdd, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x2a, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, + 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x2d, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x1d, 0x12, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, + 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x72, + 0x6f, 0x6c, 0x65, 0x2e, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, + 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1529,7 +1643,7 @@ func file_controller_api_services_v1_role_service_proto_rawDescGZIP() []byte { return file_controller_api_services_v1_role_service_proto_rawDescData } -var file_controller_api_services_v1_role_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_controller_api_services_v1_role_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_controller_api_services_v1_role_service_proto_goTypes = []interface{}{ (*GetRoleRequest)(nil), // 0: controller.api.services.v1.GetRoleRequest (*GetRoleResponse)(nil), // 1: controller.api.services.v1.GetRoleResponse @@ -1541,62 +1655,70 @@ var file_controller_api_services_v1_role_service_proto_goTypes = []interface{}{ (*UpdateRoleResponse)(nil), // 7: controller.api.services.v1.UpdateRoleResponse (*DeleteRoleRequest)(nil), // 8: controller.api.services.v1.DeleteRoleRequest (*DeleteRoleResponse)(nil), // 9: controller.api.services.v1.DeleteRoleResponse - (*AddRolePrincipalsRequest)(nil), // 10: controller.api.services.v1.AddRolePrincipalsRequest - (*AddRolePrincipalsResponse)(nil), // 11: controller.api.services.v1.AddRolePrincipalsResponse - (*SetRolePrincipalsRequest)(nil), // 12: controller.api.services.v1.SetRolePrincipalsRequest - (*SetRolePrincipalsResponse)(nil), // 13: controller.api.services.v1.SetRolePrincipalsResponse - (*RemoveRolePrincipalsRequest)(nil), // 14: controller.api.services.v1.RemoveRolePrincipalsRequest - (*RemoveRolePrincipalsResponse)(nil), // 15: controller.api.services.v1.RemoveRolePrincipalsResponse - (*AddRoleGrantsRequest)(nil), // 16: controller.api.services.v1.AddRoleGrantsRequest - (*AddRoleGrantsResponse)(nil), // 17: controller.api.services.v1.AddRoleGrantsResponse - (*SetRoleGrantsRequest)(nil), // 18: controller.api.services.v1.SetRoleGrantsRequest - (*SetRoleGrantsResponse)(nil), // 19: controller.api.services.v1.SetRoleGrantsResponse - (*RemoveRoleGrantsRequest)(nil), // 20: controller.api.services.v1.RemoveRoleGrantsRequest - (*RemoveRoleGrantsResponse)(nil), // 21: controller.api.services.v1.RemoveRoleGrantsResponse - (*roles.Role)(nil), // 22: controller.api.resources.roles.v1.Role - (*field_mask.FieldMask)(nil), // 23: google.protobuf.FieldMask + (*PrincipalIdsMessage)(nil), // 10: controller.api.services.v1.PrincipalIdsMessage + (*AddRolePrincipalsRequest)(nil), // 11: controller.api.services.v1.AddRolePrincipalsRequest + (*AddRolePrincipalsResponse)(nil), // 12: controller.api.services.v1.AddRolePrincipalsResponse + (*SetRolePrincipalsRequest)(nil), // 13: controller.api.services.v1.SetRolePrincipalsRequest + (*SetRolePrincipalsResponse)(nil), // 14: controller.api.services.v1.SetRolePrincipalsResponse + (*RemoveRolePrincipalsRequest)(nil), // 15: controller.api.services.v1.RemoveRolePrincipalsRequest + (*RemoveRolePrincipalsResponse)(nil), // 16: controller.api.services.v1.RemoveRolePrincipalsResponse + (*GrantStringsMessage)(nil), // 17: controller.api.services.v1.GrantStringsMessage + (*AddRoleGrantsRequest)(nil), // 18: controller.api.services.v1.AddRoleGrantsRequest + (*AddRoleGrantsResponse)(nil), // 19: controller.api.services.v1.AddRoleGrantsResponse + (*SetRoleGrantsRequest)(nil), // 20: controller.api.services.v1.SetRoleGrantsRequest + (*SetRoleGrantsResponse)(nil), // 21: controller.api.services.v1.SetRoleGrantsResponse + (*RemoveRoleGrantsRequest)(nil), // 22: controller.api.services.v1.RemoveRoleGrantsRequest + (*RemoveRoleGrantsResponse)(nil), // 23: controller.api.services.v1.RemoveRoleGrantsResponse + (*roles.Role)(nil), // 24: controller.api.resources.roles.v1.Role + (*field_mask.FieldMask)(nil), // 25: google.protobuf.FieldMask } var file_controller_api_services_v1_role_service_proto_depIdxs = []int32{ - 22, // 0: controller.api.services.v1.GetRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 1: controller.api.services.v1.ListRolesResponse.items:type_name -> controller.api.resources.roles.v1.Role - 22, // 2: controller.api.services.v1.CreateRoleRequest.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 3: controller.api.services.v1.CreateRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 4: controller.api.services.v1.UpdateRoleRequest.item:type_name -> controller.api.resources.roles.v1.Role - 23, // 5: controller.api.services.v1.UpdateRoleRequest.update_mask:type_name -> google.protobuf.FieldMask - 22, // 6: controller.api.services.v1.UpdateRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 7: controller.api.services.v1.AddRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 8: controller.api.services.v1.SetRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 9: controller.api.services.v1.RemoveRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 10: controller.api.services.v1.AddRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 11: controller.api.services.v1.SetRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 22, // 12: controller.api.services.v1.RemoveRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role - 0, // 13: controller.api.services.v1.RoleService.GetRole:input_type -> controller.api.services.v1.GetRoleRequest - 2, // 14: controller.api.services.v1.RoleService.ListRoles:input_type -> controller.api.services.v1.ListRolesRequest - 4, // 15: controller.api.services.v1.RoleService.CreateRole:input_type -> controller.api.services.v1.CreateRoleRequest - 6, // 16: controller.api.services.v1.RoleService.UpdateRole:input_type -> controller.api.services.v1.UpdateRoleRequest - 8, // 17: controller.api.services.v1.RoleService.DeleteRole:input_type -> controller.api.services.v1.DeleteRoleRequest - 10, // 18: controller.api.services.v1.RoleService.AddRolePrincipals:input_type -> controller.api.services.v1.AddRolePrincipalsRequest - 12, // 19: controller.api.services.v1.RoleService.SetRolePrincipals:input_type -> controller.api.services.v1.SetRolePrincipalsRequest - 14, // 20: controller.api.services.v1.RoleService.RemoveRolePrincipals:input_type -> controller.api.services.v1.RemoveRolePrincipalsRequest - 16, // 21: controller.api.services.v1.RoleService.AddRoleGrants:input_type -> controller.api.services.v1.AddRoleGrantsRequest - 18, // 22: controller.api.services.v1.RoleService.SetRoleGrants:input_type -> controller.api.services.v1.SetRoleGrantsRequest - 20, // 23: controller.api.services.v1.RoleService.RemoveRoleGrants:input_type -> controller.api.services.v1.RemoveRoleGrantsRequest - 1, // 24: controller.api.services.v1.RoleService.GetRole:output_type -> controller.api.services.v1.GetRoleResponse - 3, // 25: controller.api.services.v1.RoleService.ListRoles:output_type -> controller.api.services.v1.ListRolesResponse - 5, // 26: controller.api.services.v1.RoleService.CreateRole:output_type -> controller.api.services.v1.CreateRoleResponse - 7, // 27: controller.api.services.v1.RoleService.UpdateRole:output_type -> controller.api.services.v1.UpdateRoleResponse - 9, // 28: controller.api.services.v1.RoleService.DeleteRole:output_type -> controller.api.services.v1.DeleteRoleResponse - 11, // 29: controller.api.services.v1.RoleService.AddRolePrincipals:output_type -> controller.api.services.v1.AddRolePrincipalsResponse - 13, // 30: controller.api.services.v1.RoleService.SetRolePrincipals:output_type -> controller.api.services.v1.SetRolePrincipalsResponse - 15, // 31: controller.api.services.v1.RoleService.RemoveRolePrincipals:output_type -> controller.api.services.v1.RemoveRolePrincipalsResponse - 17, // 32: controller.api.services.v1.RoleService.AddRoleGrants:output_type -> controller.api.services.v1.AddRoleGrantsResponse - 19, // 33: controller.api.services.v1.RoleService.SetRoleGrants:output_type -> controller.api.services.v1.SetRoleGrantsResponse - 21, // 34: controller.api.services.v1.RoleService.RemoveRoleGrants:output_type -> controller.api.services.v1.RemoveRoleGrantsResponse - 24, // [24:35] is the sub-list for method output_type - 13, // [13:24] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 24, // 0: controller.api.services.v1.GetRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role + 24, // 1: controller.api.services.v1.ListRolesResponse.items:type_name -> controller.api.resources.roles.v1.Role + 24, // 2: controller.api.services.v1.CreateRoleRequest.item:type_name -> controller.api.resources.roles.v1.Role + 24, // 3: controller.api.services.v1.CreateRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role + 24, // 4: controller.api.services.v1.UpdateRoleRequest.item:type_name -> controller.api.resources.roles.v1.Role + 25, // 5: controller.api.services.v1.UpdateRoleRequest.update_mask:type_name -> google.protobuf.FieldMask + 24, // 6: controller.api.services.v1.UpdateRoleResponse.item:type_name -> controller.api.resources.roles.v1.Role + 10, // 7: controller.api.services.v1.AddRolePrincipalsRequest.item:type_name -> controller.api.services.v1.PrincipalIdsMessage + 24, // 8: controller.api.services.v1.AddRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 10, // 9: controller.api.services.v1.SetRolePrincipalsRequest.item:type_name -> controller.api.services.v1.PrincipalIdsMessage + 24, // 10: controller.api.services.v1.SetRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 10, // 11: controller.api.services.v1.RemoveRolePrincipalsRequest.item:type_name -> controller.api.services.v1.PrincipalIdsMessage + 24, // 12: controller.api.services.v1.RemoveRolePrincipalsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 17, // 13: controller.api.services.v1.AddRoleGrantsRequest.item:type_name -> controller.api.services.v1.GrantStringsMessage + 24, // 14: controller.api.services.v1.AddRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 17, // 15: controller.api.services.v1.SetRoleGrantsRequest.item:type_name -> controller.api.services.v1.GrantStringsMessage + 24, // 16: controller.api.services.v1.SetRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 17, // 17: controller.api.services.v1.RemoveRoleGrantsRequest.item:type_name -> controller.api.services.v1.GrantStringsMessage + 24, // 18: controller.api.services.v1.RemoveRoleGrantsResponse.item:type_name -> controller.api.resources.roles.v1.Role + 0, // 19: controller.api.services.v1.RoleService.GetRole:input_type -> controller.api.services.v1.GetRoleRequest + 2, // 20: controller.api.services.v1.RoleService.ListRoles:input_type -> controller.api.services.v1.ListRolesRequest + 4, // 21: controller.api.services.v1.RoleService.CreateRole:input_type -> controller.api.services.v1.CreateRoleRequest + 6, // 22: controller.api.services.v1.RoleService.UpdateRole:input_type -> controller.api.services.v1.UpdateRoleRequest + 8, // 23: controller.api.services.v1.RoleService.DeleteRole:input_type -> controller.api.services.v1.DeleteRoleRequest + 11, // 24: controller.api.services.v1.RoleService.AddRolePrincipals:input_type -> controller.api.services.v1.AddRolePrincipalsRequest + 13, // 25: controller.api.services.v1.RoleService.SetRolePrincipals:input_type -> controller.api.services.v1.SetRolePrincipalsRequest + 15, // 26: controller.api.services.v1.RoleService.RemoveRolePrincipals:input_type -> controller.api.services.v1.RemoveRolePrincipalsRequest + 18, // 27: controller.api.services.v1.RoleService.AddRoleGrants:input_type -> controller.api.services.v1.AddRoleGrantsRequest + 20, // 28: controller.api.services.v1.RoleService.SetRoleGrants:input_type -> controller.api.services.v1.SetRoleGrantsRequest + 22, // 29: controller.api.services.v1.RoleService.RemoveRoleGrants:input_type -> controller.api.services.v1.RemoveRoleGrantsRequest + 1, // 30: controller.api.services.v1.RoleService.GetRole:output_type -> controller.api.services.v1.GetRoleResponse + 3, // 31: controller.api.services.v1.RoleService.ListRoles:output_type -> controller.api.services.v1.ListRolesResponse + 5, // 32: controller.api.services.v1.RoleService.CreateRole:output_type -> controller.api.services.v1.CreateRoleResponse + 7, // 33: controller.api.services.v1.RoleService.UpdateRole:output_type -> controller.api.services.v1.UpdateRoleResponse + 9, // 34: controller.api.services.v1.RoleService.DeleteRole:output_type -> controller.api.services.v1.DeleteRoleResponse + 12, // 35: controller.api.services.v1.RoleService.AddRolePrincipals:output_type -> controller.api.services.v1.AddRolePrincipalsResponse + 14, // 36: controller.api.services.v1.RoleService.SetRolePrincipals:output_type -> controller.api.services.v1.SetRolePrincipalsResponse + 16, // 37: controller.api.services.v1.RoleService.RemoveRolePrincipals:output_type -> controller.api.services.v1.RemoveRolePrincipalsResponse + 19, // 38: controller.api.services.v1.RoleService.AddRoleGrants:output_type -> controller.api.services.v1.AddRoleGrantsResponse + 21, // 39: controller.api.services.v1.RoleService.SetRoleGrants:output_type -> controller.api.services.v1.SetRoleGrantsResponse + 23, // 40: controller.api.services.v1.RoleService.RemoveRoleGrants:output_type -> controller.api.services.v1.RemoveRoleGrantsResponse + 30, // [30:41] is the sub-list for method output_type + 19, // [19:30] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_controller_api_services_v1_role_service_proto_init() } @@ -1726,7 +1848,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRolePrincipalsRequest); i { + switch v := v.(*PrincipalIdsMessage); i { case 0: return &v.state case 1: @@ -1738,7 +1860,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRolePrincipalsResponse); i { + switch v := v.(*AddRolePrincipalsRequest); i { case 0: return &v.state case 1: @@ -1750,7 +1872,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRolePrincipalsRequest); i { + switch v := v.(*AddRolePrincipalsResponse); i { case 0: return &v.state case 1: @@ -1762,7 +1884,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRolePrincipalsResponse); i { + switch v := v.(*SetRolePrincipalsRequest); i { case 0: return &v.state case 1: @@ -1774,7 +1896,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRolePrincipalsRequest); i { + switch v := v.(*SetRolePrincipalsResponse); i { case 0: return &v.state case 1: @@ -1786,7 +1908,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRolePrincipalsResponse); i { + switch v := v.(*RemoveRolePrincipalsRequest); i { case 0: return &v.state case 1: @@ -1798,7 +1920,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRoleGrantsRequest); i { + switch v := v.(*RemoveRolePrincipalsResponse); i { case 0: return &v.state case 1: @@ -1810,7 +1932,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRoleGrantsResponse); i { + switch v := v.(*GrantStringsMessage); i { case 0: return &v.state case 1: @@ -1822,7 +1944,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRoleGrantsRequest); i { + switch v := v.(*AddRoleGrantsRequest); i { case 0: return &v.state case 1: @@ -1834,7 +1956,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRoleGrantsResponse); i { + switch v := v.(*AddRoleGrantsResponse); i { case 0: return &v.state case 1: @@ -1846,7 +1968,7 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRoleGrantsRequest); i { + switch v := v.(*SetRoleGrantsRequest); i { case 0: return &v.state case 1: @@ -1858,6 +1980,30 @@ func file_controller_api_services_v1_role_service_proto_init() { } } file_controller_api_services_v1_role_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRoleGrantsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_services_v1_role_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveRoleGrantsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_services_v1_role_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveRoleGrantsResponse); i { case 0: return &v.state @@ -1876,7 +2022,7 @@ func file_controller_api_services_v1_role_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_controller_api_services_v1_role_service_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/internal/gen/controller/api/services/role_service.pb.gw.go b/internal/gen/controller/api/services/role_service.pb.gw.go index 56c24a7f5..506914b6f 100644 --- a/internal/gen/controller/api/services/role_service.pb.gw.go +++ b/internal/gen/controller/api/services/role_service.pb.gw.go @@ -327,6 +327,10 @@ func local_request_RoleService_DeleteRole_0(ctx context.Context, marshaler runti } +var ( + filter_RoleService_AddRolePrincipals_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_AddRolePrincipals_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddRolePrincipalsRequest var metadata runtime.ServerMetadata @@ -335,7 +339,7 @@ func request_RoleService_AddRolePrincipals_0(ctx context.Context, marshaler runt if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -357,6 +361,13 @@ func request_RoleService_AddRolePrincipals_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_AddRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AddRolePrincipals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -370,7 +381,7 @@ func local_request_RoleService_AddRolePrincipals_0(ctx context.Context, marshale if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -392,11 +403,22 @@ func local_request_RoleService_AddRolePrincipals_0(ctx context.Context, marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_AddRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AddRolePrincipals(ctx, &protoReq) return msg, metadata, err } +var ( + filter_RoleService_SetRolePrincipals_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_SetRolePrincipals_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SetRolePrincipalsRequest var metadata runtime.ServerMetadata @@ -405,7 +427,7 @@ func request_RoleService_SetRolePrincipals_0(ctx context.Context, marshaler runt if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -427,6 +449,13 @@ func request_RoleService_SetRolePrincipals_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_SetRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.SetRolePrincipals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -440,7 +469,7 @@ func local_request_RoleService_SetRolePrincipals_0(ctx context.Context, marshale if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -462,11 +491,22 @@ func local_request_RoleService_SetRolePrincipals_0(ctx context.Context, marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_SetRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.SetRolePrincipals(ctx, &protoReq) return msg, metadata, err } +var ( + filter_RoleService_RemoveRolePrincipals_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_RemoveRolePrincipals_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveRolePrincipalsRequest var metadata runtime.ServerMetadata @@ -475,7 +515,7 @@ func request_RoleService_RemoveRolePrincipals_0(ctx context.Context, marshaler r if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -497,6 +537,13 @@ func request_RoleService_RemoveRolePrincipals_0(ctx context.Context, marshaler r return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_RemoveRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.RemoveRolePrincipals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -510,7 +557,7 @@ func local_request_RoleService_RemoveRolePrincipals_0(ctx context.Context, marsh if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -532,11 +579,22 @@ func local_request_RoleService_RemoveRolePrincipals_0(ctx context.Context, marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_RemoveRolePrincipals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.RemoveRolePrincipals(ctx, &protoReq) return msg, metadata, err } +var ( + filter_RoleService_AddRoleGrants_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_AddRoleGrants_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddRoleGrantsRequest var metadata runtime.ServerMetadata @@ -545,7 +603,7 @@ func request_RoleService_AddRoleGrants_0(ctx context.Context, marshaler runtime. if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -567,6 +625,13 @@ func request_RoleService_AddRoleGrants_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_AddRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AddRoleGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -580,7 +645,7 @@ func local_request_RoleService_AddRoleGrants_0(ctx context.Context, marshaler ru if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -602,11 +667,22 @@ func local_request_RoleService_AddRoleGrants_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_AddRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AddRoleGrants(ctx, &protoReq) return msg, metadata, err } +var ( + filter_RoleService_SetRoleGrants_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_SetRoleGrants_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SetRoleGrantsRequest var metadata runtime.ServerMetadata @@ -615,7 +691,7 @@ func request_RoleService_SetRoleGrants_0(ctx context.Context, marshaler runtime. if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -637,6 +713,13 @@ func request_RoleService_SetRoleGrants_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_SetRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.SetRoleGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -650,7 +733,7 @@ func local_request_RoleService_SetRoleGrants_0(ctx context.Context, marshaler ru if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -672,11 +755,22 @@ func local_request_RoleService_SetRoleGrants_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_SetRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.SetRoleGrants(ctx, &protoReq) return msg, metadata, err } +var ( + filter_RoleService_RemoveRoleGrants_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "role_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_RoleService_RemoveRoleGrants_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveRoleGrantsRequest var metadata runtime.ServerMetadata @@ -685,7 +779,7 @@ func request_RoleService_RemoveRoleGrants_0(ctx context.Context, marshaler runti if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -707,6 +801,13 @@ func request_RoleService_RemoveRoleGrants_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_RemoveRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.RemoveRoleGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -720,7 +821,7 @@ func local_request_RoleService_RemoveRoleGrants_0(ctx context.Context, marshaler if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -742,6 +843,13 @@ func local_request_RoleService_RemoveRoleGrants_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "role_id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_RemoveRoleGrants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.RemoveRoleGrants(ctx, &protoReq) return msg, metadata, err diff --git a/internal/proto/local/controller/api/services/v1/role_service.proto b/internal/proto/local/controller/api/services/v1/role_service.proto index 0670f93e0..c60400778 100644 --- a/internal/proto/local/controller/api/services/v1/role_service.proto +++ b/internal/proto/local/controller/api/services/v1/role_service.proto @@ -94,7 +94,7 @@ service RoleService { rpc AddRolePrincipals(AddRolePrincipalsRequest) returns (AddRolePrincipalsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:add-principals" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -111,7 +111,7 @@ service RoleService { rpc SetRolePrincipals(SetRolePrincipalsRequest) returns (SetRolePrincipalsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:set-principals" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -127,7 +127,7 @@ service RoleService { rpc RemoveRolePrincipals(RemoveRolePrincipalsRequest) returns (RemoveRolePrincipalsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:remove-principals" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -142,7 +142,7 @@ service RoleService { rpc AddRoleGrants(AddRoleGrantsRequest) returns (AddRoleGrantsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:add-grants" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -158,7 +158,7 @@ service RoleService { rpc SetRoleGrants(SetRoleGrantsRequest) returns (SetRoleGrantsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:set-grants" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -174,7 +174,7 @@ service RoleService { rpc RemoveRoleGrants(RemoveRoleGrantsRequest) returns (RemoveRoleGrantsResponse) { option (google.api.http) = { post: "/v1/scopes/*/roles/{role_id}:remove-grants" - body: "*" + body: "item" response_body: "item" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -230,12 +230,17 @@ message DeleteRoleResponse { bool existed = 1; } +message PrincipalIdsMessage { + repeated string principal_ids = 1 [json_name="principal_ids"]; +} + message AddRolePrincipalsRequest { string role_id = 1; // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string principal_ids = 3 [json_name="principal_ids"]; + + PrincipalIdsMessage item = 3; } message AddRolePrincipalsResponse { @@ -247,7 +252,8 @@ message SetRolePrincipalsRequest { // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string principal_ids = 3 [json_name="principal_ids"]; + + PrincipalIdsMessage item = 3; } message SetRolePrincipalsResponse { @@ -259,19 +265,25 @@ message RemoveRolePrincipalsRequest { // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string principal_ids = 3 [json_name="principal_ids"]; + + PrincipalIdsMessage item = 3; } message RemoveRolePrincipalsResponse { resources.roles.v1.Role item = 1; } +message GrantStringsMessage { + repeated string grant_strings = 1 [json_name="grant_strings"]; +} + message AddRoleGrantsRequest { string role_id = 1; // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string grant_strings = 3 [json_name="grant_strings"]; + + GrantStringsMessage item = 3;; } message AddRoleGrantsResponse { @@ -283,7 +295,8 @@ message SetRoleGrantsRequest { // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string grant_strings = 3 [json_name="grant_strings"]; + + GrantStringsMessage item = 3; } message SetRoleGrantsResponse { @@ -295,9 +308,10 @@ message RemoveRoleGrantsRequest { // The version ensures the role hasn't changed since it was last retrieved and if // it has the request will fail. uint32 version = 2; - repeated string grant_strings = 3 [json_name="grant_strings"]; + + GrantStringsMessage item = 3; } message RemoveRoleGrantsResponse { resources.roles.v1.Role item = 1; -} \ No newline at end of file +} diff --git a/internal/servers/controller/handlers/roles/role_service.go b/internal/servers/controller/handlers/roles/role_service.go index 55677c5c0..8e11fe581 100644 --- a/internal/servers/controller/handlers/roles/role_service.go +++ b/internal/servers/controller/handlers/roles/role_service.go @@ -143,7 +143,7 @@ func (s Service) AddRolePrincipals(ctx context.Context, req *pbs.AddRolePrincipa if err := validateAddRolePrincipalsRequest(req); err != nil { return nil, err } - r, err := s.addPrinciplesInRepo(ctx, req.GetRoleId(), req.GetPrincipalIds(), req.GetVersion()) + r, err := s.addPrinciplesInRepo(ctx, req.GetRoleId(), req.GetItem().GetPrincipalIds(), req.GetVersion()) if err != nil { return nil, err } @@ -160,7 +160,7 @@ func (s Service) SetRolePrincipals(ctx context.Context, req *pbs.SetRolePrincipa if err := validateSetRolePrincipalsRequest(req); err != nil { return nil, err } - r, err := s.setPrinciplesInRepo(ctx, req.GetRoleId(), req.GetPrincipalIds(), req.GetVersion()) + r, err := s.setPrinciplesInRepo(ctx, req.GetRoleId(), req.GetItem().GetPrincipalIds(), req.GetVersion()) if err != nil { return nil, err } @@ -177,7 +177,7 @@ func (s Service) RemoveRolePrincipals(ctx context.Context, req *pbs.RemoveRolePr if err := validateRemoveRolePrincipalsRequest(req); err != nil { return nil, err } - r, err := s.removePrinciplesInRepo(ctx, req.GetRoleId(), req.GetPrincipalIds(), req.GetVersion()) + r, err := s.removePrinciplesInRepo(ctx, req.GetRoleId(), req.GetItem().GetPrincipalIds(), req.GetVersion()) if err != nil { return nil, err } @@ -194,7 +194,7 @@ func (s Service) AddRoleGrants(ctx context.Context, req *pbs.AddRoleGrantsReques if err := validateAddRoleGrantsRequest(req); err != nil { return nil, err } - r, err := s.addGrantsInRepo(ctx, req.GetRoleId(), req.GetGrantStrings(), req.GetVersion()) + r, err := s.addGrantsInRepo(ctx, req.GetRoleId(), req.GetItem().GetGrantStrings(), req.GetVersion()) if err != nil { return nil, err } @@ -211,7 +211,7 @@ func (s Service) SetRoleGrants(ctx context.Context, req *pbs.SetRoleGrantsReques if err := validateSetRoleGrantsRequest(req); err != nil { return nil, err } - r, err := s.setGrantsInRepo(ctx, req.GetRoleId(), req.GetGrantStrings(), req.GetVersion()) + r, err := s.setGrantsInRepo(ctx, req.GetRoleId(), req.GetItem().GetGrantStrings(), req.GetVersion()) if err != nil { return nil, err } @@ -228,7 +228,7 @@ func (s Service) RemoveRoleGrants(ctx context.Context, req *pbs.RemoveRoleGrants if err := validateRemoveRoleGrantsRequest(req); err != nil { return nil, err } - r, err := s.removeGrantsInRepo(ctx, req.GetRoleId(), req.GetGrantStrings(), req.GetVersion()) + r, err := s.removeGrantsInRepo(ctx, req.GetRoleId(), req.GetItem().GetGrantStrings(), req.GetVersion()) if err != nil { return nil, err } @@ -644,7 +644,7 @@ func validateAddRolePrincipalsRequest(req *pbs.AddRolePrincipalsRequest) error { if req.GetVersion() == 0 { badFields["version"] = "Required field." } - if len(req.GetPrincipalIds()) == 0 { + if len(req.GetItem().GetPrincipalIds()) == 0 { badFields["principal_ids"] = "Must be non-empty." } if len(badFields) > 0 { @@ -675,7 +675,7 @@ func validateRemoveRolePrincipalsRequest(req *pbs.RemoveRolePrincipalsRequest) e if req.GetVersion() == 0 { badFields["version"] = "Required field." } - if len(req.GetPrincipalIds()) == 0 { + if len(req.GetItem().GetPrincipalIds()) == 0 { badFields["principal_ids"] = "Must be non-empty." } if len(badFields) > 0 { @@ -692,7 +692,7 @@ func validateAddRoleGrantsRequest(req *pbs.AddRoleGrantsRequest) error { if req.GetVersion() == 0 { badFields["version"] = "Required field." } - if len(req.GetGrantStrings()) == 0 { + if len(req.GetItem().GetGrantStrings()) == 0 { badFields["grant_strings"] = "Must be non-empty." } if len(badFields) > 0 { @@ -723,7 +723,7 @@ func validateRemoveRoleGrantsRequest(req *pbs.RemoveRoleGrantsRequest) error { if req.GetVersion() == 0 { badFields["version"] = "Required field." } - if len(req.GetGrantStrings()) == 0 { + if len(req.GetItem().GetGrantStrings()) == 0 { badFields["grant_strings"] = "Must be non-empty." } if len(badFields) > 0 { diff --git a/internal/servers/controller/handlers/roles/role_service_test.go b/internal/servers/controller/handlers/roles/role_service_test.go index a298d3eec..819cb43d9 100644 --- a/internal/servers/controller/handlers/roles/role_service_test.go +++ b/internal/servers/controller/handlers/roles/role_service_test.go @@ -1000,9 +1000,11 @@ func TestAddPrincipal(t *testing.T) { role := iam.TestRole(t, conn, scope.GetPublicId()) tc.setup(role) req := &pbs.AddRolePrincipalsRequest{ - RoleId: role.GetPublicId(), - Version: role.GetVersion(), - PrincipalIds: append(tc.addUsers, tc.addGroups...), + RoleId: role.GetPublicId(), + Version: role.GetVersion(), + Item: &pbs.PrincipalIdsMessage{ + PrincipalIds: append(tc.addUsers, tc.addGroups...), + }, } got, err := s.AddRolePrincipals(auth.DisabledAuthTestContext(auth.WithScopeId(o.GetPublicId())), req) @@ -1120,9 +1122,11 @@ func TestSetPrincipal(t *testing.T) { role := iam.TestRole(t, conn, scope.GetPublicId()) tc.setup(role) req := &pbs.SetRolePrincipalsRequest{ - RoleId: role.GetPublicId(), - Version: role.GetVersion(), - PrincipalIds: append(tc.setUsers, tc.setGroups...), + RoleId: role.GetPublicId(), + Version: role.GetVersion(), + Item: &pbs.PrincipalIdsMessage{ + PrincipalIds: append(tc.setUsers, tc.setGroups...), + }, } got, err := s.SetRolePrincipals(auth.DisabledAuthTestContext(auth.WithScopeId(o.GetPublicId())), req) @@ -1258,9 +1262,11 @@ func TestRemovePrincipal(t *testing.T) { role := iam.TestRole(t, conn, scope.GetPublicId()) tc.setup(role) req := &pbs.RemoveRolePrincipalsRequest{ - RoleId: role.GetPublicId(), - Version: role.GetVersion(), - PrincipalIds: append(tc.removeUsers, tc.removeGroups...), + RoleId: role.GetPublicId(), + Version: role.GetVersion(), + Item: &pbs.PrincipalIdsMessage{ + PrincipalIds: append(tc.removeUsers, tc.removeGroups...), + }, } got, err := s.RemoveRolePrincipals(auth.DisabledAuthTestContext(auth.WithScopeId(o.GetPublicId())), req) @@ -1374,7 +1380,9 @@ func TestAddGrants(t *testing.T) { if o != scope { scopeId = p.GetPublicId() } - req.GrantStrings = append(req.GrantStrings, tc.add...) + req.Item = &pbs.GrantStringsMessage{ + GrantStrings: tc.add, + } got, err := s.AddRoleGrants(auth.DisabledAuthTestContext(auth.WithScopeId(scopeId)), req) if tc.wantErr { assert.Error(err) @@ -1396,9 +1404,11 @@ func TestAddGrants(t *testing.T) { { name: "Bad Role Id", req: &pbs.AddRoleGrantsRequest{ - RoleId: "bad id", - GrantStrings: []string{"id=*;actions=create"}, - Version: role.GetVersion(), + RoleId: "bad id", + Item: &pbs.GrantStringsMessage{ + GrantStrings: []string{"id=*;actions=create"}, + }, + Version: role.GetVersion(), }, errCode: codes.InvalidArgument, }, @@ -1472,7 +1482,9 @@ func TestSetGrants(t *testing.T) { if o != scope { scopeId = p.GetPublicId() } - req.GrantStrings = append(req.GrantStrings, tc.set...) + req.Item = &pbs.GrantStringsMessage{ + GrantStrings: tc.set, + } got, err := s.SetRoleGrants(auth.DisabledAuthTestContext(auth.WithScopeId(scopeId)), req) if tc.wantErr { assert.Error(err) @@ -1496,9 +1508,11 @@ func TestSetGrants(t *testing.T) { { name: "Bad Role Id", req: &pbs.SetRoleGrantsRequest{ - RoleId: "bad id", - GrantStrings: []string{"id=*;actions=create"}, - Version: role.GetVersion(), + RoleId: "bad id", + Item: &pbs.GrantStringsMessage{ + GrantStrings: []string{"id=*;actions=create"}, + }, + Version: role.GetVersion(), }, errCode: codes.InvalidArgument, }, @@ -1571,7 +1585,9 @@ func TestRemoveGrants(t *testing.T) { if o != scope { scopeId = p.GetPublicId() } - req.GrantStrings = append(req.GrantStrings, tc.remove...) + req.Item = &pbs.GrantStringsMessage{ + GrantStrings: tc.remove, + } got, err := s.RemoveRoleGrants(auth.DisabledAuthTestContext(auth.WithScopeId(scopeId)), req) if tc.wantErr { assert.Error(err) @@ -1596,9 +1612,11 @@ func TestRemoveGrants(t *testing.T) { { name: "Bad Role Id", req: &pbs.RemoveRoleGrantsRequest{ - RoleId: "bad id", - GrantStrings: []string{"id=*;actions=create"}, - Version: role.GetVersion(), + RoleId: "bad id", + Item: &pbs.GrantStringsMessage{ + GrantStrings: []string{"id=*;actions=create"}, + }, + Version: role.GetVersion(), }, errCode: codes.InvalidArgument, },