Skip to content

Commit bf80aa1

Browse files
committed
feat(IAM Policy Management): add enterprise custom role template
Signed-off-by: Hari K Arla <[email protected]>
1 parent 279fb2a commit bf80aa1

File tree

73 files changed

+7855
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7855
-49
lines changed

modules/examples/src/main/java/com/ibm/cloud/platform_services/iam_policy_management/v1/IamPolicyManagementExamples.java

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.

modules/iam-policy-management/src/main/java/com/ibm/cloud/platform_services/iam_policy_management/v1/IamPolicyManagement.java

Lines changed: 485 additions & 1 deletion
Large diffs are not rendered by default.

modules/iam-policy-management/src/main/java/com/ibm/cloud/platform_services/iam_policy_management/v1/model/ActionControlAssignmentResourceActionControl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ActionControlAssignmentResourceActionControl extends GenericModel {
2424
@SerializedName("resource_created")
2525
protected ActionControlAssignmentResourceCreated resourceCreated;
2626
@SerializedName("error_message")
27-
protected ErrorResponse errorMessage;
27+
protected AssignmentResourceError errorMessage;
2828

2929
protected ActionControlAssignmentResourceActionControl() { }
3030

@@ -42,11 +42,11 @@ public ActionControlAssignmentResourceCreated getResourceCreated() {
4242
/**
4343
* Gets the errorMessage.
4444
*
45-
* The error response from API.
45+
* Body parameters for assignment error.
4646
*
4747
* @return the errorMessage
4848
*/
49-
public ErrorResponse getErrorMessage() {
49+
public AssignmentResourceError getErrorMessage() {
5050
return errorMessage;
5151
}
5252
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2025.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.cloud.platform_services.iam_policy_management.v1.model;
15+
16+
import java.util.List;
17+
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
20+
/**
21+
* Body parameters for assignment error.
22+
*/
23+
public class AssignmentResourceError extends GenericModel {
24+
25+
protected String name;
26+
protected String errorCode;
27+
protected String message;
28+
protected String code;
29+
protected List<ErrorObject> errors;
30+
31+
protected AssignmentResourceError() { }
32+
33+
/**
34+
* Gets the name.
35+
*
36+
* Name of the error.
37+
*
38+
* @return the name
39+
*/
40+
public String getName() {
41+
return name;
42+
}
43+
44+
/**
45+
* Gets the errorCode.
46+
*
47+
* error code.
48+
*
49+
* @return the errorCode
50+
*/
51+
public String getErrorCode() {
52+
return errorCode;
53+
}
54+
55+
/**
56+
* Gets the message.
57+
*
58+
* Error message detailing the nature of the error.
59+
*
60+
* @return the message
61+
*/
62+
public String getMessage() {
63+
return message;
64+
}
65+
66+
/**
67+
* Gets the code.
68+
*
69+
* Internal status code for the error.
70+
*
71+
* @return the code
72+
*/
73+
public String getCode() {
74+
return code;
75+
}
76+
77+
/**
78+
* Gets the errors.
79+
*
80+
* The errors encountered during the response.
81+
*
82+
* @return the errors
83+
*/
84+
public List<ErrorObject> getErrors() {
85+
return errors;
86+
}
87+
}
88+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2025.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.cloud.platform_services.iam_policy_management.v1.model;
15+
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* The commitRoleTemplate options.
20+
*/
21+
public class CommitRoleTemplateOptions extends GenericModel {
22+
23+
protected String roleTemplateId;
24+
protected String version;
25+
26+
/**
27+
* Builder.
28+
*/
29+
public static class Builder {
30+
private String roleTemplateId;
31+
private String version;
32+
33+
/**
34+
* Instantiates a new Builder from an existing CommitRoleTemplateOptions instance.
35+
*
36+
* @param commitRoleTemplateOptions the instance to initialize the Builder with
37+
*/
38+
private Builder(CommitRoleTemplateOptions commitRoleTemplateOptions) {
39+
this.roleTemplateId = commitRoleTemplateOptions.roleTemplateId;
40+
this.version = commitRoleTemplateOptions.version;
41+
}
42+
43+
/**
44+
* Instantiates a new builder.
45+
*/
46+
public Builder() {
47+
}
48+
49+
/**
50+
* Instantiates a new builder with required properties.
51+
*
52+
* @param roleTemplateId the roleTemplateId
53+
* @param version the version
54+
*/
55+
public Builder(String roleTemplateId, String version) {
56+
this.roleTemplateId = roleTemplateId;
57+
this.version = version;
58+
}
59+
60+
/**
61+
* Builds a CommitRoleTemplateOptions.
62+
*
63+
* @return the new CommitRoleTemplateOptions instance
64+
*/
65+
public CommitRoleTemplateOptions build() {
66+
return new CommitRoleTemplateOptions(this);
67+
}
68+
69+
/**
70+
* Set the roleTemplateId.
71+
*
72+
* @param roleTemplateId the roleTemplateId
73+
* @return the CommitRoleTemplateOptions builder
74+
*/
75+
public Builder roleTemplateId(String roleTemplateId) {
76+
this.roleTemplateId = roleTemplateId;
77+
return this;
78+
}
79+
80+
/**
81+
* Set the version.
82+
*
83+
* @param version the version
84+
* @return the CommitRoleTemplateOptions builder
85+
*/
86+
public Builder version(String version) {
87+
this.version = version;
88+
return this;
89+
}
90+
}
91+
92+
protected CommitRoleTemplateOptions() { }
93+
94+
protected CommitRoleTemplateOptions(Builder builder) {
95+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.roleTemplateId,
96+
"roleTemplateId cannot be empty");
97+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.version,
98+
"version cannot be empty");
99+
roleTemplateId = builder.roleTemplateId;
100+
version = builder.version;
101+
}
102+
103+
/**
104+
* New builder.
105+
*
106+
* @return a CommitRoleTemplateOptions builder
107+
*/
108+
public Builder newBuilder() {
109+
return new Builder(this);
110+
}
111+
112+
/**
113+
* Gets the roleTemplateId.
114+
*
115+
* Role template ID.
116+
*
117+
* @return the roleTemplateId
118+
*/
119+
public String roleTemplateId() {
120+
return roleTemplateId;
121+
}
122+
123+
/**
124+
* Gets the version.
125+
*
126+
* The role template version.
127+
*
128+
* @return the version
129+
*/
130+
public String version() {
131+
return version;
132+
}
133+
}
134+

0 commit comments

Comments
 (0)