Doing this in Kotlin with gRPC API. Is there a difference between these two?
ApiRequest.newBuilder().build()
and
ApiRequest.getDefaultInstance()
Thanks
From https://developers.google.com/protocol-buffers/docs/reference/java-generated
static Foo getDefaultInstance(): Returns the singleton instance of Foo. This instance's contents are identical to what you'd get if you calledFoo.newBuilder().build()(so all singular fields are unset and all repeated fields are empty). Note that the default instance of a message can be used as a factory by calling its newBuilderForType() method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With