Hi!

I am starting out with cl-protobufs.  I would like to interact with a service that is doing the equivalent of the following line of Python, which allows polymorphic treatement of animals, creating a cat and serializing it for transmission to a recipient expecting an Animal (the base message).

animal = Animal()
animal.type = Animal.Cat
cat = animal.Extensions[Cat.animal]
# now work with cat...
# now serialize animal ...

That example is from the tutorial at http://www.indelible.org/ink/protobuf-polymorphism/ which shows the .proto file containing Animal, Cat and Dog messages.

How would this code look in cl-protobufs? I'd be most grateful for any clues.  I couldn't see anything like like this in the examples (but I admit I'm totally new to the protobufs concepts, and rusty at Lisp, so might have missed it...).

Thanks!

Thomas