Skip to content

Fix javadocs links - consumer request objects #4310

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

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static software.amazon.awssdk.codegen.internal.DocumentationUtils.createLinkToServiceDocumentation;
import static software.amazon.awssdk.codegen.internal.DocumentationUtils.stripHtmlTags;

import com.squareup.javapoet.ClassName;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -171,10 +172,13 @@ final List<Pair<String, String>> getThrows() {
final void emitRequestParm(DocumentationBuilder docBuilder) {
String parameterDocs = stripHtmlTags(opModel.getInput().getDocumentation());

String shapeName = opModel.getInputShape().getShapeName();
ClassName fcqn = ClassName.get(model.getMetadata().getFullModelPackageName(), shapeName);

if (config.isConsumerBuilder()) {
docBuilder.param(opModel.getInput().getVariableName(),
"A {@link Consumer} that will call methods on {@link %s.Builder} to create a request. %s",
opModel.getInputShape().getC2jName(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put the fully qualified name here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, much simpler!

Copy link
Contributor

@dagnir dagnir Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant the FQCN of the class; so for example software.amazon.awssdk.s3.GetObject or something like that. You should be able to use something like

public ClassName getModelClass(String className) {
return ClassName.get(model.getMetadata().getFullModelPackageName(), className);
}
to do that (You'll need to get a reference to IntermediateModel)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotchu, updated to use fqcn

fcqn.toString(),
parameterDocs);
} else {
docBuilder.param(opModel.getInput().getVariableName(), parameterDocs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ default CompletableFuture<APostOperationResponse> aPostOperation(APostOperationR
* </p>
*
* @param aPostOperationRequest
* A {@link Consumer} that will call methods on {@link APostOperationRequest.Builder} to create a request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.APostOperationRequest.Builder} to create a request.
* @return A Java Future containing the result of the APostOperation operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
Expand Down Expand Up @@ -179,7 +180,8 @@ default CompletableFuture<APostOperationWithOutputResponse> aPostOperationWithOu
* </p>
*
* @param aPostOperationWithOutputRequest
* A {@link Consumer} that will call methods on {@link APostOperationWithOutputRequest.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.APostOperationWithOutputRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the APostOperationWithOutput operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -236,8 +238,8 @@ default CompletableFuture<BearerAuthOperationResponse> bearerAuthOperation(
* </p>
*
* @param bearerAuthOperationRequest
* A {@link Consumer} that will call methods on {@link BearerAuthOperationRequest.Builder} to create a
* request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.BearerAuthOperationRequest.Builder} to create a request.
* @return A Java Future containing the result of the BearerAuthOperation operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
Expand Down Expand Up @@ -290,7 +292,8 @@ default CompletableFuture<Void> eventStreamOperation(EventStreamOperationRequest
* </p>
*
* @param eventStreamOperationRequest
* A {@link Consumer} that will call methods on {@link EventStreamOperationRequest.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the EventStreamOperation operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -348,7 +351,8 @@ default CompletableFuture<EventStreamOperationWithOnlyInputResponse> eventStream
* </p>
*
* @param eventStreamOperationWithOnlyInputRequest
* A {@link Consumer} that will call methods on {@link EventStreamOperationWithOnlyInputRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationWithOnlyInputRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the EventStreamOperationWithOnlyInput operation returned by the
* service.<br/>
Expand Down Expand Up @@ -408,7 +412,8 @@ default CompletableFuture<Void> eventStreamOperationWithOnlyOutput(
* </p>
*
* @param eventStreamOperationWithOnlyOutputRequest
* A {@link Consumer} that will call methods on {@link EventStreamOperationWithOnlyOutputRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationWithOnlyOutputRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the EventStreamOperationWithOnlyOutput operation returned by the
* service.<br/>
Expand Down Expand Up @@ -466,7 +471,9 @@ default CompletableFuture<GetOperationWithChecksumResponse> getOperationWithChec
* </p>
*
* @param getOperationWithChecksumRequest
* A {@link Consumer} that will call methods on {@link ChecksumStructure.Builder} to create a request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.GetOperationWithChecksumRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the GetOperationWithChecksum operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
Expand Down Expand Up @@ -527,7 +534,8 @@ default CompletableFuture<GetWithoutRequiredMembersResponse> getWithoutRequiredM
* </p>
*
* @param getWithoutRequiredMembersRequest
* A {@link Consumer} that will call methods on {@link GetWithoutRequiredMembersRequest.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.GetWithoutRequiredMembersRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the GetWithoutRequiredMembers operation returned by the service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -585,8 +593,9 @@ default CompletableFuture<OperationWithChecksumRequiredResponse> operationWithCh
* </p>
*
* @param operationWithChecksumRequiredRequest
* A {@link Consumer} that will call methods on {@link OperationWithChecksumRequiredRequest.Builder} to
* create a request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.OperationWithChecksumRequiredRequest.Builder} to create
* a request.
* @return A Java Future containing the result of the OperationWithChecksumRequired operation returned by the
* service.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -642,7 +651,8 @@ default CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOper
* </p>
*
* @param paginatedOperationWithResultKeyRequest
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithResultKeyRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the PaginatedOperationWithResultKey operation returned by the
* service.<br/>
Expand Down Expand Up @@ -902,7 +912,8 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
* </p>
*
* @param paginatedOperationWithResultKeyRequest
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithResultKeyRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest.Builder} to
* create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -958,7 +969,8 @@ default CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedO
* </p>
*
* @param paginatedOperationWithoutResultKeyRequest
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithoutResultKeyRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the PaginatedOperationWithoutResultKey operation returned by the
* service.<br/>
Expand Down Expand Up @@ -1120,7 +1132,8 @@ default PaginatedOperationWithoutResultKeyPublisher paginatedOperationWithoutRes
* </p>
*
* @param paginatedOperationWithoutResultKeyRequest
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithoutResultKeyRequest.Builder} to
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest.Builder} to
* create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
* The CompletableFuture returned by this method can be completed exceptionally with the following
Expand Down Expand Up @@ -1194,7 +1207,8 @@ default <ReturnT> CompletableFuture<ReturnT> putOperationWithChecksum(
* </p>
*
* @param putOperationWithChecksumRequest
* A {@link Consumer} that will call methods on {@link ChecksumStructureWithStreaming.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PutOperationWithChecksumRequest.Builder} to create a
* request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
Expand Down Expand Up @@ -1286,7 +1300,8 @@ default CompletableFuture<PutOperationWithChecksumResponse> putOperationWithChec
* </p>
*
* @param putOperationWithChecksumRequest
* A {@link Consumer} that will call methods on {@link ChecksumStructureWithStreaming.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.PutOperationWithChecksumRequest.Builder} to create a
* request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
Expand Down Expand Up @@ -1364,7 +1379,8 @@ default CompletableFuture<StreamingInputOperationResponse> streamingInputOperati
* </p>
*
* @param streamingInputOperationRequest
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingInputOperationRequest.Builder} to create a
* request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
Expand Down Expand Up @@ -1429,7 +1445,8 @@ default CompletableFuture<StreamingInputOperationResponse> streamingInputOperati
* </p>
*
* @param streamingInputOperationRequest
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingInputOperationRequest.Builder} to create a
* request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
Expand Down Expand Up @@ -1500,8 +1517,9 @@ default <ReturnT> CompletableFuture<ReturnT> streamingInputOutputOperation(
* </p>
*
* @param streamingInputOutputOperationRequest
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
* request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingInputOutputOperationRequest.Builder} to create
* a request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
Expand Down Expand Up @@ -1578,8 +1596,9 @@ default CompletableFuture<StreamingInputOutputOperationResponse> streamingInputO
* </p>
*
* @param streamingInputOutputOperationRequest
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
* request.
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingInputOutputOperationRequest.Builder} to create
* a request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
Expand Down Expand Up @@ -1650,7 +1669,8 @@ default <ReturnT> CompletableFuture<ReturnT> streamingOutputOperation(
* </p>
*
* @param streamingOutputOperationRequest
* A {@link Consumer} that will call methods on {@link StreamingOutputOperationRequest.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingOutputOperationRequest.Builder} to create a
* request.
* @param asyncResponseTransformer
* The response transformer for processing the streaming response in a non-blocking manner. See
Expand Down Expand Up @@ -1715,7 +1735,8 @@ default CompletableFuture<StreamingOutputOperationResponse> streamingOutputOpera
* </p>
*
* @param streamingOutputOperationRequest
* A {@link Consumer} that will call methods on {@link StreamingOutputOperationRequest.Builder} to create a
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.json.model.StreamingOutputOperationRequest.Builder} to create a
* request.
* @param destinationPath
* {@link Path} to file that response contents will be written to. The file must not exist or this method
Expand Down
Loading