Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Conversation

@andreamlin
Copy link
Contributor

This allows all interfaces that use ApiMessage to enforce that response objects have to be of type ApiMessage, which includes EmptyMessage. This replaces java.lang.Void as a response type.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 21, 2019
@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #678 into master will decrease coverage by 0.08%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #678      +/-   ##
============================================
- Coverage     75.71%   75.63%   -0.09%     
  Complexity     1029     1029              
============================================
  Files           194      195       +1     
  Lines          4608     4613       +5     
  Branches        356      356              
============================================
  Hits           3489     3489              
- Misses          961      966       +5     
  Partials        158      158
Impacted Files Coverage Δ Complexity Δ
...java/com/google/api/gax/httpjson/EmptyMessage.java 0% <0%> (ø) 0 <0> (?)
...om/google/api/gax/httpjson/HttpJsonStatusCode.java 26.82% <0%> (-0.68%) 7% <0%> (ø)

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 d41b922...4ff98f1. Read the comment docs.

@andreamlin
Copy link
Contributor Author

PTAL

Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments about javadoc.

import javax.annotation.Nullable;

/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the first time I see a javadoc written in this style (talking to the reader directly). Usually javadoc just talks about the class (i.e. s/"you can re-use"/"can be reused"). Please consider rephrasing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


@Nullable
@Override
public Object getFieldValue(String fieldName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some documentation for the public methods of a public class. (or add in /** {@inheritDoc} */ blocks)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neat!

@andreamlin andreamlin merged commit 588b08f into googleapis:master Feb 21, 2019
@andreamlin andreamlin deleted the emptyMessage branch February 21, 2019 21:48
andreamlin added a commit to googleapis/gapic-generator that referenced this pull request Feb 21, 2019
This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
andreamlin added a commit to andreamlin/toolkit that referenced this pull request Feb 27, 2019
…leapis#2585)

This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
andreamlin added a commit to andreamlin/toolkit that referenced this pull request Feb 27, 2019
…leapis#2585)

This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
andreamlin added a commit to andreamlin/toolkit that referenced this pull request Feb 27, 2019
…leapis#2585)

This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
andreamlin added a commit to andreamlin/toolkit that referenced this pull request Feb 27, 2019
…leapis#2585)

This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
andreamlin added a commit to andreamlin/toolkit that referenced this pull request Feb 27, 2019
update baselines

support OperationApiCallable

remove double @BetaApis

remove BetaApi

remove OperationsClients from LRO methods

update java discogapic baseline

remove Operation as the fourth type in OperationCallable<..>

better?

parameterize HttpJsonCallableFactory

change Void to EmptyMessage

add lroMetadataTransformer

add in the piOperationTransformer

give http_stub getOperationsStub()

fix unit tests for http LRO

return Region/Zone/GlobalOperationClient

use ComputeLongRunningClientFactory

parameterize all Global/Region/Zone operation names

remove another GlobalOperation...

let Discogapic metadata type be the Operaton

ApimEssageOperationTransformers fixed!

cleanup

Use EmptyMessage instead of Void for HTTP response wrapper type (googleapis#2585)

This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).

remove a bunch of unnecessary things

make EmptyMessage have a default builder value in tests cases

generate OperationCallable

generate the ApiLongRunningClientView

formatting

generating OperationSnapshotView

Generating SimplecomputeLongRunningClientFactory but without actual tested generated constructors
andreamlin added a commit to googleapis/gapic-generator that referenced this pull request Mar 1, 2019
This allows all interfaces that use `ApiMessage` to enforce that response objects have to be of type `ApiMessage`, which includes `EmptyMessage`. This replaces `java.lang.Void` as a response type.

Goes along with [googleapis/gax-java#678](googleapis/gax-java#678).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants