public class VisualRecognition extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
VisualRecognition(java.lang.String versionDate)
Instantiates a new `VisualRecognition`.
|
VisualRecognition(java.lang.String versionDate,
IamOptions iamOptions)
Instantiates a new `VisualRecognition` with IAM.
|
VisualRecognition(java.lang.String versionDate,
java.lang.String apiKey)
Instantiates a new `VisualRecognition` with API Key.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<ClassifiedImages> |
classify()
Classify images.
|
ServiceCall<ClassifiedImages> |
classify(ClassifyOptions classifyOptions)
Classify images.
|
ServiceCall<Classifier> |
createClassifier(CreateClassifierOptions createClassifierOptions)
Create a classifier.
|
ServiceCall<java.lang.Void> |
deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
Delete a classifier.
|
ServiceCall<java.lang.Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
ServiceCall<DetectedFaces> |
detectFaces(DetectFacesOptions detectFacesOptions)
Detect faces in images.
|
ServiceCall<Classifier> |
getClassifier(GetClassifierOptions getClassifierOptions)
Retrieve classifier details.
|
ServiceCall<java.io.InputStream> |
getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions)
Retrieve a Core ML model of a classifier.
|
ServiceCall<Classifiers> |
listClassifiers()
Retrieve a list of classifiers.
|
ServiceCall<Classifiers> |
listClassifiers(ListClassifiersOptions listClassifiersOptions)
Retrieve a list of classifiers.
|
protected void |
setAuthentication(okhttp3.Request.Builder builder)
Sets the authentication.
|
ServiceCall<Classifier> |
updateClassifier(UpdateClassifierOptions updateClassifierOptions)
Update a classifier.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isTokenManagerSet, processServiceCall, setApiKey, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, toString
public VisualRecognition(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 VisualRecognition(java.lang.String versionDate, java.lang.String apiKey)
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.apiKey
- the API Keypublic VisualRecognition(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 IAMprotected void setAuthentication(okhttp3.Request.Builder builder)
WatsonService
setAuthentication
in class WatsonService
builder
- the new authenticationpublic ServiceCall<ClassifiedImages> classify(ClassifyOptions classifyOptions)
classifyOptions
- the ClassifyOptions
containing the options for the callServiceCall
with a response type of ClassifiedImages
public ServiceCall<ClassifiedImages> classify()
ServiceCall
with a response type of ClassifiedImages
public ServiceCall<DetectedFaces> detectFaces(DetectFacesOptions detectFacesOptions)
detectFacesOptions
- the DetectFacesOptions
containing the options for the callServiceCall
with a response type of DetectedFaces
public ServiceCall<Classifier> createClassifier(CreateClassifierOptions createClassifierOptions)
createClassifierOptions
- the CreateClassifierOptions
containing the options for the callServiceCall
with a response type of Classifier
public ServiceCall<java.lang.Void> deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
deleteClassifierOptions
- the DeleteClassifierOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions)
getClassifierOptions
- the GetClassifierOptions
containing the options for the callServiceCall
with a response type of Classifier
public ServiceCall<Classifiers> listClassifiers(ListClassifiersOptions listClassifiersOptions)
listClassifiersOptions
- the ListClassifiersOptions
containing the options for the callServiceCall
with a response type of Classifiers
public ServiceCall<Classifiers> listClassifiers()
ServiceCall
with a response type of Classifiers
public ServiceCall<Classifier> updateClassifier(UpdateClassifierOptions updateClassifierOptions)
updateClassifierOptions
- the UpdateClassifierOptions
containing the options for the callServiceCall
with a response type of Classifier
public ServiceCall<java.io.InputStream> getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions)
getCoreMlModelOptions
- the GetCoreMlModelOptions
containing the options for the callServiceCall
with a response type of InputStream
public ServiceCall<java.lang.Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
deleteUserDataOptions
- the DeleteUserDataOptions
containing the options for the callServiceCall
with a response type of Void