public class LanguageTranslator extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
LanguageTranslator()
Instantiates a new `LanguageTranslator`.
|
LanguageTranslator(IamOptions iamOptions)
Instantiates a new `LanguageTranslator` with IAM.
|
LanguageTranslator(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.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isTokenManagerSet, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, toString
public LanguageTranslator()
public LanguageTranslator(java.lang.String username, java.lang.String password)
username
- the usernamepassword
- the passwordpublic LanguageTranslator(IamOptions iamOptions)
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