public abstract static class NbmapSpeech.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract NbmapSpeech.Builder |
accessToken(java.lang.String accessToken)
Required to call when this is being built.
|
abstract NbmapSpeech.Builder |
baseUrl(java.lang.String baseUrl)
Optionally change the APIs base URL to something other then the default Nbmap one.
|
NbmapSpeech |
build()
This uses the provided parameters set using the
NbmapSpeech.Builder and first checks that all
values are valid, formats the values as strings for easier consumption by the API, and lastly
creates a new NbmapSpeech object with the values provided. |
abstract NbmapSpeech.Builder |
cache(okhttp3.Cache cache)
Adds an optional cache to set in the OkHttp client.
|
abstract NbmapSpeech.Builder |
instruction(java.lang.String instruction)
Add the instruction text to dictate, either as plain text or ssml.
|
abstract NbmapSpeech.Builder |
interceptor(okhttp3.Interceptor interceptor)
Adds an optional interceptor to set in the OkHttp client.
|
abstract NbmapSpeech.Builder |
language(java.lang.String language)
Language of which to request the instructions be spoken.
|
abstract NbmapSpeech.Builder |
networkInterceptor(okhttp3.Interceptor interceptor)
Adds an optional network interceptor to set in the OkHttp client.
|
abstract NbmapSpeech.Builder |
outputType(java.lang.String outputType)
Output format for spoken instructions.
|
abstract NbmapSpeech.Builder |
textType(java.lang.String textType)
Format which the input is specified.
|
public abstract NbmapSpeech.Builder language(java.lang.String language)
language - as a string, i.e., "en-us"public abstract NbmapSpeech.Builder textType(java.lang.String textType)
textType - either text or ssmlpublic abstract NbmapSpeech.Builder outputType(java.lang.String outputType)
outputType - either mp3 or jsonpublic abstract NbmapSpeech.Builder accessToken(@NonNull java.lang.String accessToken)
ServicesException will be thrown.accessToken - Nbmap access token, You must have a Nbmap account in order to use
the Optimization APIpublic abstract NbmapSpeech.Builder instruction(@NonNull java.lang.String instruction)
instruction - to dictatepublic abstract NbmapSpeech.Builder baseUrl(@NonNull java.lang.String baseUrl)
baseUrl - base url used as end pointpublic abstract NbmapSpeech.Builder cache(okhttp3.Cache cache)
cache - to set for OkHttppublic abstract NbmapSpeech.Builder interceptor(okhttp3.Interceptor interceptor)
interceptor - to set for OkHttppublic abstract NbmapSpeech.Builder networkInterceptor(okhttp3.Interceptor interceptor)
interceptor - to set for OkHttppublic NbmapSpeech build()
NbmapSpeech.Builder and first checks that all
values are valid, formats the values as strings for easier consumption by the API, and lastly
creates a new NbmapSpeech object with the values provided.com.nbmap.core.exceptions.ServicesException - when a provided parameter is detected to be incorrect