def __init__(self, time_field='<STR_LIT>', copy_fields=None,<EOL>query_modifiers=None, required_filters=None,<EOL>metric_fields=None, *args, **kwargs):
super(ESDateHistogramQuery, self).__init__(*args, **kwargs)<EOL>self.time_field = time_field<EOL>self.copy_fields = copy_fields or {}<EOL>self.query_modifiers = query_modifiers or []<EOL>self.required_filters = required_filters or {}<EOL>self.metric_fields = metric_fields or {'<STR_LIT:value>': ('<STR_LIT>', '<STR_LIT:count>', {})}<EOL>self.allowed_metrics = {<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>'}<EOL>if any(v not in self.allowed_metrics<EOL>for k, (v, _, _) in (self.metric_fields or {}).items()):<EOL><INDENT>raise(ValueError('<STR_LIT>'<EOL>.format('<STR_LIT:U+002CU+0020>'.join(self.allowed_metrics))))<EOL><DEDENT>
Constructor.

        :param time_field: name of the timestamp field.
        :param copy_fields: list of fields to copy from the top hit document
            into the resulting aggregation.
        :param query_modifiers: List of functions accepting a ``query`` and
            ``**kwargs`` (same as provided to the ``run`` method), that will
            be applied to the aggregation query.
        :param required_filters: Dict of "mandatory query parameter" ->
            "filtered field".
        :param metric_fields: Dict of "destination field" ->
            tuple("metric type", "source field", "metric_options").