Class Config

java.lang.Object
glair.vision.api.Config

public class Config extends Object
The Config class provides configuration settings for the Glair Vision API.
  • Constructor Details

    • Config

      public Config(VisionSettings config)
      Constructs a Config instance based on the provided VisionSettings.
      Parameters:
      config - The VisionSettings to initialize the configuration.
  • Method Details

    • getApiKey

      public String getApiKey()
      Gets the API key associated with the configuration.
      Returns:
      The API key.
    • getUrl

      public String getUrl(String path)
      Constructs a full URL by combining the base URL and the given path.
      Parameters:
      path - The path to append to the base URL.
      Returns:
      The full URL.
    • getBasicAuth

      public String getBasicAuth()
      Gets the Basic Authentication string for HTTP requests.
      Returns:
      The Basic Authentication string.
    • getConfig

      public Config getConfig()
      Gets a reference to the current Config instance.
      Returns:
      The Config instance.
    • getConfig

      public Config getConfig(VisionSettings newConfig)
      Gets a new Config instance with updated settings based on the provided VisionSettings.
      Parameters:
      newConfig - The VisionSettings with updated settings.
      Returns:
      A new Config instance with the updated settings.
    • getSettings

      public VisionSettings getSettings()
      Gets the VisionSettings associated with the configuration.
      Returns:
      The VisionSettings.
    • toString

      public String toString()
      Returns a JSON representation of the configuration.
      Overrides:
      toString in class Object
      Returns:
      A JSON string representing the configuration settings.