-
Notifications
You must be signed in to change notification settings - Fork 954
Code generation for Service BatchFunctions class #2683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code generation for Service BatchFunctions class #2683
Conversation
…Mapper method and helper methods
…batchFunctionsTypes and BatchManager
...en/src/main/java/software/amazon/awssdk/codegen/model/config/customization/BatchManager.java
Outdated
Show resolved
Hide resolved
.../src/main/java/software/amazon/awssdk/codegen/poet/batchmanager/BatchFunctionsClassSpec.java
Outdated
Show resolved
Hide resolved
codegen/src/main/java/software/amazon/awssdk/codegen/poet/batchmanager/BatchTypesUtils.java
Outdated
Show resolved
Hide resolved
codegen/src/main/java/software/amazon/awssdk/codegen/poet/batchmanager/BatchTypesUtils.java
Outdated
Show resolved
Hide resolved
.../src/main/java/software/amazon/awssdk/codegen/poet/batchmanager/BatchFunctionsClassSpec.java
Outdated
Show resolved
Hide resolved
...urces/software/amazon/awssdk/codegen/poet/batchmanager/test-batchmanager-batchfunctions.java
Outdated
Show resolved
Hide resolved
...urces/software/amazon/awssdk/codegen/poet/batchmanager/test-batchmanager-batchfunctions.java
Outdated
Show resolved
Hide resolved
...urces/software/amazon/awssdk/codegen/poet/batchmanager/test-batchmanager-batchfunctions.java
Outdated
Show resolved
Hide resolved
...c/main/java/software/amazon/awssdk/services/sqs/internal/batchmanager/SqsBatchFunctions.java
Show resolved
Hide resolved
...urces/software/amazon/awssdk/codegen/poet/batchmanager/test-batchmanager-batchfunctions.java
Outdated
Show resolved
Hide resolved
… to reflect codegeneration pacakage structure
|
There are only a few code smells. Most are TODOs and 2 are related to code duplication (just some really short strings that are reused but wouldn't make sense to make into a constant). |
| } | ||
|
|
||
| private String methodNameFromMemberModel(String memberModelName) { | ||
| // Have to lowercase second char as well since MD5 methods/members have the D capitalized as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this does not cover for the case where more than 2 characters are capitalized.
Can we use this method instead? https://github.com/aws/aws-sdk-java-v2/blob/master/codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/MemberModel.java#L174
...urces/software/amazon/awssdk/codegen/poet/batchmanager/test-batchmanager-batchfunctions.java
Outdated
Show resolved
Hide resolved
.../src/main/java/software/amazon/awssdk/codegen/poet/batchmanager/BatchFunctionsClassSpec.java
Outdated
Show resolved
Hide resolved
|
Kudos, SonarCloud Quality Gate passed! |
…5c0d218d1 Pull request: release <- staging/edc1b242-cf39-400b-b82e-b485c0d218d1








Motivation and Context
Service specific batch managers will rely on a
BatchFunctionsutility file that defines all the necessary work to map combine individual requests to batch requests, map batch responses back to individual responses, and to generatebatchKeysfrom a request. Of the files/classes related a service batch manager, this is the most complicated so I put the modifications in a separate PR from the other classes.Description
Added code generation for the BatchFunctions file. Code generation for the rest of the service batch manager classes will be done in a separate PR.
Testing
Added codegen tests to check the generated batchFunctions class matched expectations for it. Also had to modify the other codegen tests since the service-2.json file had to be modified to include some operations and classes (since I am no parsing the service-2.json file to extract the shapes).
Types of changes
Checklist
mvn installsucceedsLicense