class_docstr: Custom implementation of Looker SDK's `ApiSettings` class.
class_docstr_tok: ["Custom","implementation","of","Looker","SDK","'s","`","ApiSettings","`","class","."]
docstr: Fetches the connection settings from Airflow's connection object.
  
  Overrides the default logic of getting connection settings.
docstr_tok: ["Fetches","the","connection","settings","from","Airflow","'s","connection","object",".","Overrides","the","default","logic","of","getting","connection","settings","."]
code: def read_config(self):
      """
      Fetches the connection settings from Airflow's connection object.
  
      Overrides the default logic of getting connection settings.
      """
      config = {}
  
      if self.conn.host is None:
          raise AirflowException(
              f"No `host` was supplied in connection: {self.conn.id}."
          )
  
      if self.conn.port:
          config[
              "base_url"
          ] = f"{self.conn.host}:{self.conn.port}"  # port is optional
      else:
          config["base_url"] = self.conn.host
  
      if self.conn.login:
          config["client_id"] = self.conn.login
      else:
          raise AirflowException(
              f"No `login` was supplied in connection: {self.conn.id}."
          )
  
      if self.conn.password:
          config["client_secret"] = self.conn.password
      else:
          raise AirflowException(
              f"No `password` was supplied in connection: {self.conn.id}."
          )
  
      extras: dict = self.conn.extra_dejson
  
      if "verify_ssl" in extras:
          config["verify_ssl"] = extras["verify_ssl"]  # optional
  
      if "timeout" in extras:
          config["timeout"] = extras["timeout"]  # optional
  
      return config
  
imports: from __future__ import annotations
  import json
  import time
  from enum import Enum
  from typing import TYPE_CHECKING
  from looker_sdk.rtl import api_settings, auth_session, requests_transport, serialize
  from looker_sdk.sdk.api40 import methods
  from packaging.version import parse
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.version import version
label_desc: Use image node_id 2 for calling the LookerApiSettings obj's underlying member method code with example usage: obj.read_config() and returns: config