class_docstr: wrapper class for elasticsearch.Elasticsearch.
class_docstr_tok: ["wrapper","class","for","elasticsearch.Elasticsearch","."]
code: def __init__(
      self,
      host: str = "localhost",
      port: int = 9200,
      user: str | None = None,
      password: str | None = None,
      scheme: str = "http",
      **kwargs: Any,
  ):
      self.host = host
      self.port = port
      self.user = user
      self.password = password
      self.scheme = scheme
      self.kwargs = kwargs
      netloc = f"{host}:{port}"
      self.url = parse.urlunparse(
          (scheme, netloc, "/", None, None, None)
      )
      if user and password:
          self.es = Elasticsearch(
              self.url, http_auth=(user, password), **self.kwargs
          )
      else:
          self.es = Elasticsearch(self.url, **self.kwargs)
  
imports: from __future__ import annotations
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any
  from urllib import parse
  from elasticsearch import Elasticsearch
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
  from airflow.providers.common.sql.hooks.sql import DbApiHook
label_desc: Use image node_id 1 to create a new ESConnection object  with example: obj = ESConnection(host, port, user, password, scheme)