Skip to content

Commit 28d113e

Browse files
committedDec 11, 2020
fix(IAM Access Groups): re-gen service with latest API
1 parent c5cc504 commit 28d113e

24 files changed

+210
-210
lines changed
 

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/IamAccessGroups.java

+60-60
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-af92e433-20201110-100619
15+
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-d753183b-20201209-163011
1616
*/
1717

1818
package com.ibm.cloud.platform_services.iam_access_groups.v2;
@@ -288,65 +288,6 @@ public ServiceCall<Void> deleteAccessGroup(DeleteAccessGroupOptions deleteAccess
288288
return createServiceCall(builder.build(), responseConverter);
289289
}
290290

291-
/**
292-
* Get Account Settings.
293-
*
294-
* Retrieve the Access Groups settings for a specific account.
295-
*
296-
* @param getAccountSettingsOptions the {@link GetAccountSettingsOptions} containing the options for the call
297-
* @return a {@link ServiceCall} with a result of type {@link AccountSettings}
298-
*/
299-
public ServiceCall<AccountSettings> getAccountSettings(GetAccountSettingsOptions getAccountSettingsOptions) {
300-
com.ibm.cloud.sdk.core.util.Validator.notNull(getAccountSettingsOptions,
301-
"getAccountSettingsOptions cannot be null");
302-
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/groups/settings"));
303-
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("iam_access_groups", "v2", "getAccountSettings");
304-
for (Entry<String, String> header : sdkHeaders.entrySet()) {
305-
builder.header(header.getKey(), header.getValue());
306-
}
307-
builder.header("Accept", "application/json");
308-
if (getAccountSettingsOptions.transactionId() != null) {
309-
builder.header("Transaction-Id", getAccountSettingsOptions.transactionId());
310-
}
311-
builder.query("account_id", String.valueOf(getAccountSettingsOptions.accountId()));
312-
ResponseConverter<AccountSettings> responseConverter =
313-
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<AccountSettings>() { }.getType());
314-
return createServiceCall(builder.build(), responseConverter);
315-
}
316-
317-
/**
318-
* Update Account Settings.
319-
*
320-
* Update the Access Groups settings for a specific account. Note: When the `public_access_enabled` setting is set to
321-
* false, all policies within the account attached to the Public Access group will be deleted. Only set
322-
* `public_access_enabled` to false if you are sure that you want those policies to be removed.
323-
*
324-
* @param updateAccountSettingsOptions the {@link UpdateAccountSettingsOptions} containing the options for the call
325-
* @return a {@link ServiceCall} with a result of type {@link AccountSettings}
326-
*/
327-
public ServiceCall<AccountSettings> updateAccountSettings(UpdateAccountSettingsOptions updateAccountSettingsOptions) {
328-
com.ibm.cloud.sdk.core.util.Validator.notNull(updateAccountSettingsOptions,
329-
"updateAccountSettingsOptions cannot be null");
330-
RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/groups/settings"));
331-
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("iam_access_groups", "v2", "updateAccountSettings");
332-
for (Entry<String, String> header : sdkHeaders.entrySet()) {
333-
builder.header(header.getKey(), header.getValue());
334-
}
335-
builder.header("Accept", "application/json");
336-
if (updateAccountSettingsOptions.transactionId() != null) {
337-
builder.header("Transaction-Id", updateAccountSettingsOptions.transactionId());
338-
}
339-
builder.query("account_id", String.valueOf(updateAccountSettingsOptions.accountId()));
340-
final JsonObject contentJson = new JsonObject();
341-
if (updateAccountSettingsOptions.publicAccessEnabled() != null) {
342-
contentJson.addProperty("public_access_enabled", updateAccountSettingsOptions.publicAccessEnabled());
343-
}
344-
builder.bodyJson(contentJson);
345-
ResponseConverter<AccountSettings> responseConverter =
346-
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<AccountSettings>() { }.getType());
347-
return createServiceCall(builder.build(), responseConverter);
348-
}
349-
350291
/**
351292
* Check membership in an Access Group.
352293
*
@@ -745,4 +686,63 @@ public ServiceCall<Void> removeAccessGroupRule(RemoveAccessGroupRuleOptions remo
745686
return createServiceCall(builder.build(), responseConverter);
746687
}
747688

689+
/**
690+
* Get Account Settings.
691+
*
692+
* Retrieve the Access Groups settings for a specific account.
693+
*
694+
* @param getAccountSettingsOptions the {@link GetAccountSettingsOptions} containing the options for the call
695+
* @return a {@link ServiceCall} with a result of type {@link AccountSettings}
696+
*/
697+
public ServiceCall<AccountSettings> getAccountSettings(GetAccountSettingsOptions getAccountSettingsOptions) {
698+
com.ibm.cloud.sdk.core.util.Validator.notNull(getAccountSettingsOptions,
699+
"getAccountSettingsOptions cannot be null");
700+
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/groups/settings"));
701+
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("iam_access_groups", "v2", "getAccountSettings");
702+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
703+
builder.header(header.getKey(), header.getValue());
704+
}
705+
builder.header("Accept", "application/json");
706+
if (getAccountSettingsOptions.transactionId() != null) {
707+
builder.header("Transaction-Id", getAccountSettingsOptions.transactionId());
708+
}
709+
builder.query("account_id", String.valueOf(getAccountSettingsOptions.accountId()));
710+
ResponseConverter<AccountSettings> responseConverter =
711+
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<AccountSettings>() { }.getType());
712+
return createServiceCall(builder.build(), responseConverter);
713+
}
714+
715+
/**
716+
* Update Account Settings.
717+
*
718+
* Update the Access Groups settings for a specific account. Note: When the `public_access_enabled` setting is set to
719+
* false, all policies within the account attached to the Public Access group will be deleted. Only set
720+
* `public_access_enabled` to false if you are sure that you want those policies to be removed.
721+
*
722+
* @param updateAccountSettingsOptions the {@link UpdateAccountSettingsOptions} containing the options for the call
723+
* @return a {@link ServiceCall} with a result of type {@link AccountSettings}
724+
*/
725+
public ServiceCall<AccountSettings> updateAccountSettings(UpdateAccountSettingsOptions updateAccountSettingsOptions) {
726+
com.ibm.cloud.sdk.core.util.Validator.notNull(updateAccountSettingsOptions,
727+
"updateAccountSettingsOptions cannot be null");
728+
RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/groups/settings"));
729+
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("iam_access_groups", "v2", "updateAccountSettings");
730+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
731+
builder.header(header.getKey(), header.getValue());
732+
}
733+
builder.header("Accept", "application/json");
734+
if (updateAccountSettingsOptions.transactionId() != null) {
735+
builder.header("Transaction-Id", updateAccountSettingsOptions.transactionId());
736+
}
737+
builder.query("account_id", String.valueOf(updateAccountSettingsOptions.accountId()));
738+
final JsonObject contentJson = new JsonObject();
739+
if (updateAccountSettingsOptions.publicAccessEnabled() != null) {
740+
contentJson.addProperty("public_access_enabled", updateAccountSettingsOptions.publicAccessEnabled());
741+
}
742+
builder.bodyJson(contentJson);
743+
ResponseConverter<AccountSettings> responseConverter =
744+
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<AccountSettings>() { }.getType());
745+
return createServiceCall(builder.build(), responseConverter);
746+
}
747+
748748
}

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/AddAccessGroupRuleOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public Builder newBuilder() {
192192
/**
193193
* Gets the accessGroupId.
194194
*
195-
* The id of the group that the rule will be added to.
195+
* The Access Group identifier.
196196
*
197197
* @return the accessGroupId
198198
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/AddMemberToMultipleAccessGroupsOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public Builder newBuilder() {
169169
/**
170170
* Gets the accountId.
171171
*
172-
* IBM Cloud account id of the groups that the member will be added to.
172+
* IBM Cloud account identifier.
173173
*
174174
* @return the accountId
175175
*/
@@ -180,7 +180,7 @@ public String accountId() {
180180
/**
181181
* Gets the iamId.
182182
*
183-
* The iam_id to be added to the groups.
183+
* The IAM identifier.
184184
*
185185
* @return the iamId
186186
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/AddMembersToAccessGroupOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public Builder newBuilder() {
135135
/**
136136
* Gets the accessGroupId.
137137
*
138-
* The Access Group to add the members to.
138+
* The Access Group identifier.
139139
*
140140
* @return the accessGroupId
141141
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/CreateAccessGroupOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public Builder newBuilder() {
134134
/**
135135
* Gets the accountId.
136136
*
137-
* IBM Cloud account id under which the group is created.
137+
* IBM Cloud account identifier.
138138
*
139139
* @return the accountId
140140
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/DeleteAccessGroupOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public Builder newBuilder() {
115115
/**
116116
* Gets the accessGroupId.
117117
*
118-
* The Access group to delete.
118+
* The Access Group identifier.
119119
*
120120
* @return the accessGroupId
121121
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/GetAccessGroupOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public Builder newBuilder() {
115115
/**
116116
* Gets the accessGroupId.
117117
*
118-
* The Access Group to get.
118+
* The Access Group identifier.
119119
*
120120
* @return the accessGroupId
121121
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/GetAccessGroupRuleOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Builder newBuilder() {
119119
/**
120120
* Gets the accessGroupId.
121121
*
122-
* The group id that the rule is bound to.
122+
* The Access Group identifier.
123123
*
124124
* @return the accessGroupId
125125
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/GetAccountSettingsOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public Builder newBuilder() {
100100
/**
101101
* Gets the accountId.
102102
*
103-
* The account id of the settings being retrieved.
103+
* IBM Cloud account identifier.
104104
*
105105
* @return the accountId
106106
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/GroupMembersList.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public Long getLimit() {
4646
/**
4747
* Gets the offset.
4848
*
49-
* The number of items to skip over in the result set.
49+
* The offset of the first item returned in the result set.
5050
*
5151
* @return the offset
5252
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/GroupsList.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public Long getLimit() {
4646
/**
4747
* Gets the offset.
4848
*
49-
* The number of items to skip over in the result set.
49+
* The offset of the first item returned in the result set.
5050
*
5151
* @return the offset
5252
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/IsMemberOfAccessGroupOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Builder newBuilder() {
119119
/**
120120
* Gets the accessGroupId.
121121
*
122-
* The access_group_id to check for membership in.
122+
* The Access Group identifier.
123123
*
124124
* @return the accessGroupId
125125
*/
@@ -130,7 +130,7 @@ public String accessGroupId() {
130130
/**
131131
* Gets the iamId.
132132
*
133-
* The iam_id to look for within the group.
133+
* The IAM identifier.
134134
*
135135
* @return the iamId
136136
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/ListAccessGroupMembersOptions.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class ListAccessGroupMembersOptions extends GenericModel {
2121

2222
protected String accessGroupId;
2323
protected String transactionId;
24-
protected Double limit;
25-
protected Double offset;
24+
protected Long limit;
25+
protected Long offset;
2626
protected String type;
2727
protected Boolean verbose;
2828
protected String sort;
@@ -33,8 +33,8 @@ public class ListAccessGroupMembersOptions extends GenericModel {
3333
public static class Builder {
3434
private String accessGroupId;
3535
private String transactionId;
36-
private Double limit;
37-
private Double offset;
36+
private Long limit;
37+
private Long offset;
3838
private String type;
3939
private Boolean verbose;
4040
private String sort;
@@ -101,7 +101,7 @@ public Builder transactionId(String transactionId) {
101101
* @param limit the limit
102102
* @return the ListAccessGroupMembersOptions builder
103103
*/
104-
public Builder limit(Double limit) {
104+
public Builder limit(long limit) {
105105
this.limit = limit;
106106
return this;
107107
}
@@ -112,7 +112,7 @@ public Builder limit(Double limit) {
112112
* @param offset the offset
113113
* @return the ListAccessGroupMembersOptions builder
114114
*/
115-
public Builder offset(Double offset) {
115+
public Builder offset(long offset) {
116116
this.offset = offset;
117117
return this;
118118
}
@@ -175,7 +175,7 @@ public Builder newBuilder() {
175175
/**
176176
* Gets the accessGroupId.
177177
*
178-
* The access_group_id to list members of.
178+
* The Access Group identifier.
179179
*
180180
* @return the accessGroupId
181181
*/
@@ -201,18 +201,18 @@ public String transactionId() {
201201
*
202202
* @return the limit
203203
*/
204-
public Double limit() {
204+
public Long limit() {
205205
return limit;
206206
}
207207

208208
/**
209209
* Gets the offset.
210210
*
211-
* Offset the results using this query parameter.
211+
* The offset of the first result item to be returned.
212212
*
213213
* @return the offset
214214
*/
215-
public Double offset() {
215+
public Long offset() {
216216
return offset;
217217
}
218218

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/ListAccessGroupRulesOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public Builder newBuilder() {
100100
/**
101101
* Gets the accessGroupId.
102102
*
103-
* The group id that the rules are bound to.
103+
* The Access Group identifier.
104104
*
105105
* @return the accessGroupId
106106
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/ListAccessGroupsOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public Builder newBuilder() {
190190
/**
191191
* Gets the accountId.
192192
*
193-
* IBM Cloud account id under which the groups are listed.
193+
* IBM Cloud account identifier.
194194
*
195195
* @return the accountId
196196
*/
@@ -234,7 +234,7 @@ public Long limit() {
234234
/**
235235
* Gets the offset.
236236
*
237-
* Offset the results using this query parameter.
237+
* The offset of the first result item to be returned.
238238
*
239239
* @return the offset
240240
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/RemoveAccessGroupRuleOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Builder newBuilder() {
119119
/**
120120
* Gets the accessGroupId.
121121
*
122-
* The group id that the rule is bound to.
122+
* The Access Group identifier.
123123
*
124124
* @return the accessGroupId
125125
*/
@@ -130,7 +130,7 @@ public String accessGroupId() {
130130
/**
131131
* Gets the ruleId.
132132
*
133-
* The rule to delete.
133+
* The rule to get.
134134
*
135135
* @return the ruleId
136136
*/

‎modules/iam-access-groups/src/main/java/com/ibm/cloud/platform_services/iam_access_groups/v2/model/RemoveMemberFromAccessGroupOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Builder newBuilder() {
119119
/**
120120
* Gets the accessGroupId.
121121
*
122-
* The access_group_id to find the membership in.
122+
* The Access Group identifier.
123123
*
124124
* @return the accessGroupId
125125
*/
@@ -130,7 +130,7 @@ public String accessGroupId() {
130130
/**
131131
* Gets the iamId.
132132
*
133-
* The iam_id to remove from the group.
133+
* The IAM identifier.
134134
*
135135
* @return the iamId
136136
*/

0 commit comments

Comments
 (0)