Search in sources :

Example 1 with ValueTypeCase

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();
}
Also used : ValueTypeCase(com.google.datastore.v1.Value.ValueTypeCase)

Aggregations

ValueTypeCase (com.google.datastore.v1.Value.ValueTypeCase)1