@utils.positional(<NUM_LIT:1>)<EOL><INDENT>def __init__(self, kind=None, ancestor=None, filters=None, orders=None,<EOL>app=None, namespace=None, default_options=None,<EOL>projection=None, group_by=None):<DEDENT>
<EOL>if ancestor is not None:<EOL><INDENT>if isinstance(ancestor, ParameterizedThing):<EOL><INDENT>if isinstance(ancestor, ParameterizedFunction):<EOL><INDENT>if ancestor.func != '<STR_LIT:key>':<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if not isinstance(ancestor, model.Key):<EOL><INDENT>raise TypeError('<STR_LIT>' % (ancestor,))<EOL><DEDENT>if not ancestor.id():<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if app is not None:<EOL><INDENT>if app != ancestor.app():<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT>if namespace is None:<EOL><INDENT>namespace = ancestor.namespace()<EOL><DEDENT>else:<EOL><INDENT>if namespace != ancestor.namespace():<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if filters is not None:<EOL><INDENT>if not isinstance(filters, Node):<EOL><INDENT>raise TypeError('<STR_LIT>' %<EOL>(filters,))<EOL><DEDENT><DEDENT>if orders is not None:<EOL><INDENT>if not isinstance(orders, datastore_query.Order):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>% (orders,))<EOL><DEDENT><DEDENT>if default_options is not None:<EOL><INDENT>if not isinstance(default_options, datastore_rpc.BaseConfiguration):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' % (default_options,))<EOL><DEDENT>if projection is not None:<EOL><INDENT>if default_options.projection is not None:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if default_options.keys_only is not None:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>self.__kind = kind  <EOL>self.__ancestor = ancestor  <EOL>self.__filters = filters  <EOL>self.__orders = orders  <EOL>self.__app = app<EOL>self.__namespace = namespace<EOL>self.__default_options = default_options<EOL>self.__projection = None<EOL>if projection is not None:<EOL><INDENT>if not projection:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if not isinstance(projection, (tuple, list)):<EOL><INDENT>raise TypeError(<EOL>'<STR_LIT>' %<EOL>(projection,))<EOL><DEDENT>self._check_properties(self._to_property_names(projection))<EOL>self.__projection = tuple(projection)<EOL><DEDENT>self.__group_by = None<EOL>if group_by is not None:<EOL><INDENT>if not group_by:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if not isinstance(group_by, (tuple, list)):<EOL><INDENT>raise TypeError(<EOL>'<STR_LIT>' % (group_by,))<EOL><DEDENT>self._check_properties(self._to_property_names(group_by))<EOL>self.__group_by = tuple(group_by)<EOL><DEDENT>
Constructor.
        Args:
          kind: Optional kind string.
          ancestor: Optional ancestor Key.
          filters: Optional Node representing a filter expression tree.
          orders: Optional datastore_query.Order object.
          app: Optional app id.
          namespace: Optional namespace.
          default_options: Optional QueryOptions object.
          projection: Optional list or tuple of properties to project.
          group_by: Optional list or tuple of properties to group by.