public static class NexmoClient.Builder extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
NexmoClient.Builder |
apiKey(java.lang.String apiKey)
When setting an apiKey, it is also expected that
apiSecret(String) and/or signatureSecret(String) will also be set. |
NexmoClient.Builder |
apiSecret(java.lang.String apiSecret)
When setting an apiSecret, it is also expected that
apiKey(String) will also be set. |
NexmoClient.Builder |
applicationId(java.lang.String applicationId)
When setting an applicationId, it is also expected that the
privateKeyContents will also be set. |
NexmoClient |
build() |
NexmoClient.Builder |
httpClient(org.apache.http.client.HttpClient httpClient) |
NexmoClient.Builder |
httpConfig(HttpConfig httpConfig) |
NexmoClient.Builder |
privateKeyContents(byte[] privateKeyContents)
When setting the contents of your private key, it is also expected that
applicationId(String) will
also be set. |
NexmoClient.Builder |
privateKeyContents(java.lang.String privateKeyContents)
When setting the contents of your private key, it is also expected that
applicationId(String) will
also be set. |
NexmoClient.Builder |
privateKeyPath(java.nio.file.Path privateKeyPath)
When setting the path of your private key, it is also expected that
applicationId(String) will also
be set. |
NexmoClient.Builder |
privateKeyPath(java.lang.String privateKeyPath)
When setting the path of your private key, it is also expected that
applicationId(String) will also
be set. |
NexmoClient.Builder |
signatureSecret(java.lang.String signatureSecret)
When setting a signatureSecret, it is also expected that
apiKey(String) will also be set. |
public Builder()
public NexmoClient.Builder httpConfig(HttpConfig httpConfig)
httpConfig - Configuration options for the HttpWrapperNexmoClient.Builder to keep building.public NexmoClient.Builder httpClient(org.apache.http.client.HttpClient httpClient)
httpClient - Custom implementation of HttpClient.NexmoClient.Builder to keep building.public NexmoClient.Builder applicationId(java.lang.String applicationId)
privateKeyContents will also be set.applicationId - Used to identify each application.NexmoClient.Builder to keep building.public NexmoClient.Builder apiKey(java.lang.String apiKey)
apiSecret(String) and/or signatureSecret(String) will also be set.apiKey - The API Key found in the dashboard for your account.NexmoClient.Builder to keep building.public NexmoClient.Builder apiSecret(java.lang.String apiSecret)
apiKey(String) will also be set.apiSecret - The API Secret found in the dashboard for your account.NexmoClient.Builder to keep building.public NexmoClient.Builder signatureSecret(java.lang.String signatureSecret)
apiKey(String) will also be set.signatureSecret - The Signature Secret found in the dashboard for your account.NexmoClient.Builder to keep building.public NexmoClient.Builder privateKeyContents(byte[] privateKeyContents)
applicationId(String) will
also be set.privateKeyContents - The contents of your private key used for JWT generation.NexmoClient.Builder to keep building.public NexmoClient.Builder privateKeyContents(java.lang.String privateKeyContents)
applicationId(String) will
also be set.privateKeyContents - The contents of your private key used for JWT generation.NexmoClient.Builder to keep building.public NexmoClient.Builder privateKeyPath(java.nio.file.Path privateKeyPath) throws NexmoUnableToReadPrivateKeyException
applicationId(String) will also
be set.privateKeyPath - The path to your private key used for JWT generation.NexmoClient.Builder to keep building.NexmoUnableToReadPrivateKeyException - if the private key could not be read from the file system.public NexmoClient.Builder privateKeyPath(java.lang.String privateKeyPath) throws NexmoUnableToReadPrivateKeyException
applicationId(String) will also
be set.privateKeyPath - The path to your private key used for JWT generation.NexmoClient.Builder to keep building.NexmoUnableToReadPrivateKeyException - if the private key could not be read from the file system.public NexmoClient build()
NexmoClient from the stored builder options.NexmoClientCreationException - if credentials aren't provided in a valid pairing or there were issues
generating an JWTAuthMethod with the provided credentials.