async def exists_source(
        self,
        *,
        index: str,
        id: str,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        preference: t.Optional[str] = None,
        pretty: t.Optional[bool] = None,
        realtime: t.Optional[bool] = None,
        refresh: t.Optional[bool] = None,
        routing: t.Optional[str] = None,
        source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
        source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        version: t.Optional[int] = None,
        version_type: t.Optional[
            t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
        ] = None,
    ) -> HeadApiResponse:
        """
        .. raw:: html

          <p>Check for a document source.</p>
          <p>Check whether a document source exists in an index.
          For example:</p>
          <pre><code>HEAD my-index-000001/_source/1
          </code></pre>
          <p>A document's source is not available if it is disabled in the mapping.</p>


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

        :param index: A comma-separated list of data streams, indices, and aliases. It
            supports wildcards (`*`).
        :param id: A unique identifier for the document.
        :param preference: The node or shard the operation should be performed on. By
            default, the operation is randomized between the shard replicas.
        :param realtime: If `true`, the request is real-time as opposed to near-real-time.
        :param refresh: If `true`, the request refreshes the relevant shards before retrieving
            the document. Setting it to `true` should be done after careful thought and
            verification that this does not cause a heavy load on the system (and slow
            down indexing).
        :param routing: A custom value used to route operations to a specific shard.
        :param source: Indicates whether to return the `_source` field (`true` or `false`)
            or lists the fields to return.
        :param source_excludes: A comma-separated list of source fields to exclude in
            the response.
        :param source_includes: A comma-separated list of source fields to include in
            the response.
        :param version: The version number for concurrency control. It must match the
            current version of the document for the request to succeed.
        :param version_type: The version type.
        """
        if index in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'index'")
        if id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'id'")
        __path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
        __path = f'/{__path_parts["index"]}/_source/{__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 preference is not None:
            __query["preference"] = preference
        if pretty is not None:
            __query["pretty"] = pretty
        if realtime is not None:
            __query["realtime"] = realtime
        if refresh is not None:
            __query["refresh"] = refresh
        if routing is not None:
            __query["routing"] = routing
        if source is not None:
            __query["_source"] = source
        if source_excludes is not None:
            __query["_source_excludes"] = source_excludes
        if source_includes is not None:
            __query["_source_includes"] = source_includes
        if version is not None:
            __query["version"] = version
        if version_type is not None:
            __query["version_type"] = version_type
        __headers = {"accept": "application/json"}
        return await self.perform_request(  # type: ignore[return-value]
            "HEAD",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="exists_source",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Check for a document source.</p>
          <p>Check whether a document source exists in an index.
          For example:</p>
          <pre><code>HEAD my-index-000001/_source/1
          </code></pre>
          <p>A document's source is not available if it is disabled in the mapping.</p>


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

        :param index: A comma-separated list of data streams, indices, and aliases. It
            supports wildcards (`*`).
        :param id: A unique identifier for the document.
        :param preference: The node or shard the operation should be performed on. By
            default, the operation is randomized between the shard replicas.
        :param realtime: If `true`, the request is real-time as opposed to near-real-time.
        :param refresh: If `true`, the request refreshes the relevant shards before retrieving
            the document. Setting it to `true` should be done after careful thought and
            verification that this does not cause a heavy load on the system (and slow
            down indexing).
        :param routing: A custom value used to route operations to a specific shard.
        :param source: Indicates whether to return the `_source` field (`true` or `false`)
            or lists the fields to return.
        :param source_excludes: A comma-separated list of source fields to exclude in
            the response.
        :param source_includes: A comma-separated list of source fields to include in
            the response.
        :param version: The version number for concurrency control. It must match the
            current version of the document for the request to succeed.
        :param version_type: The version type.
        
elasticsearch/_async/client/__init__.py