Interface ChalkClient.Builder

All Known Implementing Classes:
BuilderImpl
Enclosing interface:
ChalkClient

public static interface ChalkClient.Builder
  • Method Details

    • withClientId

      ChalkClient.Builder withClientId(String clientId)
      Sets the client ID. Used for authentication.
    • withClientSecret

      ChalkClient.Builder withClientSecret(String clientSecret)
      Sets the client secret. Used for authentication.
    • withApiServer

      ChalkClient.Builder withApiServer(String apiServer)
      Sets the API server URL. Defaults to "https://api.chalk.ai".
    • withQueryServer

      ChalkClient.Builder withQueryServer(String queryServer)
      Chalk routes performance sensitive requests like online query directly to the query server that runs the engine. Populate this field if you would like to route these requests to a different query server than the one automatically resolved by Chalk.
    • withEnvironmentId

      ChalkClient.Builder withEnvironmentId(String environmentId)
      Sets the environment ID. This is the identifier that distinguishes between different environments in your Chalk project.
    • withBranch

      ChalkClient.Builder withBranch(String branch)
      Sets the branch name. This is the identifier that distinguishes between different branches of a particular environment.
    • withDeploymentTag

      ChalkClient.Builder withDeploymentTag(String deploymentTag)
      Sets the deployment Tag. This is the identifier that distinguishes between different tagged deployments in a particular environment.
    • withHttpClient

      ChalkClient.Builder withHttpClient(HttpClient httpClient)
      Sets the HTTP client. This is useful for setting custom timeouts, etc.
    • withGrpc

    • withTimeout

      ChalkClient.Builder withTimeout(Duration timeout)
      Sets the timeout for all requests. Defaults to no timeout. Timeout of 0 means the query times out immediately. Request level timeouts takes precedence over this timeout.
      Parameters:
      timeout - The timeout duration
    • withRootCa

      ChalkClient.Builder withRootCa(Path rootCa)
      Sets the root CA certificate file.
      Parameters:
      rootCa - The path to the root CA
    • getClientId

      String getClientId()
    • getClientSecret

      String getClientSecret()
    • getApiServer

      String getApiServer()
    • getEnvironmentId

      String getEnvironmentId()
    • getBranch

      String getBranch()
    • getDeploymentTag

      String getDeploymentTag()
    • getRootCa

      Path getRootCa()
    • getHttpClient

      HttpClient getHttpClient()
    • getTimeout

      Duration getTimeout()
    • build

      ChalkClient build() throws ChalkException
      Throws:
      ChalkException