-
Notifications
You must be signed in to change notification settings - Fork 104
Add an EmptyMessage class, analogous to protobuf's Empty #678
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
|
PTAL |
vam-google
left a comment
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.
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 |
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.
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.
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.
Done.
|
|
||
| @Nullable | ||
| @Override | ||
| public Object getFieldValue(String fieldName) { |
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 add some documentation for the public methods of a public class. (or add in /** {@inheritDoc} */ blocks)
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.
Neat!
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).
…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).
…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).
…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).
…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).
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
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).
This allows all interfaces that use
ApiMessageto enforce that response objects have to be of typeApiMessage, which includesEmptyMessage. This replacesjava.lang.Voidas a response type.