use of com.google.datastore.v1.Value.ValueTypeCase in project google-cloud-java by GoogleCloudPlatform.
the class Value method fromPb.
static Value<?> fromPb(com.google.datastore.v1.Value proto) {
ValueTypeCase descriptorId = proto.getValueTypeCase();
ValueType valueType = ValueType.getByDescriptorId(descriptorId.getNumber());
return valueType == null ? RawValue.MARSHALLER.fromProto(proto).build() : valueType.getMarshaller().fromProto(proto).build();
}
Aggregations