|
12 | 12 | */
|
13 | 13 |
|
14 | 14 | /*
|
15 |
| - * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-af92e433-20201110-100619 |
| 15 | + * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-d753183b-20201209-163011 |
16 | 16 | */
|
17 | 17 |
|
18 | 18 | package com.ibm.cloud.platform_services.iam_access_groups.v2;
|
@@ -288,65 +288,6 @@ public ServiceCall<Void> deleteAccessGroup(DeleteAccessGroupOptions deleteAccess
|
288 | 288 | return createServiceCall(builder.build(), responseConverter);
|
289 | 289 | }
|
290 | 290 |
|
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 |
| - |
350 | 291 | /**
|
351 | 292 | * Check membership in an Access Group.
|
352 | 293 | *
|
@@ -745,4 +686,63 @@ public ServiceCall<Void> removeAccessGroupRule(RemoveAccessGroupRuleOptions remo
|
745 | 686 | return createServiceCall(builder.build(), responseConverter);
|
746 | 687 | }
|
747 | 688 |
|
| 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 | + |
748 | 748 | }
|
0 commit comments