Search in sources :

Example 1 with GetTrainingDataOptions

use of com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingDataOptions in project java-sdk by watson-developer-cloud.

the class Discovery method getTrainingData.

/**
 * Shows details for a specific training data query, including the query string and all examples.
 *
 * @param getTrainingDataOptions the {@link GetTrainingDataOptions} containing the options for the call
 * @return a {@link ServiceCall} with a response type of {@link TrainingQuery}
 */
public ServiceCall<TrainingQuery> getTrainingData(GetTrainingDataOptions getTrainingDataOptions) {
    Validator.notNull(getTrainingDataOptions, "getTrainingDataOptions cannot be null");
    String[] pathSegments = { "v1/environments", "collections", "training_data" };
    String[] pathParameters = { getTrainingDataOptions.environmentId(), getTrainingDataOptions.collectionId(), getTrainingDataOptions.queryId() };
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments, pathParameters));
    builder.query(VERSION, versionDate);
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(TrainingQuery.class));
}
Also used : RequestBuilder(com.ibm.watson.developer_cloud.http.RequestBuilder) TrainingQuery(com.ibm.watson.developer_cloud.discovery.v1.model.TrainingQuery)

Aggregations

TrainingQuery (com.ibm.watson.developer_cloud.discovery.v1.model.TrainingQuery)1 RequestBuilder (com.ibm.watson.developer_cloud.http.RequestBuilder)1