def delete_synonym(
        self,
        *,
        id: str,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        pretty: t.Optional[bool] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Delete a synonym set.</p>
          <p>You can only delete a synonyms set that is not in use by any index analyzer.</p>
          <p>Synonyms sets can be used in synonym graph token filters and synonym token filters.
          These synonym filters can be used as part of search analyzers.</p>
          <p>Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).
          Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.</p>
          <p>If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.
          To prevent that, synonyms sets that are used in analyzers can't be deleted.
          A delete request in this case will return a 400 response code.</p>
          <p>To remove a synonyms set, you must first remove all indices that contain analyzers using it.
          You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data.
          Once finished, you can delete the index.
          When the synonyms set is not used in analyzers, you will be able to delete it.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym>`_

        :param id: The synonyms set identifier to delete.
        """
        if id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'id'")
        __path_parts: t.Dict[str, str] = {"id": _quote(id)}
        __path = f'/_synonyms/{__path_parts["id"]}'
        __query: t.Dict[str, t.Any] = {}
        if error_trace is not None:
            __query["error_trace"] = error_trace
        if filter_path is not None:
            __query["filter_path"] = filter_path
        if human is not None:
            __query["human"] = human
        if pretty is not None:
            __query["pretty"] = pretty
        __headers = {"accept": "application/json"}
        return self.perform_request(  # type: ignore[return-value]
            "DELETE",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="synonyms.delete_synonym",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Delete a synonym set.</p>
          <p>You can only delete a synonyms set that is not in use by any index analyzer.</p>
          <p>Synonyms sets can be used in synonym graph token filters and synonym token filters.
          These synonym filters can be used as part of search analyzers.</p>
          <p>Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).
          Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.</p>
          <p>If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.
          To prevent that, synonyms sets that are used in analyzers can't be deleted.
          A delete request in this case will return a 400 response code.</p>
          <p>To remove a synonyms set, you must first remove all indices that contain analyzers using it.
          You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data.
          Once finished, you can delete the index.
          When the synonyms set is not used in analyzers, you will be able to delete it.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym>`_

        :param id: The synonyms set identifier to delete.
        
elasticsearch/_sync/client/synonyms.py