def __init__(self, index_id, kind, has_ancestor, properties):
    argument_error = datastore_errors.BadArgumentError
    datastore_types.ValidateInteger(index_id, 'index_id', argument_error,
                                    zero_ok=True)
    datastore_types.ValidateString(kind, 'kind', argument_error, empty_ok=True)
    if not isinstance(properties, (list, tuple)):
      raise argument_error('properties must be a list or a tuple')
    for idx, index_property in enumerate(properties):
      if not isinstance(index_property, (list, tuple)):
        raise argument_error('property[%d] must be a list or a tuple' % idx)
      if len(index_property) != 2:
        raise argument_error('property[%d] length should be 2 but was %d' %
                        (idx, len(index_property)))
      datastore_types.ValidateString(index_property[0], 'property name',
                                     argument_error)
      _BaseIndex.__ValidateEnum(index_property[1],
                               (self.ASCENDING, self.DESCENDING),
                               'sort direction')
    self.__id = long(index_id)
    self.__kind = kind
    self.__has_ancestor = bool(has_ancestor)
    self.__properties = properties
Construct a datastore index instance.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore.py/_BaseIndex.__init__