These are gone in proto3. The has* stuff is available with proto2.

On Thu, Jul 11, 2019 at 4:54 PM Janac Meena <[email protected]> wrote:
>
> Hello,
>
> I see in the documentation that there is a way to check for the existence of 
> a field in a message, i.e.
>
> message Foo {
>  string name = 1;
> }
>
> In my Java code, I was hoping to do
>
> // Assuming object "foo" has been initialized
>
> if (foo.hasName()) {
> // do stuff
> }
>
> But I am unable to find the hasX() methods.
>
> What's going on?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/protobuf.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/protobuf/1d700a63-f677-4c56-8c47-fa50d3d5468f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAKb7UvibG7u14Fpgnz-Em6Pdv_248h5jOc0wQ7k2bZxbnS89DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to