NaturalLanguageUnderstanding extends BaseService { public ServiceCall<DeleteModelResults> deleteModel(DeleteModelOptions deleteModelOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull( deleteModelOptions, "deleteModelOptions cannot be null"); String[] pathSegments = {"v1/models"}; String[] pathParameters = {deleteModelOptions.modelId()}; RequestBuilder builder = RequestBuilder.delete( RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments, pathParameters)); builder.query("version", versionDate); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("natural-language-understanding", "v1", "deleteModel"); for (Entry<String, String> header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); ResponseConverter<DeleteModelResults> responseConverter = ResponseConverterUtils.getValue( new com.google.gson.reflect.TypeToken<DeleteModelResults>() {}.getType()); return createServiceCall(builder.build(), responseConverter); } NaturalLanguageUnderstanding(String versionDate);  NaturalLanguageUnderstanding(String versionDate, Authenticator authenticator);  NaturalLanguageUnderstanding(String versionDate, String serviceName);  NaturalLanguageUnderstanding(
      String versionDate, String serviceName, Authenticator authenticator); ServiceCall<AnalysisResults> analyze(AnalyzeOptions analyzeOptions); ServiceCall<ListModelsResults> listModels(ListModelsOptions listModelsOptions); ServiceCall<ListModelsResults> listModels(); ServiceCall<DeleteModelResults> deleteModel(DeleteModelOptions deleteModelOptions);  }
@Test public void testDeleteModel() throws InterruptedException { server.enqueue(jsonResponse(null)); DeleteModelOptions deleteOptions = new DeleteModelOptions.Builder(modelId).build(); service.deleteModel(deleteOptions).execute().getResult(); final RecordedRequest request = server.takeRequest(); assertEquals(DELETE_PATH, request.getPath()); assertEquals("DELETE", request.getMethod()); }
@Test(expected = IllegalArgumentException.class) public void testNullModelId() { service.deleteModel(null).execute(); }