File tree Expand file tree Collapse file tree 12 files changed +1296
-19
lines changed
cloudfoundry-operations/src
main/java/org/cloudfoundry/operations/useradmin
test/java/org/cloudfoundry/operations/useradmin
integration-test/src/test/java/org/cloudfoundry/operations Expand file tree Collapse file tree 12 files changed +1296
-19
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2017 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .operations .useradmin ;
18+
19+ /**
20+ * The space roles of users
21+ */
22+ public enum SpaceRole {
23+
24+ /**
25+ * User is an Auditor for the space
26+ */
27+ AUDITOR ,
28+
29+ /**
30+ * User is a Developer for the space
31+ */
32+ DEVELOPER ,
33+
34+ /**
35+ * User is a Manager for the space
36+ */
37+ MANAGER
38+
39+ }
Original file line number Diff line number Diff line change @@ -39,4 +39,28 @@ public interface UserAdmin {
3939 */
4040 Mono <Void > delete (DeleteUserRequest request );
4141
42+ /**
43+ * List space users
44+ *
45+ * @param request the list space users request
46+ * @return the Space Users
47+ */
48+ Mono <SpaceUsers > listSpaceUsers (ListSpaceUsersRequest request );
49+
50+ /**
51+ * Assign a space role to a user
52+ *
53+ * @param request the set space user request
54+ * @return completion indicator
55+ */
56+ Mono <Void > setSpaceRole (SetSpaceRoleRequest request );
57+
58+ /**
59+ * Remove a space role from a user
60+ *
61+ * @param request the unset space user request
62+ * @return completion indicator
63+ */
64+ Mono <Void > unsetSpaceRole (UnsetSpaceRoleRequest request );
65+
4266}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2018 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .operations .useradmin ;
18+
19+ import org .immutables .value .Value ;
20+
21+ /**
22+ * The request options for the list space users operation
23+ */
24+ @ Value .Immutable
25+ abstract class _ListSpaceUsersRequest {
26+
27+ /**
28+ * Organization name to list
29+ */
30+ abstract String getOrganizationName ();
31+
32+ /**
33+ * Space name to list
34+ */
35+ abstract String getSpaceName ();
36+
37+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2018 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .operations .useradmin ;
18+
19+ import org .immutables .value .Value ;
20+
21+ /**
22+ * The request options for the set space role operation
23+ */
24+ @ Value .Immutable
25+ abstract class _SetSpaceRoleRequest {
26+
27+ /**
28+ * Organization name
29+ */
30+ abstract String getOrganizationName ();
31+
32+ /**
33+ * Space name
34+ */
35+ abstract String getSpaceName ();
36+
37+ /**
38+ * Role
39+ */
40+ abstract SpaceRole getSpaceRole ();
41+
42+ /**
43+ * Username
44+ */
45+ abstract String getUsername ();
46+
47+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2018 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .operations .useradmin ;
18+
19+ import org .immutables .value .Value ;
20+
21+ import java .util .List ;
22+
23+ /**
24+ * The users for a space
25+ */
26+ @ Value .Immutable
27+ abstract class _SpaceUsers {
28+
29+ /**
30+ * The space's auditors
31+ */
32+ abstract List <String > getAuditors ();
33+
34+ /**
35+ * The space's developers
36+ */
37+ abstract List <String > getDevelopers ();
38+
39+ /**
40+ * The space's managers
41+ */
42+ abstract List <String > getManagers ();
43+
44+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2018 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .operations .useradmin ;
18+
19+ import org .immutables .value .Value ;
20+
21+ /**
22+ * The request options for the unset space role operation
23+ */
24+ @ Value .Immutable
25+ abstract class _UnsetSpaceRoleRequest {
26+
27+ /**
28+ * Organization name
29+ */
30+ abstract String getOrganizationName ();
31+
32+ /**
33+ * Space name
34+ */
35+ abstract String getSpaceName ();
36+
37+ /**
38+ * Role
39+ */
40+ abstract SpaceRole getSpaceRole ();
41+
42+ /**
43+ * Username
44+ */
45+ abstract String getUsername ();
46+
47+ }
You can’t perform that action at this time.
0 commit comments