- Enclosing interface:
TrainClient
public static interface TrainClient.Builder
A builder for configuring and creating
TrainClient instances.
Fluent, non-thread-safe builder. Call build() to obtain a configured client.
-
Method Summary
Modifier and TypeMethodDescriptionSets the API key used for authentication.build()Builds a configuredTrainClientinstance.Sets the API host used by the client.
-
Method Details
-
host
Sets the API host used by the client.- Parameters:
host- the host- Returns:
- this
TrainClient.Builderfor method chaining - Throws:
NullPointerException- ifhostisnull
-
apiKey
Sets the API key used for authentication.- Parameters:
apiKey- the API key- Returns:
- this
TrainClient.Builderfor method chaining - Throws:
NullPointerException- ifapiKeyisnull
-
build
TrainClient build()Builds a configuredTrainClientinstance.- Returns:
- a new
TrainClient
-