Package ai.spice
Class SpiceClientBuilder
java.lang.Object
ai.spice.SpiceClientBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates SpiceClient with provided parameters.withApiKey(String apiKey) Sets the client's Api Key.withFlightAddress(URI flightAddress) Sets the client's flight addressSets the client's flight address to default Spice Cloud address.
-
Method Details
-
withFlightAddress
Sets the client's flight address- Parameters:
flightAddress- The URI of the flight address- Returns:
- The current instance of SpiceClientBuilder for method chaining.
-
withApiKey
Sets the client's Api Key.- Parameters:
apiKey- The Spice Cloud api key- Returns:
- The current instance of SpiceClientBuilder for method chaining.
- Throws:
IllegalArgumentException- Thrown when the apiKey is in wrong format.
-
withSpiceCloud
Sets the client's flight address to default Spice Cloud address.- Returns:
- The current instance of SpiceClientBuilder for method chaining.
- Throws:
URISyntaxException- Thrown when the URI syntax is incorrect.
-
build
Creates SpiceClient with provided parameters.- Returns:
- The SpiceClient instance
-