can someone please explain me the meaning of "Value" in below .proto file?
message Test {
string id = 1;
string name = 2;
google.protobuf.Value property = 6;}
Without an import
it probably shouldn't work, however: it represents a flexibly typed value; the Value
"well known type" is essentially a union (oneof
) of a few common types, with the Java API (from your tags) described here.
The definition is in struct.proto
(hence you'll need import "google/protobuf/struct.proto";
), or basically:
message Value {
// The kind of value.
oneof kind {
// Represents a null value.
NullValue null_value = 1;
// Represents a double value.
double number_value = 2;
// Represents a string value.
string string_value = 3;
// Represents a boolean value.
bool bool_value = 4;
// Represents a structured value.
Struct struct_value = 5;
// Represents a repeated `Value`.
ListValue list_value = 6;
}
}
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