elastic_enterprise_search/_async/client/app_search.py [1698:1730]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        engine_name: str,
        queries: t.Union[t.List[str], t.Tuple[str, ...]],
        hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        suggestion: t.Optional[t.Mapping[str, t.Any]] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        Create a new curation for the engine

        `<https://www.elastic.co/guide/en/app-search/current/curations.html#curations-create>`_

        :param engine_name: Name of the engine
        :param queries:
        :param hidden:
        :param promoted:
        :param suggestion:
        """
        if engine_name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'engine_name'")
        if queries is None:
            raise ValueError("Empty value passed for parameter 'queries'")
        __body: t.Dict[str, t.Any] = {}
        if queries is not None:
            __body["queries"] = queries
        if hidden is not None:
            __body["hidden"] = hidden
        if promoted is not None:
            __body["promoted"] = promoted
        if suggestion is not None:
            __body["suggestion"] = suggestion
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elastic_enterprise_search/_sync/client/app_search.py [1698:1730]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        engine_name: str,
        queries: t.Union[t.List[str], t.Tuple[str, ...]],
        hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        suggestion: t.Optional[t.Mapping[str, t.Any]] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        Create a new curation for the engine

        `<https://www.elastic.co/guide/en/app-search/current/curations.html#curations-create>`_

        :param engine_name: Name of the engine
        :param queries:
        :param hidden:
        :param promoted:
        :param suggestion:
        """
        if engine_name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'engine_name'")
        if queries is None:
            raise ValueError("Empty value passed for parameter 'queries'")
        __body: t.Dict[str, t.Any] = {}
        if queries is not None:
            __body["queries"] = queries
        if hidden is not None:
            __body["hidden"] = hidden
        if promoted is not None:
            __body["promoted"] = promoted
        if suggestion is not None:
            __body["suggestion"] = suggestion
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



