(  # pylint: disable=arguments-differ
            self,
            query_string=None,
            query_dsl=None,
            query_filter=None,
            return_fields=None,
            max_entries=None,
            **kwargs)
Explore the sketch.

        Args:
            query_string (str): OpenSearch query string.
            query_dsl (str): OpenSearch query DSL as JSON string.
            query_filter (dict): Filter for the query as a dict.
            return_fields (str): A comma separated string with a list of fields
                that should be included in the response. Optional and defaults
                to None.
            max_entries (int): Optional integer denoting a best effort to limit
                the output size to the number of events. Events are read in,
                10k at a time so there may be more events in the answer back
                than this number denotes, this is a best effort.
            kwargs (dict[str, object]): Depending on the resource they may
                require different sets of arguments to be able to run a raw
                API request.

        Raises:
            ValueError: if unable to query for the results.
            RuntimeError: if the query is missing needed values, or if the
                sketch is archived.
Explore the sketch.
Explore the sketch .
def from_manual(  # pylint: disable=arguments-differ
            self,
            query_string=None,
            query_dsl=None,
            query_filter=None,
            return_fields=None,
            max_entries=None,
            **kwargs):
        """Explore the sketch.

        Args:
            query_string (str): OpenSearch query string.
            query_dsl (str): OpenSearch query DSL as JSON string.
            query_filter (dict): Filter for the query as a dict.
            return_fields (str): A comma separated string with a list of fields
                that should be included in the response. Optional and defaults
                to None.
            max_entries (int): Optional integer denoting a best effort to limit
                the output size to the number of events. Events are read in,
                10k at a time so there may be more events in the answer back
                than this number denotes, this is a best effort.
            kwargs (dict[str, object]): Depending on the resource they may
                require different sets of arguments to be able to run a raw
                API request.

        Raises:
            ValueError: if unable to query for the results.
            RuntimeError: if the query is missing needed values, or if the
                sketch is archived.
        """
        super().from_manual(**kwargs)
        if not (query_string or query_filter or query_dsl):
            raise RuntimeError('You need to supply a query')

        self._username = self.api.current_user.username
        self._name = 'From Explore'
        self._description = 'From Explore'

        if query_filter:
            self.query_filter = query_filter

        self._query_string = query_string
        self.query_dsl = query_dsl
        self._return_fields = return_fields

        if max_entries:
            self._max_entries = max_entries

        # TODO: Make use of search templates and aggregations.
        #self._searchtemplate = data.get('searchtemplate', 0)
        #self._aggregations = data.get('aggregation', 0)

        self._created_at = datetime.datetime.now(
            datetime.timezone.utc).isoformat()
        self._updated_at = self._created_at

        self.resource_data = {}
def from_manual ( # pylint: disable=arguments-differ self , query_string = None , query_dsl = None , query_filter = None , return_fields = None , max_entries = None , * * kwargs ) : super ( ) . from_manual ( * * kwargs ) if not ( query_string or query_filter or query_dsl ) : raise RuntimeError ( 'You need to supply a query' ) self . _username = self . api . current_user . username self . _name = 'From Explore' self . _description = 'From Explore' if query_filter : self . query_filter = query_filter self . _query_string = query_string self . query_dsl = query_dsl self . _return_fields = return_fields if max_entries : self . _max_entries = max_entries # TODO: Make use of search templates and aggregations. #self._searchtemplate = data.get('searchtemplate', 0) #self._aggregations = data.get('aggregation', 0) self . _created_at = datetime . datetime . now ( datetime . timezone . utc ) . isoformat ( ) self . _updated_at = self . _created_at self . resource_data = { }