def _GetValue(value_pb):
 if (value_pb.type() in _PROTO_FIELDS_STRING_VALUE):
  if value_pb.has_string_value():
   return value_pb.string_value()
  return None
 if (value_pb.type() == document_pb.FieldValue.DATE):
  if value_pb.has_string_value():
   return search_util.DeserializeDate(value_pb.string_value())
  return None
 if (value_pb.type() == document_pb.FieldValue.NUMBER):
  if value_pb.has_string_value():
   return float(value_pb.string_value())
  return None
 if (value_pb.type() == document_pb.FieldValue.GEO):
  if value_pb.has_geo():
   geo_pb = value_pb.geo()
   return GeoPoint(latitude=geo_pb.lat(), longitude=geo_pb.lng())
  return None
 raise TypeError(('unknown FieldValue type %d' % value_pb.type()))

def _GetValue ( value_pb ) : if ( value_pb . type ( ) in _PROTO_FIELDS_STRING_VALUE ) : if value_pb . has_string_value ( ) : return value_pb . string_value ( ) return None if ( value_pb . type ( ) == document_pb . FieldValue . DATE ) : if value_pb . has_string_value ( ) : return search_util . DeserializeDate ( value_pb . string_value ( ) ) return None if ( value_pb . type ( ) == document_pb . FieldValue . NUMBER ) : if value_pb . has_string_value ( ) : return float ( value_pb . string_value ( ) ) return None if ( value_pb . type ( ) == document_pb . FieldValue . GEO ) : if value_pb . has_geo ( ) : geo_pb = value_pb . geo ( ) return GeoPoint ( latitude = geo_pb . lat ( ) , longitude = geo_pb . lng ( ) ) return None raise TypeError ( ( 'unknown FieldValue type %d' % value_pb . type ( ) ) )
gets the value from the value_pb .