GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: REST LRO implementation by vam-google · Pull Request #859 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@vam-google

@vam-google vam-google commented Oct 6, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This includes both DIREGAPIC and AIP-151 LRO implementations.

This PR merges changes from diregapic-lro branch to master.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
GabrielGonzalezDiaz and others added 10 commits August 23, 2021 01:53
@GabrielGonzalezDiaz
DIREGAPIC LRO implementation without annotations (googleapis#826)
35cc21c
* fix ServiceStub Goldens

* fix Stub golden

* fix Stub  golden

* fix CallableFactory golden

* fix java format

* add annotation placement comments

* only add machinery to methods that return operation

* add grpc file that contained method that was edited on abstract class

* update HttpJsonComplianceStub.golden

* java format
@vam-google @arithmetic1728 @release-please
Diregapic lro (googleapis#828)
00d94ed
* feat: enable self signed jwt for gapic clients (googleapis#794)

* feat: enable self signed jwt for gapic clients

* resolve comments

* update gax version

* update goldens

* update golden files

* chore: release 2.1.0 (googleapis#827)

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>

* ingegrate with latest googleapis and googleapis-discovery

* ingegrate with latest googleapis and googleapis-discovery

Co-authored-by: arithmetic1728 <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@GabrielGonzalezDiaz
Feat: Implement DIREGAPIC LRO annotations (googleapis#832)
d7b29e0
* fix ServiceStub Goldens

* fix Stub golden

* fix Stub  golden

* fix CallableFactory golden

* fix java format

* add annotation placement comments

* only add machinery to methods that return operation

* add grpc file that contained method that was edited on abstract class

* update HttpJsonComplianceStub.golden

* java format

* add initial methods from annotations

* add initial methods from annotations

* Implement annotations

* java format

* fix package for Status

* fix CallableFactory generics

* java format

* initialize new fields in message for parser test

* set default value for operation_polling_method

* add brackets to if statement

* remove comments and invoke methods

* add brackets to if statements and remove invoke methods

* java formet
@vam-google
fix: fix diregapic-lro logic (googleapis#834)
957f69a
There are 2 more things left:
1) longRunnignOperation() getter method on the transport-agnostic (parent) class
2) proper (transport-specific) Response and Metadata transformers for OperationSettings initialization
@vam-google @arithmetic1728 @release-please
chore: Merge multitransport client and fixes (googleapis#836)
200fce7
* feat: enable self signed jwt for gapic clients (googleapis#794)

* feat: enable self signed jwt for gapic clients

* resolve comments

* update gax version

* update goldens

* update golden files

* chore: release 2.1.0 (googleapis#827)

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>

* feat: REGAPIC initial implementation (googleapis#824)

This includes:
1) Proper GRPC transcoding
2) Mimimal REST Operations (go make it compilable)
3) Rely on resource names for tests values generation (to not fail http url path validation)
4) Empty Server Streaming method implementation

* feat: REGAPIC Multitransport implementation (grpc+rest) (googleapis#833)

1) Fully backward compatible with grpc-only GAPIC
2) Strictly speaking not fully backward compatible with rest-only REGAPIC (but is compatible for practical cases). See below for details.
3) Introduces the concept of default transport (is necessary to preserve backward-compabitility). The default behavior assumes grpc transport.

Needed to unblock DIREGAPIC LRO. To be reviewed after submission

* chore: merge DIREGAPIC LRO with multitransport changes from master

* fix: fix Stub.longRunningClient() issues for DIREGAPIC LRO

* fix: [bazel] fix rest transport handling in assembly rule (googleapis#835)

Co-authored-by: arithmetic1728 <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@vam-google
fix: DIREGAPIC LRO generated tests logic (googleapis#838)
8ae8e6f
@vam-google
feat: Add REST AIP-151 LRO suport
cb1b534
Depends on googleapis/gax-java#1484
@vam-google
Merge remote-tracking branch 'upstream/master' into diregapic-lro
39c7b9c
@vam-google
chore: merge changes from master
d029941
@vam-google
Merge remote-tracking branch 'upstream/main' into diregapic-lro
0cf77b5
@vam-google
vam-google requested a review from miraleung as a code owner October 6, 2021 03:07
@vam-google
vam-google requested a review from a team October 6, 2021 03:07
@google-cla

google-cla Bot commented Oct 6, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot added the cla: no This human has *not* signed the Contributor License Agreement. label Oct 6, 2021
@codecov

codecov Bot commented Oct 6, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #859 (84c04c9) into main (aba0ec0) will decrease coverage by 2.45%.
The diff coverage is 36.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #859      +/-   ##
==========================================
- Coverage   90.03%   87.58%   -2.46%     
==========================================
  Files         151      152       +1     
  Lines       15339    15983     +644     
  Branches     1101     1160      +59     
==========================================
+ Hits        13811    13999     +188     
- Misses       1213     1637     +424     
- Partials      315      347      +32     
Impacted Files Coverage Δ
...ic/composer/grpc/GrpcServiceStubClassComposer.java 97.76% <ø> (ø)
...rator/gapic/composer/grpcrest/GrpcRestContext.java 0.00% <0.00%> (ø)
...e/api/generator/gapic/model/OperationResponse.java 0.00% <0.00%> (ø)
...common/AbstractServiceClientTestClassComposer.java 86.01% <4.54%> (-3.61%) ⬇️
...omposer/rest/HttpJsonServiceStubClassComposer.java 52.32% <12.26%> (-43.00%) ⬇️
...ic/composer/defaultvalue/DefaultValueComposer.java 82.40% <13.63%> (-5.10%) ⬇️
...poser/common/AbstractServiceStubClassComposer.java 93.75% <38.46%> (-5.53%) ⬇️
...google/api/generator/gapic/protoparser/Parser.java 45.18% <42.85%> (-1.25%) ⬇️
...ser/common/AbstractServiceClientClassComposer.java 98.62% <50.00%> (-0.35%) ⬇️
...mon/AbstractTransportServiceStubClassComposer.java 93.69% <60.00%> (-4.49%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aba0ec0...84c04c9. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vam-google
vam-google requested a review from chanseokoh October 6, 2021 03:27
chanseokoh
chanseokoh reviewed Oct 6, 2021
View reviewed changes

@chanseokoh chanseokoh left a comment

Copy link
Copy Markdown
Contributor

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.

Looked into the upper part of the diff. Will take a look at the rest later.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread repositories.bzl Outdated
strip_prefix = "googleapis-discovery-bb8a053b93ef8698297c41634aa9201f7e075277",
urls = [
"https://github.com/googleapis/googleapis-discovery/archive/abf4cec1ce9e02e4d7d650bf66137c347cdd0d44.zip",
"https://github.com/vam-google/googleapis-discovery/archive/bb8a053b93ef8698297c41634aa9201f7e075277.zip",

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
"https://github.com/vam-google/googleapis-discovery/archive/bb8a053b93ef8698297c41634aa9201f7e075277.zip",
"https://github.com/googleapis/googleapis-discovery/archive/....zip",

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Changed to point to upstream

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .../google/api/generator/gapic/composer/common/AbstractServiceCallableFactoryClassComposer.java Outdated
* factory class.
*/
protected abstract List<TypeNode> createClassImplements(TypeStore typeStore);
protected abstract List<TypeNode> createClassImplements(TypeStore typeStore, Service service);

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

Is it worth having the consistency in the argument order with others?

Suggested change
protected abstract List<TypeNode> createClassImplements(TypeStore typeStore, Service service);
protected abstract List<TypeNode> createClassImplements(Service service, TypeStore typeStore);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Yes, it is better to have ordering consistent, though there are so much code in gapic-generator in general, so things like arguments ordering is not really a consistent thing accross the generator codebase (meaning other similar methods, not this specific one necessarily). As result it is hard to define what is the "right" ordering. for this specific one it is clearly service should go first, so reordered the parsms, thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .../java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java Outdated
.copyAndSetGenerics(
Arrays.asList(
lro.responseType().reference(), lro.metadataType().reference())));
if (method.hasLro() && method.lro().operationServiceStubType() != null) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

We already checked method.hasLro().

Suggested change
if (method.hasLro() && method.lro().operationServiceStubType() != null) {
if (lro.operationServiceStubType() != null) {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

yep, that was redundant. Removed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...in/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java
while (operationStubNameIt.hasNext() && operationStubTypeIt.hasNext()) {
String methodName =
String.format("get%s", JavaStyle.toUpperCamelCase(operationStubNameIt.next()));
//TODO: refactor this

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

How to refactor this? Into a separate method?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Honestly, I don't remember anymore =). But I'm pretty sure it is not about language syntax used, it meant it on architectural level. The problem in that piece of code is this whole logic of operationsStubType != null ever being true. This comes from the difference between DIREGAPIC LRO and AIP-151 LROs, and I believe "refactoring" here means removing these kind of differences in logic depending on which LRO is being processed. Proper refactoring of this is outside of scope of this PR I believe.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...in/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java
}

private List<MethodDefinition> createLongRunningClientGetters(TypeStore typeStore) {
return ImmutableList.of(createCallableGetterMethodDefinition(

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

I saw a lot of times, the codebase uses Arrays.asList(). What would you say?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

I believe all three versions are being used simultaneously:
Arrays.asList()
Collections.singletonList()
ImmutableList.of().

The reason why I don't like Arrays.asList() is that it always gets highlighted by IDEs (especially by IntelliJ) when used with only one argument (and it suggests to use Collections.singletonList() instead). On the other hand, in the rest of our codebase, which depends on guava, we use guava's collections were possible, so using them here as well. I don't have a strong preference, though.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java Outdated
Variable.builder()
.setName(getTransportContext().transportOperationsStubNames().get(0))
.setType(getTransportContext().transportOperationsStubTypes().get(0))
.setType(opeationsStubType)

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

nit

Suggested change
.setType(opeationsStubType)
.setType(operationsStubType)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Thanks, fixed here and in other places (apparently I copy-pased this typo in multiple places in multiple classes =)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
return ImmutableList.of();
}

protected VariableExpr declareLongRunningClient() {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

@Nullable?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

I guess we don't really use nullable annotation consistently in composers, but added it here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java Outdated
}

private boolean checkOperationPollingMethod(Service service) {
for (Method method : service.methods()) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

service.methods().stream().anyMatch(Method::isOperationPollingMethod)? (Haven't tested though.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Yeah, pretty idiomatic, changed it to java8 streams form as you suggested. Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
return javaMethods;
}

private boolean checkOperationPollingMethod(Service service) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

static?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Honestly, I prefer not using static methods, if not necessary, as they are much less flexible. For private methods it doesn't even matter that much, but even if a method is not using any class state it might in the future or subclasses may be using it, also static methods often cause troubles during testing as they harder to mock, if necessary.

Technically for private static methods it is ok, because they are private anyways and can't be extended (and in case they are promoted to protected/public the static identifier may be removed on the moment of "promotion") and having static on them gives the reader additional information that the method does not mess with the client state, but that seems taking it a bit too far in terms of imposed conventions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chanseokoh
chanseokoh reviewed Oct 6, 2021
View reviewed changes

@chanseokoh chanseokoh left a comment

Copy link
Copy Markdown
Contributor

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.

Still working on it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
Comment on lines +1101 to +1102
TypeNode transportOpeationsStubType = service.operationServiceStubType();
if (transportOpeationsStubType == null) {
transportOpeationsStubType = getTransportContext().transportOperationsStubTypes().get(0);
} else {
transportOpeationsStubType =

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

I think it's confusing in that you first initialize transportOpeationsStubType to something but then both of the if branches overwrite the variable immediately. How about this?

Suggested change
TypeNode transportOpeationsStubType = service.operationServiceStubType();
if (transportOpeationsStubType == null) {
transportOpeationsStubType = getTransportContext().transportOperationsStubTypes().get(0);
} else {
transportOpeationsStubType =
TypeNode transportOpeationsStubType = service.operationServiceStubType();
if (transportOpeationsStubType == null) {
return getTransportContext().transportOperationsStubTypes().get(0);
} else {
return

But I'm fine either way actually.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

I'm not sure I can read the suggested change right (it abruptly ends with empty return statement). I agree that initializing something and than unavoidably overwriting it may be confusing. Here I think it was done to save a little bit of code, because on the else statement the new value is constructed based on the old value and with current logic we can do transportOpeationsStubType.reference() instead of service.operationServiceStubType().reference() which is one less method call and it is being done twice in the else statement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...om/google/api/generator/gapic/composer/rest/HttpJsonServiceCallableFactoryClassComposer.java Outdated
Comment on lines +192 to +194
initialCallableType) // TypeNode.withReference(ConcreteReference.withClazz(UnaryCallable.class)))
.build())
// .setTemplateObjects(Arrays.asList(requestTemplateName, "OperationSnapshot"))

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

Clean this up?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Yep, cleaned up

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
}

// Generates get[camelCase(fieldName)]
private String getMethodFormat(String fieldName) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

static

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Please see the other comment. I'm not aware of static being a good practice/recommended way for things like this (i.e. private helper methods). If there is such, can you please post a link to it?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
}

// Generates set[camelCase(fieldName)]
private String setMethodFormat(String fieldName) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

static

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

same as above

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
}

// Generates: [nameVar].append(":").append([requestVar].get[FieldName]());
private ExprStatement appendField(

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

static?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
}

// returns var.get(num);
private MethodInvocationExpr getExpr(VariableExpr var, String num) {

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

static

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
.apply(
"setPollingRequestFactory",
setPollingRequestFactoryExpr(protoMethod, messageTypes))
.apply(expr);

@chanseokoh chanseokoh Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

Just checking: if hasLro and isOperationPollingMethod, it will chain setPollingRequestFactory after setOperationSnapshotFactory. Is that correct?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vam-google vam-google Oct 7, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Yes, your undestanding is correct. setOperationSnapshotFactory is needed by both methods - the ones which start LRO and the ones which poll for LRO status. setPollingRequestFactory is needed only by polling methods.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chanseokoh
chanseokoh approved these changes Oct 7, 2021
View reviewed changes

@chanseokoh chanseokoh left a comment

Copy link
Copy Markdown
Contributor

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.

Didn't look at golden files. LGTM with some comments I already made.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vam-google vam-google removed the cla: no This human has *not* signed the Contributor License Agreement. label Oct 7, 2021
@vam-google

vam-google commented Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

@googlebot I fixed it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 7, 2021
@vam-google
chore: Address PR feedback
84c04c9
chanseokoh
chanseokoh approved these changes Oct 8, 2021
View reviewed changes
@vam-google
vam-google force-pushed the diregapic-lro branch 2 times, most recently from ec1eb8d to 84c04c9 Compare October 8, 2021 23:44
@vam-google
vam-google merged commit 7bfc61b into googleapis:main Oct 9, 2021
suztomo pushed a commit that referenced this pull request Mar 21, 2023
@renovate-bot
deps: update dependency zipp to v3.9.0 (#859)
971b84e
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [zipp](https://togithub.com/jaraco/zipp) | `==3.6.0` -> `==3.9.0` | [![age](https://badges.renovateapi.com/packages/pypi/zipp/3.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/zipp/3.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/zipp/3.9.0/compatibility-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/zipp/3.9.0/confidence-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-shared-dependencies).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMjIuMyIsInVwZGF0ZWRJblZlciI6IjMyLjIyMi4zIn0=-->
suztomo pushed a commit that referenced this pull request Mar 21, 2023
@release-please
chore(main): release 3.0.5 (#880)
cb88582
🤖 I have created a release *beep* *boop*
---


## [3.0.5](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.4...v3.0.5) (2022-10-20)


### Dependencies

* Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4.20221013 ([#868](https://togithub.com/googleapis/java-shared-dependencies/issues/868)) ([5c2a825](https://togithub.com/googleapis/java-shared-dependencies/commit/5c2a825c18af61784287dd41eba3a21be80bbe6b))
* Update dependency com.google.auth:google-auth-library-bom to v1.12.0 ([#870](https://togithub.com/googleapis/java-shared-dependencies/issues/870)) ([3e3a60d](https://togithub.com/googleapis/java-shared-dependencies/commit/3e3a60dfd45f08401ee3ac7a98007fae21d5bba6))
* Update dependency com.google.auth:google-auth-library-bom to v1.12.1 ([#871](https://togithub.com/googleapis/java-shared-dependencies/issues/871)) ([4d94c75](https://togithub.com/googleapis/java-shared-dependencies/commit/4d94c753b46d7f8c787b0efa21d7bc42b1ca1c6c))
* Update dependency com.google.cloud:grpc-gcp to v1.3.0 ([#867](https://togithub.com/googleapis/java-shared-dependencies/issues/867)) ([48ca222](https://togithub.com/googleapis/java-shared-dependencies/commit/48ca222a5e4d9f88737d4c4a4ee2a42a7145619e))
* Update dependency com.google.errorprone:error_prone_annotations to v2.16 ([#865](https://togithub.com/googleapis/java-shared-dependencies/issues/865)) ([d7a494d](https://togithub.com/googleapis/java-shared-dependencies/commit/d7a494dcd12a529121b74fd9fb9dfc679017f844))
* Update dependency com.google.protobuf:protobuf-bom to v3.21.8 ([#872](https://togithub.com/googleapis/java-shared-dependencies/issues/872)) ([ebe5d5f](https://togithub.com/googleapis/java-shared-dependencies/commit/ebe5d5f27dbe4f12c06d3a69c14c74bbf4e76dd1))
* Update dependency gcp-releasetool to v1.8.10 ([#853](https://togithub.com/googleapis/java-shared-dependencies/issues/853)) ([5c6367a](https://togithub.com/googleapis/java-shared-dependencies/commit/5c6367a643f491d2ec04be58c1ff0eca5aa10904))
* Update dependency google-api-core to v2.10.2 ([#858](https://togithub.com/googleapis/java-shared-dependencies/issues/858)) ([bc91e8d](https://togithub.com/googleapis/java-shared-dependencies/commit/bc91e8df54f9d919a9e0dc69e61d52fd855a8dbf))
* Update dependency io.grpc:grpc-bom to v1.50.0 ([#866](https://togithub.com/googleapis/java-shared-dependencies/issues/866)) ([50039f4](https://togithub.com/googleapis/java-shared-dependencies/commit/50039f41bfba37e65685c4a5b279d3cb2a92f2c5))
* Update dependency io.grpc:grpc-bom to v1.50.1 ([#873](https://togithub.com/googleapis/java-shared-dependencies/issues/873)) ([9fb1561](https://togithub.com/googleapis/java-shared-dependencies/commit/9fb15613976f83c5545e2b664c488e9811c1f185))
* Update dependency org.checkerframework:checker-qual to v3.26.0 ([#852](https://togithub.com/googleapis/java-shared-dependencies/issues/852)) ([1e8cd60](https://togithub.com/googleapis/java-shared-dependencies/commit/1e8cd609b3be0cdd748a8fea6bc0fcb15d8f4c96))
* Update dependency org.threeten:threetenbp to v1.6.3 ([#869](https://togithub.com/googleapis/java-shared-dependencies/issues/869)) ([e992190](https://togithub.com/googleapis/java-shared-dependencies/commit/e9921900ec590e281b5ae6e16ab51e7bd67c1242))
* Update dependency typing-extensions to v4.4.0 ([#854](https://togithub.com/googleapis/java-shared-dependencies/issues/854)) ([c909a13](https://togithub.com/googleapis/java-shared-dependencies/commit/c909a13fa626eb387c8ee87b7cc22607cb9cf889))
* Update dependency zipp to v3.9.0 ([#859](https://togithub.com/googleapis/java-shared-dependencies/issues/859)) ([971b84e](https://togithub.com/googleapis/java-shared-dependencies/commit/971b84eb801699b585cd35300bed8d4fb65046d8))
* Update gax.version to v2.19.4 ([#875](https://togithub.com/googleapis/java-shared-dependencies/issues/875)) ([2eb7f3d](https://togithub.com/googleapis/java-shared-dependencies/commit/2eb7f3d6cf834c474dcdc99740f8cdabf50bca51))
* Update google.core.version to v2.8.21 ([#861](https://togithub.com/googleapis/java-shared-dependencies/issues/861)) ([2fda421](https://togithub.com/googleapis/java-shared-dependencies/commit/2fda4213796df086450fdc3d69d53a0bd1d59f46))
* Update google.core.version to v2.8.22 ([#879](https://togithub.com/googleapis/java-shared-dependencies/issues/879)) ([e4f9f9a](https://togithub.com/googleapis/java-shared-dependencies/commit/e4f9f9ad6373fb52c069985ca4390663ccdacb7d))
* Update iam.version to v1.6.3 ([#857](https://togithub.com/googleapis/java-shared-dependencies/issues/857)) ([6758373](https://togithub.com/googleapis/java-shared-dependencies/commit/675837378642f39fe55c0e30b62755b9185bee3d))
* Update iam.version to v1.6.4 ([#862](https://togithub.com/googleapis/java-shared-dependencies/issues/862)) ([1e1bc34](https://togithub.com/googleapis/java-shared-dependencies/commit/1e1bc341c9dd0f8f5a2d14aa8dd52399b2ce71c1))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
@renovate-bot
deps: update dependency com.google.api-client:google-api-client-bom t…
6b51a1c
…o v1.35.2 (#859)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.api-client:google-api-client-bom](https://togithub.com/googleapis/google-api-java-client) | `1.35.1` -> `1.35.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.35.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.35.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.35.2/compatibility-slim/1.35.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.35.2/confidence-slim/1.35.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/google-api-java-client</summary>

### [`v1.35.2`](https://togithub.com/googleapis/google-api-java-client/blob/HEAD/CHANGELOG.md#&#8203;1352-httpsgithubcomgoogleapisgoogle-api-java-clientcomparev1351v1352-2022-06-30)

[Compare Source](https://togithub.com/googleapis/google-api-java-client/compare/v1.35.1...v1.35.2)

##### Bug Fixes

-   **deps:** update dependency com.google.api-client:google-api-client to v1.35.1 ([#&#8203;2091](https://togithub.com/googleapis/google-api-java-client/issues/2091)) ([a3b4780](https://togithub.com/googleapis/google-api-java-client/commit/a3b4780916b5acab86c43db8793a2d10c3e2c4fb))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
@release-please
chore(main): release 2.8.2 (#863)
5e3488b
🤖 I have created a release *beep* *boop*
---


## [2.8.2](googleapis/java-core@v2.8.1...v2.8.2) (2022-07-13)


### Bug Fixes

* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-core/issues/1485)) ([#866](googleapis/java-core#866)) ([8a8ac99](googleapis/java-core@8a8ac99))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#859](googleapis/java-core#859)) ([6b51a1c](googleapis/java-core@6b51a1c))
* update dependency com.google.api:gax-bom to v2.18.3 ([#860](googleapis/java-core#860)) ([f5a5278](googleapis/java-core@f5a5278))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.9.1 ([#855](googleapis/java-core#855)) ([4ec6635](googleapis/java-core@4ec6635))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.5.0 ([#862](googleapis/java-core#862)) ([19aebbe](googleapis/java-core@19aebbe))
* update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#861](googleapis/java-core#861)) ([4d7548b](googleapis/java-core@4d7548b))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@miraleung miraleung Awaiting requested review from miraleung
1 more reviewer
@chanseokoh chanseokoh chanseokoh approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vam-google @chanseokoh @GabrielGonzalezDiaz
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.