Conversation
Rename the alternate service to admin and move hard coded config values to the env file.
padamstx
suggested changes
Feb 24, 2021
Contributor
padamstx
left a comment
There was a problem hiding this comment.
Looks good... just suggested changes to use the various "addXXX" methods on the builders where applicable.
| Attribute[] attributeArray = new Attribute[] { attributeModel, attributeModel2 }; | ||
|
|
||
| Resource resourceModel = new Resource.Builder() | ||
| .attributes(new java.util.ArrayList<Attribute>(java.util.Arrays.asList(attributeArray))) |
Contributor
There was a problem hiding this comment.
Suggested change
| .attributes(new java.util.ArrayList<Attribute>(java.util.Arrays.asList(attributeArray))) | |
| .addAttributes(attributeModel) | |
| .addAttributes(attributeModel2) |
|
|
||
| InviteUserIamPolicy inviteUserIamPolicyModel = new InviteUserIamPolicy.Builder() | ||
| .type("access") | ||
| .roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel))) |
Contributor
There was a problem hiding this comment.
Suggested change
| .roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel))) | |
| .addRoles(roleModel) |
| InviteUserIamPolicy inviteUserIamPolicyModel = new InviteUserIamPolicy.Builder() | ||
| .type("access") | ||
| .roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel))) | ||
| .resources(new java.util.ArrayList<Resource>(java.util.Arrays.asList(resourceModel))) |
Contributor
There was a problem hiding this comment.
Suggested change
| .resources(new java.util.ArrayList<Resource>(java.util.Arrays.asList(resourceModel))) | |
| .addResources(resourceModel) |
|
|
||
| InviteUsersOptions inviteUsersOptions = new InviteUsersOptions.Builder() | ||
| .accountId(accountId) | ||
| .users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel))) |
Contributor
There was a problem hiding this comment.
Suggested change
| .users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel))) | |
| .addUsers(inviteUserModel) |
| InviteUsersOptions inviteUsersOptions = new InviteUsersOptions.Builder() | ||
| .accountId(accountId) | ||
| .users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel))) | ||
| .iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>( |
Contributor
There was a problem hiding this comment.
Suggested change
| .iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>( | |
| .addIamPolicy(inviteUserIamPolicyModel) |
| .accountId(accountId) | ||
| .users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel))) | ||
| .iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>( | ||
| java.util.Arrays.asList(inviteUserIamPolicyModel))) |
Contributor
There was a problem hiding this comment.
Suggested change
| java.util.Arrays.asList(inviteUserIamPolicyModel))) |
| .users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel))) | ||
| .iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>( | ||
| java.util.Arrays.asList(inviteUserIamPolicyModel))) | ||
| .accessGroups(new java.util.ArrayList<String>(java.util.Arrays.asList(accessGroupId))) |
Contributor
There was a problem hiding this comment.
Suggested change
| .accessGroups(new java.util.ArrayList<String>(java.util.Arrays.asList(accessGroupId))) | |
| .addAccessGroups(accessGroupId) |
ibm-devx-automation
pushed a commit
that referenced
this pull request
Feb 25, 2021
## [0.17.11](0.17.10...0.17.11) (2021-02-25) ### Bug Fixes * **User Management:** add examples ([#80](#80)) ([2c152fb](2c152fb))
|
🎉 This PR is included in version 0.17.11 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
JonahFarc
pushed a commit
to JonahFarc/platform-services-java-sdk
that referenced
this pull request
Sep 15, 2021
JonahFarc
pushed a commit
to JonahFarc/platform-services-java-sdk
that referenced
this pull request
Sep 15, 2021
## [0.17.12](IBM/platform-services-node-sdk@v0.17.11...v0.17.12) (2021-02-25) ### Bug Fixes * **User Management:** add examples ([IBM#80](IBM/platform-services-node-sdk#80)) ([51dc65a](IBM/platform-services-node-sdk@51dc65a))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
This PR adds examples to the User Management service and move hard-coded config values to the env file.
PR Checklist
Please make sure that your PR fulfills the following requirements:
Current vs new behavior
Does this PR introduce a breaking change?
Other information