code
stringlengths
73
34.1k
label
stringclasses
1 value
protected JestClient createJestClient(Map<String, String> config, String indexName, String defaultIndexName) { String host = config.get("client.host"); //$NON-NLS-1$ String port = config.get("client.port"); //$NON-NLS-1$ String protocol = config.get("client.protocol"); //$NON-NLS-1$ Stri...
java
protected void updateHttpConfig(Builder httpClientConfig, Map<String, String> config) { String username = config.get("client.username"); //$NON-NLS-1$ String password = config.get("client.password"); //$NON-NLS-1$ String timeout = config.get("client.timeout"); //$NON-NLS-1$ if (StringUti...
java
private void orderPolicies(PoliciesBean policies) { int idx = 1; for (PolicyBean policy : policies.getPolicies()) { policy.setOrderIndex(idx++); } }
java
private Map<String, Object> getEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Get.Builder(getIndexName(), id).type(type).build()); if (!response.isSucceeded()) { return null; } return respo...
java
private List<Hit<Map<String, Object>, Void>> listEntities(String type, SearchSourceBuilder searchSourceBuilder) throws StorageException { try { String query = searchSourceBuilder.string(); Search search = new Search.Builder(query).addIndex(getIndexName()).addType(type).build(...
java
private void deleteEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Delete.Builder(id).index(getIndexName()).type(type).build()); if (!response.isSucceeded()) { throw new StorageException("Document could not be dele...
java
private void updateEntity(String type, String id, XContentBuilder source) throws StorageException { try { String doc = source.string(); /* JestResult response = */esClient.execute(new Index.Builder(doc) .setParameter(Parameters.OP_TYPE, "index").index(getIndexName())....
java
private static String getPoliciesDocType(PolicyType type) { String docType = "planPolicies"; //$NON-NLS-1$ if (type == PolicyType.Api) { docType = "apiPolicies"; //$NON-NLS-1$ } else if (type == PolicyType.Client) { docType = "clientPolicies"; //$NON-NLS-1$ } ...
java
private static String id(String organizationId, String entityId, String version) { return organizationId + ':' + entityId + ':' + version; }
java
private <T> Iterator<T> getAll(String entityType, IUnmarshaller<T> unmarshaller) throws StorageException { String query = matchAllQuery(); return getAll(entityType, unmarshaller, query); }
java
private boolean hasOriginHeader(HttpServletRequest httpReq) { String origin = httpReq.getHeader("Origin"); //$NON-NLS-1$ return origin != null && origin.trim().length() > 0; }
java
public static AuthHandler getAuth(Vertx vertx, Router router, VertxEngineConfig apimanConfig) { String type = apimanConfig.getAuth().getString("type", "NONE"); JsonObject authConfig = apimanConfig.getAuth().getJsonObject("config", new JsonObject()); switch(AuthType.getType(type)) { case...
java
public Session createSession() throws OpenViduJavaClientException, OpenViduHttpException { Session s = new Session(); OpenVidu.activeSessions.put(s.getSessionId(), s); return s; }
java
public Recording getRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS + "/" + recordingId); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e) {...
java
@SuppressWarnings("unchecked") public List<Recording> listRecordings() throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e)...
java
public void createSession(Session sessionNotActive, KurentoClientSessionInfo kcSessionInfo) throws OpenViduException { String sessionId = kcSessionInfo.getRoomName(); KurentoSession session = (KurentoSession) sessions.get(sessionId); if (session != null) { throw new OpenViduException(Code.ROOM_CANNOT_BE_CRE...
java
protected void unregisterElementErrListener(MediaElement element, final ListenerSubscription subscription) { if (element == null || subscription == null) { return; } element.removeErrorListener(subscription); }
java
public Set<Participant> getParticipants(String sessionId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Set<Participant> participants = session.getParticipant...
java
public Participant getParticipant(String sessionId, String participantPrivateId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Participant participant = sessi...
java
public Participant getParticipant(String participantPrivateId) throws OpenViduException { for (Session session : sessions.values()) { if (!session.isClosed()) { if (session.getParticipantByPrivateId(participantPrivateId) != null) { return session.getParticipantByPrivateId(participantPrivateId); } }...
java
protected void updateRecordingManagerCollections(Session session, Recording recording) { this.recordingManager.sessionHandler.setRecordingStarted(session.getSessionId(), recording); this.recordingManager.sessionsRecordings.put(session.getSessionId(), recording); this.recordingManager.startingRecordings.remove(rec...
java
protected void sendRecordingStartedNotification(Session session, Recording recording) { this.recordingManager.getSessionEventsHandler().sendRecordingStartedNotification(session, recording); }
java
public Notification getNotification() { try { Notification notif = notifications.take(); log.debug("Dequeued notification {}", notif); return notif; } catch (InterruptedException e) { log.info("Interrupted while polling notifications' queue"); return null; } }
java
public ServiceCall<SessionResponse> createSession(CreateSessionOptions createSessionOptions) { Validator.notNull(createSessionOptions, "createSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { createSessionOptions.assistantId() }; Reques...
java
public ServiceCall<Void> deleteSession(DeleteSessionOptions deleteSessionOptions) { Validator.notNull(deleteSessionOptions, "deleteSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { deleteSessionOptions.assistantId(), deleteSessionOptions.se...
java
public ServiceCall<MessageResponse> message(MessageOptions messageOptions) { Validator.notNull(messageOptions, "messageOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions", "message" }; String[] pathParameters = { messageOptions.assistantId(), messageOptions.sessionId() }; Req...
java
public ServiceCall<IdentifiedLanguages> identify(IdentifyOptions identifyOptions) { Validator.notNull(identifyOptions, "identifyOptions cannot be null"); String[] pathSegments = { "v3/identify" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
java
public ServiceCall<IdentifiableLanguages> listIdentifiableLanguages( ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions) { String[] pathSegments = { "v3/identifiable_languages" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
java
public ServiceCall<TranslationModel> createModel(CreateModelOptions createModelOptions) { Validator.notNull(createModelOptions, "createModelOptions cannot be null"); Validator.isTrue((createModelOptions.forcedGlossary() != null) || (createModelOptions.parallelCorpus() != null), "At least one of forcedGl...
java
public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions) { Validator.notNull(convertToHtmlOptions, "convertToHtmlOptions cannot be null"); String[] pathSegments = { "v1/html_conversion" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint...
java
public ServiceCall<CompareReturn> compareDocuments(CompareDocumentsOptions compareDocumentsOptions) { Validator.notNull(compareDocumentsOptions, "compareDocumentsOptions cannot be null"); String[] pathSegments = { "v1/comparison" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUr...
java
public ServiceCall<FeedbackReturn> addFeedback(AddFeedbackOptions addFeedbackOptions) { Validator.notNull(addFeedbackOptions, "addFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegme...
java
public ServiceCall<Void> deleteFeedback(DeleteFeedbackOptions deleteFeedbackOptions) { Validator.notNull(deleteFeedbackOptions, "deleteFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { deleteFeedbackOptions.feedbackId() }; RequestBuilder builder = R...
java
public ServiceCall<GetFeedback> getFeedback(GetFeedbackOptions getFeedbackOptions) { Validator.notNull(getFeedbackOptions, "getFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { getFeedbackOptions.feedbackId() }; RequestBuilder builder = RequestBuild...
java
public ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOptions) { Validator.notNull(createBatchOptions, "createBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)...
java
public ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions) { Validator.notNull(getBatchOptions, "getBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { getBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder....
java
public ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions) { String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("version", versionDate); Map<String, String> sdkHeaders = Sd...
java
public ServiceCall<BatchStatus> updateBatch(UpdateBatchOptions updateBatchOptions) { Validator.notNull(updateBatchOptions, "updateBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { updateBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.p...
java
public ServiceCall<Voice> getVoice(GetVoiceOptions getVoiceOptions) { Validator.notNull(getVoiceOptions, "getVoiceOptions cannot be null"); String[] pathSegments = { "v1/voices" }; String[] pathParameters = { getVoiceOptions.voice() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.construct...
java
public ServiceCall<Voices> listVoices(ListVoicesOptions listVoicesOptions) { String[] pathSegments = { "v1/voices" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("text_to_speech", "v1", "l...
java
public ServiceCall<InputStream> synthesize(SynthesizeOptions synthesizeOptions) { Validator.notNull(synthesizeOptions, "synthesizeOptions cannot be null"); String[] pathSegments = { "v1/synthesize" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));...
java
public ServiceCall<Pronunciation> getPronunciation(GetPronunciationOptions getPronunciationOptions) { Validator.notNull(getPronunciationOptions, "getPronunciationOptions cannot be null"); String[] pathSegments = { "v1/pronunciation" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttp...
java
public ServiceCall<VoiceModel> createVoiceModel(CreateVoiceModelOptions createVoiceModelOptions) { Validator.notNull(createVoiceModelOptions, "createVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpU...
java
public ServiceCall<VoiceModel> getVoiceModel(GetVoiceModelOptions getVoiceModelOptions) { Validator.notNull(getVoiceModelOptions, "getVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { getVoiceModelOptions.customizationId() }; RequestBuilder ...
java
public ServiceCall<VoiceModels> listVoiceModels(ListVoiceModelsOptions listVoiceModelsOptions) { String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeader...
java
public ServiceCall<Void> updateVoiceModel(UpdateVoiceModelOptions updateVoiceModelOptions) { Validator.notNull(updateVoiceModelOptions, "updateVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { updateVoiceModelOptions.customizationId() }; Req...
java
public ServiceCall<Void> addWords(AddWordsOptions addWordsOptions) { Validator.notNull(addWordsOptions, "addWordsOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { addWordsOptions.customizationId() }; RequestBuilder builder = RequestBuilder.po...
java
public ServiceCall<Void> deleteWord(DeleteWordOptions deleteWordOptions) { Validator.notNull(deleteWordOptions, "deleteWordOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { deleteWordOptions.customizationId(), deleteWordOptions.word() }; Requ...
java
public ServiceCall<Translation> getWord(GetWordOptions getWordOptions) { Validator.notNull(getWordOptions, "getWordOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { getWordOptions.customizationId(), getWordOptions.word() }; RequestBuilder bui...
java
public ServiceCall<Words> listWords(ListWordsOptions listWordsOptions) { Validator.notNull(listWordsOptions, "listWordsOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { listWordsOptions.customizationId() }; RequestBuilder builder = RequestBui...
java
public ServiceCall<Classification> classify(ClassifyOptions classifyOptions) { Validator.notNull(classifyOptions, "classifyOptions cannot be null"); String[] pathSegments = { "v1/classifiers", "classify" }; String[] pathParameters = { classifyOptions.classifierId() }; RequestBuilder builder = RequestBui...
java
public ServiceCall<ClassificationCollection> classifyCollection(ClassifyCollectionOptions classifyCollectionOptions) { Validator.notNull(classifyCollectionOptions, "classifyCollectionOptions cannot be null"); String[] pathSegments = { "v1/classifiers", "classify_collection" }; String[] pathParameters = { cl...
java
public ServiceCall<Classifier> createClassifier(CreateClassifierOptions createClassifierOptions) { Validator.notNull(createClassifierOptions, "createClassifierOptions cannot be null"); String[] pathSegments = { "v1/classifiers" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(...
java
private static void writeInt(int value, byte[] array, int offset) { for (int i = 0; i < 4; i++) { array[offset + i] = (byte) (value >>> (8 * i)); } }
java
public static String getMediaTypeFromFile(final File file) { if (file == null) { return null; } final String fileName = file.getName(); final int i = fileName.lastIndexOf('.'); if (i == -1) { return null; } return MEDIA_TYPES.get(fileName.substring(i).toLowerCase()); }
java
public static boolean isValidMediaType(final String mediaType) { return (mediaType != null) && MEDIA_TYPES.values().contains(mediaType.toLowerCase()); }
java
@SuppressWarnings("unchecked") private static void updateEmotionTone(Map<String, Object> user, List<ToneScore> emotionTone, boolean maintainHistory) { Double maxScore = 0.0; String primaryEmotion = null; Double primaryEmotionScore = null; for (ToneScore tone : emotionTone) { if (tone.get...
java
@SuppressWarnings("unchecked") private static void updateLanguageTone(Map<String, Object> user, List<ToneScore> languageTone, boolean maintainHistory) { List<String> currentLanguage = new ArrayList<String>(); Map<String, Object> currentLanguageObject = new HashMap<String, Object>(); // Process eac...
java
@SuppressWarnings("unchecked") public static void updateSocialTone(Map<String, Object> user, List<ToneScore> socialTone, boolean maintainHistory) { List<String> currentSocial = new ArrayList<String>(); Map<String, Object> currentSocialObject = new HashMap<String, Object>(); for (ToneScore tone : socialT...
java
public ServiceCall<ClassifiedImages> classify(ClassifyOptions classifyOptions) { Validator.notNull(classifyOptions, "classifyOptions cannot be null"); Validator.isTrue((classifyOptions.imagesFile() != null) || (classifyOptions.url() != null) || (classifyOptions .threshold() != null) || (classifyOptions....
java
public ServiceCall<DetectedFaces> detectFaces(DetectFacesOptions detectFacesOptions) { Validator.notNull(detectFacesOptions, "detectFacesOptions cannot be null"); Validator.isTrue((detectFacesOptions.imagesFile() != null) || (detectFacesOptions.url() != null), "At least one of imagesFile or url must be ...
java
public ServiceCall<Void> deleteClassifier(DeleteClassifierOptions deleteClassifierOptions) { Validator.notNull(deleteClassifierOptions, "deleteClassifierOptions cannot be null"); String[] pathSegments = { "v3/classifiers" }; String[] pathParameters = { deleteClassifierOptions.classifierId() }; RequestBu...
java
public ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions) { Validator.notNull(getClassifierOptions, "getClassifierOptions cannot be null"); String[] pathSegments = { "v3/classifiers" }; String[] pathParameters = { getClassifierOptions.classifierId() }; RequestBuilder builde...
java
public ServiceCall<Classifiers> listClassifiers(ListClassifiersOptions listClassifiersOptions) { String[] pathSegments = { "v3/classifiers" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("version", versionDate); Map<String, Str...
java
public ServiceCall<Classifier> updateClassifier(UpdateClassifierOptions updateClassifierOptions) { Validator.notNull(updateClassifierOptions, "updateClassifierOptions cannot be null"); Validator.isTrue((updateClassifierOptions.positiveExamples() != null) || (updateClassifierOptions .negativeExamples() !...
java
public ServiceCall<InputStream> getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions) { Validator.notNull(getCoreMlModelOptions, "getCoreMlModelOptions cannot be null"); String[] pathSegments = { "v3/classifiers", "core_ml_model" }; String[] pathParameters = { getCoreMlModelOptions.classifierId() }; ...
java
public ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions) { Validator.notNull(deleteUserDataOptions, "deleteUserDataOptions cannot be null"); String[] pathSegments = { "v3/user_data" }; RequestBuilder builder = RequestBuilder.delete(RequestBuilder.constructHttpUrl(getEndPoint(), p...
java
private static void writeToFile(InputStream in, File file) { try { OutputStream out = new FileOutputStream(file); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } out.close(); in.close(); } catch (Exception e) { ...
java
public ServiceCall<AnalysisResults> analyze(AnalyzeOptions analyzeOptions) { Validator.notNull(analyzeOptions, "analyzeOptions cannot be null"); String[] pathSegments = { "v1/analyze" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.q...
java
private String buildStopMessage() { JsonObject stopMessage = new JsonObject(); stopMessage.addProperty(ACTION, STOP); return stopMessage.toString(); }
java
private void parseArray(JsonReader in, HashMap<String, Object> objMap, String name) throws IOException { List<HashMap<String, Object>> array = new ArrayList<>(); in.beginArray(); while (in.peek() != JsonToken.END_ARRAY) { HashMap<String, Object> arrayItem = new HashMap<>(); parseNext(in, arrayI...
java
private void parseObject(JsonReader in, HashMap<String, Object> objMap, String name) throws IOException { HashMap<String, Object> innerObject = new HashMap<>(); in.beginObject(); while (in.peek() != JsonToken.END_OBJECT) { parseNext(in, innerObject); } in.endObject(); objMap.put(name, in...
java
private void collapseMap(HashMap<String, Object> objMap) { while (objMap.keySet().size() == 1 && objMap.keySet().contains("")) { HashMap<String, Object> innerMap = (HashMap<String, Object>) objMap.get(""); objMap.clear(); objMap.putAll(innerMap); } }
java
public ServiceCall<Profile> profile(ProfileOptions profileOptions) { Validator.notNull(profileOptions, "profileOptions cannot be null"); String[] pathSegments = { "v3/profile" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("ve...
java
private void sendInputStream(InputStream inputStream) { byte[] buffer = new byte[ONE_KB]; int read; try { // This method uses a blocking while loop to receive all contents of the underlying input stream. // AudioInputStreams, typically used for streaming microphone inputs return 0 only when the ...
java
public ServiceCall<Environment> createEnvironment(CreateEnvironmentOptions createEnvironmentOptions) { Validator.notNull(createEnvironmentOptions, "createEnvironmentOptions cannot be null"); String[] pathSegments = { "v1/environments" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructH...
java
public ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironmentOptions) { Validator.notNull(getEnvironmentOptions, "getEnvironmentOptions cannot be null"); String[] pathSegments = { "v1/environments" }; String[] pathParameters = { getEnvironmentOptions.environmentId() }; RequestBuild...
java
public ServiceCall<ListEnvironmentsResponse> listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions) { String[] pathSegments = { "v1/environments" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("version", versionDate); ...
java
public ServiceCall<ListCollectionFieldsResponse> listFields(ListFieldsOptions listFieldsOptions) { Validator.notNull(listFieldsOptions, "listFieldsOptions cannot be null"); String[] pathSegments = { "v1/environments", "fields" }; String[] pathParameters = { listFieldsOptions.environmentId() }; RequestBu...
java
public ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions) { Validator.notNull(getConfigurationOptions, "getConfigurationOptions cannot be null"); String[] pathSegments = { "v1/environments", "configurations" }; String[] pathParameters = { getConfigurationOptions.env...
java
public ServiceCall<ListConfigurationsResponse> listConfigurations( ListConfigurationsOptions listConfigurationsOptions) { Validator.notNull(listConfigurationsOptions, "listConfigurationsOptions cannot be null"); String[] pathSegments = { "v1/environments", "configurations" }; String[] pathParameters =...
java
public ServiceCall<Configuration> updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions) { Validator.notNull(updateConfigurationOptions, "updateConfigurationOptions cannot be null"); String[] pathSegments = { "v1/environments", "configurations" }; String[] pathParameters = { updateConfig...
java
public ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions) { Validator.notNull(createCollectionOptions, "createCollectionOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections" }; String[] pathParameters = { createCollectionOptions.environme...
java
public ServiceCall<Collection> getCollection(GetCollectionOptions getCollectionOptions) { Validator.notNull(getCollectionOptions, "getCollectionOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections" }; String[] pathParameters = { getCollectionOptions.environmentId(), getCollect...
java
public ServiceCall<ListCollectionFieldsResponse> listCollectionFields( ListCollectionFieldsOptions listCollectionFieldsOptions) { Validator.notNull(listCollectionFieldsOptions, "listCollectionFieldsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "fields" }; String...
java
public ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions) { Validator.notNull(listCollectionsOptions, "listCollectionsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections" }; String[] pathParameters = { listCollectionsOptions.en...
java
public ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions) { Validator.notNull(updateCollectionOptions, "updateCollectionOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections" }; String[] pathParameters = { updateCollectionOptions.environme...
java
public ServiceCall<Expansions> createExpansions(CreateExpansionsOptions createExpansionsOptions) { Validator.notNull(createExpansionsOptions, "createExpansionsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "expansions" }; String[] pathParameters = { createExpansionsOpt...
java
public ServiceCall<TokenDictStatusResponse> createStopwordList(CreateStopwordListOptions createStopwordListOptions) { Validator.notNull(createStopwordListOptions, "createStopwordListOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "word_lists/stopwords" }; String[] pathP...
java
public ServiceCall<TokenDictStatusResponse> createTokenizationDictionary( CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions) { Validator.notNull(createTokenizationDictionaryOptions, "createTokenizationDictionaryOptions cannot be null"); String[] pathSegments = { "v1/environments", "c...
java
public ServiceCall<Void> deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions) { Validator.notNull(deleteExpansionsOptions, "deleteExpansionsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "expansions" }; String[] pathParameters = { deleteExpansionsOptions.e...
java
public ServiceCall<TokenDictStatusResponse> getTokenizationDictionaryStatus( GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions) { Validator.notNull(getTokenizationDictionaryStatusOptions, "getTokenizationDictionaryStatusOptions cannot be null"); String[] pathSegments = { "v1/en...
java
public ServiceCall<Expansions> listExpansions(ListExpansionsOptions listExpansionsOptions) { Validator.notNull(listExpansionsOptions, "listExpansionsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "expansions" }; String[] pathParameters = { listExpansionsOptions.environ...
java
public ServiceCall<DocumentStatus> getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions) { Validator.notNull(getDocumentStatusOptions, "getDocumentStatusOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "documents" }; String[] pathParameters = { getDocument...
java
public ServiceCall<QueryEntitiesResponse> queryEntities(QueryEntitiesOptions queryEntitiesOptions) { Validator.notNull(queryEntitiesOptions, "queryEntitiesOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "query_entities" }; String[] pathParameters = { queryEntitiesOption...
java
public ServiceCall<QueryRelationsResponse> queryRelations(QueryRelationsOptions queryRelationsOptions) { Validator.notNull(queryRelationsOptions, "queryRelationsOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "query_relations" }; String[] pathParameters = { queryRelatio...
java
public ServiceCall<TrainingQuery> addTrainingData(AddTrainingDataOptions addTrainingDataOptions) { Validator.notNull(addTrainingDataOptions, "addTrainingDataOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "training_data" }; String[] pathParameters = { addTrainingDataOpt...
java
public ServiceCall<TrainingExample> createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions) { Validator.notNull(createTrainingExampleOptions, "createTrainingExampleOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "training_data", "examples" }; St...
java
public ServiceCall<TrainingQuery> getTrainingData(GetTrainingDataOptions getTrainingDataOptions) { Validator.notNull(getTrainingDataOptions, "getTrainingDataOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "training_data" }; String[] pathParameters = { getTrainingDataOpt...
java
public ServiceCall<TrainingExample> getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions) { Validator.notNull(getTrainingExampleOptions, "getTrainingExampleOptions cannot be null"); String[] pathSegments = { "v1/environments", "collections", "training_data", "examples" }; String[] pathPara...
java