I have a proto message:
syntax = "proto3";
import "google/protobuf/any.proto";
message Task {
repeated google.protobuf.Any targets = 1;
// ...
}
message Target {
string name = 1;
// ...
}
How should I add Target messages into Task.targets
?
In official docs I've found info about how to assign value to a single Any type value, however in my case I have repeated Any
field type.
Edit: Task.targets
may contain different types of targets, that's why Any
type is used. A single Target
message is just for minimal reproducible example.