Skip to content

feat(generator): add HttpJsonServiceResumableUploadStubClassComposer - #14321

Draft
whowes wants to merge 1 commit into
whowes/generator-rest-composer-helpersfrom
whowes/generator-resumable-upload-stub-composer
Draft

whowes wants to merge 1 commit into
whowes/generator-rest-composer-helpersfrom
whowes/generator-resumable-upload-stub-composer

Conversation

@whowes

@whowes whowes commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Introduces HttpJsonServiceResumableUploadStubClassComposer to emit an internal, dedicated REST stub (HttpJson[Service]ResumableUploadStub) for the resumable upload protocol. The composer is registered in the generator pipeline and includes unit goldens locking in the generated stub class.

@whowes
whowes added this pull request to stack #14327 September 9, 2026 06:35
gemini-code-assist[bot]

This comment was marked as outdated.

@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from f246196 to 1885bb8 Compare September 9, 2026 15:50
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 1885bb8 to 542f6e7 Compare September 9, 2026 20:16
@whowes
whowes removed this pull request from stack #14327 September 9, 2026 23:45
@whowes
whowes added this pull request to stack #14343 September 9, 2026 23:47
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 542f6e7 to 6f00489 Compare September 9, 2026 23:51
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 6f00489 to 296ed15 Compare September 10, 2026 00:19
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 296ed15 to bbc408e Compare September 10, 2026 01:15
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from bbc408e to c8c1e06 Compare September 10, 2026 06:05
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from c8c1e06 to c41b295 Compare September 11, 2026 17:24
@whowes
whowes removed this pull request from stack #14343 September 11, 2026 17:25
@whowes
whowes added this pull request to stack #14363 September 11, 2026 17:25
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from c41b295 to 63a3b57 Compare September 11, 2026 18:30
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 63a3b57 to f014476 Compare September 11, 2026 20:00
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from f014476 to 46d6fdf Compare September 11, 2026 21:14
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 46d6fdf to 2525926 Compare September 11, 2026 21:39
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 2525926 to 2f42f31 Compare September 11, 2026 22:15
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 2f42f31 to 15511ad Compare September 14, 2026 21:34
new HttpJsonServiceResumableUploadStubClassComposer();

private static final Statement EMPTY_LINE_STATEMENT = EmptyLineStatement.create();
private static final String RESUMABLE_UPLOAD_PATH_PREFIX = "resumable/upload";

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.

Is this hardcoded for Ads/Showcase?

import org.jspecify.annotations.NullMarked;

@NullMarked
public class HttpJsonServiceResumableUploadStubClassComposer implements ClassComposer {

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.

Is it possible to extend from AbstractTransportServiceStubClassComposer? Generation logics for methods like close, shutdown should be able to be reused.

public class HttpJsonResumableUploadServiceResumableUploadStub implements BackgroundResource {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

private static final ApiMethodDescriptor<UploadMediaRequest, UploadMediaResponse>

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.

IIRC, the ApiMethodDescriptor here is only used for startUpload?

@whowes
whowes removed this pull request from stack #14363 September 14, 2026 22:18
@whowes
whowes added this pull request to stack #14381 September 14, 2026 22:19
@whowes
whowes removed this pull request from stack #14381 September 14, 2026 23:13
@whowes
whowes added this pull request to stack #14382 September 14, 2026 23:14
Add HttpJsonServiceResumableUploadStubClassComposer to generate dedicated
REST stub classes (HttpJson[Service]ResumableUploadStub) for services
containing resumable upload RPC methods.
@whowes
whowes force-pushed the whowes/generator-resumable-upload-stub-composer branch from 15511ad to ec75b25 Compare September 15, 2026 00:43
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

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.

2 participants