public class LanguageTranslator extends WatsonService
defaultHeaders, JSON_MIME_PATTERN, JSON_PATCH_MIME_PATTERN, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
LanguageTranslator(java.lang.String versionDate)
Instantiates a new `LanguageTranslator`.
|
LanguageTranslator(java.lang.String versionDate,
IamOptions iamOptions)
Instantiates a new `LanguageTranslator` with IAM.
|
LanguageTranslator(java.lang.String versionDate,
java.lang.String username,
java.lang.String password)
Instantiates a new `LanguageTranslator` with username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<TranslationModel> |
createModel(CreateModelOptions createModelOptions)
Create model.
|
ServiceCall<java.lang.Void> |
deleteModel(DeleteModelOptions deleteModelOptions)
Delete model.
|
ServiceCall<TranslationModel> |
getModel(GetModelOptions getModelOptions)
Get model details.
|
ServiceCall<IdentifiedLanguages> |
identify(IdentifyOptions identifyOptions)
Identify language.
|
ServiceCall<IdentifiableLanguages> |
listIdentifiableLanguages()
List identifiable languages.
|
ServiceCall<IdentifiableLanguages> |
listIdentifiableLanguages(ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions)
List identifiable languages.
|
ServiceCall<TranslationModels> |
listModels()
List models.
|
ServiceCall<TranslationModels> |
listModels(ListModelsOptions listModelsOptions)
List models.
|
ServiceCall<TranslationResult> |
translate(TranslateOptions translateOptions)
Translate.
|
configureClient, configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isJsonMimeType, isJsonPatchMimeType, isTokenManagerSet, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, toString
public LanguageTranslator(java.lang.String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public LanguageTranslator(java.lang.String versionDate, java.lang.String username, java.lang.String password)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.username
- the usernamepassword
- the passwordpublic LanguageTranslator(java.lang.String versionDate, IamOptions iamOptions)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.iamOptions
- the options for authenticating through IAMpublic ServiceCall<TranslationResult> translate(TranslateOptions translateOptions)
translateOptions
- the TranslateOptions
containing the options for the callServiceCall
with a response type of TranslationResult
public ServiceCall<IdentifiedLanguages> identify(IdentifyOptions identifyOptions)
identifyOptions
- the IdentifyOptions
containing the options for the callServiceCall
with a response type of IdentifiedLanguages
public ServiceCall<IdentifiableLanguages> listIdentifiableLanguages(ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions)
listIdentifiableLanguagesOptions
- the ListIdentifiableLanguagesOptions
containing the options for the
callServiceCall
with a response type of IdentifiableLanguages
public ServiceCall<IdentifiableLanguages> listIdentifiableLanguages()
ServiceCall
with a response type of IdentifiableLanguages
public ServiceCall<TranslationModel> createModel(CreateModelOptions createModelOptions)
createModelOptions
- the CreateModelOptions
containing the options for the callServiceCall
with a response type of TranslationModel
public ServiceCall<java.lang.Void> deleteModel(DeleteModelOptions deleteModelOptions)
deleteModelOptions
- the DeleteModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<TranslationModel> getModel(GetModelOptions getModelOptions)
getModelOptions
- the GetModelOptions
containing the options for the callServiceCall
with a response type of TranslationModel
public ServiceCall<TranslationModels> listModels(ListModelsOptions listModelsOptions)
listModelsOptions
- the ListModelsOptions
containing the options for the callServiceCall
with a response type of TranslationModels
public ServiceCall<TranslationModels> listModels()
ServiceCall
with a response type of TranslationModels