Skip to content

feat(generator): emit callable getter and convenience method for resumable upload RPCs - #14319

Draft
whowes wants to merge 1 commit into
whowes/generator-settings-codegenfrom
whowes/generator-client-codegen
Draft

feat(generator): emit callable getter and convenience method for resumable upload RPCs#14319
whowes wants to merge 1 commit into
whowes/generator-settings-codegenfrom
whowes/generator-client-codegen

Conversation

@whowes

@whowes whowes commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Work in progress, not ready for review

@whowes
whowes added this pull request to stack #14327 September 9, 2026 06:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for generating resumable upload RPC methods in the Java GAPIC generator. Key changes include adding Javadoc warnings and custom parameter documentation for resumable upload methods, generating a default method that accepts an InputStream payload and utilizes ResumableUploadCallable and ApiExceptions.callAndTranslateApiException, suppressing standard flattened method variants and sample code for these methods, and generating placeholder integration test methods instead of standard unit tests. A new test suite ResumableUploadServiceClientComposerTest has been added to verify these generation behaviors. There are no review comments to address, so I have no feedback to provide.

…mable upload RPCs

- In AbstractServiceStubClassComposer: emit public ResumableUploadCallable<RequestT, ResponseT> [method]Callable() throwing UnsupportedOperationException
- In AbstractServiceClientClassComposer: emit public ResumableUploadCallable<RequestT, ResponseT> [method]Callable() delegating to stub
- In AbstractServiceClientClassComposer: emit synchronous convenience method [method](RequestT request, InputStream payload) calling ApiExceptions.callAndTranslateApiException
- Suppress method variants (flattened methods) for resumable upload RPCs
- In ServiceClientCommentComposer: emit Javadoc call context override warning on both callable method and synchronous convenience method
- Add unit test ResumableUploadServiceClientComposerTest verifying generated stub and client methods
@whowes
whowes force-pushed the whowes/generator-client-codegen branch from a07c67a to e0d1fe6 Compare September 9, 2026 15:50
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
6.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant