From 087e978ce6c29feb9b1d1899c1d1cf68996f1f3e Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Fri, 11 Oct 2024 14:17:37 -0500 Subject: [PATCH 01/12] docs(readme): update readmes --- MIGRATION-V11.md | 50 ------------------------------------------------ README.md | 22 ++++++++++----------- 2 files changed, 11 insertions(+), 61 deletions(-) delete mode 100644 MIGRATION-V11.md diff --git a/MIGRATION-V11.md b/MIGRATION-V11.md deleted file mode 100644 index 98c20bc3cb..0000000000 --- a/MIGRATION-V11.md +++ /dev/null @@ -1,50 +0,0 @@ -# v11.0.0 Migration Guide - -### Breaking changes by service - -#### Assistant v2 -- Model `MessageContext` property `skills` type changed to new `MessageContextSkills` -- Model `Environment` property `language` removed -- Model `EnvironmentReleaseReference` renamed to `BaseEnvironmentReleaseReference` -- Model `EnvironmentOrchestration` renamed to `BaseEnvironmentOrchestration` -- Model `SkillReference` renamed to `EnvironmentSkill` - -#### Discovery v2 -- Parameter `smartDocumentUnderstanding` removed from `CreateCollectionOptions` -- Model `QueryResponsePassage` and `QueryResultPassage` property `confidence` removed -- QueryAggregation models restructured - -#### Natural Language Understanding -- All `sentimentModel` functions removed - -#### Speech to Text -- `AR_AR_BROADBANDMODEL` model removed in favor of `AR_MS_BROADBANDMODEL` model - - -### New Features by Service - -#### Assistant v2 -- `createAssistant` function -- `listAssistants` function -- `deleteAssistant` function -- `updateEnvironment` function -- `createRelease` function -- `deleteRelease` function -- `getSkill` function -- `updateSkill` function -- `exportSkills` function -- `importSkills` function -- `importSkillsStatus` function -- Improved typing for `message` function call -See details of these functions on IBM's documentation site [here](https://cloud.ibm.com/apidocs/assistant-v2?code=node) - -#### Discovery v2 -- Aggregation types `QueryTopicAggregation` and `QueryTrendAggregation` added - -#### Speech to Text -- added `FR_CA_MULTIMEDIA`, `JA_JP_TELEPHONY`, `NL_NL_MULTIMEDIA`, `SV_SE_TELEPHONY` models - -#### Text to Speech -- added `EN_AU_HEIDIEXPRESSIVE`, `EN_AU_JACKEXPRESSIVE`, `EN_US_ALLISONEXPRESSIVE`, `EN_US_EMMAEXPRESSIVE`, `EN_US_LISAEXPRESSIVE`, `EN_US_MICHAELEXPRESSIVE`, `KO_KR_JINV3VOICE` -- Parameters `ratePercentage` and `pitchPercentage` added to `synthesize` function -See details of these new parameters on IBM's documentation site [here](https://cloud.ibm.com/apidocs/text-to-speech?code=node#synthesize) diff --git a/README.md b/README.md index 54df8eb7f3..68fe84f197 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ The file downloaded will be called `ibm-credentials.env`. This is the name the S As long as you set that up correctly, you don't have to worry about setting any authentication options in your code. So, for example, if you created and downloaded the credential file for your Discovery instance, you just need to do the following: ```java -Discovery service = new Discovery("2019-04-30"); +Discovery service = new Discovery("2023-03-31"); ``` And that's it! @@ -144,7 +144,7 @@ Builder pattern approach: Authenticator authenticator = new IamAuthenticator.Builder() .apikey("") .build(); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); ``` Deprecated constructor approach: @@ -152,7 +152,7 @@ Deprecated constructor approach: ```java // letting the SDK manage the IAM token Authenticator authenticator = new IamAuthenticator(""); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); ``` Supplying the access token: @@ -160,7 +160,7 @@ Supplying the access token: ```java // assuming control of managing IAM token Authenticator authenticator = new BearerTokenAuthenticator(""); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); ``` #### Username and password @@ -172,14 +172,14 @@ Authenticator authenticator = new BasicAuthenticator.Builder() .username("") .password("") .build(); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); ``` Deprecated constructor approach: ```java Authenticator authenticator = new BasicAuthenticator("", ""); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); ``` #### ICP @@ -187,7 +187,7 @@ Authenticating with ICP is similar to the basic username and password method, ex ```java Authenticator authenticator = new BasicAuthenticator("", ""); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); HttpConfigOptions options = new HttpConfigOptions.Builder() .disableSslVerification(true) @@ -210,7 +210,7 @@ Authenticator authenticator = new CloudPakForDataAuthenticator.Builder() .disableSSLVerification(true) .headers(null) .build(); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); service.setServiceUrl(""); ``` @@ -225,14 +225,14 @@ Authenticator authenticator = new CloudPakForDataAuthenticator( true, // disabling SSL verification null, ); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); service.setServiceUrl(""); ``` ```java // assuming control of managing the access token Authenticator authenticator = new BearerTokenAuthenticator(""); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); service.setServiceUrl(""); ``` @@ -288,7 +288,7 @@ Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxyHost", 8080 IamAuthenticator authenticator = new IamAuthenticator(apiKey); authenticator.setProxy(proxy); -Discovery service = new Discovery("2019-04-30", authenticator); +Discovery service = new Discovery("2023-03-31", authenticator); // setting configuration options HttpConfigOptions options = new HttpConfigOptions.Builder() From 552761226fa650f6ea5c228f4c29da9d1f429c5c Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 17 Oct 2024 10:55:36 -0500 Subject: [PATCH 02/12] feat(stt): readd interimResults and lowLatency wss params --- .../model/RecognizeWithWebsocketsOptions.java | 69 +++++++++++++++++++ .../speech_to_text/v1/SpeechToTextIT.java | 1 + 2 files changed, 70 insertions(+) diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeWithWebsocketsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeWithWebsocketsOptions.java index bcc2129eae..6d6f85a517 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeWithWebsocketsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeWithWebsocketsOptions.java @@ -201,7 +201,9 @@ public interface Model { protected Boolean splitTranscriptAtPhraseEnd; protected Float speechDetectorSensitivity; protected Float backgroundAudioSuppression; + protected Boolean lowLatency; protected Float characterInsertionBias; + private Boolean interimResults; private Boolean processingMetrics; private Float processingMetricsInterval; @@ -232,7 +234,9 @@ public static class Builder { private Boolean splitTranscriptAtPhraseEnd; private Float speechDetectorSensitivity; private Float backgroundAudioSuppression; + private Boolean lowLatency; private Float characterInsertionBias; + private Boolean interimResults; private Boolean processingMetrics; private Float processingMetricsInterval; @@ -262,7 +266,9 @@ private Builder(RecognizeWithWebsocketsOptions recognizeWithWebsocketsOptions) { this.splitTranscriptAtPhraseEnd = recognizeWithWebsocketsOptions.splitTranscriptAtPhraseEnd; this.speechDetectorSensitivity = recognizeWithWebsocketsOptions.speechDetectorSensitivity; this.backgroundAudioSuppression = recognizeWithWebsocketsOptions.backgroundAudioSuppression; + this.lowLatency = recognizeWithWebsocketsOptions.lowLatency; this.characterInsertionBias = recognizeWithWebsocketsOptions.characterInsertionBias; + this.interimResults = recognizeWithWebsocketsOptions.interimResults; this.processingMetrics = recognizeWithWebsocketsOptions.processingMetrics; this.processingMetricsInterval = recognizeWithWebsocketsOptions.processingMetricsInterval; } @@ -578,6 +584,17 @@ public Builder backgroundAudioSuppression(Float backgroundAudioSuppression) { return this; } + /** + * Set the lowLatency. + * + * @param lowLatency the lowLatency + * @return the RecognizeOptions builder + */ + public Builder lowLatency(Boolean lowLatency) { + this.lowLatency = lowLatency; + return this; + } + /** * Set the characterInsertionBias. * @@ -589,6 +606,19 @@ public Builder characterInsertionBias(Float characterInsertionBias) { return this; } + /** + * Set the interimResults. + * + *

NOTE: This parameter only works for the `recognizeUsingWebSocket` method. + * + * @param interimResults the interimResults + * @return the interimResults + */ + public Builder interimResults(Boolean interimResults) { + this.interimResults = interimResults; + return this; + } + /** * Set the audio. * @@ -655,7 +685,9 @@ protected RecognizeWithWebsocketsOptions(Builder builder) { splitTranscriptAtPhraseEnd = builder.splitTranscriptAtPhraseEnd; speechDetectorSensitivity = builder.speechDetectorSensitivity; backgroundAudioSuppression = builder.backgroundAudioSuppression; + lowLatency = builder.lowLatency; characterInsertionBias = builder.characterInsertionBias; + interimResults = builder.interimResults; processingMetrics = builder.processingMetrics; processingMetricsInterval = builder.processingMetricsInterval; } @@ -1091,6 +1123,28 @@ public Float backgroundAudioSuppression() { return backgroundAudioSuppression; } + /** + * Gets the lowLatency. + * + *

If `true` for next-generation `Multimedia` and `Telephony` models that support low latency, + * directs the service to produce results even more quickly than it usually does. Next-generation + * models produce transcription results faster than previous-generation models. The `low_latency` + * parameter causes the models to produce results even more quickly, though the results might be + * less accurate when the parameter is used. + * + *

The parameter is not available for previous-generation `Broadband` and `Narrowband` models. + * It is available for most next-generation models. * For a list of next-generation models that + * support low latency, see [Supported next-generation language + * models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported). + * * For more information about the `low_latency` parameter, see [Low + * latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency). + * + * @return the lowLatency + */ + public Boolean lowLatency() { + return lowLatency; + } + /** * Gets the characterInsertionBias. * @@ -1122,6 +1176,21 @@ public Float characterInsertionBias() { return characterInsertionBias; } + /** + * Gets the interimResults. + * + *

If `true`, the service returns interim results as a stream of `SpeechRecognitionResults` + * objects. By default, the service returns a single `SpeechRecognitionResults` object with final + * results only. + * + *

NOTE: This parameter only works for the `recognizeUsingWebSocket` method. + * + * @return the interimResults + */ + public Boolean interimResults() { + return interimResults; + } + /** * Gets the processingMetrics. * diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java index 076c7c42a7..56068190a6 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java @@ -347,6 +347,7 @@ public void testRecognizeWebSocket() throws FileNotFoundException, InterruptedEx .wordAlternativesThreshold(0.5f) .model(EN_BROADBAND16K) .contentType(HttpMediaType.AUDIO_WAV) + .interimResults(true) .processingMetrics(true) .processingMetricsInterval(0.2f) .audioMetrics(true) From fd8ad61f1d033d6945c3c7e916cc723be898fe66 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 17 Oct 2024 10:55:52 -0500 Subject: [PATCH 03/12] feat(stt): add new speech models --- .../v1/model/CreateAcousticModelOptions.java | 16 +++++++++++++++- .../v1/model/CreateJobOptions.java | 14 ++++++++++++++ .../v1/model/CreateLanguageModelOptions.java | 14 ++++++++++++++ .../speech_to_text/v1/model/GetModelOptions.java | 14 ++++++++++++++ .../v1/model/RecognizeOptions.java | 14 ++++++++++++++ 5 files changed, 71 insertions(+), 1 deletion(-) diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java index 501fdf6d25..2a1bd9a716 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -46,26 +46,38 @@ public interface BaseModelName { String EN_US_NARROWBANDMODEL = "en-US_NarrowbandModel"; /** en-US_ShortForm_NarrowbandModel. */ String EN_US_SHORTFORM_NARROWBANDMODEL = "en-US_ShortForm_NarrowbandModel"; + /** es-AR. */ + String ES_AR = "es-AR"; /** es-AR_BroadbandModel. */ String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel"; /** es-AR_NarrowbandModel. */ String ES_AR_NARROWBANDMODEL = "es-AR_NarrowbandModel"; + /** es-CL. */ + String ES_CL = "es-CL"; /** es-CL_BroadbandModel. */ String ES_CL_BROADBANDMODEL = "es-CL_BroadbandModel"; /** es-CL_NarrowbandModel. */ String ES_CL_NARROWBANDMODEL = "es-CL_NarrowbandModel"; + /** es-CO. */ + String ES_CO = "es-CO"; /** es-CO_BroadbandModel. */ String ES_CO_BROADBANDMODEL = "es-CO_BroadbandModel"; /** es-CO_NarrowbandModel. */ String ES_CO_NARROWBANDMODEL = "es-CO_NarrowbandModel"; + /** es-ES. */ + String ES_ES = "es-ES"; /** es-ES_BroadbandModel. */ String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel"; /** es-ES_NarrowbandModel. */ String ES_ES_NARROWBANDMODEL = "es-ES_NarrowbandModel"; + /** es-MX. */ + String ES_MX = "es-MX"; /** es-MX_BroadbandModel. */ String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel"; /** es-MX_NarrowbandModel. */ String ES_MX_NARROWBANDMODEL = "es-MX_NarrowbandModel"; + /** es-PE. */ + String ES_PE = "es-PE"; /** es-PE_BroadbandModel. */ String ES_PE_BROADBANDMODEL = "es-PE_BroadbandModel"; /** es-PE_NarrowbandModel. */ @@ -94,6 +106,8 @@ public interface BaseModelName { String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel"; /** nl-NL_NarrowbandModel. */ String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel"; + /** pt-BR. */ + String PT_BR = "pt-BR"; /** pt-BR_BroadbandModel. */ String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel"; /** pt-BR_NarrowbandModel. */ diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java index 17661b801d..15d4969436 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java @@ -89,18 +89,26 @@ public interface Model { String EN_US_TELEPHONY = "en-US_Telephony"; /** en-WW_Medical_Telephony. */ String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony"; + /** es-AR. */ + String ES_AR = "es-AR"; /** es-AR_BroadbandModel. */ String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel"; /** es-AR_NarrowbandModel. */ String ES_AR_NARROWBANDMODEL = "es-AR_NarrowbandModel"; + /** es-CL. */ + String ES_CL = "es-CL"; /** es-CL_BroadbandModel. */ String ES_CL_BROADBANDMODEL = "es-CL_BroadbandModel"; /** es-CL_NarrowbandModel. */ String ES_CL_NARROWBANDMODEL = "es-CL_NarrowbandModel"; + /** es-CO. */ + String ES_CO = "es-CO"; /** es-CO_BroadbandModel. */ String ES_CO_BROADBANDMODEL = "es-CO_BroadbandModel"; /** es-CO_NarrowbandModel. */ String ES_CO_NARROWBANDMODEL = "es-CO_NarrowbandModel"; + /** es-ES. */ + String ES_ES = "es-ES"; /** es-ES_BroadbandModel. */ String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel"; /** es-ES_NarrowbandModel. */ @@ -111,10 +119,14 @@ public interface Model { String ES_ES_TELEPHONY = "es-ES_Telephony"; /** es-LA_Telephony. */ String ES_LA_TELEPHONY = "es-LA_Telephony"; + /** es-MX. */ + String ES_MX = "es-MX"; /** es-MX_BroadbandModel. */ String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel"; /** es-MX_NarrowbandModel. */ String ES_MX_NARROWBANDMODEL = "es-MX_NarrowbandModel"; + /** es-PE. */ + String ES_PE = "es-PE"; /** es-PE_BroadbandModel. */ String ES_PE_BROADBANDMODEL = "es-PE_BroadbandModel"; /** es-PE_NarrowbandModel. */ @@ -177,6 +189,8 @@ public interface Model { String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel"; /** nl-NL_Telephony. */ String NL_NL_TELEPHONY = "nl-NL_Telephony"; + /** pt-BR. */ + String PT_BR = "pt-BR"; /** pt-BR_BroadbandModel. */ String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel"; /** pt-BR_Multimedia. */ diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java index 2538ef3366..daa9865a9d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java @@ -77,18 +77,26 @@ public interface BaseModelName { String EN_US_TELEPHONY = "en-US_Telephony"; /** en-WW_Medical_Telephony. */ String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony"; + /** es-AR. */ + String ES_AR = "es-AR"; /** es-AR_BroadbandModel. */ String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel"; /** es-AR_NarrowbandModel. */ String ES_AR_NARROWBANDMODEL = "es-AR_NarrowbandModel"; + /** es-CL. */ + String ES_CL = "es-CL"; /** es-CL_BroadbandModel. */ String ES_CL_BROADBANDMODEL = "es-CL_BroadbandModel"; /** es-CL_NarrowbandModel. */ String ES_CL_NARROWBANDMODEL = "es-CL_NarrowbandModel"; + /** es-CO. */ + String ES_CO = "es-CO"; /** es-CO_BroadbandModel. */ String ES_CO_BROADBANDMODEL = "es-CO_BroadbandModel"; /** es-CO_NarrowbandModel. */ String ES_CO_NARROWBANDMODEL = "es-CO_NarrowbandModel"; + /** es-ES. */ + String ES_ES = "es-ES"; /** es-ES_BroadbandModel. */ String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel"; /** es-ES_NarrowbandModel. */ @@ -99,10 +107,14 @@ public interface BaseModelName { String ES_ES_TELEPHONY = "es-ES_Telephony"; /** es-LA_Telephony. */ String ES_LA_TELEPHONY = "es-LA_Telephony"; + /** es-MX. */ + String ES_MX = "es-MX"; /** es-MX_BroadbandModel. */ String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel"; /** es-MX_NarrowbandModel. */ String ES_MX_NARROWBANDMODEL = "es-MX_NarrowbandModel"; + /** es-PE. */ + String ES_PE = "es-PE"; /** es-PE_BroadbandModel. */ String ES_PE_BROADBANDMODEL = "es-PE_BroadbandModel"; /** es-PE_NarrowbandModel. */ @@ -165,6 +177,8 @@ public interface BaseModelName { String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel"; /** nl-NL_Telephony. */ String NL_NL_TELEPHONY = "nl-NL_Telephony"; + /** pt-BR. */ + String PT_BR = "pt-BR"; /** pt-BR_BroadbandModel. */ String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel"; /** pt-BR_Multimedia. */ diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java index 26ff76eb4a..bb66c632fb 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java @@ -74,18 +74,26 @@ public interface ModelId { String EN_US_TELEPHONY = "en-US_Telephony"; /** en-WW_Medical_Telephony. */ String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony"; + /** es-AR. */ + String ES_AR = "es-AR"; /** es-AR_BroadbandModel. */ String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel"; /** es-AR_NarrowbandModel. */ String ES_AR_NARROWBANDMODEL = "es-AR_NarrowbandModel"; + /** es-CL. */ + String ES_CL = "es-CL"; /** es-CL_BroadbandModel. */ String ES_CL_BROADBANDMODEL = "es-CL_BroadbandModel"; /** es-CL_NarrowbandModel. */ String ES_CL_NARROWBANDMODEL = "es-CL_NarrowbandModel"; + /** es-CO. */ + String ES_CO = "es-CO"; /** es-CO_BroadbandModel. */ String ES_CO_BROADBANDMODEL = "es-CO_BroadbandModel"; /** es-CO_NarrowbandModel. */ String ES_CO_NARROWBANDMODEL = "es-CO_NarrowbandModel"; + /** es-ES. */ + String ES_ES = "es-ES"; /** es-ES_BroadbandModel. */ String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel"; /** es-ES_NarrowbandModel. */ @@ -96,10 +104,14 @@ public interface ModelId { String ES_ES_TELEPHONY = "es-ES_Telephony"; /** es-LA_Telephony. */ String ES_LA_TELEPHONY = "es-LA_Telephony"; + /** es-MX. */ + String ES_MX = "es-MX"; /** es-MX_BroadbandModel. */ String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel"; /** es-MX_NarrowbandModel. */ String ES_MX_NARROWBANDMODEL = "es-MX_NarrowbandModel"; + /** es-PE. */ + String ES_PE = "es-PE"; /** es-PE_BroadbandModel. */ String ES_PE_BROADBANDMODEL = "es-PE_BroadbandModel"; /** es-PE_NarrowbandModel. */ @@ -162,6 +174,8 @@ public interface ModelId { String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel"; /** nl-NL_Telephony. */ String NL_NL_TELEPHONY = "nl-NL_Telephony"; + /** pt-BR. */ + String PT_BR = "pt-BR"; /** pt-BR_BroadbandModel. */ String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel"; /** pt-BR_Multimedia. */ diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java index 443c176c3a..d1e511b94c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java @@ -89,18 +89,26 @@ public interface Model { String EN_US_TELEPHONY = "en-US_Telephony"; /** en-WW_Medical_Telephony. */ String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony"; + /** es-AR. */ + String ES_AR = "es-AR"; /** es-AR_BroadbandModel. */ String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel"; /** es-AR_NarrowbandModel. */ String ES_AR_NARROWBANDMODEL = "es-AR_NarrowbandModel"; + /** es-CL. */ + String ES_CL = "es-CL"; /** es-CL_BroadbandModel. */ String ES_CL_BROADBANDMODEL = "es-CL_BroadbandModel"; /** es-CL_NarrowbandModel. */ String ES_CL_NARROWBANDMODEL = "es-CL_NarrowbandModel"; + /** es-CO. */ + String ES_CO = "es-CO"; /** es-CO_BroadbandModel. */ String ES_CO_BROADBANDMODEL = "es-CO_BroadbandModel"; /** es-CO_NarrowbandModel. */ String ES_CO_NARROWBANDMODEL = "es-CO_NarrowbandModel"; + /** es-ES. */ + String ES_ES = "es-ES"; /** es-ES_BroadbandModel. */ String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel"; /** es-ES_NarrowbandModel. */ @@ -111,10 +119,14 @@ public interface Model { String ES_ES_TELEPHONY = "es-ES_Telephony"; /** es-LA_Telephony. */ String ES_LA_TELEPHONY = "es-LA_Telephony"; + /** es-MX. */ + String ES_MX = "es-MX"; /** es-MX_BroadbandModel. */ String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel"; /** es-MX_NarrowbandModel. */ String ES_MX_NARROWBANDMODEL = "es-MX_NarrowbandModel"; + /** es-PE. */ + String ES_PE = "es-PE"; /** es-PE_BroadbandModel. */ String ES_PE_BROADBANDMODEL = "es-PE_BroadbandModel"; /** es-PE_NarrowbandModel. */ @@ -177,6 +189,8 @@ public interface Model { String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel"; /** nl-NL_Telephony. */ String NL_NL_TELEPHONY = "nl-NL_Telephony"; + /** pt-BR. */ + String PT_BR = "pt-BR"; /** pt-BR_BroadbandModel. */ String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel"; /** pt-BR_Multimedia. */ From f5264c02391605d768339be8ed9aec9bc39f4034 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 17 Oct 2024 11:28:26 -0500 Subject: [PATCH 04/12] fix(nlu): remove summarization param --- .../v1/NaturalLanguageUnderstanding.java | 12 +------- .../v1/model/Features.java | 30 ------------------- .../v1/NaturalLanguageUnderstandingTest.java | 6 ---- .../v1/model/AnalyzeOptionsTest.java | 6 ---- .../v1/model/FeaturesTest.java | 7 ----- 5 files changed, 1 insertion(+), 60 deletions(-) diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java index 49b64505d0..7db48403f4 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java @@ -63,16 +63,6 @@ * with Watson Knowledge Studio to detect custom entities and relations in Natural Language * Understanding. * - *

IBM is sunsetting Watson Natural Language Understanding Custom Sentiment (BETA). From **June - * 3, 2023** onward, you will no longer be able to use the Custom Sentiment feature.<br - * /><br />To ensure we continue providing our clients with robust and powerful text - * classification capabilities, IBM recently announced the general availability of a new - * [single-label text classification - * capability](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications). - * This new feature includes extended language support and training data customizations suited for - * building a custom sentiment classifier.<br /><br />If you would like more information - * or further guidance, please contact IBM Cloud Support.{: deprecated}. - * *

API Version: 1.0 See: https://cloud.ibm.com/docs/natural-language-understanding */ public class NaturalLanguageUnderstanding extends BaseService { @@ -168,7 +158,7 @@ public void setVersion(final String version) { * *

Analyzes text, HTML, or a public webpage for the following features: - Categories - * Classifications - Concepts - Emotion - Entities - Keywords - Metadata - Relations - Semantic - * roles - Sentiment - Syntax - Summarization (Experimental) + * roles - Sentiment - Syntax * *

If a language for the input text is not specified with the `language` parameter, the service * [automatically detects the diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/Features.java b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/Features.java index 6a86431b84..203f312f5d 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/Features.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/Features.java @@ -31,7 +31,6 @@ public class Features extends GenericModel { protected SemanticRolesOptions semanticRoles; protected SentimentOptions sentiment; - protected SummarizationOptions summarization; protected CategoriesOptions categories; protected SyntaxOptions syntax; @@ -46,7 +45,6 @@ public static class Builder { private RelationsOptions relations; private SemanticRolesOptions semanticRoles; private SentimentOptions sentiment; - private SummarizationOptions summarization; private CategoriesOptions categories; private SyntaxOptions syntax; @@ -65,7 +63,6 @@ private Builder(Features features) { this.relations = features.relations; this.semanticRoles = features.semanticRoles; this.sentiment = features.sentiment; - this.summarization = features.summarization; this.categories = features.categories; this.syntax = features.syntax; } @@ -181,17 +178,6 @@ public Builder sentiment(SentimentOptions sentiment) { return this; } - /** - * Set the summarization. - * - * @param summarization the summarization - * @return the Features builder - */ - public Builder summarization(SummarizationOptions summarization) { - this.summarization = summarization; - return this; - } - /** * Set the categories. * @@ -227,7 +213,6 @@ protected Features(Builder builder) { relations = builder.relations; semanticRoles = builder.semanticRoles; sentiment = builder.sentiment; - summarization = builder.summarization; categories = builder.categories; syntax = builder.syntax; } @@ -371,21 +356,6 @@ public SentimentOptions sentiment() { return sentiment; } - /** - * Gets the summarization. - * - *

(Experimental) Returns a summary of content. - * - *

Supported languages: English only. - * - *

Supported regions: Dallas region only. - * - * @return the summarization - */ - public SummarizationOptions summarization() { - return summarization; - } - /** * Gets the categories. * diff --git a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstandingTest.java b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstandingTest.java index 1e007bef4c..36e1f0ace9 100644 --- a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstandingTest.java +++ b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstandingTest.java @@ -47,7 +47,6 @@ import com.ibm.watson.natural_language_understanding.v1.model.RelationsOptions; import com.ibm.watson.natural_language_understanding.v1.model.SemanticRolesOptions; import com.ibm.watson.natural_language_understanding.v1.model.SentimentOptions; -import com.ibm.watson.natural_language_understanding.v1.model.SummarizationOptions; import com.ibm.watson.natural_language_understanding.v1.model.SyntaxOptions; import com.ibm.watson.natural_language_understanding.v1.model.SyntaxOptionsTokens; import com.ibm.watson.natural_language_understanding.v1.model.UpdateCategoriesModelOptions; @@ -155,10 +154,6 @@ public void testAnalyzeWOptions() throws Throwable { .targets(java.util.Arrays.asList("testString")) .build(); - // Construct an instance of the SummarizationOptions model - SummarizationOptions summarizationOptionsModel = - new SummarizationOptions.Builder().limit(Long.valueOf("3")).build(); - // Construct an instance of the CategoriesOptions model CategoriesOptions categoriesOptionsModel = new CategoriesOptions.Builder() @@ -187,7 +182,6 @@ public void testAnalyzeWOptions() throws Throwable { .relations(relationsOptionsModel) .semanticRoles(semanticRolesOptionsModel) .sentiment(sentimentOptionsModel) - .summarization(summarizationOptionsModel) .categories(categoriesOptionsModel) .syntax(syntaxOptionsModel) .build(); diff --git a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/AnalyzeOptionsTest.java b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/AnalyzeOptionsTest.java index 40155064f1..3708c87292 100644 --- a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/AnalyzeOptionsTest.java +++ b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/AnalyzeOptionsTest.java @@ -92,10 +92,6 @@ public void testAnalyzeOptions() throws Throwable { assertEquals(sentimentOptionsModel.document(), Boolean.valueOf(true)); assertEquals(sentimentOptionsModel.targets(), java.util.Arrays.asList("testString")); - SummarizationOptions summarizationOptionsModel = - new SummarizationOptions.Builder().limit(Long.valueOf("3")).build(); - assertEquals(summarizationOptionsModel.limit(), Long.valueOf("3")); - CategoriesOptions categoriesOptionsModel = new CategoriesOptions.Builder() .explanation(false) @@ -127,7 +123,6 @@ public void testAnalyzeOptions() throws Throwable { .relations(relationsOptionsModel) .semanticRoles(semanticRolesOptionsModel) .sentiment(sentimentOptionsModel) - .summarization(summarizationOptionsModel) .categories(categoriesOptionsModel) .syntax(syntaxOptionsModel) .build(); @@ -141,7 +136,6 @@ public void testAnalyzeOptions() throws Throwable { assertEquals(featuresModel.relations(), relationsOptionsModel); assertEquals(featuresModel.semanticRoles(), semanticRolesOptionsModel); assertEquals(featuresModel.sentiment(), sentimentOptionsModel); - assertEquals(featuresModel.summarization(), summarizationOptionsModel); assertEquals(featuresModel.categories(), categoriesOptionsModel); assertEquals(featuresModel.syntax(), syntaxOptionsModel); diff --git a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/FeaturesTest.java b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/FeaturesTest.java index d31b3ea8d3..5b94606e01 100644 --- a/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/FeaturesTest.java +++ b/natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/model/FeaturesTest.java @@ -92,10 +92,6 @@ public void testFeatures() throws Throwable { assertEquals(sentimentOptionsModel.document(), Boolean.valueOf(true)); assertEquals(sentimentOptionsModel.targets(), java.util.Arrays.asList("testString")); - SummarizationOptions summarizationOptionsModel = - new SummarizationOptions.Builder().limit(Long.valueOf("3")).build(); - assertEquals(summarizationOptionsModel.limit(), Long.valueOf("3")); - CategoriesOptions categoriesOptionsModel = new CategoriesOptions.Builder() .explanation(false) @@ -127,7 +123,6 @@ public void testFeatures() throws Throwable { .relations(relationsOptionsModel) .semanticRoles(semanticRolesOptionsModel) .sentiment(sentimentOptionsModel) - .summarization(summarizationOptionsModel) .categories(categoriesOptionsModel) .syntax(syntaxOptionsModel) .build(); @@ -141,7 +136,6 @@ public void testFeatures() throws Throwable { assertEquals(featuresModel.relations(), relationsOptionsModel); assertEquals(featuresModel.semanticRoles(), semanticRolesOptionsModel); assertEquals(featuresModel.sentiment(), sentimentOptionsModel); - assertEquals(featuresModel.summarization(), summarizationOptionsModel); assertEquals(featuresModel.categories(), categoriesOptionsModel); assertEquals(featuresModel.syntax(), syntaxOptionsModel); @@ -161,7 +155,6 @@ public void testFeatures() throws Throwable { assertEquals(featuresModelNew.relations().toString(), relationsOptionsModel.toString()); assertEquals(featuresModelNew.semanticRoles().toString(), semanticRolesOptionsModel.toString()); assertEquals(featuresModelNew.sentiment().toString(), sentimentOptionsModel.toString()); - assertEquals(featuresModelNew.summarization().toString(), summarizationOptionsModel.toString()); assertEquals(featuresModelNew.categories().toString(), categoriesOptionsModel.toString()); assertEquals(featuresModelNew.syntax().toString(), syntaxOptionsModel.toString()); } From bd51c0526945bcb574398bfa6fdc9405a20218f7 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 17 Oct 2024 12:22:04 -0500 Subject: [PATCH 05/12] feat(discov1): remove discoV1 BREAKING CHANGE: DiscoveryV1 functionality has been removed --- .github/workflows/integration-test.yml | 5 - discovery/README.md | 18 +- .../ibm/watson/discovery/v1/Discovery.java | 2943 ----------- .../v1/model/AddDocumentOptions.java | 253 - .../v1/model/AddTrainingDataOptions.java | 220 - .../discovery/v1/model/AggregationResult.java | 61 - .../watson/discovery/v1/model/Collection.java | 207 - .../v1/model/CollectionCrawlStatus.java | 36 - .../v1/model/CollectionDiskUsage.java | 36 - .../discovery/v1/model/CollectionUsage.java | 49 - .../discovery/v1/model/Completions.java | 35 - .../discovery/v1/model/Configuration.java | 298 -- .../discovery/v1/model/Conversions.java | 240 - .../v1/model/CreateCollectionOptions.java | 232 - .../v1/model/CreateConfigurationOptions.java | 303 -- .../v1/model/CreateCredentialsOptions.java | 214 - .../v1/model/CreateEnvironmentOptions.java | 174 - .../v1/model/CreateEventOptions.java | 129 - .../v1/model/CreateEventResponse.java | 52 - .../v1/model/CreateExpansionsOptions.java | 196 - .../v1/model/CreateGatewayOptions.java | 121 - .../v1/model/CreateStopwordListOptions.java | 206 - .../CreateTokenizationDictionaryOptions.java | 170 - .../model/CreateTrainingExampleOptions.java | 245 - .../discovery/v1/model/CredentialDetails.java | 662 --- .../discovery/v1/model/Credentials.java | 183 - .../discovery/v1/model/CredentialsList.java | 35 - .../model/DeleteAllTrainingDataOptions.java | 125 - .../v1/model/DeleteCollectionOptions.java | 125 - .../v1/model/DeleteCollectionResponse.java | 55 - .../v1/model/DeleteConfigurationOptions.java | 125 - .../v1/model/DeleteConfigurationResponse.java | 68 - .../discovery/v1/model/DeleteCredentials.java | 55 - .../v1/model/DeleteCredentialsOptions.java | 125 - .../v1/model/DeleteDocumentOptions.java | 155 - .../v1/model/DeleteDocumentResponse.java | 55 - .../v1/model/DeleteEnvironmentOptions.java | 95 - .../v1/model/DeleteEnvironmentResponse.java | 55 - .../v1/model/DeleteExpansionsOptions.java | 125 - .../v1/model/DeleteGatewayOptions.java | 124 - .../v1/model/DeleteStopwordListOptions.java | 125 - .../DeleteTokenizationDictionaryOptions.java | 125 - .../v1/model/DeleteTrainingDataOptions.java | 154 - .../model/DeleteTrainingExampleOptions.java | 183 - .../v1/model/DeleteUserDataOptions.java | 94 - .../watson/discovery/v1/model/DiskUsage.java | 51 - .../discovery/v1/model/DocumentAccepted.java | 76 - .../discovery/v1/model/DocumentCounts.java | 71 - .../discovery/v1/model/DocumentStatus.java | 156 - .../watson/discovery/v1/model/Enrichment.java | 285 -- .../discovery/v1/model/EnrichmentOptions.java | 179 - .../discovery/v1/model/Environment.java | 210 - .../v1/model/EnvironmentDocuments.java | 49 - .../watson/discovery/v1/model/EventData.java | 267 - .../watson/discovery/v1/model/Expansion.java | 163 - .../watson/discovery/v1/model/Expansions.java | 125 - .../model/FederatedQueryNoticesOptions.java | 560 --- .../v1/model/FederatedQueryOptions.java | 673 --- .../ibm/watson/discovery/v1/model/Field.java | 72 - .../discovery/v1/model/FontSetting.java | 220 - .../watson/discovery/v1/model/Gateway.java | 101 - .../discovery/v1/model/GatewayDelete.java | 49 - .../discovery/v1/model/GatewayList.java | 35 - .../v1/model/GetAutocompletionOptions.java | 207 - .../v1/model/GetCollectionOptions.java | 125 - .../v1/model/GetConfigurationOptions.java | 125 - .../v1/model/GetCredentialsOptions.java | 125 - .../v1/model/GetDocumentStatusOptions.java | 155 - .../v1/model/GetEnvironmentOptions.java | 95 - .../discovery/v1/model/GetGatewayOptions.java | 124 - .../v1/model/GetMetricsEventRateOptions.java | 145 - .../v1/model/GetMetricsQueryEventOptions.java | 145 - .../GetMetricsQueryNoResultsOptions.java | 145 - .../v1/model/GetMetricsQueryOptions.java | 145 - .../GetMetricsQueryTokenEventOptions.java | 85 - .../model/GetStopwordListStatusOptions.java | 125 - ...etTokenizationDictionaryStatusOptions.java | 125 - .../v1/model/GetTrainingDataOptions.java | 154 - .../v1/model/GetTrainingExampleOptions.java | 183 - .../discovery/v1/model/HtmlSettings.java | 292 -- .../discovery/v1/model/IndexCapacity.java | 62 - .../v1/model/ListCollectionFieldsOptions.java | 125 - .../model/ListCollectionFieldsResponse.java | 50 - .../v1/model/ListCollectionsOptions.java | 121 - .../v1/model/ListCollectionsResponse.java | 35 - .../v1/model/ListConfigurationsOptions.java | 121 - .../v1/model/ListConfigurationsResponse.java | 35 - .../v1/model/ListCredentialsOptions.java | 95 - .../v1/model/ListEnvironmentsOptions.java | 84 - .../v1/model/ListEnvironmentsResponse.java | 35 - .../v1/model/ListExpansionsOptions.java | 125 - .../discovery/v1/model/ListFieldsOptions.java | 142 - .../v1/model/ListGatewaysOptions.java | 95 - .../v1/model/ListTrainingDataOptions.java | 125 - .../v1/model/ListTrainingExamplesOptions.java | 154 - .../discovery/v1/model/LogQueryResponse.java | 50 - .../v1/model/LogQueryResponseResult.java | 293 -- .../LogQueryResponseResultDocuments.java | 50 - ...LogQueryResponseResultDocumentsResult.java | 93 - .../discovery/v1/model/MetricAggregation.java | 64 - .../v1/model/MetricAggregationResult.java | 80 - .../discovery/v1/model/MetricResponse.java | 35 - .../v1/model/MetricTokenAggregation.java | 51 - .../model/MetricTokenAggregationResult.java | 65 - .../v1/model/MetricTokenResponse.java | 35 - .../v1/model/NluEnrichmentConcepts.java | 85 - .../v1/model/NluEnrichmentEmotion.java | 127 - .../v1/model/NluEnrichmentEntities.java | 250 - .../v1/model/NluEnrichmentFeatures.java | 271 - .../v1/model/NluEnrichmentKeywords.java | 136 - .../v1/model/NluEnrichmentRelations.java | 86 - .../v1/model/NluEnrichmentSemanticRoles.java | 137 - .../v1/model/NluEnrichmentSentiment.java | 127 - .../v1/model/NormalizationOperation.java | 209 - .../ibm/watson/discovery/v1/model/Notice.java | 135 - .../v1/model/PdfHeadingDetection.java | 101 - .../discovery/v1/model/PdfSettings.java | 84 - .../discovery/v1/model/QueryAggregation.java | 53 - .../v1/model/QueryCalculationAggregation.java | 47 - .../v1/model/QueryFilterAggregation.java | 63 - .../v1/model/QueryHistogramAggregation.java | 73 - .../QueryHistogramAggregationResult.java | 63 - .../discovery/v1/model/QueryLogOptions.java | 212 - .../v1/model/QueryNestedAggregation.java | 65 - .../v1/model/QueryNoticesOptions.java | 667 --- .../v1/model/QueryNoticesResponse.java | 88 - .../v1/model/QueryNoticesResult.java | 166 - .../discovery/v1/model/QueryOptions.java | 703 --- .../discovery/v1/model/QueryPassages.java | 106 - .../discovery/v1/model/QueryResponse.java | 133 - .../discovery/v1/model/QueryResult.java | 82 - .../v1/model/QueryResultMetadata.java | 50 - .../v1/model/QueryTermAggregation.java | 70 - .../v1/model/QueryTermAggregationResult.java | 106 - .../v1/model/QueryTimesliceAggregation.java | 70 - .../QueryTimesliceAggregationResult.java | 78 - .../v1/model/QueryTopHitsAggregation.java | 54 - .../model/QueryTopHitsAggregationResult.java | 51 - .../discovery/v1/model/RetrievalDetails.java | 62 - .../watson/discovery/v1/model/SduStatus.java | 101 - .../v1/model/SduStatusCustomFields.java | 49 - .../discovery/v1/model/SearchStatus.java | 93 - .../discovery/v1/model/SegmentSettings.java | 184 - .../ibm/watson/discovery/v1/model/Source.java | 192 - .../discovery/v1/model/SourceOptions.java | 306 -- .../v1/model/SourceOptionsBuckets.java | 121 - .../v1/model/SourceOptionsFolder.java | 156 - .../v1/model/SourceOptionsObject.java | 121 - .../v1/model/SourceOptionsSiteColl.java | 127 - .../v1/model/SourceOptionsWebCrawl.java | 333 -- .../discovery/v1/model/SourceSchedule.java | 167 - .../discovery/v1/model/SourceStatus.java | 79 - .../discovery/v1/model/StatusDetails.java | 113 - .../discovery/v1/model/TokenDictRule.java | 216 - .../v1/model/TokenDictStatusResponse.java | 56 - .../discovery/v1/model/TopHitsResults.java | 48 - .../discovery/v1/model/TrainingDataSet.java | 65 - .../discovery/v1/model/TrainingExample.java | 141 - .../v1/model/TrainingExampleList.java | 35 - .../discovery/v1/model/TrainingQuery.java | 76 - .../discovery/v1/model/TrainingStatus.java | 146 - .../v1/model/UpdateCollectionOptions.java | 206 - .../v1/model/UpdateConfigurationOptions.java | 333 -- .../v1/model/UpdateCredentialsOptions.java | 244 - .../v1/model/UpdateDocumentOptions.java | 283 -- .../v1/model/UpdateEnvironmentOptions.java | 197 - .../model/UpdateTrainingExampleOptions.java | 235 - .../v1/model/WordHeadingDetection.java | 142 - .../discovery/v1/model/WordSettings.java | 84 - .../watson/discovery/v1/model/WordStyle.java | 127 - .../discovery/v1/model/XPathPatterns.java | 101 - .../ibm/watson/discovery/v1/package-info.java | 14 - .../discovery/v1/DiscoveryServiceIT.java | 2401 --------- .../discovery/v1/DiscoveryServiceTest.java | 2553 ---------- .../watson/discovery/v1/DiscoveryTest.java | 4391 ----------------- .../v1/model/AddDocumentOptionsTest.java | 57 - .../v1/model/AddTrainingDataOptionsTest.java | 63 - .../v1/model/AggregationResultTest.java | 37 - .../v1/model/CollectionCrawlStatusTest.java | 36 - .../v1/model/CollectionDiskUsageTest.java | 35 - .../discovery/v1/model/CollectionTest.java | 44 - .../v1/model/CollectionUsageTest.java | 35 - .../discovery/v1/model/CompletionsTest.java | 36 - .../discovery/v1/model/ConfigurationTest.java | 367 -- .../discovery/v1/model/ConversionsTest.java | 145 - .../v1/model/CreateCollectionOptionsTest.java | 52 - .../model/CreateConfigurationOptionsTest.java | 360 -- .../model/CreateCredentialsOptionsTest.java | 97 - .../model/CreateEnvironmentOptionsTest.java | 48 - .../v1/model/CreateEventOptionsTest.java | 61 - .../v1/model/CreateEventResponseTest.java | 37 - .../v1/model/CreateExpansionsOptionsTest.java | 57 - .../v1/model/CreateGatewayOptionsTest.java | 43 - .../model/CreateStopwordListOptionsTest.java | 53 - ...eateTokenizationDictionaryOptionsTest.java | 62 - .../CreateTrainingExampleOptionsTest.java | 54 - .../v1/model/CredentialDetailsTest.java | 100 - .../v1/model/CredentialsListTest.java | 36 - .../discovery/v1/model/CredentialsTest.java | 99 - .../DeleteAllTrainingDataOptionsTest.java | 46 - .../v1/model/DeleteCollectionOptionsTest.java | 46 - .../model/DeleteCollectionResponseTest.java | 37 - .../model/DeleteConfigurationOptionsTest.java | 46 - .../DeleteConfigurationResponseTest.java | 39 - .../model/DeleteCredentialsOptionsTest.java | 46 - .../v1/model/DeleteCredentialsTest.java | 37 - .../v1/model/DeleteDocumentOptionsTest.java | 48 - .../v1/model/DeleteDocumentResponseTest.java | 37 - .../model/DeleteEnvironmentOptionsTest.java | 42 - .../model/DeleteEnvironmentResponseTest.java | 37 - .../v1/model/DeleteExpansionsOptionsTest.java | 46 - .../v1/model/DeleteGatewayOptionsTest.java | 46 - .../model/DeleteStopwordListOptionsTest.java | 46 - ...leteTokenizationDictionaryOptionsTest.java | 46 - .../model/DeleteTrainingDataOptionsTest.java | 48 - .../DeleteTrainingExampleOptionsTest.java | 50 - .../v1/model/DeleteUserDataOptionsTest.java | 42 - .../discovery/v1/model/DiskUsageTest.java | 35 - .../v1/model/DocumentAcceptedTest.java | 38 - .../v1/model/DocumentCountsTest.java | 35 - .../v1/model/DocumentStatusTest.java | 38 - .../v1/model/EnrichmentOptionsTest.java | 137 - .../discovery/v1/model/EnrichmentTest.java | 162 - .../v1/model/EnvironmentDocumentsTest.java | 35 - .../discovery/v1/model/EnvironmentTest.java | 41 - .../discovery/v1/model/EventDataTest.java | 68 - .../discovery/v1/model/ExpansionTest.java | 51 - .../discovery/v1/model/ExpansionsTest.java | 55 - .../FederatedQueryNoticesOptionsTest.java | 77 - .../v1/model/FederatedQueryOptionsTest.java | 86 - .../watson/discovery/v1/model/FieldTest.java | 35 - .../discovery/v1/model/FontSettingTest.java | 60 - .../discovery/v1/model/GatewayDeleteTest.java | 37 - .../discovery/v1/model/GatewayListTest.java | 36 - .../discovery/v1/model/GatewayTest.java | 40 - .../model/GetAutocompletionOptionsTest.java | 52 - .../v1/model/GetCollectionOptionsTest.java | 46 - .../v1/model/GetConfigurationOptionsTest.java | 46 - .../v1/model/GetCredentialsOptionsTest.java | 46 - .../model/GetDocumentStatusOptionsTest.java | 48 - .../v1/model/GetEnvironmentOptionsTest.java | 42 - .../v1/model/GetGatewayOptionsTest.java | 43 - .../model/GetMetricsEventRateOptionsTest.java | 48 - .../GetMetricsQueryEventOptionsTest.java | 48 - .../GetMetricsQueryNoResultsOptionsTest.java | 48 - .../v1/model/GetMetricsQueryOptionsTest.java | 48 - .../GetMetricsQueryTokenEventOptionsTest.java | 37 - .../GetStopwordListStatusOptionsTest.java | 46 - ...kenizationDictionaryStatusOptionsTest.java | 46 - .../v1/model/GetTrainingDataOptionsTest.java | 48 - .../model/GetTrainingExampleOptionsTest.java | 50 - .../discovery/v1/model/HtmlSettingsTest.java | 60 - .../discovery/v1/model/IndexCapacityTest.java | 38 - .../ListCollectionFieldsOptionsTest.java | 46 - .../ListCollectionFieldsResponseTest.java | 37 - .../v1/model/ListCollectionsOptionsTest.java | 43 - .../v1/model/ListCollectionsResponseTest.java | 36 - .../model/ListConfigurationsOptionsTest.java | 46 - .../model/ListConfigurationsResponseTest.java | 36 - .../v1/model/ListCredentialsOptionsTest.java | 42 - .../v1/model/ListEnvironmentsOptionsTest.java | 37 - .../model/ListEnvironmentsResponseTest.java | 36 - .../v1/model/ListExpansionsOptionsTest.java | 46 - .../v1/model/ListFieldsOptionsTest.java | 46 - .../v1/model/ListGatewaysOptionsTest.java | 42 - .../v1/model/ListTrainingDataOptionsTest.java | 46 - .../ListTrainingExamplesOptionsTest.java | 48 - ...ueryResponseResultDocumentsResultTest.java | 41 - .../LogQueryResponseResultDocumentsTest.java | 38 - .../v1/model/LogQueryResponseResultTest.java | 49 - .../v1/model/LogQueryResponseTest.java | 37 - .../v1/model/MetricAggregationResultTest.java | 39 - .../v1/model/MetricAggregationTest.java | 38 - .../v1/model/MetricResponseTest.java | 36 - .../MetricTokenAggregationResultTest.java | 39 - .../v1/model/MetricTokenAggregationTest.java | 37 - .../v1/model/MetricTokenResponseTest.java | 36 - .../v1/model/NluEnrichmentConceptsTest.java | 44 - .../v1/model/NluEnrichmentEmotionTest.java | 48 - .../v1/model/NluEnrichmentEntitiesTest.java | 64 - .../v1/model/NluEnrichmentFeaturesTest.java | 143 - .../v1/model/NluEnrichmentKeywordsTest.java | 52 - .../v1/model/NluEnrichmentRelationsTest.java | 44 - .../model/NluEnrichmentSemanticRolesTest.java | 52 - .../v1/model/NluEnrichmentSentimentTest.java | 48 - .../v1/model/NormalizationOperationTest.java | 52 - .../watson/discovery/v1/model/NoticeTest.java | 35 - .../v1/model/PdfHeadingDetectionTest.java | 59 - .../discovery/v1/model/PdfSettingsTest.java | 63 - .../v1/model/QueryAggregationTest.java | 37 - .../QueryCalculationAggregationTest.java | 39 - .../v1/model/QueryFilterAggregationTest.java | 38 - .../QueryHistogramAggregationResultTest.java | 39 - .../model/QueryHistogramAggregationTest.java | 39 - .../v1/model/QueryLogOptionsTest.java | 47 - .../v1/model/QueryNestedAggregationTest.java | 38 - .../v1/model/QueryNoticesOptionsTest.java | 81 - .../v1/model/QueryNoticesResponseTest.java | 40 - .../v1/model/QueryNoticesResultTest.java | 44 - .../discovery/v1/model/QueryOptionsTest.java | 88 - .../discovery/v1/model/QueryPassagesTest.java | 41 - .../discovery/v1/model/QueryResponseTest.java | 43 - .../v1/model/QueryResultMetadataTest.java | 37 - .../discovery/v1/model/QueryResultTest.java | 39 - .../model/QueryTermAggregationResultTest.java | 41 - .../v1/model/QueryTermAggregationTest.java | 39 - .../QueryTimesliceAggregationResultTest.java | 40 - .../model/QueryTimesliceAggregationTest.java | 39 - .../QueryTopHitsAggregationResultTest.java | 38 - .../v1/model/QueryTopHitsAggregationTest.java | 39 - .../v1/model/RetrievalDetailsTest.java | 36 - .../v1/model/SduStatusCustomFieldsTest.java | 37 - .../discovery/v1/model/SduStatusTest.java | 40 - .../discovery/v1/model/SearchStatusTest.java | 39 - .../v1/model/SegmentSettingsTest.java | 50 - .../v1/model/SourceOptionsBucketsTest.java | 51 - .../v1/model/SourceOptionsFolderTest.java | 57 - .../v1/model/SourceOptionsObjectTest.java | 51 - .../v1/model/SourceOptionsSiteCollTest.java | 54 - .../discovery/v1/model/SourceOptionsTest.java | 104 - .../v1/model/SourceOptionsWebCrawlTest.java | 71 - .../v1/model/SourceScheduleTest.java | 51 - .../discovery/v1/model/SourceStatusTest.java | 37 - .../watson/discovery/v1/model/SourceTest.java | 129 - .../discovery/v1/model/StatusDetailsTest.java | 45 - .../discovery/v1/model/TokenDictRuleTest.java | 57 - .../v1/model/TokenDictStatusResponseTest.java | 37 - .../v1/model/TopHitsResultsTest.java | 37 - .../v1/model/TrainingDataSetTest.java | 38 - .../v1/model/TrainingExampleListTest.java | 36 - .../v1/model/TrainingExampleTest.java | 52 - .../discovery/v1/model/TrainingQueryTest.java | 39 - .../v1/model/TrainingStatusTest.java | 44 - .../v1/model/UpdateCollectionOptionsTest.java | 52 - .../model/UpdateConfigurationOptionsTest.java | 362 -- .../model/UpdateCredentialsOptionsTest.java | 99 - .../v1/model/UpdateDocumentOptionsTest.java | 59 - .../model/UpdateEnvironmentOptionsTest.java | 50 - .../UpdateTrainingExampleOptionsTest.java | 54 - .../v1/model/WordHeadingDetectionTest.java | 71 - .../discovery/v1/model/WordSettingsTest.java | 75 - .../discovery/v1/model/WordStyleTest.java | 47 - .../discovery/v1/model/XPathPatternsTest.java | 42 - .../com/ibm/watson/discovery/v1/testng.xml | 10 - .../discovery/v1/utils/TestUtilities.java | 128 - .../v1/add_training_example_resp.json | 4 - .../discovery/v1/add_training_query_resp.json | 10 - .../discovery/v1/create_coll_resp.json | 8 - .../discovery/v1/create_conf_resp.json | 142 - .../discovery/v1/create_doc_resp.json | 4 - .../discovery/v1/create_env_resp.json | 25 - .../discovery/v1/create_event_resp.json | 12 - .../discovery/v1/credentials_resp.json | 9 - .../discovery/v1/delete_coll_resp.json | 4 - .../discovery/v1/delete_conf_resp.json | 12 - .../discovery/v1/delete_credentials_resp.json | 4 - .../discovery/v1/delete_doc_resp.json | 4 - .../discovery/v1/delete_env_resp.json | 4 - .../discovery/v1/delete_gateway_resp.json | 4 - .../discovery/v1/expansions_resp.json | 27 - .../resources/discovery/v1/gateway_resp.json | 7 - .../discovery/v1/get_coll1_resp.json | 14 - .../resources/discovery/v1/get_coll_resp.json | 13 - .../resources/discovery/v1/get_conf_resp.json | 142 - .../discovery/v1/get_confs_resp.json | 18 - .../resources/discovery/v1/get_doc_resp.json | 15 - .../resources/discovery/v1/get_env_resp.json | 31 - .../resources/discovery/v1/get_envs_resp.json | 28 - .../discovery/v1/get_training_data_resp.json | 10 - .../v1/get_training_example_resp.json | 4 - .../test/resources/discovery/v1/issue517.json | 12 - .../test/resources/discovery/v1/issue518.json | 83 - .../discovery/v1/list_credentials_resp.json | 28 - .../discovery/v1/list_fields_resp.json | 8 - .../discovery/v1/list_gateways_resp.json | 18 - .../discovery/v1/list_training_data_resp.json | 16 - .../v1/list_training_examples_resp.json | 9 - .../discovery/v1/listfields_coll_resp.json | 20 - .../discovery/v1/log_query_resp.json | 43 - .../resources/discovery/v1/metric_resp.json | 50 - .../discovery/v1/metric_token_resp.json | 59 - .../discovery/v1/passages_test_doc_1.json | 3 - .../discovery/v1/passages_test_doc_2.json | 3 - .../resources/discovery/v1/query1_resp.json | 536 -- .../test/resources/discovery/v1/stopwords.txt | 35 - .../resources/discovery/v1/test-config.json | 3 - .../discovery/v1/token_dict_status_resp.json | 4 - .../v1/token_dict_status_resp_stopwords.json | 4 - .../discovery/v1/update_conf_resp.json | 139 - .../discovery/v1/update_doc_resp.json | 4 - .../discovery/v1/update_env_resp.json | 24 - .../v1/update_training_example_resp.json | 4 - 392 files changed, 2 insertions(+), 47610 deletions(-) delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddDocumentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/AggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Collection.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsage.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionUsage.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Completions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Configuration.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Conversions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Credentials.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialsList.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentials.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DiskUsage.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentAccepted.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentCounts.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Enrichment.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnrichmentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Environment.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnvironmentDocuments.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/EventData.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansion.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Field.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/FontSetting.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Gateway.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayDelete.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayList.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCollectionOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetGatewayOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/HtmlSettings.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/IndexCapacity.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListFieldsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocuments.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConcepts.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotion.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntities.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeatures.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywords.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelations.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRoles.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentiment.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/NormalizationOperation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Notice.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetection.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfSettings.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryLogOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryPassages.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResultMetadata.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregation.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResult.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/RetrievalDetails.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFields.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SearchStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SegmentSettings.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/Source.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsBuckets.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolder.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsObject.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteColl.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawl.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceSchedule.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/StatusDetails.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictRule.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponse.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TopHitsResults.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingDataSet.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExample.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExampleList.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingQuery.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingStatus.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptions.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordHeadingDetection.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordSettings.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordStyle.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/model/XPathPatterns.java delete mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v1/package-info.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddDocumentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/AggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsageTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionUsageTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CompletionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConfigurationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConversionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialDetailsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsListTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DiskUsageTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentAcceptedTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentCountsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentDocumentsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/EventDataTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/FieldTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/FontSettingTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayDeleteTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayListTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCollectionOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetGatewayOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/HtmlSettingsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/IndexCapacityTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListFieldsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConceptsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotionTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntitiesTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeaturesTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywordsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelationsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRolesTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentimentTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NormalizationOperationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/NoticeTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetectionTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfSettingsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryLogOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryPassagesTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultMetadataTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResultTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/RetrievalDetailsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFieldsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SearchStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SegmentSettingsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsBucketsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolderTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsObjectTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteCollTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawlTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceScheduleTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/StatusDetailsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictRuleTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponseTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TopHitsResultsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingDataSetTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleListTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingQueryTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingStatusTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptionsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordHeadingDetectionTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordSettingsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordStyleTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/model/XPathPatternsTest.java delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/testng.xml delete mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v1/utils/TestUtilities.java delete mode 100644 discovery/src/test/resources/discovery/v1/add_training_example_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/add_training_query_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/create_coll_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/create_conf_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/create_doc_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/create_env_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/create_event_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/credentials_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_coll_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_conf_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_credentials_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_doc_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_env_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/delete_gateway_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/expansions_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/gateway_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_coll1_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_coll_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_conf_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_confs_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_doc_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_env_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_envs_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_training_data_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/get_training_example_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/issue517.json delete mode 100644 discovery/src/test/resources/discovery/v1/issue518.json delete mode 100644 discovery/src/test/resources/discovery/v1/list_credentials_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/list_fields_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/list_gateways_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/list_training_data_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/list_training_examples_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/listfields_coll_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/log_query_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/metric_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/metric_token_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/passages_test_doc_1.json delete mode 100644 discovery/src/test/resources/discovery/v1/passages_test_doc_2.json delete mode 100644 discovery/src/test/resources/discovery/v1/query1_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/stopwords.txt delete mode 100644 discovery/src/test/resources/discovery/v1/test-config.json delete mode 100644 discovery/src/test/resources/discovery/v1/token_dict_status_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/token_dict_status_resp_stopwords.json delete mode 100644 discovery/src/test/resources/discovery/v1/update_conf_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/update_doc_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/update_env_resp.json delete mode 100644 discovery/src/test/resources/discovery/v1/update_training_example_resp.json diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6648074ea5..0701899640 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -46,10 +46,6 @@ jobs: ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }} ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }} ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com" - DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }} - DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }} - DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }} - DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com" DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }} DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }} DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }} @@ -57,7 +53,6 @@ jobs: run: | mvn test -Dtest=v1/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS mvn test -Dtest=v2/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS - mvn test -Dtest=v1/DiscoveryServiceIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS mvn test -Dtest=v2/DiscoveryIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS mvn test -Dtest=LanguageTranslatorIT -DfailIfNoTests=false -pl language-translator,common $MVN_ARGS mvn test -Dtest=NaturalLanguageUnderstandingIT -DfailIfNoTests=false -pl natural-language-understanding,common $MVN_ARGS diff --git a/discovery/README.md b/discovery/README.md index 32f9b9b236..57c67082e8 100644 --- a/discovery/README.md +++ b/discovery/README.md @@ -20,23 +20,9 @@ ## Usage -This SDK supports both the Discovery v1 and v2 APIs. +This SDK supports the Discovery v2 APIs. -Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/docs/discovery?topic=discovery-gs-api). - -### Using Discovery v1 - -```java -// Make sure to use the Discovery v1 import! -Authenticator authenticator = new IamAuthenticator(""); -Discovery discovery = new Discovery("2019-04-30", authenticator); - -//Build an empty query on an existing environment/collection -String environmentId = ""; -String collectionId = ""; -QueryOptions queryOptions = new QueryOptions.Builder(environmentId, collectionId).build(); -QueryResponse queryResponse = discovery.query(queryOptions).execute().getResult(); -``` +Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/apidocs/discovery-data). ### Using Discovery v2 diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java deleted file mode 100644 index f80bc008fa..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java +++ /dev/null @@ -1,2943 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -/* - * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647 - */ - -package com.ibm.watson.discovery.v1; - -import com.google.gson.JsonObject; -import com.ibm.cloud.sdk.core.http.RequestBuilder; -import com.ibm.cloud.sdk.core.http.ResponseConverter; -import com.ibm.cloud.sdk.core.http.ServiceCall; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory; -import com.ibm.cloud.sdk.core.service.BaseService; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.cloud.sdk.core.util.RequestUtils; -import com.ibm.cloud.sdk.core.util.ResponseConverterUtils; -import com.ibm.watson.common.SdkCommon; -import com.ibm.watson.discovery.v1.model.AddDocumentOptions; -import com.ibm.watson.discovery.v1.model.AddTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.Collection; -import com.ibm.watson.discovery.v1.model.Completions; -import com.ibm.watson.discovery.v1.model.Configuration; -import com.ibm.watson.discovery.v1.model.CreateCollectionOptions; -import com.ibm.watson.discovery.v1.model.CreateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.CreateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.CreateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.CreateEventOptions; -import com.ibm.watson.discovery.v1.model.CreateEventResponse; -import com.ibm.watson.discovery.v1.model.CreateExpansionsOptions; -import com.ibm.watson.discovery.v1.model.CreateGatewayOptions; -import com.ibm.watson.discovery.v1.model.CreateStopwordListOptions; -import com.ibm.watson.discovery.v1.model.CreateTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.CreateTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.Credentials; -import com.ibm.watson.discovery.v1.model.CredentialsList; -import com.ibm.watson.discovery.v1.model.DeleteAllTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionResponse; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationOptions; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationResponse; -import com.ibm.watson.discovery.v1.model.DeleteCredentials; -import com.ibm.watson.discovery.v1.model.DeleteCredentialsOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentResponse; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentResponse; -import com.ibm.watson.discovery.v1.model.DeleteExpansionsOptions; -import com.ibm.watson.discovery.v1.model.DeleteGatewayOptions; -import com.ibm.watson.discovery.v1.model.DeleteStopwordListOptions; -import com.ibm.watson.discovery.v1.model.DeleteTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.DeleteUserDataOptions; -import com.ibm.watson.discovery.v1.model.DocumentAccepted; -import com.ibm.watson.discovery.v1.model.DocumentStatus; -import com.ibm.watson.discovery.v1.model.Environment; -import com.ibm.watson.discovery.v1.model.Expansions; -import com.ibm.watson.discovery.v1.model.FederatedQueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.FederatedQueryOptions; -import com.ibm.watson.discovery.v1.model.Gateway; -import com.ibm.watson.discovery.v1.model.GatewayDelete; -import com.ibm.watson.discovery.v1.model.GatewayList; -import com.ibm.watson.discovery.v1.model.GetAutocompletionOptions; -import com.ibm.watson.discovery.v1.model.GetCollectionOptions; -import com.ibm.watson.discovery.v1.model.GetConfigurationOptions; -import com.ibm.watson.discovery.v1.model.GetCredentialsOptions; -import com.ibm.watson.discovery.v1.model.GetDocumentStatusOptions; -import com.ibm.watson.discovery.v1.model.GetEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.GetGatewayOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsEventRateOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryEventOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryNoResultsOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryTokenEventOptions; -import com.ibm.watson.discovery.v1.model.GetStopwordListStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTokenizationDictionaryStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsResponse; -import com.ibm.watson.discovery.v1.model.ListCollectionsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionsResponse; -import com.ibm.watson.discovery.v1.model.ListConfigurationsOptions; -import com.ibm.watson.discovery.v1.model.ListConfigurationsResponse; -import com.ibm.watson.discovery.v1.model.ListCredentialsOptions; -import com.ibm.watson.discovery.v1.model.ListEnvironmentsOptions; -import com.ibm.watson.discovery.v1.model.ListEnvironmentsResponse; -import com.ibm.watson.discovery.v1.model.ListExpansionsOptions; -import com.ibm.watson.discovery.v1.model.ListFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListGatewaysOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingExamplesOptions; -import com.ibm.watson.discovery.v1.model.LogQueryResponse; -import com.ibm.watson.discovery.v1.model.MetricResponse; -import com.ibm.watson.discovery.v1.model.MetricTokenResponse; -import com.ibm.watson.discovery.v1.model.QueryLogOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesResponse; -import com.ibm.watson.discovery.v1.model.QueryOptions; -import com.ibm.watson.discovery.v1.model.QueryResponse; -import com.ibm.watson.discovery.v1.model.TokenDictStatusResponse; -import com.ibm.watson.discovery.v1.model.TrainingDataSet; -import com.ibm.watson.discovery.v1.model.TrainingExample; -import com.ibm.watson.discovery.v1.model.TrainingExampleList; -import com.ibm.watson.discovery.v1.model.TrainingQuery; -import com.ibm.watson.discovery.v1.model.UpdateCollectionOptions; -import com.ibm.watson.discovery.v1.model.UpdateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.UpdateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.UpdateDocumentOptions; -import com.ibm.watson.discovery.v1.model.UpdateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.UpdateTrainingExampleOptions; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import okhttp3.MultipartBody; - -/** - * IBM Watson&trade; Discovery v1 is a cognitive search and content analytics engine that you - * can add to applications to identify patterns, trends and actionable insights to drive better - * decision-making. Securely unify structured and unstructured data with pre-enriched content, and - * use a simplified query language to eliminate the need for manual filtering of results. - * - *

API Version: 1.0 See: https://cloud.ibm.com/docs/discovery - */ -public class Discovery extends BaseService { - - /** Default service name used when configuring the `Discovery` client. */ - public static final String DEFAULT_SERVICE_NAME = "discovery"; - - /** Default service endpoint URL. */ - public static final String DEFAULT_SERVICE_URL = - "https://api.us-south.discovery.watson.cloud.ibm.com"; - - private String version; - - /** - * Constructs an instance of the `Discovery` client. The default service name is used to configure - * the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2019-04-30`. - */ - public Discovery(String version) { - this( - version, - DEFAULT_SERVICE_NAME, - ConfigBasedAuthenticatorFactory.getAuthenticator(DEFAULT_SERVICE_NAME)); - } - - /** - * Constructs an instance of the `Discovery` client. The default service name and specified - * authenticator are used to configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2019-04-30`. - * @param authenticator the {@link Authenticator} instance to be configured for this client - */ - public Discovery(String version, Authenticator authenticator) { - this(version, DEFAULT_SERVICE_NAME, authenticator); - } - - /** - * Constructs an instance of the `Discovery` client. The specified service name is used to - * configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2019-04-30`. - * @param serviceName the service name to be used when configuring the client instance - */ - public Discovery(String version, String serviceName) { - this(version, serviceName, ConfigBasedAuthenticatorFactory.getAuthenticator(serviceName)); - } - - /** - * Constructs an instance of the `Discovery` client. The specified service name and authenticator - * are used to configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2019-04-30`. - * @param serviceName the service name to be used when configuring the client instance - * @param authenticator the {@link Authenticator} instance to be configured for this client - */ - public Discovery(String version, String serviceName, Authenticator authenticator) { - super(serviceName, authenticator); - setServiceUrl(DEFAULT_SERVICE_URL); - setVersion(version); - this.configureService(serviceName); - } - - /** - * Gets the version. - * - *

Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. - * The current version is `2019-04-30`. - * - * @return the version - */ - public String getVersion() { - return this.version; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(final String version) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(version, "version cannot be empty."); - this.version = version; - } - - /** - * Create an environment. - * - *

Creates a new environment for private data. An environment must be created before - * collections can be created. - * - *

**Note**: You can create only one environment for private data per service instance. An - * attempt to create another environment results in an error. - * - * @param createEnvironmentOptions the {@link CreateEnvironmentOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Environment} - */ - public ServiceCall createEnvironment( - CreateEnvironmentOptions createEnvironmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createEnvironmentOptions, "createEnvironmentOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/environments")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createEnvironment"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("name", createEnvironmentOptions.name()); - if (createEnvironmentOptions.description() != null) { - contentJson.addProperty("description", createEnvironmentOptions.description()); - } - if (createEnvironmentOptions.size() != null) { - contentJson.addProperty("size", createEnvironmentOptions.size()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List environments. - * - *

List existing environments for the service instance. - * - * @param listEnvironmentsOptions the {@link ListEnvironmentsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link ListEnvironmentsResponse} - */ - public ServiceCall listEnvironments( - ListEnvironmentsOptions listEnvironmentsOptions) { - if (listEnvironmentsOptions == null) { - listEnvironmentsOptions = new ListEnvironmentsOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/environments")); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listEnvironments"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (listEnvironmentsOptions.name() != null) { - builder.query("name", String.valueOf(listEnvironmentsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List environments. - * - *

List existing environments for the service instance. - * - * @return a {@link ServiceCall} with a result of type {@link ListEnvironmentsResponse} - */ - public ServiceCall listEnvironments() { - return listEnvironments(null); - } - - /** - * Get environment info. - * - * @param getEnvironmentOptions the {@link GetEnvironmentOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Environment} - */ - public ServiceCall getEnvironment(GetEnvironmentOptions getEnvironmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getEnvironmentOptions, "getEnvironmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getEnvironmentOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getEnvironment"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update an environment. - * - *

Updates an environment. The environment's **name** and **description** parameters can be - * changed. You must specify a **name** for the environment. - * - * @param updateEnvironmentOptions the {@link UpdateEnvironmentOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Environment} - */ - public ServiceCall updateEnvironment( - UpdateEnvironmentOptions updateEnvironmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateEnvironmentOptions, "updateEnvironmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateEnvironmentOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.put( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "updateEnvironment"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (updateEnvironmentOptions.name() != null) { - contentJson.addProperty("name", updateEnvironmentOptions.name()); - } - if (updateEnvironmentOptions.description() != null) { - contentJson.addProperty("description", updateEnvironmentOptions.description()); - } - if (updateEnvironmentOptions.size() != null) { - contentJson.addProperty("size", updateEnvironmentOptions.size()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete environment. - * - * @param deleteEnvironmentOptions the {@link DeleteEnvironmentOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DeleteEnvironmentResponse} - */ - public ServiceCall deleteEnvironment( - DeleteEnvironmentOptions deleteEnvironmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteEnvironmentOptions, "deleteEnvironmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteEnvironmentOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteEnvironment"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List fields across collections. - * - *

Gets a list of the unique fields (and their types) stored in the indexes of the specified - * collections. - * - * @param listFieldsOptions the {@link ListFieldsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ListCollectionFieldsResponse} - */ - public ServiceCall listFields(ListFieldsOptions listFieldsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listFieldsOptions, "listFieldsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listFieldsOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/fields", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listFields"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("collection_ids", RequestUtils.join(listFieldsOptions.collectionIds(), ",")); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Add configuration. - * - *

Creates a new configuration. - * - *

If the input configuration contains the **configuration_id**, **created**, or **updated** - * properties, then they are ignored and overridden by the system, and an error is not returned so - * that the overridden fields do not need to be removed when copying a configuration. - * - *

The configuration can contain unrecognized JSON fields. Any such fields are ignored and do - * not generate an error. This makes it easier to use newer configuration files with older - * versions of the API and the service. It also makes it possible for the tooling to add - * additional metadata and information to the configuration. - * - * @param createConfigurationOptions the {@link CreateConfigurationOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link Configuration} - */ - public ServiceCall createConfiguration( - CreateConfigurationOptions createConfigurationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createConfigurationOptions, "createConfigurationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createConfigurationOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/configurations", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createConfiguration"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("name", createConfigurationOptions.name()); - if (createConfigurationOptions.description() != null) { - contentJson.addProperty("description", createConfigurationOptions.description()); - } - if (createConfigurationOptions.conversions() != null) { - contentJson.add( - "conversions", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createConfigurationOptions.conversions())); - } - if (createConfigurationOptions.enrichments() != null) { - contentJson.add( - "enrichments", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createConfigurationOptions.enrichments())); - } - if (createConfigurationOptions.normalizations() != null) { - contentJson.add( - "normalizations", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createConfigurationOptions.normalizations())); - } - if (createConfigurationOptions.source() != null) { - contentJson.add( - "source", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createConfigurationOptions.source())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List configurations. - * - *

Lists existing configurations for the service instance. - * - * @param listConfigurationsOptions the {@link ListConfigurationsOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link ListConfigurationsResponse} - */ - public ServiceCall listConfigurations( - ListConfigurationsOptions listConfigurationsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listConfigurationsOptions, "listConfigurationsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listConfigurationsOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/configurations", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "listConfigurations"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (listConfigurationsOptions.name() != null) { - builder.query("name", String.valueOf(listConfigurationsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get configuration details. - * - * @param getConfigurationOptions the {@link GetConfigurationOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Configuration} - */ - public ServiceCall getConfiguration( - GetConfigurationOptions getConfigurationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getConfigurationOptions, "getConfigurationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getConfigurationOptions.environmentId()); - pathParamsMap.put("configuration_id", getConfigurationOptions.configurationId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/configurations/{configuration_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getConfiguration"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update a configuration. - * - *

Replaces an existing configuration. * Completely replaces the original configuration. * The - * **configuration_id**, **updated**, and **created** fields are accepted in the request, but they - * are ignored, and an error is not generated. It is also acceptable for users to submit an - * updated configuration with none of the three properties. * Documents are processed with a - * snapshot of the configuration as it was at the time the document was submitted to be ingested. - * This means that already submitted documents will not see any updates made to the configuration. - * - * @param updateConfigurationOptions the {@link UpdateConfigurationOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link Configuration} - */ - public ServiceCall updateConfiguration( - UpdateConfigurationOptions updateConfigurationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateConfigurationOptions, "updateConfigurationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateConfigurationOptions.environmentId()); - pathParamsMap.put("configuration_id", updateConfigurationOptions.configurationId()); - RequestBuilder builder = - RequestBuilder.put( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/configurations/{configuration_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "updateConfiguration"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("name", updateConfigurationOptions.name()); - if (updateConfigurationOptions.description() != null) { - contentJson.addProperty("description", updateConfigurationOptions.description()); - } - if (updateConfigurationOptions.conversions() != null) { - contentJson.add( - "conversions", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateConfigurationOptions.conversions())); - } - if (updateConfigurationOptions.enrichments() != null) { - contentJson.add( - "enrichments", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateConfigurationOptions.enrichments())); - } - if (updateConfigurationOptions.normalizations() != null) { - contentJson.add( - "normalizations", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateConfigurationOptions.normalizations())); - } - if (updateConfigurationOptions.source() != null) { - contentJson.add( - "source", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateConfigurationOptions.source())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete a configuration. - * - *

The deletion is performed unconditionally. A configuration deletion request succeeds even if - * the configuration is referenced by a collection or document ingestion. However, documents that - * have already been submitted for processing continue to use the deleted configuration. Documents - * are always processed with a snapshot of the configuration as it existed at the time the - * document was submitted. - * - * @param deleteConfigurationOptions the {@link DeleteConfigurationOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link DeleteConfigurationResponse} - */ - public ServiceCall deleteConfiguration( - DeleteConfigurationOptions deleteConfigurationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteConfigurationOptions, "deleteConfigurationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteConfigurationOptions.environmentId()); - pathParamsMap.put("configuration_id", deleteConfigurationOptions.configurationId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/configurations/{configuration_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteConfiguration"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create a collection. - * - * @param createCollectionOptions the {@link CreateCollectionOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Collection} - */ - public ServiceCall createCollection(CreateCollectionOptions createCollectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createCollectionOptions, "createCollectionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createCollectionOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/collections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createCollection"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("name", createCollectionOptions.name()); - if (createCollectionOptions.description() != null) { - contentJson.addProperty("description", createCollectionOptions.description()); - } - if (createCollectionOptions.configurationId() != null) { - contentJson.addProperty("configuration_id", createCollectionOptions.configurationId()); - } - if (createCollectionOptions.language() != null) { - contentJson.addProperty("language", createCollectionOptions.language()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List collections. - * - *

Lists existing collections for the service instance. - * - * @param listCollectionsOptions the {@link ListCollectionsOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link ListCollectionsResponse} - */ - public ServiceCall listCollections( - ListCollectionsOptions listCollectionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listCollectionsOptions, "listCollectionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listCollectionsOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/collections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listCollections"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (listCollectionsOptions.name() != null) { - builder.query("name", String.valueOf(listCollectionsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get collection details. - * - * @param getCollectionOptions the {@link GetCollectionOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Collection} - */ - public ServiceCall getCollection(GetCollectionOptions getCollectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getCollectionOptions, "getCollectionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getCollectionOptions.environmentId()); - pathParamsMap.put("collection_id", getCollectionOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getCollection"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update a collection. - * - * @param updateCollectionOptions the {@link UpdateCollectionOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Collection} - */ - public ServiceCall updateCollection(UpdateCollectionOptions updateCollectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateCollectionOptions, "updateCollectionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateCollectionOptions.environmentId()); - pathParamsMap.put("collection_id", updateCollectionOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.put( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "updateCollection"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("name", updateCollectionOptions.name()); - if (updateCollectionOptions.description() != null) { - contentJson.addProperty("description", updateCollectionOptions.description()); - } - if (updateCollectionOptions.configurationId() != null) { - contentJson.addProperty("configuration_id", updateCollectionOptions.configurationId()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete a collection. - * - * @param deleteCollectionOptions the {@link DeleteCollectionOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DeleteCollectionResponse} - */ - public ServiceCall deleteCollection( - DeleteCollectionOptions deleteCollectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteCollectionOptions, "deleteCollectionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteCollectionOptions.environmentId()); - pathParamsMap.put("collection_id", deleteCollectionOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "deleteCollection"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List collection fields. - * - *

Gets a list of the unique fields (and their types) stored in the index. - * - * @param listCollectionFieldsOptions the {@link ListCollectionFieldsOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link ListCollectionFieldsResponse} - */ - public ServiceCall listCollectionFields( - ListCollectionFieldsOptions listCollectionFieldsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listCollectionFieldsOptions, "listCollectionFieldsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listCollectionFieldsOptions.environmentId()); - pathParamsMap.put("collection_id", listCollectionFieldsOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/fields", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "listCollectionFields"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get the expansion list. - * - *

Returns the current expansion list for the specified collection. If an expansion list is not - * specified, an object with empty expansion arrays is returned. - * - * @param listExpansionsOptions the {@link ListExpansionsOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Expansions} - */ - public ServiceCall listExpansions(ListExpansionsOptions listExpansionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listExpansionsOptions, "listExpansionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listExpansionsOptions.environmentId()); - pathParamsMap.put("collection_id", listExpansionsOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/expansions", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listExpansions"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create or update expansion list. - * - *

Create or replace the Expansion list for this collection. The maximum number of expanded - * terms per collection is `500`. The current expansion list is replaced with the uploaded - * content. - * - * @param createExpansionsOptions the {@link CreateExpansionsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Expansions} - */ - public ServiceCall createExpansions(CreateExpansionsOptions createExpansionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createExpansionsOptions, "createExpansionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createExpansionsOptions.environmentId()); - pathParamsMap.put("collection_id", createExpansionsOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/expansions", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createExpansions"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.add( - "expansions", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createExpansionsOptions.expansions())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete the expansion list. - * - *

Remove the expansion information for this collection. The expansion list must be deleted to - * disable query expansion for a collection. - * - * @param deleteExpansionsOptions the {@link DeleteExpansionsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteExpansionsOptions, "deleteExpansionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteExpansionsOptions.environmentId()); - pathParamsMap.put("collection_id", deleteExpansionsOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/expansions", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "deleteExpansions"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get tokenization dictionary status. - * - *

Returns the current status of the tokenization dictionary for the specified collection. - * - * @param getTokenizationDictionaryStatusOptions the {@link - * GetTokenizationDictionaryStatusOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TokenDictStatusResponse} - */ - public ServiceCall getTokenizationDictionaryStatus( - GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getTokenizationDictionaryStatusOptions, - "getTokenizationDictionaryStatusOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getTokenizationDictionaryStatusOptions.environmentId()); - pathParamsMap.put("collection_id", getTokenizationDictionaryStatusOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getTokenizationDictionaryStatus"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create tokenization dictionary. - * - *

Upload a custom tokenization dictionary to use with the specified collection. - * - * @param createTokenizationDictionaryOptions the {@link CreateTokenizationDictionaryOptions} - * containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TokenDictStatusResponse} - */ - public ServiceCall createTokenizationDictionary( - CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createTokenizationDictionaryOptions, "createTokenizationDictionaryOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createTokenizationDictionaryOptions.environmentId()); - pathParamsMap.put("collection_id", createTokenizationDictionaryOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createTokenizationDictionary"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (createTokenizationDictionaryOptions.tokenizationRules() != null) { - contentJson.add( - "tokenization_rules", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createTokenizationDictionaryOptions.tokenizationRules())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete tokenization dictionary. - * - *

Delete the tokenization dictionary from the collection. - * - * @param deleteTokenizationDictionaryOptions the {@link DeleteTokenizationDictionaryOptions} - * containing the options for the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteTokenizationDictionary( - DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteTokenizationDictionaryOptions, "deleteTokenizationDictionaryOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteTokenizationDictionaryOptions.environmentId()); - pathParamsMap.put("collection_id", deleteTokenizationDictionaryOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteTokenizationDictionary"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get stopword list status. - * - *

Returns the current status of the stopword list for the specified collection. - * - * @param getStopwordListStatusOptions the {@link GetStopwordListStatusOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link TokenDictStatusResponse} - */ - public ServiceCall getStopwordListStatus( - GetStopwordListStatusOptions getStopwordListStatusOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getStopwordListStatusOptions, "getStopwordListStatusOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getStopwordListStatusOptions.environmentId()); - pathParamsMap.put("collection_id", getStopwordListStatusOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getStopwordListStatus"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create stopword list. - * - *

Upload a custom stopword list to use with the specified collection. - * - * @param createStopwordListOptions the {@link CreateStopwordListOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link TokenDictStatusResponse} - */ - public ServiceCall createStopwordList( - CreateStopwordListOptions createStopwordListOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createStopwordListOptions, "createStopwordListOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createStopwordListOptions.environmentId()); - pathParamsMap.put("collection_id", createStopwordListOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createStopwordList"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MultipartBody.FORM); - okhttp3.RequestBody stopwordFileBody = - RequestUtils.inputStreamBody( - createStopwordListOptions.stopwordFile(), "application/octet-stream"); - multipartBuilder.addFormDataPart( - "stopword_file", createStopwordListOptions.stopwordFilename(), stopwordFileBody); - builder.body(multipartBuilder.build()); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete a custom stopword list. - * - *

Delete a custom stopword list from the collection. After a custom stopword list is deleted, - * the default list is used for the collection. - * - * @param deleteStopwordListOptions the {@link DeleteStopwordListOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteStopwordListOptions, "deleteStopwordListOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteStopwordListOptions.environmentId()); - pathParamsMap.put("collection_id", deleteStopwordListOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteStopwordList"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Add a document. - * - *

Add a document to a collection with optional metadata. - * - *

* The **version** query parameter is still required. - * - *

* Returns immediately after the system has accepted the document for processing. - * - *

* The user must provide document content, metadata, or both. If the request is missing both - * document content and metadata, it is rejected. - * - *

* The user can set the **Content-Type** parameter on the **file** part to indicate the media - * type of the document. If the **Content-Type** parameter is missing or is one of the generic - * media types (for example, `application/octet-stream`), then the service attempts to - * automatically detect the document's media type. - * - *

* The following field names are reserved and will be filtered out if present after - * normalization: `id`, `score`, `highlight`, and any field with the prefix of: `_`, `+`, or `-` - * - *

* Fields with empty name values after normalization are filtered out before indexing. - * - *

* Fields containing the following characters after normalization are filtered out before - * indexing: `#` and `,` - * - *

**Note:** Documents can be added with a specific **document_id** by using the - * **_/v1/environments/{environment_id}/collections/{collection_id}/documents** method. - * - * @param addDocumentOptions the {@link AddDocumentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DocumentAccepted} - */ - public ServiceCall addDocument(AddDocumentOptions addDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - addDocumentOptions, "addDocumentOptions cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.isTrue( - (addDocumentOptions.file() != null) || (addDocumentOptions.metadata() != null), - "At least one of file or metadata must be supplied."); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", addDocumentOptions.environmentId()); - pathParamsMap.put("collection_id", addDocumentOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/documents", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "addDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MultipartBody.FORM); - if (addDocumentOptions.file() != null) { - okhttp3.RequestBody fileBody = - RequestUtils.inputStreamBody( - addDocumentOptions.file(), addDocumentOptions.fileContentType()); - multipartBuilder.addFormDataPart("file", addDocumentOptions.filename(), fileBody); - } - if (addDocumentOptions.metadata() != null) { - multipartBuilder.addFormDataPart("metadata", addDocumentOptions.metadata()); - } - builder.body(multipartBuilder.build()); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get document details. - * - *

Fetch status details about a submitted document. **Note:** this operation does not return - * the document itself. Instead, it returns only the document's processing status and any notices - * (warnings or errors) that were generated when the document was ingested. Use the query API to - * retrieve the actual document content. - * - * @param getDocumentStatusOptions the {@link GetDocumentStatusOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DocumentStatus} - */ - public ServiceCall getDocumentStatus( - GetDocumentStatusOptions getDocumentStatusOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getDocumentStatusOptions, "getDocumentStatusOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getDocumentStatusOptions.environmentId()); - pathParamsMap.put("collection_id", getDocumentStatusOptions.collectionId()); - pathParamsMap.put("document_id", getDocumentStatusOptions.documentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getDocumentStatus"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update a document. - * - *

Replace an existing document or add a document with a specified **document_id**. Starts - * ingesting a document with optional metadata. - * - *

**Note:** When uploading a new document with this method it automatically replaces any - * document stored with the same **document_id** if it exists. - * - * @param updateDocumentOptions the {@link UpdateDocumentOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link DocumentAccepted} - */ - public ServiceCall updateDocument(UpdateDocumentOptions updateDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateDocumentOptions, "updateDocumentOptions cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.isTrue( - (updateDocumentOptions.file() != null) || (updateDocumentOptions.metadata() != null), - "At least one of file or metadata must be supplied."); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateDocumentOptions.environmentId()); - pathParamsMap.put("collection_id", updateDocumentOptions.collectionId()); - pathParamsMap.put("document_id", updateDocumentOptions.documentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "updateDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MultipartBody.FORM); - if (updateDocumentOptions.file() != null) { - okhttp3.RequestBody fileBody = - RequestUtils.inputStreamBody( - updateDocumentOptions.file(), updateDocumentOptions.fileContentType()); - multipartBuilder.addFormDataPart("file", updateDocumentOptions.filename(), fileBody); - } - if (updateDocumentOptions.metadata() != null) { - multipartBuilder.addFormDataPart("metadata", updateDocumentOptions.metadata()); - } - builder.body(multipartBuilder.build()); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete a document. - * - *

If the given document ID is invalid, or if the document is not found, then the a success - * response is returned (HTTP status code `200`) with the status set to 'deleted'. - * - * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link DeleteDocumentResponse} - */ - public ServiceCall deleteDocument( - DeleteDocumentOptions deleteDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteDocumentOptions, "deleteDocumentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteDocumentOptions.environmentId()); - pathParamsMap.put("collection_id", deleteDocumentOptions.collectionId()); - pathParamsMap.put("document_id", deleteDocumentOptions.documentId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "deleteDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Query a collection. - * - *

By using this method, you can construct long queries. For details, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts). - * - * @param queryOptions the {@link QueryOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link QueryResponse} - */ - public ServiceCall query(QueryOptions queryOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(queryOptions, "queryOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", queryOptions.environmentId()); - pathParamsMap.put("collection_id", queryOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/query", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "query"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - if (queryOptions.xWatsonLoggingOptOut() != null) { - builder.header("X-Watson-Logging-Opt-Out", queryOptions.xWatsonLoggingOptOut()); - } - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (queryOptions.filter() != null) { - contentJson.addProperty("filter", queryOptions.filter()); - } - if (queryOptions.query() != null) { - contentJson.addProperty("query", queryOptions.query()); - } - if (queryOptions.naturalLanguageQuery() != null) { - contentJson.addProperty("natural_language_query", queryOptions.naturalLanguageQuery()); - } - if (queryOptions.passages() != null) { - contentJson.addProperty("passages", queryOptions.passages()); - } - if (queryOptions.aggregation() != null) { - contentJson.addProperty("aggregation", queryOptions.aggregation()); - } - if (queryOptions.count() != null) { - contentJson.addProperty("count", queryOptions.count()); - } - if (queryOptions.xReturn() != null) { - contentJson.addProperty("return", queryOptions.xReturn()); - } - if (queryOptions.offset() != null) { - contentJson.addProperty("offset", queryOptions.offset()); - } - if (queryOptions.sort() != null) { - contentJson.addProperty("sort", queryOptions.sort()); - } - if (queryOptions.highlight() != null) { - contentJson.addProperty("highlight", queryOptions.highlight()); - } - if (queryOptions.passagesFields() != null) { - contentJson.addProperty("passages.fields", queryOptions.passagesFields()); - } - if (queryOptions.passagesCount() != null) { - contentJson.addProperty("passages.count", queryOptions.passagesCount()); - } - if (queryOptions.passagesCharacters() != null) { - contentJson.addProperty("passages.characters", queryOptions.passagesCharacters()); - } - if (queryOptions.deduplicate() != null) { - contentJson.addProperty("deduplicate", queryOptions.deduplicate()); - } - if (queryOptions.deduplicateField() != null) { - contentJson.addProperty("deduplicate.field", queryOptions.deduplicateField()); - } - if (queryOptions.similar() != null) { - contentJson.addProperty("similar", queryOptions.similar()); - } - if (queryOptions.similarDocumentIds() != null) { - contentJson.addProperty("similar.document_ids", queryOptions.similarDocumentIds()); - } - if (queryOptions.similarFields() != null) { - contentJson.addProperty("similar.fields", queryOptions.similarFields()); - } - if (queryOptions.bias() != null) { - contentJson.addProperty("bias", queryOptions.bias()); - } - if (queryOptions.spellingSuggestions() != null) { - contentJson.addProperty("spelling_suggestions", queryOptions.spellingSuggestions()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Query system notices. - * - *

Queries for notices (errors or warnings) that might have been generated by the system. - * Notices are generated when ingesting documents and performing relevance training. See the - * [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) - * for more details on the query language. - * - * @param queryNoticesOptions the {@link QueryNoticesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link QueryNoticesResponse} - */ - public ServiceCall queryNotices(QueryNoticesOptions queryNoticesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - queryNoticesOptions, "queryNoticesOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", queryNoticesOptions.environmentId()); - pathParamsMap.put("collection_id", queryNoticesOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/notices", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "queryNotices"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (queryNoticesOptions.filter() != null) { - builder.query("filter", String.valueOf(queryNoticesOptions.filter())); - } - if (queryNoticesOptions.query() != null) { - builder.query("query", String.valueOf(queryNoticesOptions.query())); - } - if (queryNoticesOptions.naturalLanguageQuery() != null) { - builder.query( - "natural_language_query", String.valueOf(queryNoticesOptions.naturalLanguageQuery())); - } - if (queryNoticesOptions.passages() != null) { - builder.query("passages", String.valueOf(queryNoticesOptions.passages())); - } - if (queryNoticesOptions.aggregation() != null) { - builder.query("aggregation", String.valueOf(queryNoticesOptions.aggregation())); - } - if (queryNoticesOptions.count() != null) { - builder.query("count", String.valueOf(queryNoticesOptions.count())); - } - if (queryNoticesOptions.xReturn() != null) { - builder.query("return", RequestUtils.join(queryNoticesOptions.xReturn(), ",")); - } - if (queryNoticesOptions.offset() != null) { - builder.query("offset", String.valueOf(queryNoticesOptions.offset())); - } - if (queryNoticesOptions.sort() != null) { - builder.query("sort", RequestUtils.join(queryNoticesOptions.sort(), ",")); - } - if (queryNoticesOptions.highlight() != null) { - builder.query("highlight", String.valueOf(queryNoticesOptions.highlight())); - } - if (queryNoticesOptions.passagesFields() != null) { - builder.query( - "passages.fields", RequestUtils.join(queryNoticesOptions.passagesFields(), ",")); - } - if (queryNoticesOptions.passagesCount() != null) { - builder.query("passages.count", String.valueOf(queryNoticesOptions.passagesCount())); - } - if (queryNoticesOptions.passagesCharacters() != null) { - builder.query( - "passages.characters", String.valueOf(queryNoticesOptions.passagesCharacters())); - } - if (queryNoticesOptions.deduplicateField() != null) { - builder.query("deduplicate.field", String.valueOf(queryNoticesOptions.deduplicateField())); - } - if (queryNoticesOptions.similar() != null) { - builder.query("similar", String.valueOf(queryNoticesOptions.similar())); - } - if (queryNoticesOptions.similarDocumentIds() != null) { - builder.query( - "similar.document_ids", RequestUtils.join(queryNoticesOptions.similarDocumentIds(), ",")); - } - if (queryNoticesOptions.similarFields() != null) { - builder.query("similar.fields", RequestUtils.join(queryNoticesOptions.similarFields(), ",")); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Query multiple collections. - * - *

By using this method, you can construct long queries that search multiple collection. For - * details, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts). - * - * @param federatedQueryOptions the {@link FederatedQueryOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link QueryResponse} - */ - public ServiceCall federatedQuery(FederatedQueryOptions federatedQueryOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - federatedQueryOptions, "federatedQueryOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", federatedQueryOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/query", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "federatedQuery"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - if (federatedQueryOptions.xWatsonLoggingOptOut() != null) { - builder.header("X-Watson-Logging-Opt-Out", federatedQueryOptions.xWatsonLoggingOptOut()); - } - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("collection_ids", federatedQueryOptions.collectionIds()); - if (federatedQueryOptions.filter() != null) { - contentJson.addProperty("filter", federatedQueryOptions.filter()); - } - if (federatedQueryOptions.query() != null) { - contentJson.addProperty("query", federatedQueryOptions.query()); - } - if (federatedQueryOptions.naturalLanguageQuery() != null) { - contentJson.addProperty( - "natural_language_query", federatedQueryOptions.naturalLanguageQuery()); - } - if (federatedQueryOptions.passages() != null) { - contentJson.addProperty("passages", federatedQueryOptions.passages()); - } - if (federatedQueryOptions.aggregation() != null) { - contentJson.addProperty("aggregation", federatedQueryOptions.aggregation()); - } - if (federatedQueryOptions.count() != null) { - contentJson.addProperty("count", federatedQueryOptions.count()); - } - if (federatedQueryOptions.xReturn() != null) { - contentJson.addProperty("return", federatedQueryOptions.xReturn()); - } - if (federatedQueryOptions.offset() != null) { - contentJson.addProperty("offset", federatedQueryOptions.offset()); - } - if (federatedQueryOptions.sort() != null) { - contentJson.addProperty("sort", federatedQueryOptions.sort()); - } - if (federatedQueryOptions.highlight() != null) { - contentJson.addProperty("highlight", federatedQueryOptions.highlight()); - } - if (federatedQueryOptions.passagesFields() != null) { - contentJson.addProperty("passages.fields", federatedQueryOptions.passagesFields()); - } - if (federatedQueryOptions.passagesCount() != null) { - contentJson.addProperty("passages.count", federatedQueryOptions.passagesCount()); - } - if (federatedQueryOptions.passagesCharacters() != null) { - contentJson.addProperty("passages.characters", federatedQueryOptions.passagesCharacters()); - } - if (federatedQueryOptions.deduplicate() != null) { - contentJson.addProperty("deduplicate", federatedQueryOptions.deduplicate()); - } - if (federatedQueryOptions.deduplicateField() != null) { - contentJson.addProperty("deduplicate.field", federatedQueryOptions.deduplicateField()); - } - if (federatedQueryOptions.similar() != null) { - contentJson.addProperty("similar", federatedQueryOptions.similar()); - } - if (federatedQueryOptions.similarDocumentIds() != null) { - contentJson.addProperty("similar.document_ids", federatedQueryOptions.similarDocumentIds()); - } - if (federatedQueryOptions.similarFields() != null) { - contentJson.addProperty("similar.fields", federatedQueryOptions.similarFields()); - } - if (federatedQueryOptions.bias() != null) { - contentJson.addProperty("bias", federatedQueryOptions.bias()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Query multiple collection system notices. - * - *

Queries for notices (errors or warnings) that might have been generated by the system. - * Notices are generated when ingesting documents and performing relevance training. See the - * [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) - * for more details on the query language. - * - * @param federatedQueryNoticesOptions the {@link FederatedQueryNoticesOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link QueryNoticesResponse} - */ - public ServiceCall federatedQueryNotices( - FederatedQueryNoticesOptions federatedQueryNoticesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - federatedQueryNoticesOptions, "federatedQueryNoticesOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", federatedQueryNoticesOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/notices", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "federatedQueryNotices"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query( - "collection_ids", RequestUtils.join(federatedQueryNoticesOptions.collectionIds(), ",")); - if (federatedQueryNoticesOptions.filter() != null) { - builder.query("filter", String.valueOf(federatedQueryNoticesOptions.filter())); - } - if (federatedQueryNoticesOptions.query() != null) { - builder.query("query", String.valueOf(federatedQueryNoticesOptions.query())); - } - if (federatedQueryNoticesOptions.naturalLanguageQuery() != null) { - builder.query( - "natural_language_query", - String.valueOf(federatedQueryNoticesOptions.naturalLanguageQuery())); - } - if (federatedQueryNoticesOptions.aggregation() != null) { - builder.query("aggregation", String.valueOf(federatedQueryNoticesOptions.aggregation())); - } - if (federatedQueryNoticesOptions.count() != null) { - builder.query("count", String.valueOf(federatedQueryNoticesOptions.count())); - } - if (federatedQueryNoticesOptions.xReturn() != null) { - builder.query("return", RequestUtils.join(federatedQueryNoticesOptions.xReturn(), ",")); - } - if (federatedQueryNoticesOptions.offset() != null) { - builder.query("offset", String.valueOf(federatedQueryNoticesOptions.offset())); - } - if (federatedQueryNoticesOptions.sort() != null) { - builder.query("sort", RequestUtils.join(federatedQueryNoticesOptions.sort(), ",")); - } - if (federatedQueryNoticesOptions.highlight() != null) { - builder.query("highlight", String.valueOf(federatedQueryNoticesOptions.highlight())); - } - if (federatedQueryNoticesOptions.deduplicateField() != null) { - builder.query( - "deduplicate.field", String.valueOf(federatedQueryNoticesOptions.deduplicateField())); - } - if (federatedQueryNoticesOptions.similar() != null) { - builder.query("similar", String.valueOf(federatedQueryNoticesOptions.similar())); - } - if (federatedQueryNoticesOptions.similarDocumentIds() != null) { - builder.query( - "similar.document_ids", - RequestUtils.join(federatedQueryNoticesOptions.similarDocumentIds(), ",")); - } - if (federatedQueryNoticesOptions.similarFields() != null) { - builder.query( - "similar.fields", RequestUtils.join(federatedQueryNoticesOptions.similarFields(), ",")); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get Autocomplete Suggestions. - * - *

Returns completion query suggestions for the specified prefix. /n/n **Important:** this - * method is only valid when using the Cloud Pak version of Discovery. - * - * @param getAutocompletionOptions the {@link GetAutocompletionOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Completions} - */ - public ServiceCall getAutocompletion( - GetAutocompletionOptions getAutocompletionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getAutocompletionOptions, "getAutocompletionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getAutocompletionOptions.environmentId()); - pathParamsMap.put("collection_id", getAutocompletionOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/autocompletion", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getAutocompletion"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("prefix", String.valueOf(getAutocompletionOptions.prefix())); - if (getAutocompletionOptions.field() != null) { - builder.query("field", String.valueOf(getAutocompletionOptions.field())); - } - if (getAutocompletionOptions.count() != null) { - builder.query("count", String.valueOf(getAutocompletionOptions.count())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List training data. - * - *

Lists the training data for the specified collection. - * - * @param listTrainingDataOptions the {@link ListTrainingDataOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link TrainingDataSet} - */ - public ServiceCall listTrainingData( - ListTrainingDataOptions listTrainingDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listTrainingDataOptions, "listTrainingDataOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listTrainingDataOptions.environmentId()); - pathParamsMap.put("collection_id", listTrainingDataOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listTrainingData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Add query to training data. - * - *

Adds a query to the training data for this collection. The query can contain a filter and - * natural language query. - * - * @param addTrainingDataOptions the {@link AddTrainingDataOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link TrainingQuery} - */ - public ServiceCall addTrainingData(AddTrainingDataOptions addTrainingDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - addTrainingDataOptions, "addTrainingDataOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", addTrainingDataOptions.environmentId()); - pathParamsMap.put("collection_id", addTrainingDataOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "addTrainingData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (addTrainingDataOptions.naturalLanguageQuery() != null) { - contentJson.addProperty( - "natural_language_query", addTrainingDataOptions.naturalLanguageQuery()); - } - if (addTrainingDataOptions.filter() != null) { - contentJson.addProperty("filter", addTrainingDataOptions.filter()); - } - if (addTrainingDataOptions.examples() != null) { - contentJson.add( - "examples", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(addTrainingDataOptions.examples())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete all training data. - * - *

Deletes all training data from a collection. - * - * @param deleteAllTrainingDataOptions the {@link DeleteAllTrainingDataOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteAllTrainingData( - DeleteAllTrainingDataOptions deleteAllTrainingDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteAllTrainingDataOptions, "deleteAllTrainingDataOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteAllTrainingDataOptions.environmentId()); - pathParamsMap.put("collection_id", deleteAllTrainingDataOptions.collectionId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteAllTrainingData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get details about a query. - * - *

Gets 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 result of type {@link TrainingQuery} - */ - public ServiceCall getTrainingData(GetTrainingDataOptions getTrainingDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getTrainingDataOptions, "getTrainingDataOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getTrainingDataOptions.environmentId()); - pathParamsMap.put("collection_id", getTrainingDataOptions.collectionId()); - pathParamsMap.put("query_id", getTrainingDataOptions.queryId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getTrainingData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete a training data query. - * - *

Removes the training data query and all associated examples from the training data set. - * - * @param deleteTrainingDataOptions the {@link DeleteTrainingDataOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteTrainingDataOptions, "deleteTrainingDataOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteTrainingDataOptions.environmentId()); - pathParamsMap.put("collection_id", deleteTrainingDataOptions.collectionId()); - pathParamsMap.put("query_id", deleteTrainingDataOptions.queryId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteTrainingData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List examples for a training data query. - * - *

List all examples for this training data query. - * - * @param listTrainingExamplesOptions the {@link ListTrainingExamplesOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link TrainingExampleList} - */ - public ServiceCall listTrainingExamples( - ListTrainingExamplesOptions listTrainingExamplesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listTrainingExamplesOptions, "listTrainingExamplesOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listTrainingExamplesOptions.environmentId()); - pathParamsMap.put("collection_id", listTrainingExamplesOptions.collectionId()); - pathParamsMap.put("query_id", listTrainingExamplesOptions.queryId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "listTrainingExamples"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Add example to training data query. - * - *

Adds a example to this training data query. - * - * @param createTrainingExampleOptions the {@link CreateTrainingExampleOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link TrainingExample} - */ - public ServiceCall createTrainingExample( - CreateTrainingExampleOptions createTrainingExampleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createTrainingExampleOptions, "createTrainingExampleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createTrainingExampleOptions.environmentId()); - pathParamsMap.put("collection_id", createTrainingExampleOptions.collectionId()); - pathParamsMap.put("query_id", createTrainingExampleOptions.queryId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createTrainingExample"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (createTrainingExampleOptions.documentId() != null) { - contentJson.addProperty("document_id", createTrainingExampleOptions.documentId()); - } - if (createTrainingExampleOptions.crossReference() != null) { - contentJson.addProperty("cross_reference", createTrainingExampleOptions.crossReference()); - } - if (createTrainingExampleOptions.relevance() != null) { - contentJson.addProperty("relevance", createTrainingExampleOptions.relevance()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete example for training data query. - * - *

Deletes the example document with the given ID from the training data query. - * - * @param deleteTrainingExampleOptions the {@link DeleteTrainingExampleOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteTrainingExample( - DeleteTrainingExampleOptions deleteTrainingExampleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteTrainingExampleOptions, "deleteTrainingExampleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteTrainingExampleOptions.environmentId()); - pathParamsMap.put("collection_id", deleteTrainingExampleOptions.collectionId()); - pathParamsMap.put("query_id", deleteTrainingExampleOptions.queryId()); - pathParamsMap.put("example_id", deleteTrainingExampleOptions.exampleId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteTrainingExample"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Change label or cross reference for example. - * - *

Changes the label or cross reference query for this training data example. - * - * @param updateTrainingExampleOptions the {@link UpdateTrainingExampleOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link TrainingExample} - */ - public ServiceCall updateTrainingExample( - UpdateTrainingExampleOptions updateTrainingExampleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateTrainingExampleOptions, "updateTrainingExampleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateTrainingExampleOptions.environmentId()); - pathParamsMap.put("collection_id", updateTrainingExampleOptions.collectionId()); - pathParamsMap.put("query_id", updateTrainingExampleOptions.queryId()); - pathParamsMap.put("example_id", updateTrainingExampleOptions.exampleId()); - RequestBuilder builder = - RequestBuilder.put( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "updateTrainingExample"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (updateTrainingExampleOptions.crossReference() != null) { - contentJson.addProperty("cross_reference", updateTrainingExampleOptions.crossReference()); - } - if (updateTrainingExampleOptions.relevance() != null) { - contentJson.addProperty("relevance", updateTrainingExampleOptions.relevance()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get details for training data example. - * - *

Gets the details for this training example. - * - * @param getTrainingExampleOptions the {@link GetTrainingExampleOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link TrainingExample} - */ - public ServiceCall getTrainingExample( - GetTrainingExampleOptions getTrainingExampleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getTrainingExampleOptions, "getTrainingExampleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getTrainingExampleOptions.environmentId()); - pathParamsMap.put("collection_id", getTrainingExampleOptions.collectionId()); - pathParamsMap.put("query_id", getTrainingExampleOptions.queryId()); - pathParamsMap.put("example_id", getTrainingExampleOptions.exampleId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getTrainingExample"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete labeled data. - * - *

Deletes all data associated with a specified customer ID. The method has no effect if no - * data is associated with the customer ID. - * - *

You associate a customer ID with data by passing the **X-Watson-Metadata** header with a - * request that passes data. For more information about personal data and customer IDs, see - * [Information - * security](https://cloud.ibm.com/docs/discovery?topic=discovery-information-security#information-security). - * - * @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteUserData(DeleteUserDataOptions deleteUserDataOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteUserDataOptions, "deleteUserDataOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/user_data")); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "deleteUserData"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - builder.query("customer_id", String.valueOf(deleteUserDataOptions.customerId())); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create event. - * - *

The **Events** API can be used to create log entries that are associated with specific - * queries. For example, you can record which documents in the results set were "clicked" by a - * user and when that click occurred. - * - * @param createEventOptions the {@link CreateEventOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link CreateEventResponse} - */ - public ServiceCall createEvent(CreateEventOptions createEventOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createEventOptions, "createEventOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/events")); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createEvent"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("type", createEventOptions.type()); - contentJson.add( - "data", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEventOptions.data())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Search the query and event log. - * - *

Searches the query and event log to find query sessions that match the specified criteria. - * Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters - * that are supported. - * - * @param queryLogOptions the {@link QueryLogOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LogQueryResponse} - */ - public ServiceCall queryLog(QueryLogOptions queryLogOptions) { - if (queryLogOptions == null) { - queryLogOptions = new QueryLogOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/logs")); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "queryLog"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (queryLogOptions.filter() != null) { - builder.query("filter", String.valueOf(queryLogOptions.filter())); - } - if (queryLogOptions.query() != null) { - builder.query("query", String.valueOf(queryLogOptions.query())); - } - if (queryLogOptions.count() != null) { - builder.query("count", String.valueOf(queryLogOptions.count())); - } - if (queryLogOptions.offset() != null) { - builder.query("offset", String.valueOf(queryLogOptions.offset())); - } - if (queryLogOptions.sort() != null) { - builder.query("sort", RequestUtils.join(queryLogOptions.sort(), ",")); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Search the query and event log. - * - *

Searches the query and event log to find query sessions that match the specified criteria. - * Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters - * that are supported. - * - * @return a {@link ServiceCall} with a result of type {@link LogQueryResponse} - */ - public ServiceCall queryLog() { - return queryLog(null); - } - - /** - * Number of queries over time. - * - *

Total number of queries using the **natural_language_query** parameter over a specific time - * window. - * - * @param getMetricsQueryOptions the {@link GetMetricsQueryOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQuery( - GetMetricsQueryOptions getMetricsQueryOptions) { - if (getMetricsQueryOptions == null) { - getMetricsQueryOptions = new GetMetricsQueryOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/metrics/number_of_queries")); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getMetricsQuery"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (getMetricsQueryOptions.startTime() != null) { - builder.query("start_time", DateUtils.formatAsDateTime(getMetricsQueryOptions.startTime())); - } - if (getMetricsQueryOptions.endTime() != null) { - builder.query("end_time", DateUtils.formatAsDateTime(getMetricsQueryOptions.endTime())); - } - if (getMetricsQueryOptions.resultType() != null) { - builder.query("result_type", String.valueOf(getMetricsQueryOptions.resultType())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Number of queries over time. - * - *

Total number of queries using the **natural_language_query** parameter over a specific time - * window. - * - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQuery() { - return getMetricsQuery(null); - } - - /** - * Number of queries with an event over time. - * - *

Total number of queries using the **natural_language_query** parameter that have a - * corresponding "click" event over a specified time window. This metric requires having - * integrated event tracking in your application using the **Events** API. - * - * @param getMetricsQueryEventOptions the {@link GetMetricsQueryEventOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQueryEvent( - GetMetricsQueryEventOptions getMetricsQueryEventOptions) { - if (getMetricsQueryEventOptions == null) { - getMetricsQueryEventOptions = new GetMetricsQueryEventOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/metrics/number_of_queries_with_event")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getMetricsQueryEvent"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (getMetricsQueryEventOptions.startTime() != null) { - builder.query( - "start_time", DateUtils.formatAsDateTime(getMetricsQueryEventOptions.startTime())); - } - if (getMetricsQueryEventOptions.endTime() != null) { - builder.query("end_time", DateUtils.formatAsDateTime(getMetricsQueryEventOptions.endTime())); - } - if (getMetricsQueryEventOptions.resultType() != null) { - builder.query("result_type", String.valueOf(getMetricsQueryEventOptions.resultType())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Number of queries with an event over time. - * - *

Total number of queries using the **natural_language_query** parameter that have a - * corresponding "click" event over a specified time window. This metric requires having - * integrated event tracking in your application using the **Events** API. - * - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQueryEvent() { - return getMetricsQueryEvent(null); - } - - /** - * Number of queries with no search results over time. - * - *

Total number of queries using the **natural_language_query** parameter that have no results - * returned over a specified time window. - * - * @param getMetricsQueryNoResultsOptions the {@link GetMetricsQueryNoResultsOptions} containing - * the options for the call - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQueryNoResults( - GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions) { - if (getMetricsQueryNoResultsOptions == null) { - getMetricsQueryNoResultsOptions = new GetMetricsQueryNoResultsOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/metrics/number_of_queries_with_no_search_results")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getMetricsQueryNoResults"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (getMetricsQueryNoResultsOptions.startTime() != null) { - builder.query( - "start_time", DateUtils.formatAsDateTime(getMetricsQueryNoResultsOptions.startTime())); - } - if (getMetricsQueryNoResultsOptions.endTime() != null) { - builder.query( - "end_time", DateUtils.formatAsDateTime(getMetricsQueryNoResultsOptions.endTime())); - } - if (getMetricsQueryNoResultsOptions.resultType() != null) { - builder.query("result_type", String.valueOf(getMetricsQueryNoResultsOptions.resultType())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Number of queries with no search results over time. - * - *

Total number of queries using the **natural_language_query** parameter that have no results - * returned over a specified time window. - * - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsQueryNoResults() { - return getMetricsQueryNoResults(null); - } - - /** - * Percentage of queries with an associated event. - * - *

The percentage of queries using the **natural_language_query** parameter that have a - * corresponding "click" event over a specified time window. This metric requires having - * integrated event tracking in your application using the **Events** API. - * - * @param getMetricsEventRateOptions the {@link GetMetricsEventRateOptions} containing the options - * for the call - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsEventRate( - GetMetricsEventRateOptions getMetricsEventRateOptions) { - if (getMetricsEventRateOptions == null) { - getMetricsEventRateOptions = new GetMetricsEventRateOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/metrics/event_rate")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getMetricsEventRate"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (getMetricsEventRateOptions.startTime() != null) { - builder.query( - "start_time", DateUtils.formatAsDateTime(getMetricsEventRateOptions.startTime())); - } - if (getMetricsEventRateOptions.endTime() != null) { - builder.query("end_time", DateUtils.formatAsDateTime(getMetricsEventRateOptions.endTime())); - } - if (getMetricsEventRateOptions.resultType() != null) { - builder.query("result_type", String.valueOf(getMetricsEventRateOptions.resultType())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Percentage of queries with an associated event. - * - *

The percentage of queries using the **natural_language_query** parameter that have a - * corresponding "click" event over a specified time window. This metric requires having - * integrated event tracking in your application using the **Events** API. - * - * @return a {@link ServiceCall} with a result of type {@link MetricResponse} - */ - public ServiceCall getMetricsEventRate() { - return getMetricsEventRate(null); - } - - /** - * Most frequent query tokens with an event. - * - *

The most frequent query tokens parsed from the **natural_language_query** parameter and - * their corresponding "click" event rate within the recording period (queries and events are - * stored for 30 days). A query token is an individual word or unigram within the query string. - * - * @param getMetricsQueryTokenEventOptions the {@link GetMetricsQueryTokenEventOptions} containing - * the options for the call - * @return a {@link ServiceCall} with a result of type {@link MetricTokenResponse} - */ - public ServiceCall getMetricsQueryTokenEvent( - GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions) { - if (getMetricsQueryTokenEventOptions == null) { - getMetricsQueryTokenEventOptions = new GetMetricsQueryTokenEventOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/metrics/top_query_tokens_with_event_rate")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "getMetricsQueryTokenEvent"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (getMetricsQueryTokenEventOptions.count() != null) { - builder.query("count", String.valueOf(getMetricsQueryTokenEventOptions.count())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Most frequent query tokens with an event. - * - *

The most frequent query tokens parsed from the **natural_language_query** parameter and - * their corresponding "click" event rate within the recording period (queries and events are - * stored for 30 days). A query token is an individual word or unigram within the query string. - * - * @return a {@link ServiceCall} with a result of type {@link MetricTokenResponse} - */ - public ServiceCall getMetricsQueryTokenEvent() { - return getMetricsQueryTokenEvent(null); - } - - /** - * List credentials. - * - *

List all the source credentials that have been created for this service instance. - * - *

**Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param listCredentialsOptions the {@link ListCredentialsOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link CredentialsList} - */ - public ServiceCall listCredentials( - ListCredentialsOptions listCredentialsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listCredentialsOptions, "listCredentialsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listCredentialsOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/credentials", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listCredentials"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create credentials. - * - *

Creates a set of credentials to connect to a remote source. Created credentials are used in - * a configuration to associate a collection with the remote source. - * - *

**Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param createCredentialsOptions the {@link CreateCredentialsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Credentials} - */ - public ServiceCall createCredentials( - CreateCredentialsOptions createCredentialsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createCredentialsOptions, "createCredentialsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createCredentialsOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/credentials", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "createCredentials"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (createCredentialsOptions.sourceType() != null) { - contentJson.addProperty("source_type", createCredentialsOptions.sourceType()); - } - if (createCredentialsOptions.credentialDetails() != null) { - contentJson.add( - "credential_details", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createCredentialsOptions.credentialDetails())); - } - if (createCredentialsOptions.status() != null) { - contentJson.add( - "status", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createCredentialsOptions.status())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * View Credentials. - * - *

Returns details about the specified credentials. - * - *

**Note:** Secure credential information such as a password or SSH key is never returned and - * must be obtained from the source system. - * - * @param getCredentialsOptions the {@link GetCredentialsOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Credentials} - */ - public ServiceCall getCredentials(GetCredentialsOptions getCredentialsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getCredentialsOptions, "getCredentialsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getCredentialsOptions.environmentId()); - pathParamsMap.put("credential_id", getCredentialsOptions.credentialId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/credentials/{credential_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getCredentials"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update credentials. - * - *

Updates an existing set of source credentials. - * - *

**Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param updateCredentialsOptions the {@link UpdateCredentialsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link Credentials} - */ - public ServiceCall updateCredentials( - UpdateCredentialsOptions updateCredentialsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - updateCredentialsOptions, "updateCredentialsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", updateCredentialsOptions.environmentId()); - pathParamsMap.put("credential_id", updateCredentialsOptions.credentialId()); - RequestBuilder builder = - RequestBuilder.put( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/credentials/{credential_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "updateCredentials"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (updateCredentialsOptions.sourceType() != null) { - contentJson.addProperty("source_type", updateCredentialsOptions.sourceType()); - } - if (updateCredentialsOptions.credentialDetails() != null) { - contentJson.add( - "credential_details", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateCredentialsOptions.credentialDetails())); - } - if (updateCredentialsOptions.status() != null) { - contentJson.add( - "status", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(updateCredentialsOptions.status())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete credentials. - * - *

Deletes a set of stored credentials from your Discovery instance. - * - * @param deleteCredentialsOptions the {@link DeleteCredentialsOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DeleteCredentials} - */ - public ServiceCall deleteCredentials( - DeleteCredentialsOptions deleteCredentialsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteCredentialsOptions, "deleteCredentialsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteCredentialsOptions.environmentId()); - pathParamsMap.put("credential_id", deleteCredentialsOptions.credentialId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/credentials/{credential_id}", - pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("discovery", "v1", "deleteCredentials"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List Gateways. - * - *

List the currently configured gateways. - * - * @param listGatewaysOptions the {@link ListGatewaysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link GatewayList} - */ - public ServiceCall listGateways(ListGatewaysOptions listGatewaysOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - listGatewaysOptions, "listGatewaysOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", listGatewaysOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/gateways", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "listGateways"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Create Gateway. - * - *

Create a gateway configuration to use with a remotely installed gateway. - * - * @param createGatewayOptions the {@link CreateGatewayOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Gateway} - */ - public ServiceCall createGateway(CreateGatewayOptions createGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createGatewayOptions, "createGatewayOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", createGatewayOptions.environmentId()); - RequestBuilder builder = - RequestBuilder.post( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v1/environments/{environment_id}/gateways", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "createGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - if (createGatewayOptions.name() != null) { - contentJson.addProperty("name", createGatewayOptions.name()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List Gateway Details. - * - *

List information about the specified gateway. - * - * @param getGatewayOptions the {@link GetGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Gateway} - */ - public ServiceCall getGateway(GetGatewayOptions getGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getGatewayOptions, "getGatewayOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", getGatewayOptions.environmentId()); - pathParamsMap.put("gateway_id", getGatewayOptions.gatewayId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/gateways/{gateway_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete Gateway. - * - *

Delete the specified gateway configuration. - * - * @param deleteGatewayOptions the {@link DeleteGatewayOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link GatewayDelete} - */ - public ServiceCall deleteGateway(DeleteGatewayOptions deleteGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteGatewayOptions, "deleteGatewayOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("environment_id", deleteGatewayOptions.environmentId()); - pathParamsMap.put("gateway_id", deleteGatewayOptions.gatewayId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), - "/v1/environments/{environment_id}/gateways/{gateway_id}", - pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "deleteGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddDocumentOptions.java deleted file mode 100644 index b8ba8a545e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddDocumentOptions.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** The addDocument options. */ -public class AddDocumentOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected InputStream file; - protected String filename; - protected String fileContentType; - protected String metadata; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private InputStream file; - private String filename; - private String fileContentType; - private String metadata; - - /** - * Instantiates a new Builder from an existing AddDocumentOptions instance. - * - * @param addDocumentOptions the instance to initialize the Builder with - */ - private Builder(AddDocumentOptions addDocumentOptions) { - this.environmentId = addDocumentOptions.environmentId; - this.collectionId = addDocumentOptions.collectionId; - this.file = addDocumentOptions.file; - this.filename = addDocumentOptions.filename; - this.fileContentType = addDocumentOptions.fileContentType; - this.metadata = addDocumentOptions.metadata; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a AddDocumentOptions. - * - * @return the new AddDocumentOptions instance - */ - public AddDocumentOptions build() { - return new AddDocumentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the AddDocumentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the AddDocumentOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the file. - * - * @param file the file - * @return the AddDocumentOptions builder - */ - public Builder file(InputStream file) { - this.file = file; - return this; - } - - /** - * Set the filename. - * - * @param filename the filename - * @return the AddDocumentOptions builder - */ - public Builder filename(String filename) { - this.filename = filename; - return this; - } - - /** - * Set the fileContentType. - * - * @param fileContentType the fileContentType - * @return the AddDocumentOptions builder - */ - public Builder fileContentType(String fileContentType) { - this.fileContentType = fileContentType; - return this; - } - - /** - * Set the metadata. - * - * @param metadata the metadata - * @return the AddDocumentOptions builder - */ - public Builder metadata(String metadata) { - this.metadata = metadata; - return this; - } - - /** - * Set the file. - * - * @param file the file - * @return the AddDocumentOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder file(File file) throws FileNotFoundException { - this.file = new FileInputStream(file); - this.filename = file.getName(); - return this; - } - } - - protected AddDocumentOptions() {} - - protected AddDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.isTrue( - (builder.file == null) || (builder.filename != null), - "filename cannot be null if file is not null."); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - file = builder.file; - filename = builder.filename; - fileContentType = builder.fileContentType; - metadata = builder.metadata; - } - - /** - * New builder. - * - * @return a AddDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the file. - * - *

The content of the document to ingest. The maximum supported file size when adding a file to - * a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 - * megabyte. Files larger than the supported size are rejected. - * - * @return the file - */ - public InputStream file() { - return file; - } - - /** - * Gets the filename. - * - *

The filename for file. - * - * @return the filename - */ - public String filename() { - return filename; - } - - /** - * Gets the fileContentType. - * - *

The content type of file. Values for this parameter can be obtained from the HttpMediaType - * class. - * - * @return the fileContentType - */ - public String fileContentType() { - return fileContentType; - } - - /** - * Gets the metadata. - * - *

The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are - * rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. - * - * @return the metadata - */ - public String metadata() { - return metadata; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptions.java deleted file mode 100644 index 84c57841bc..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptions.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The addTrainingData options. */ -public class AddTrainingDataOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String naturalLanguageQuery; - protected String filter; - protected List examples; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String naturalLanguageQuery; - private String filter; - private List examples; - - /** - * Instantiates a new Builder from an existing AddTrainingDataOptions instance. - * - * @param addTrainingDataOptions the instance to initialize the Builder with - */ - private Builder(AddTrainingDataOptions addTrainingDataOptions) { - this.environmentId = addTrainingDataOptions.environmentId; - this.collectionId = addTrainingDataOptions.collectionId; - this.naturalLanguageQuery = addTrainingDataOptions.naturalLanguageQuery; - this.filter = addTrainingDataOptions.filter; - this.examples = addTrainingDataOptions.examples; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a AddTrainingDataOptions. - * - * @return the new AddTrainingDataOptions instance - */ - public AddTrainingDataOptions build() { - return new AddTrainingDataOptions(this); - } - - /** - * Adds a new element to examples. - * - * @param examples the new element to be added - * @return the AddTrainingDataOptions builder - */ - public Builder addExamples(TrainingExample examples) { - com.ibm.cloud.sdk.core.util.Validator.notNull(examples, "examples cannot be null"); - if (this.examples == null) { - this.examples = new ArrayList(); - } - this.examples.add(examples); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the AddTrainingDataOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the AddTrainingDataOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the naturalLanguageQuery. - * - * @param naturalLanguageQuery the naturalLanguageQuery - * @return the AddTrainingDataOptions builder - */ - public Builder naturalLanguageQuery(String naturalLanguageQuery) { - this.naturalLanguageQuery = naturalLanguageQuery; - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the AddTrainingDataOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the examples. Existing examples will be replaced. - * - * @param examples the examples - * @return the AddTrainingDataOptions builder - */ - public Builder examples(List examples) { - this.examples = examples; - return this; - } - } - - protected AddTrainingDataOptions() {} - - protected AddTrainingDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - naturalLanguageQuery = builder.naturalLanguageQuery; - filter = builder.filter; - examples = builder.examples; - } - - /** - * New builder. - * - * @return a AddTrainingDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the naturalLanguageQuery. - * - *

The natural text query for the new training query. - * - * @return the naturalLanguageQuery - */ - public String naturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the filter. - * - *

The filter used on the collection before the **natural_language_query** is applied. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the examples. - * - *

Array of training examples. - * - * @return the examples - */ - public List examples() { - return examples; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AggregationResult.java deleted file mode 100644 index 47fa2ad05c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/AggregationResult.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Aggregation results for the specified query. */ -public class AggregationResult extends GenericModel { - - protected String key; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - /** - * Gets the key. - * - *

Key that matched the aggregation type. - * - * @return the key - */ - public String getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

Aggregations returned in the case of chained aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Collection.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Collection.java deleted file mode 100644 index 748637f571..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Collection.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** A collection for storing documents. */ -public class Collection extends GenericModel { - - /** The status of the collection. */ - public interface Status { - /** active. */ - String ACTIVE = "active"; - /** pending. */ - String PENDING = "pending"; - /** maintenance. */ - String MAINTENANCE = "maintenance"; - } - - @SerializedName("collection_id") - protected String collectionId; - - protected String name; - protected String description; - protected Date created; - protected Date updated; - protected String status; - - @SerializedName("configuration_id") - protected String configurationId; - - protected String language; - - @SerializedName("document_counts") - protected DocumentCounts documentCounts; - - @SerializedName("disk_usage") - protected CollectionDiskUsage diskUsage; - - @SerializedName("training_status") - protected TrainingStatus trainingStatus; - - @SerializedName("crawl_status") - protected CollectionCrawlStatus crawlStatus; - - @SerializedName("smart_document_understanding") - protected SduStatus smartDocumentUnderstanding; - - protected Collection() {} - - /** - * Gets the collectionId. - * - *

The unique identifier of the collection. - * - * @return the collectionId - */ - public String getCollectionId() { - return collectionId; - } - - /** - * Gets the name. - * - *

The name of the collection. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the description. - * - *

The description of the collection. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the created. - * - *

The creation date of the collection in the format yyyy-MM-dd'T'HH:mmcon:ss.SSS'Z'. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Gets the updated. - * - *

The timestamp of when the collection was last updated in the format - * yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. - * - * @return the updated - */ - public Date getUpdated() { - return updated; - } - - /** - * Gets the status. - * - *

The status of the collection. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the configurationId. - * - *

The unique identifier of the collection's configuration. - * - * @return the configurationId - */ - public String getConfigurationId() { - return configurationId; - } - - /** - * Gets the language. - * - *

The language of the documents stored in the collection. Permitted values include `en` - * (English), `de` (German), and `es` (Spanish). - * - * @return the language - */ - public String getLanguage() { - return language; - } - - /** - * Gets the documentCounts. - * - *

Object containing collection document count information. - * - * @return the documentCounts - */ - public DocumentCounts getDocumentCounts() { - return documentCounts; - } - - /** - * Gets the diskUsage. - * - *

Summary of the disk usage statistics for this collection. - * - * @return the diskUsage - */ - public CollectionDiskUsage getDiskUsage() { - return diskUsage; - } - - /** - * Gets the trainingStatus. - * - *

Training status details. - * - * @return the trainingStatus - */ - public TrainingStatus getTrainingStatus() { - return trainingStatus; - } - - /** - * Gets the crawlStatus. - * - *

Object containing information about the crawl status of this collection. - * - * @return the crawlStatus - */ - public CollectionCrawlStatus getCrawlStatus() { - return crawlStatus; - } - - /** - * Gets the smartDocumentUnderstanding. - * - *

Object containing smart document understanding information for this collection. - * - * @return the smartDocumentUnderstanding - */ - public SduStatus getSmartDocumentUnderstanding() { - return smartDocumentUnderstanding; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatus.java deleted file mode 100644 index 615e34021a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatus.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing information about the crawl status of this collection. */ -public class CollectionCrawlStatus extends GenericModel { - - @SerializedName("source_crawl") - protected SourceStatus sourceCrawl; - - protected CollectionCrawlStatus() {} - - /** - * Gets the sourceCrawl. - * - *

Object containing source crawl status information. - * - * @return the sourceCrawl - */ - public SourceStatus getSourceCrawl() { - return sourceCrawl; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsage.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsage.java deleted file mode 100644 index 0a0ae62edd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsage.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Summary of the disk usage statistics for this collection. */ -public class CollectionDiskUsage extends GenericModel { - - @SerializedName("used_bytes") - protected Long usedBytes; - - protected CollectionDiskUsage() {} - - /** - * Gets the usedBytes. - * - *

Number of bytes used by the collection. - * - * @return the usedBytes - */ - public Long getUsedBytes() { - return usedBytes; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionUsage.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionUsage.java deleted file mode 100644 index a71d4adc2b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CollectionUsage.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Summary of the collection usage in the environment. */ -public class CollectionUsage extends GenericModel { - - protected Long available; - - @SerializedName("maximum_allowed") - protected Long maximumAllowed; - - protected CollectionUsage() {} - - /** - * Gets the available. - * - *

Number of active collections in the environment. - * - * @return the available - */ - public Long getAvailable() { - return available; - } - - /** - * Gets the maximumAllowed. - * - *

Total number of collections allowed in the environment. - * - * @return the maximumAllowed - */ - public Long getMaximumAllowed() { - return maximumAllowed; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Completions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Completions.java deleted file mode 100644 index d09e5ae59a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Completions.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** An object containing an array of autocompletion suggestions. */ -public class Completions extends GenericModel { - - protected List completions; - - protected Completions() {} - - /** - * Gets the completions. - * - *

Array of autcomplete suggestion based on the provided prefix. - * - * @return the completions - */ - public List getCompletions() { - return completions; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Configuration.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Configuration.java deleted file mode 100644 index 7d468e249c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Configuration.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** A custom configuration for the environment. */ -public class Configuration extends GenericModel { - - @SerializedName("configuration_id") - protected String configurationId; - - protected String name; - protected Date created; - protected Date updated; - protected String description; - protected Conversions conversions; - protected List enrichments; - protected List normalizations; - protected Source source; - - /** Builder. */ - public static class Builder { - private String name; - private String description; - private Conversions conversions; - private List enrichments; - private List normalizations; - private Source source; - - /** - * Instantiates a new Builder from an existing Configuration instance. - * - * @param configuration the instance to initialize the Builder with - */ - private Builder(Configuration configuration) { - this.name = configuration.name; - this.description = configuration.description; - this.conversions = configuration.conversions; - this.enrichments = configuration.enrichments; - this.normalizations = configuration.normalizations; - this.source = configuration.source; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param name the name - */ - public Builder(String name) { - this.name = name; - } - - /** - * Builds a Configuration. - * - * @return the new Configuration instance - */ - public Configuration build() { - return new Configuration(this); - } - - /** - * Adds a new element to enrichments. - * - * @param enrichment the new element to be added - * @return the Configuration builder - */ - public Builder addEnrichment(Enrichment enrichment) { - com.ibm.cloud.sdk.core.util.Validator.notNull(enrichment, "enrichment cannot be null"); - if (this.enrichments == null) { - this.enrichments = new ArrayList(); - } - this.enrichments.add(enrichment); - return this; - } - - /** - * Adds a new element to normalizations. - * - * @param normalization the new element to be added - * @return the Configuration builder - */ - public Builder addNormalization(NormalizationOperation normalization) { - com.ibm.cloud.sdk.core.util.Validator.notNull(normalization, "normalization cannot be null"); - if (this.normalizations == null) { - this.normalizations = new ArrayList(); - } - this.normalizations.add(normalization); - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the Configuration builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the Configuration builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the conversions. - * - * @param conversions the conversions - * @return the Configuration builder - */ - public Builder conversions(Conversions conversions) { - this.conversions = conversions; - return this; - } - - /** - * Set the enrichments. Existing enrichments will be replaced. - * - * @param enrichments the enrichments - * @return the Configuration builder - */ - public Builder enrichments(List enrichments) { - this.enrichments = enrichments; - return this; - } - - /** - * Set the normalizations. Existing normalizations will be replaced. - * - * @param normalizations the normalizations - * @return the Configuration builder - */ - public Builder normalizations(List normalizations) { - this.normalizations = normalizations; - return this; - } - - /** - * Set the source. - * - * @param source the source - * @return the Configuration builder - */ - public Builder source(Source source) { - this.source = source; - return this; - } - } - - protected Configuration() {} - - protected Configuration(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - name = builder.name; - description = builder.description; - conversions = builder.conversions; - enrichments = builder.enrichments; - normalizations = builder.normalizations; - source = builder.source; - } - - /** - * New builder. - * - * @return a Configuration builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the configurationId. - * - *

The unique identifier of the configuration. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } - - /** - * Gets the name. - * - *

The name of the configuration. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the created. - * - *

The creation date of the configuration in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. - * - * @return the created - */ - public Date created() { - return created; - } - - /** - * Gets the updated. - * - *

The timestamp of when the configuration was last updated in the format - * yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. - * - * @return the updated - */ - public Date updated() { - return updated; - } - - /** - * Gets the description. - * - *

The description of the configuration, if available. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the conversions. - * - *

Document conversion settings. - * - * @return the conversions - */ - public Conversions conversions() { - return conversions; - } - - /** - * Gets the enrichments. - * - *

An array of document enrichment settings for the configuration. - * - * @return the enrichments - */ - public List enrichments() { - return enrichments; - } - - /** - * Gets the normalizations. - * - *

Defines operations that can be used to transform the final output JSON into a normalized - * form. Operations are executed in the order that they appear in the array. - * - * @return the normalizations - */ - public List normalizations() { - return normalizations; - } - - /** - * Gets the source. - * - *

Object containing source parameters for the configuration. - * - * @return the source - */ - public Source source() { - return source; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Conversions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Conversions.java deleted file mode 100644 index 429778a2c2..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Conversions.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Document conversion settings. */ -public class Conversions extends GenericModel { - - protected PdfSettings pdf; - protected WordSettings word; - protected HtmlSettings html; - protected SegmentSettings segment; - - @SerializedName("json_normalizations") - protected List jsonNormalizations; - - @SerializedName("image_text_recognition") - protected Boolean imageTextRecognition; - - /** Builder. */ - public static class Builder { - private PdfSettings pdf; - private WordSettings word; - private HtmlSettings html; - private SegmentSettings segment; - private List jsonNormalizations; - private Boolean imageTextRecognition; - - /** - * Instantiates a new Builder from an existing Conversions instance. - * - * @param conversions the instance to initialize the Builder with - */ - private Builder(Conversions conversions) { - this.pdf = conversions.pdf; - this.word = conversions.word; - this.html = conversions.html; - this.segment = conversions.segment; - this.jsonNormalizations = conversions.jsonNormalizations; - this.imageTextRecognition = conversions.imageTextRecognition; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a Conversions. - * - * @return the new Conversions instance - */ - public Conversions build() { - return new Conversions(this); - } - - /** - * Adds a new element to jsonNormalizations. - * - * @param normalization the new element to be added - * @return the Conversions builder - */ - public Builder addNormalization(NormalizationOperation normalization) { - com.ibm.cloud.sdk.core.util.Validator.notNull(normalization, "normalization cannot be null"); - if (this.jsonNormalizations == null) { - this.jsonNormalizations = new ArrayList(); - } - this.jsonNormalizations.add(normalization); - return this; - } - - /** - * Set the pdf. - * - * @param pdf the pdf - * @return the Conversions builder - */ - public Builder pdf(PdfSettings pdf) { - this.pdf = pdf; - return this; - } - - /** - * Set the word. - * - * @param word the word - * @return the Conversions builder - */ - public Builder word(WordSettings word) { - this.word = word; - return this; - } - - /** - * Set the html. - * - * @param html the html - * @return the Conversions builder - */ - public Builder html(HtmlSettings html) { - this.html = html; - return this; - } - - /** - * Set the segment. - * - * @param segment the segment - * @return the Conversions builder - */ - public Builder segment(SegmentSettings segment) { - this.segment = segment; - return this; - } - - /** - * Set the jsonNormalizations. Existing jsonNormalizations will be replaced. - * - * @param jsonNormalizations the jsonNormalizations - * @return the Conversions builder - */ - public Builder jsonNormalizations(List jsonNormalizations) { - this.jsonNormalizations = jsonNormalizations; - return this; - } - - /** - * Set the imageTextRecognition. - * - * @param imageTextRecognition the imageTextRecognition - * @return the Conversions builder - */ - public Builder imageTextRecognition(Boolean imageTextRecognition) { - this.imageTextRecognition = imageTextRecognition; - return this; - } - } - - protected Conversions() {} - - protected Conversions(Builder builder) { - pdf = builder.pdf; - word = builder.word; - html = builder.html; - segment = builder.segment; - jsonNormalizations = builder.jsonNormalizations; - imageTextRecognition = builder.imageTextRecognition; - } - - /** - * New builder. - * - * @return a Conversions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the pdf. - * - *

A list of PDF conversion settings. - * - * @return the pdf - */ - public PdfSettings pdf() { - return pdf; - } - - /** - * Gets the word. - * - *

A list of Word conversion settings. - * - * @return the word - */ - public WordSettings word() { - return word; - } - - /** - * Gets the html. - * - *

A list of HTML conversion settings. - * - * @return the html - */ - public HtmlSettings html() { - return html; - } - - /** - * Gets the segment. - * - *

A list of Document Segmentation settings. - * - * @return the segment - */ - public SegmentSettings segment() { - return segment; - } - - /** - * Gets the jsonNormalizations. - * - *

Defines operations that can be used to transform the final output JSON into a normalized - * form. Operations are executed in the order that they appear in the array. - * - * @return the jsonNormalizations - */ - public List jsonNormalizations() { - return jsonNormalizations; - } - - /** - * Gets the imageTextRecognition. - * - *

When `true`, automatic text extraction from images (this includes images embedded in - * supported document formats, for example PDF, and suppported image formats, for example TIFF) is - * performed on documents uploaded to the collection. This field is supported on **Advanced** and - * higher plans only. **Lite** plans do not support image text recognition. - * - * @return the imageTextRecognition - */ - public Boolean imageTextRecognition() { - return imageTextRecognition; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptions.java deleted file mode 100644 index a935d73069..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptions.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createCollection options. */ -public class CreateCollectionOptions extends GenericModel { - - /** - * The language of the documents stored in the collection, in the form of an ISO 639-1 language - * code. - */ - public interface Language { - /** en. */ - String EN = "en"; - /** es. */ - String ES = "es"; - /** de. */ - String DE = "de"; - /** ar. */ - String AR = "ar"; - /** fr. */ - String FR = "fr"; - /** it. */ - String IT = "it"; - /** ja. */ - String JA = "ja"; - /** ko. */ - String KO = "ko"; - /** pt. */ - String PT = "pt"; - /** nl. */ - String NL = "nl"; - /** zh-CN. */ - String ZH_CN = "zh-CN"; - } - - protected String environmentId; - protected String name; - protected String description; - protected String configurationId; - protected String language; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - private String description; - private String configurationId; - private String language; - - /** - * Instantiates a new Builder from an existing CreateCollectionOptions instance. - * - * @param createCollectionOptions the instance to initialize the Builder with - */ - private Builder(CreateCollectionOptions createCollectionOptions) { - this.environmentId = createCollectionOptions.environmentId; - this.name = createCollectionOptions.name; - this.description = createCollectionOptions.description; - this.configurationId = createCollectionOptions.configurationId; - this.language = createCollectionOptions.language; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param name the name - */ - public Builder(String environmentId, String name) { - this.environmentId = environmentId; - this.name = name; - } - - /** - * Builds a CreateCollectionOptions. - * - * @return the new CreateCollectionOptions instance - */ - public CreateCollectionOptions build() { - return new CreateCollectionOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateCollectionOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the CreateCollectionOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the CreateCollectionOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the configurationId. - * - * @param configurationId the configurationId - * @return the CreateCollectionOptions builder - */ - public Builder configurationId(String configurationId) { - this.configurationId = configurationId; - return this; - } - - /** - * Set the language. - * - * @param language the language - * @return the CreateCollectionOptions builder - */ - public Builder language(String language) { - this.language = language; - return this; - } - } - - protected CreateCollectionOptions() {} - - protected CreateCollectionOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - environmentId = builder.environmentId; - name = builder.name; - description = builder.description; - configurationId = builder.configurationId; - language = builder.language; - } - - /** - * New builder. - * - * @return a CreateCollectionOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

The name of the collection to be created. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

A description of the collection. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the configurationId. - * - *

The ID of the configuration in which the collection is to be created. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } - - /** - * Gets the language. - * - *

The language of the documents stored in the collection, in the form of an ISO 639-1 language - * code. - * - * @return the language - */ - public String language() { - return language; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptions.java deleted file mode 100644 index 6034583117..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptions.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The createConfiguration options. */ -public class CreateConfigurationOptions extends GenericModel { - - protected String environmentId; - protected String name; - protected String description; - protected Conversions conversions; - protected List enrichments; - protected List normalizations; - protected Source source; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - private String description; - private Conversions conversions; - private List enrichments; - private List normalizations; - private Source source; - - /** - * Instantiates a new Builder from an existing CreateConfigurationOptions instance. - * - * @param createConfigurationOptions the instance to initialize the Builder with - */ - private Builder(CreateConfigurationOptions createConfigurationOptions) { - this.environmentId = createConfigurationOptions.environmentId; - this.name = createConfigurationOptions.name; - this.description = createConfigurationOptions.description; - this.conversions = createConfigurationOptions.conversions; - this.enrichments = createConfigurationOptions.enrichments; - this.normalizations = createConfigurationOptions.normalizations; - this.source = createConfigurationOptions.source; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param name the name - */ - public Builder(String environmentId, String name) { - this.environmentId = environmentId; - this.name = name; - } - - /** - * Builds a CreateConfigurationOptions. - * - * @return the new CreateConfigurationOptions instance - */ - public CreateConfigurationOptions build() { - return new CreateConfigurationOptions(this); - } - - /** - * Adds a new element to enrichments. - * - * @param enrichment the new element to be added - * @return the CreateConfigurationOptions builder - */ - public Builder addEnrichment(Enrichment enrichment) { - com.ibm.cloud.sdk.core.util.Validator.notNull(enrichment, "enrichment cannot be null"); - if (this.enrichments == null) { - this.enrichments = new ArrayList(); - } - this.enrichments.add(enrichment); - return this; - } - - /** - * Adds a new element to normalizations. - * - * @param normalization the new element to be added - * @return the CreateConfigurationOptions builder - */ - public Builder addNormalization(NormalizationOperation normalization) { - com.ibm.cloud.sdk.core.util.Validator.notNull(normalization, "normalization cannot be null"); - if (this.normalizations == null) { - this.normalizations = new ArrayList(); - } - this.normalizations.add(normalization); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateConfigurationOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the CreateConfigurationOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the CreateConfigurationOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the conversions. - * - * @param conversions the conversions - * @return the CreateConfigurationOptions builder - */ - public Builder conversions(Conversions conversions) { - this.conversions = conversions; - return this; - } - - /** - * Set the enrichments. Existing enrichments will be replaced. - * - * @param enrichments the enrichments - * @return the CreateConfigurationOptions builder - */ - public Builder enrichments(List enrichments) { - this.enrichments = enrichments; - return this; - } - - /** - * Set the normalizations. Existing normalizations will be replaced. - * - * @param normalizations the normalizations - * @return the CreateConfigurationOptions builder - */ - public Builder normalizations(List normalizations) { - this.normalizations = normalizations; - return this; - } - - /** - * Set the source. - * - * @param source the source - * @return the CreateConfigurationOptions builder - */ - public Builder source(Source source) { - this.source = source; - return this; - } - - /** - * Set the configuration. - * - * @param configuration the configuration - * @return the CreateConfigurationOptions builder - */ - public Builder configuration(Configuration configuration) { - this.name = configuration.name(); - this.description = configuration.description(); - this.conversions = configuration.conversions(); - this.enrichments = configuration.enrichments(); - this.normalizations = configuration.normalizations(); - this.source = configuration.source(); - return this; - } - } - - protected CreateConfigurationOptions() {} - - protected CreateConfigurationOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - environmentId = builder.environmentId; - name = builder.name; - description = builder.description; - conversions = builder.conversions; - enrichments = builder.enrichments; - normalizations = builder.normalizations; - source = builder.source; - } - - /** - * New builder. - * - * @return a CreateConfigurationOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

The name of the configuration. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

The description of the configuration, if available. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the conversions. - * - *

Document conversion settings. - * - * @return the conversions - */ - public Conversions conversions() { - return conversions; - } - - /** - * Gets the enrichments. - * - *

An array of document enrichment settings for the configuration. - * - * @return the enrichments - */ - public List enrichments() { - return enrichments; - } - - /** - * Gets the normalizations. - * - *

Defines operations that can be used to transform the final output JSON into a normalized - * form. Operations are executed in the order that they appear in the array. - * - * @return the normalizations - */ - public List normalizations() { - return normalizations; - } - - /** - * Gets the source. - * - *

Object containing source parameters for the configuration. - * - * @return the source - */ - public Source source() { - return source; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptions.java deleted file mode 100644 index 5ca84b4420..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptions.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createCredentials options. */ -public class CreateCredentialsOptions extends GenericModel { - - /** - * The source that this credentials object connects to. - `box` indicates the credentials are used - * to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to - * connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - */ - public interface SourceType { - /** box. */ - String BOX = "box"; - /** salesforce. */ - String SALESFORCE = "salesforce"; - /** sharepoint. */ - String SHAREPOINT = "sharepoint"; - /** web_crawl. */ - String WEB_CRAWL = "web_crawl"; - /** cloud_object_storage. */ - String CLOUD_OBJECT_STORAGE = "cloud_object_storage"; - } - - protected String environmentId; - protected String sourceType; - protected CredentialDetails credentialDetails; - protected StatusDetails status; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String sourceType; - private CredentialDetails credentialDetails; - private StatusDetails status; - - /** - * Instantiates a new Builder from an existing CreateCredentialsOptions instance. - * - * @param createCredentialsOptions the instance to initialize the Builder with - */ - private Builder(CreateCredentialsOptions createCredentialsOptions) { - this.environmentId = createCredentialsOptions.environmentId; - this.sourceType = createCredentialsOptions.sourceType; - this.credentialDetails = createCredentialsOptions.credentialDetails; - this.status = createCredentialsOptions.status; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a CreateCredentialsOptions. - * - * @return the new CreateCredentialsOptions instance - */ - public CreateCredentialsOptions build() { - return new CreateCredentialsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateCredentialsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the sourceType. - * - * @param sourceType the sourceType - * @return the CreateCredentialsOptions builder - */ - public Builder sourceType(String sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Set the credentialDetails. - * - * @param credentialDetails the credentialDetails - * @return the CreateCredentialsOptions builder - */ - public Builder credentialDetails(CredentialDetails credentialDetails) { - this.credentialDetails = credentialDetails; - return this; - } - - /** - * Set the status. - * - * @param status the status - * @return the CreateCredentialsOptions builder - */ - public Builder status(StatusDetails status) { - this.status = status; - return this; - } - - /** - * Set the credentials. - * - * @param credentials the credentials - * @return the CreateCredentialsOptions builder - */ - public Builder credentials(Credentials credentials) { - this.sourceType = credentials.sourceType(); - this.credentialDetails = credentials.credentialDetails(); - this.status = credentials.status(); - return this; - } - } - - protected CreateCredentialsOptions() {} - - protected CreateCredentialsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - sourceType = builder.sourceType; - credentialDetails = builder.credentialDetails; - status = builder.status; - } - - /** - * New builder. - * - * @return a CreateCredentialsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the sourceType. - * - *

The source that this credentials object connects to. - `box` indicates the credentials are - * used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are - * used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - * - * @return the sourceType - */ - public String sourceType() { - return sourceType; - } - - /** - * Gets the credentialDetails. - * - *

Object containing details of the stored credentials. - * - *

Obtain credentials for your source from the administrator of the source. - * - * @return the credentialDetails - */ - public CredentialDetails credentialDetails() { - return credentialDetails; - } - - /** - * Gets the status. - * - *

Object that contains details about the status of the authentication process. - * - * @return the status - */ - public StatusDetails status() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptions.java deleted file mode 100644 index 07641b9f17..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptions.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createEnvironment options. */ -public class CreateEnvironmentOptions extends GenericModel { - - /** - * Size of the environment. In the Lite plan the default and only accepted value is `LT`, in all - * other plans the default is `S`. - */ - public interface Size { - /** LT. */ - String LT = "LT"; - /** XS. */ - String XS = "XS"; - /** S. */ - String S = "S"; - /** MS. */ - String MS = "MS"; - /** M. */ - String M = "M"; - /** ML. */ - String ML = "ML"; - /** L. */ - String L = "L"; - /** XL. */ - String XL = "XL"; - /** XXL. */ - String XXL = "XXL"; - /** XXXL. */ - String XXXL = "XXXL"; - } - - protected String name; - protected String description; - protected String size; - - /** Builder. */ - public static class Builder { - private String name; - private String description; - private String size; - - /** - * Instantiates a new Builder from an existing CreateEnvironmentOptions instance. - * - * @param createEnvironmentOptions the instance to initialize the Builder with - */ - private Builder(CreateEnvironmentOptions createEnvironmentOptions) { - this.name = createEnvironmentOptions.name; - this.description = createEnvironmentOptions.description; - this.size = createEnvironmentOptions.size; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param name the name - */ - public Builder(String name) { - this.name = name; - } - - /** - * Builds a CreateEnvironmentOptions. - * - * @return the new CreateEnvironmentOptions instance - */ - public CreateEnvironmentOptions build() { - return new CreateEnvironmentOptions(this); - } - - /** - * Set the name. - * - * @param name the name - * @return the CreateEnvironmentOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the CreateEnvironmentOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the size. - * - * @param size the size - * @return the CreateEnvironmentOptions builder - */ - public Builder size(String size) { - this.size = size; - return this; - } - } - - protected CreateEnvironmentOptions() {} - - protected CreateEnvironmentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - name = builder.name; - description = builder.description; - size = builder.size; - } - - /** - * New builder. - * - * @return a CreateEnvironmentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the name. - * - *

Name that identifies the environment. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

Description of the environment. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the size. - * - *

Size of the environment. In the Lite plan the default and only accepted value is `LT`, in - * all other plans the default is `S`. - * - * @return the size - */ - public String size() { - return size; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventOptions.java deleted file mode 100644 index ae055f13d5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventOptions.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createEvent options. */ -public class CreateEventOptions extends GenericModel { - - /** The event type to be created. */ - public interface Type { - /** click. */ - String CLICK = "click"; - } - - protected String type; - protected EventData data; - - /** Builder. */ - public static class Builder { - private String type; - private EventData data; - - /** - * Instantiates a new Builder from an existing CreateEventOptions instance. - * - * @param createEventOptions the instance to initialize the Builder with - */ - private Builder(CreateEventOptions createEventOptions) { - this.type = createEventOptions.type; - this.data = createEventOptions.data; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param type the type - * @param data the data - */ - public Builder(String type, EventData data) { - this.type = type; - this.data = data; - } - - /** - * Builds a CreateEventOptions. - * - * @return the new CreateEventOptions instance - */ - public CreateEventOptions build() { - return new CreateEventOptions(this); - } - - /** - * Set the type. - * - * @param type the type - * @return the CreateEventOptions builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Set the data. - * - * @param data the data - * @return the CreateEventOptions builder - */ - public Builder data(EventData data) { - this.data = data; - return this; - } - } - - protected CreateEventOptions() {} - - protected CreateEventOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.type, "type cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.data, "data cannot be null"); - type = builder.type; - data = builder.data; - } - - /** - * New builder. - * - * @return a CreateEventOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the type. - * - *

The event type to be created. - * - * @return the type - */ - public String type() { - return type; - } - - /** - * Gets the data. - * - *

Query event data object. - * - * @return the data - */ - public EventData data() { - return data; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventResponse.java deleted file mode 100644 index 15ad5a2adf..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateEventResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object defining the event being created. */ -public class CreateEventResponse extends GenericModel { - - /** The event type that was created. */ - public interface Type { - /** click. */ - String CLICK = "click"; - } - - protected String type; - protected EventData data; - - protected CreateEventResponse() {} - - /** - * Gets the type. - * - *

The event type that was created. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Gets the data. - * - *

Query event data object. - * - * @return the data - */ - public EventData getData() { - return data; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptions.java deleted file mode 100644 index eedede7f9e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptions.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The createExpansions options. */ -public class CreateExpansionsOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected List expansions; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private List expansions; - - /** - * Instantiates a new Builder from an existing CreateExpansionsOptions instance. - * - * @param createExpansionsOptions the instance to initialize the Builder with - */ - private Builder(CreateExpansionsOptions createExpansionsOptions) { - this.environmentId = createExpansionsOptions.environmentId; - this.collectionId = createExpansionsOptions.collectionId; - this.expansions = createExpansionsOptions.expansions; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param expansions the expansions - */ - public Builder(String environmentId, String collectionId, List expansions) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.expansions = expansions; - } - - /** - * Builds a CreateExpansionsOptions. - * - * @return the new CreateExpansionsOptions instance - */ - public CreateExpansionsOptions build() { - return new CreateExpansionsOptions(this); - } - - /** - * Adds a new element to expansions. - * - * @param expansions the new element to be added - * @return the CreateExpansionsOptions builder - */ - public Builder addExpansions(Expansion expansions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(expansions, "expansions cannot be null"); - if (this.expansions == null) { - this.expansions = new ArrayList(); - } - this.expansions.add(expansions); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateExpansionsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the CreateExpansionsOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the expansions. Existing expansions will be replaced. - * - * @param expansions the expansions - * @return the CreateExpansionsOptions builder - */ - public Builder expansions(List expansions) { - this.expansions = expansions; - return this; - } - - /** - * Set the expansions. - * - * @param expansions the expansions - * @return the CreateExpansionsOptions builder - */ - public Builder expansions(Expansions expansions) { - this.expansions = expansions.expansions(); - return this; - } - } - - protected CreateExpansionsOptions() {} - - protected CreateExpansionsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.expansions, "expansions cannot be null"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - expansions = builder.expansions; - } - - /** - * New builder. - * - * @return a CreateExpansionsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the expansions. - * - *

An array of query expansion definitions. - * - *

Each object in the **expansions** array represents a term or set of terms that will be - * expanded into other terms. Each expansion object can be configured as bidirectional or - * unidirectional. Bidirectional means that all terms are expanded to all other terms in the - * object. Unidirectional means that a set list of terms can be expanded into a second list of - * terms. - * - *

To create a bi-directional expansion specify an **expanded_terms** array. When found in a - * query, all items in the **expanded_terms** array are then expanded to the other items in the - * same array. - * - *

To create a uni-directional expansion, specify both an array of **input_terms** and an array - * of **expanded_terms**. When items in the **input_terms** array are present in a query, they are - * expanded using the items listed in the **expanded_terms** array. - * - * @return the expansions - */ - public List expansions() { - return expansions; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptions.java deleted file mode 100644 index b7b0c94f6b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptions.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createGateway options. */ -public class CreateGatewayOptions extends GenericModel { - - protected String environmentId; - protected String name; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - - /** - * Instantiates a new Builder from an existing CreateGatewayOptions instance. - * - * @param createGatewayOptions the instance to initialize the Builder with - */ - private Builder(CreateGatewayOptions createGatewayOptions) { - this.environmentId = createGatewayOptions.environmentId; - this.name = createGatewayOptions.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a CreateGatewayOptions. - * - * @return the new CreateGatewayOptions instance - */ - public CreateGatewayOptions build() { - return new CreateGatewayOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateGatewayOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the CreateGatewayOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - } - - protected CreateGatewayOptions() {} - - protected CreateGatewayOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - name = builder.name; - } - - /** - * New builder. - * - * @return a CreateGatewayOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

User-defined name. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptions.java deleted file mode 100644 index bd8de9d527..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptions.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** The createStopwordList options. */ -public class CreateStopwordListOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected InputStream stopwordFile; - protected String stopwordFilename; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private InputStream stopwordFile; - private String stopwordFilename; - - /** - * Instantiates a new Builder from an existing CreateStopwordListOptions instance. - * - * @param createStopwordListOptions the instance to initialize the Builder with - */ - private Builder(CreateStopwordListOptions createStopwordListOptions) { - this.environmentId = createStopwordListOptions.environmentId; - this.collectionId = createStopwordListOptions.collectionId; - this.stopwordFile = createStopwordListOptions.stopwordFile; - this.stopwordFilename = createStopwordListOptions.stopwordFilename; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param stopwordFile the stopwordFile - * @param stopwordFilename the stopwordFilename - */ - public Builder( - String environmentId, - String collectionId, - InputStream stopwordFile, - String stopwordFilename) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.stopwordFile = stopwordFile; - this.stopwordFilename = stopwordFilename; - } - - /** - * Builds a CreateStopwordListOptions. - * - * @return the new CreateStopwordListOptions instance - */ - public CreateStopwordListOptions build() { - return new CreateStopwordListOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateStopwordListOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the CreateStopwordListOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the stopwordFile. - * - * @param stopwordFile the stopwordFile - * @return the CreateStopwordListOptions builder - */ - public Builder stopwordFile(InputStream stopwordFile) { - this.stopwordFile = stopwordFile; - return this; - } - - /** - * Set the stopwordFilename. - * - * @param stopwordFilename the stopwordFilename - * @return the CreateStopwordListOptions builder - */ - public Builder stopwordFilename(String stopwordFilename) { - this.stopwordFilename = stopwordFilename; - return this; - } - - /** - * Set the stopwordFile. - * - * @param stopwordFile the stopwordFile - * @return the CreateStopwordListOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder stopwordFile(File stopwordFile) throws FileNotFoundException { - this.stopwordFile = new FileInputStream(stopwordFile); - this.stopwordFilename = stopwordFile.getName(); - return this; - } - } - - protected CreateStopwordListOptions() {} - - protected CreateStopwordListOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.stopwordFile, "stopwordFile cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.stopwordFilename, "stopwordFilename cannot be null"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - stopwordFile = builder.stopwordFile; - stopwordFilename = builder.stopwordFilename; - } - - /** - * New builder. - * - * @return a CreateStopwordListOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the stopwordFile. - * - *

The content of the stopword list to ingest. - * - * @return the stopwordFile - */ - public InputStream stopwordFile() { - return stopwordFile; - } - - /** - * Gets the stopwordFilename. - * - *

The filename for stopwordFile. - * - * @return the stopwordFilename - */ - public String stopwordFilename() { - return stopwordFilename; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptions.java deleted file mode 100644 index 72dc5d3c71..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptions.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The createTokenizationDictionary options. */ -public class CreateTokenizationDictionaryOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected List tokenizationRules; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private List tokenizationRules; - - /** - * Instantiates a new Builder from an existing CreateTokenizationDictionaryOptions instance. - * - * @param createTokenizationDictionaryOptions the instance to initialize the Builder with - */ - private Builder(CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions) { - this.environmentId = createTokenizationDictionaryOptions.environmentId; - this.collectionId = createTokenizationDictionaryOptions.collectionId; - this.tokenizationRules = createTokenizationDictionaryOptions.tokenizationRules; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a CreateTokenizationDictionaryOptions. - * - * @return the new CreateTokenizationDictionaryOptions instance - */ - public CreateTokenizationDictionaryOptions build() { - return new CreateTokenizationDictionaryOptions(this); - } - - /** - * Adds a new element to tokenizationRules. - * - * @param tokenizationRules the new element to be added - * @return the CreateTokenizationDictionaryOptions builder - */ - public Builder addTokenizationRules(TokenDictRule tokenizationRules) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - tokenizationRules, "tokenizationRules cannot be null"); - if (this.tokenizationRules == null) { - this.tokenizationRules = new ArrayList(); - } - this.tokenizationRules.add(tokenizationRules); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateTokenizationDictionaryOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the CreateTokenizationDictionaryOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the tokenizationRules. Existing tokenizationRules will be replaced. - * - * @param tokenizationRules the tokenizationRules - * @return the CreateTokenizationDictionaryOptions builder - */ - public Builder tokenizationRules(List tokenizationRules) { - this.tokenizationRules = tokenizationRules; - return this; - } - } - - protected CreateTokenizationDictionaryOptions() {} - - protected CreateTokenizationDictionaryOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - tokenizationRules = builder.tokenizationRules; - } - - /** - * New builder. - * - * @return a CreateTokenizationDictionaryOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the tokenizationRules. - * - *

An array of tokenization rules. Each rule contains, the original `text` string, component - * `tokens`, any alternate character set `readings`, and which `part_of_speech` the text is from. - * - * @return the tokenizationRules - */ - public List tokenizationRules() { - return tokenizationRules; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptions.java deleted file mode 100644 index 50c06254b5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptions.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The createTrainingExample options. */ -public class CreateTrainingExampleOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - protected String documentId; - protected String crossReference; - protected Long relevance; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - private String documentId; - private String crossReference; - private Long relevance; - - /** - * Instantiates a new Builder from an existing CreateTrainingExampleOptions instance. - * - * @param createTrainingExampleOptions the instance to initialize the Builder with - */ - private Builder(CreateTrainingExampleOptions createTrainingExampleOptions) { - this.environmentId = createTrainingExampleOptions.environmentId; - this.collectionId = createTrainingExampleOptions.collectionId; - this.queryId = createTrainingExampleOptions.queryId; - this.documentId = createTrainingExampleOptions.documentId; - this.crossReference = createTrainingExampleOptions.crossReference; - this.relevance = createTrainingExampleOptions.relevance; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - */ - public Builder(String environmentId, String collectionId, String queryId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - } - - /** - * Builds a CreateTrainingExampleOptions. - * - * @return the new CreateTrainingExampleOptions instance - */ - public CreateTrainingExampleOptions build() { - return new CreateTrainingExampleOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the CreateTrainingExampleOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the CreateTrainingExampleOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the CreateTrainingExampleOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the CreateTrainingExampleOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Set the crossReference. - * - * @param crossReference the crossReference - * @return the CreateTrainingExampleOptions builder - */ - public Builder crossReference(String crossReference) { - this.crossReference = crossReference; - return this; - } - - /** - * Set the relevance. - * - * @param relevance the relevance - * @return the CreateTrainingExampleOptions builder - */ - public Builder relevance(long relevance) { - this.relevance = relevance; - return this; - } - - /** - * Set the trainingExample. - * - * @param trainingExample the trainingExample - * @return the CreateTrainingExampleOptions builder - */ - public Builder trainingExample(TrainingExample trainingExample) { - this.documentId = trainingExample.documentId(); - this.crossReference = trainingExample.crossReference(); - this.relevance = trainingExample.relevance(); - return this; - } - } - - protected CreateTrainingExampleOptions() {} - - protected CreateTrainingExampleOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - documentId = builder.documentId; - crossReference = builder.crossReference; - relevance = builder.relevance; - } - - /** - * New builder. - * - * @return a CreateTrainingExampleOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } - - /** - * Gets the documentId. - * - *

The document ID associated with this training example. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } - - /** - * Gets the crossReference. - * - *

The cross reference associated with this training example. - * - * @return the crossReference - */ - public String crossReference() { - return crossReference; - } - - /** - * Gets the relevance. - * - *

The relevance of the training example. - * - * @return the relevance - */ - public Long relevance() { - return relevance; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java deleted file mode 100644 index 0cce6cc5bd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Object containing details of the stored credentials. - * - *

Obtain credentials for your source from the administrator of the source. - */ -public class CredentialDetails extends GenericModel { - - /** - * The authentication method for this credentials definition. The **credential_type** specified - * must be supported by the **source_type**. The following combinations are possible: - * - *

- `"source_type": "box"` - valid `credential_type`s: `oauth2` - `"source_type": - * "salesforce"` - valid `credential_type`s: `username_password` - `"source_type": "sharepoint"` - - * valid `credential_type`s: `saml` with **source_version** of `online`, or `ntlm_v1` with - * **source_version** of `2016` - `"source_type": "web_crawl"` - valid `credential_type`s: - * `noauth` or `basic` - "source_type": "cloud_object_storage"` - valid `credential_type`s: - * `aws4_hmac`. - */ - public interface CredentialType { - /** oauth2. */ - String OAUTH2 = "oauth2"; - /** saml. */ - String SAML = "saml"; - /** username_password. */ - String USERNAME_PASSWORD = "username_password"; - /** noauth. */ - String NOAUTH = "noauth"; - /** basic. */ - String BASIC = "basic"; - /** ntlm_v1. */ - String NTLM_V1 = "ntlm_v1"; - /** aws4_hmac. */ - String AWS4_HMAC = "aws4_hmac"; - } - - /** - * The type of Sharepoint repository to connect to. Only valid, and required, with a - * **source_type** of `sharepoint`. - */ - public interface SourceVersion { - /** online. */ - String ONLINE = "online"; - } - - @SerializedName("credential_type") - protected String credentialType; - - @SerializedName("client_id") - protected String clientId; - - @SerializedName("enterprise_id") - protected String enterpriseId; - - protected String url; - protected String username; - - @SerializedName("organization_url") - protected String organizationUrl; - - @SerializedName("site_collection.path") - protected String siteCollectionPath; - - @SerializedName("client_secret") - protected String clientSecret; - - @SerializedName("public_key_id") - protected String publicKeyId; - - @SerializedName("private_key") - protected String privateKey; - - protected String passphrase; - protected String password; - - @SerializedName("gateway_id") - protected String gatewayId; - - @SerializedName("source_version") - protected String sourceVersion; - - @SerializedName("web_application_url") - protected String webApplicationUrl; - - protected String domain; - protected String endpoint; - - @SerializedName("access_key_id") - protected String accessKeyId; - - @SerializedName("secret_access_key") - protected String secretAccessKey; - - /** Builder. */ - public static class Builder { - private String credentialType; - private String clientId; - private String enterpriseId; - private String url; - private String username; - private String organizationUrl; - private String siteCollectionPath; - private String clientSecret; - private String publicKeyId; - private String privateKey; - private String passphrase; - private String password; - private String gatewayId; - private String sourceVersion; - private String webApplicationUrl; - private String domain; - private String endpoint; - private String accessKeyId; - private String secretAccessKey; - - /** - * Instantiates a new Builder from an existing CredentialDetails instance. - * - * @param credentialDetails the instance to initialize the Builder with - */ - private Builder(CredentialDetails credentialDetails) { - this.credentialType = credentialDetails.credentialType; - this.clientId = credentialDetails.clientId; - this.enterpriseId = credentialDetails.enterpriseId; - this.url = credentialDetails.url; - this.username = credentialDetails.username; - this.organizationUrl = credentialDetails.organizationUrl; - this.siteCollectionPath = credentialDetails.siteCollectionPath; - this.clientSecret = credentialDetails.clientSecret; - this.publicKeyId = credentialDetails.publicKeyId; - this.privateKey = credentialDetails.privateKey; - this.passphrase = credentialDetails.passphrase; - this.password = credentialDetails.password; - this.gatewayId = credentialDetails.gatewayId; - this.sourceVersion = credentialDetails.sourceVersion; - this.webApplicationUrl = credentialDetails.webApplicationUrl; - this.domain = credentialDetails.domain; - this.endpoint = credentialDetails.endpoint; - this.accessKeyId = credentialDetails.accessKeyId; - this.secretAccessKey = credentialDetails.secretAccessKey; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a CredentialDetails. - * - * @return the new CredentialDetails instance - */ - public CredentialDetails build() { - return new CredentialDetails(this); - } - - /** - * Set the credentialType. - * - * @param credentialType the credentialType - * @return the CredentialDetails builder - */ - public Builder credentialType(String credentialType) { - this.credentialType = credentialType; - return this; - } - - /** - * Set the clientId. - * - * @param clientId the clientId - * @return the CredentialDetails builder - */ - public Builder clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Set the enterpriseId. - * - * @param enterpriseId the enterpriseId - * @return the CredentialDetails builder - */ - public Builder enterpriseId(String enterpriseId) { - this.enterpriseId = enterpriseId; - return this; - } - - /** - * Set the url. - * - * @param url the url - * @return the CredentialDetails builder - */ - public Builder url(String url) { - this.url = url; - return this; - } - - /** - * Set the username. - * - * @param username the username - * @return the CredentialDetails builder - */ - public Builder username(String username) { - this.username = username; - return this; - } - - /** - * Set the organizationUrl. - * - * @param organizationUrl the organizationUrl - * @return the CredentialDetails builder - */ - public Builder organizationUrl(String organizationUrl) { - this.organizationUrl = organizationUrl; - return this; - } - - /** - * Set the siteCollectionPath. - * - * @param siteCollectionPath the siteCollectionPath - * @return the CredentialDetails builder - */ - public Builder siteCollectionPath(String siteCollectionPath) { - this.siteCollectionPath = siteCollectionPath; - return this; - } - - /** - * Set the clientSecret. - * - * @param clientSecret the clientSecret - * @return the CredentialDetails builder - */ - public Builder clientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Set the publicKeyId. - * - * @param publicKeyId the publicKeyId - * @return the CredentialDetails builder - */ - public Builder publicKeyId(String publicKeyId) { - this.publicKeyId = publicKeyId; - return this; - } - - /** - * Set the privateKey. - * - * @param privateKey the privateKey - * @return the CredentialDetails builder - */ - public Builder privateKey(String privateKey) { - this.privateKey = privateKey; - return this; - } - - /** - * Set the passphrase. - * - * @param passphrase the passphrase - * @return the CredentialDetails builder - */ - public Builder passphrase(String passphrase) { - this.passphrase = passphrase; - return this; - } - - /** - * Set the password. - * - * @param password the password - * @return the CredentialDetails builder - */ - public Builder password(String password) { - this.password = password; - return this; - } - - /** - * Set the gatewayId. - * - * @param gatewayId the gatewayId - * @return the CredentialDetails builder - */ - public Builder gatewayId(String gatewayId) { - this.gatewayId = gatewayId; - return this; - } - - /** - * Set the sourceVersion. - * - * @param sourceVersion the sourceVersion - * @return the CredentialDetails builder - */ - public Builder sourceVersion(String sourceVersion) { - this.sourceVersion = sourceVersion; - return this; - } - - /** - * Set the webApplicationUrl. - * - * @param webApplicationUrl the webApplicationUrl - * @return the CredentialDetails builder - */ - public Builder webApplicationUrl(String webApplicationUrl) { - this.webApplicationUrl = webApplicationUrl; - return this; - } - - /** - * Set the domain. - * - * @param domain the domain - * @return the CredentialDetails builder - */ - public Builder domain(String domain) { - this.domain = domain; - return this; - } - - /** - * Set the endpoint. - * - * @param endpoint the endpoint - * @return the CredentialDetails builder - */ - public Builder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Set the accessKeyId. - * - * @param accessKeyId the accessKeyId - * @return the CredentialDetails builder - */ - public Builder accessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - return this; - } - - /** - * Set the secretAccessKey. - * - * @param secretAccessKey the secretAccessKey - * @return the CredentialDetails builder - */ - public Builder secretAccessKey(String secretAccessKey) { - this.secretAccessKey = secretAccessKey; - return this; - } - } - - protected CredentialDetails() {} - - protected CredentialDetails(Builder builder) { - credentialType = builder.credentialType; - clientId = builder.clientId; - enterpriseId = builder.enterpriseId; - url = builder.url; - username = builder.username; - organizationUrl = builder.organizationUrl; - siteCollectionPath = builder.siteCollectionPath; - clientSecret = builder.clientSecret; - publicKeyId = builder.publicKeyId; - privateKey = builder.privateKey; - passphrase = builder.passphrase; - password = builder.password; - gatewayId = builder.gatewayId; - sourceVersion = builder.sourceVersion; - webApplicationUrl = builder.webApplicationUrl; - domain = builder.domain; - endpoint = builder.endpoint; - accessKeyId = builder.accessKeyId; - secretAccessKey = builder.secretAccessKey; - } - - /** - * New builder. - * - * @return a CredentialDetails builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the credentialType. - * - *

The authentication method for this credentials definition. The **credential_type** specified - * must be supported by the **source_type**. The following combinations are possible: - * - *

- `"source_type": "box"` - valid `credential_type`s: `oauth2` - `"source_type": - * "salesforce"` - valid `credential_type`s: `username_password` - `"source_type": "sharepoint"` - - * valid `credential_type`s: `saml` with **source_version** of `online`, or `ntlm_v1` with - * **source_version** of `2016` - `"source_type": "web_crawl"` - valid `credential_type`s: - * `noauth` or `basic` - "source_type": "cloud_object_storage"` - valid `credential_type`s: - * `aws4_hmac`. - * - * @return the credentialType - */ - public String credentialType() { - return credentialType; - } - - /** - * Gets the clientId. - * - *

The **client_id** of the source that these credentials connect to. Only valid, and required, - * with a **credential_type** of `oauth2`. - * - * @return the clientId - */ - public String clientId() { - return clientId; - } - - /** - * Gets the enterpriseId. - * - *

The **enterprise_id** of the Box site that these credentials connect to. Only valid, and - * required, with a **source_type** of `box`. - * - * @return the enterpriseId - */ - public String enterpriseId() { - return enterpriseId; - } - - /** - * Gets the url. - * - *

The **url** of the source that these credentials connect to. Only valid, and required, with - * a **credential_type** of `username_password`, `noauth`, and `basic`. - * - * @return the url - */ - public String url() { - return url; - } - - /** - * Gets the username. - * - *

The **username** of the source that these credentials connect to. Only valid, and required, - * with a **credential_type** of `saml`, `username_password`, `basic`, or `ntlm_v1`. - * - * @return the username - */ - public String username() { - return username; - } - - /** - * Gets the organizationUrl. - * - *

The **organization_url** of the source that these credentials connect to. Only valid, and - * required, with a **credential_type** of `saml`. - * - * @return the organizationUrl - */ - public String organizationUrl() { - return organizationUrl; - } - - /** - * Gets the siteCollectionPath. - * - *

The **site_collection.path** of the source that these credentials connect to. Only valid, - * and required, with a **source_type** of `sharepoint`. - * - * @return the siteCollectionPath - */ - public String siteCollectionPath() { - return siteCollectionPath; - } - - /** - * Gets the clientSecret. - * - *

The **client_secret** of the source that these credentials connect to. Only valid, and - * required, with a **credential_type** of `oauth2`. This value is never returned and is only used - * when creating or modifying **credentials**. - * - * @return the clientSecret - */ - public String clientSecret() { - return clientSecret; - } - - /** - * Gets the publicKeyId. - * - *

The **public_key_id** of the source that these credentials connect to. Only valid, and - * required, with a **credential_type** of `oauth2`. This value is never returned and is only used - * when creating or modifying **credentials**. - * - * @return the publicKeyId - */ - public String publicKeyId() { - return publicKeyId; - } - - /** - * Gets the privateKey. - * - *

The **private_key** of the source that these credentials connect to. Only valid, and - * required, with a **credential_type** of `oauth2`. This value is never returned and is only used - * when creating or modifying **credentials**. - * - * @return the privateKey - */ - public String privateKey() { - return privateKey; - } - - /** - * Gets the passphrase. - * - *

The **passphrase** of the source that these credentials connect to. Only valid, and - * required, with a **credential_type** of `oauth2`. This value is never returned and is only used - * when creating or modifying **credentials**. - * - * @return the passphrase - */ - public String passphrase() { - return passphrase; - } - - /** - * Gets the password. - * - *

The **password** of the source that these credentials connect to. Only valid, and required, - * with **credential_type**s of `saml`, `username_password`, `basic`, or `ntlm_v1`. - * - *

**Note:** When used with a **source_type** of `salesforce`, the password consists of the - * Salesforce password and a valid Salesforce security token concatenated. This value is never - * returned and is only used when creating or modifying **credentials**. - * - * @return the password - */ - public String password() { - return password; - } - - /** - * Gets the gatewayId. - * - *

The ID of the **gateway** to be connected through (when connecting to intranet sites). Only - * valid with a **credential_type** of `noauth`, `basic`, or `ntlm_v1`. Gateways are created using - * the `/v1/environments/{environment_id}/gateways` methods. - * - * @return the gatewayId - */ - public String gatewayId() { - return gatewayId; - } - - /** - * Gets the sourceVersion. - * - *

The type of Sharepoint repository to connect to. Only valid, and required, with a - * **source_type** of `sharepoint`. - * - * @return the sourceVersion - */ - public String sourceVersion() { - return sourceVersion; - } - - /** - * Gets the webApplicationUrl. - * - *

SharePoint OnPrem WebApplication URL. Only valid, and required, with a **source_version** of - * `2016`. If a port is not supplied, the default to port `80` for http and port `443` for https - * connections are used. - * - * @return the webApplicationUrl - */ - public String webApplicationUrl() { - return webApplicationUrl; - } - - /** - * Gets the domain. - * - *

The domain used to log in to your OnPrem SharePoint account. Only valid, and required, with - * a **source_version** of `2016`. - * - * @return the domain - */ - public String domain() { - return domain; - } - - /** - * Gets the endpoint. - * - *

The endpoint associated with the cloud object store that your are connecting to. Only valid, - * and required, with a **credential_type** of `aws4_hmac`. - * - * @return the endpoint - */ - public String endpoint() { - return endpoint; - } - - /** - * Gets the accessKeyId. - * - *

The access key ID associated with the cloud object store. Only valid, and required, with a - * **credential_type** of `aws4_hmac`. This value is never returned and is only used when creating - * or modifying **credentials**. For more infomation, see the [cloud object store - * documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-using-hmac-credentials#using-hmac-credentials). - * - * @return the accessKeyId - */ - public String accessKeyId() { - return accessKeyId; - } - - /** - * Gets the secretAccessKey. - * - *

The secret access key associated with the cloud object store. Only valid, and required, with - * a **credential_type** of `aws4_hmac`. This value is never returned and is only used when - * creating or modifying **credentials**. For more infomation, see the [cloud object store - * documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-using-hmac-credentials#using-hmac-credentials). - * - * @return the secretAccessKey - */ - public String secretAccessKey() { - return secretAccessKey; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Credentials.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Credentials.java deleted file mode 100644 index f409654700..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Credentials.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing credential information. */ -public class Credentials extends GenericModel { - - /** - * The source that this credentials object connects to. - `box` indicates the credentials are used - * to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to - * connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - */ - public interface SourceType { - /** box. */ - String BOX = "box"; - /** salesforce. */ - String SALESFORCE = "salesforce"; - /** sharepoint. */ - String SHAREPOINT = "sharepoint"; - /** web_crawl. */ - String WEB_CRAWL = "web_crawl"; - /** cloud_object_storage. */ - String CLOUD_OBJECT_STORAGE = "cloud_object_storage"; - } - - @SerializedName("credential_id") - protected String credentialId; - - @SerializedName("source_type") - protected String sourceType; - - @SerializedName("credential_details") - protected CredentialDetails credentialDetails; - - protected StatusDetails status; - - /** Builder. */ - public static class Builder { - private String sourceType; - private CredentialDetails credentialDetails; - private StatusDetails status; - - /** - * Instantiates a new Builder from an existing Credentials instance. - * - * @param credentials the instance to initialize the Builder with - */ - private Builder(Credentials credentials) { - this.sourceType = credentials.sourceType; - this.credentialDetails = credentials.credentialDetails; - this.status = credentials.status; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a Credentials. - * - * @return the new Credentials instance - */ - public Credentials build() { - return new Credentials(this); - } - - /** - * Set the sourceType. - * - * @param sourceType the sourceType - * @return the Credentials builder - */ - public Builder sourceType(String sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Set the credentialDetails. - * - * @param credentialDetails the credentialDetails - * @return the Credentials builder - */ - public Builder credentialDetails(CredentialDetails credentialDetails) { - this.credentialDetails = credentialDetails; - return this; - } - - /** - * Set the status. - * - * @param status the status - * @return the Credentials builder - */ - public Builder status(StatusDetails status) { - this.status = status; - return this; - } - } - - protected Credentials() {} - - protected Credentials(Builder builder) { - sourceType = builder.sourceType; - credentialDetails = builder.credentialDetails; - status = builder.status; - } - - /** - * New builder. - * - * @return a Credentials builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the credentialId. - * - *

Unique identifier for this set of credentials. - * - * @return the credentialId - */ - public String credentialId() { - return credentialId; - } - - /** - * Gets the sourceType. - * - *

The source that this credentials object connects to. - `box` indicates the credentials are - * used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are - * used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - * - * @return the sourceType - */ - public String sourceType() { - return sourceType; - } - - /** - * Gets the credentialDetails. - * - *

Object containing details of the stored credentials. - * - *

Obtain credentials for your source from the administrator of the source. - * - * @return the credentialDetails - */ - public CredentialDetails credentialDetails() { - return credentialDetails; - } - - /** - * Gets the status. - * - *

Object that contains details about the status of the authentication process. - * - * @return the status - */ - public StatusDetails status() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialsList.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialsList.java deleted file mode 100644 index 6db9646c4f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialsList.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing array of credential definitions. */ -public class CredentialsList extends GenericModel { - - protected List credentials; - - protected CredentialsList() {} - - /** - * Gets the credentials. - * - *

An array of credential definitions that were created for this instance. - * - * @return the credentials - */ - public List getCredentials() { - return credentials; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptions.java deleted file mode 100644 index f8256508c5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteAllTrainingData options. */ -public class DeleteAllTrainingDataOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing DeleteAllTrainingDataOptions instance. - * - * @param deleteAllTrainingDataOptions the instance to initialize the Builder with - */ - private Builder(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions) { - this.environmentId = deleteAllTrainingDataOptions.environmentId; - this.collectionId = deleteAllTrainingDataOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a DeleteAllTrainingDataOptions. - * - * @return the new DeleteAllTrainingDataOptions instance - */ - public DeleteAllTrainingDataOptions build() { - return new DeleteAllTrainingDataOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteAllTrainingDataOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteAllTrainingDataOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected DeleteAllTrainingDataOptions() {} - - protected DeleteAllTrainingDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a DeleteAllTrainingDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptions.java deleted file mode 100644 index d7d5b52e68..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteCollection options. */ -public class DeleteCollectionOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing DeleteCollectionOptions instance. - * - * @param deleteCollectionOptions the instance to initialize the Builder with - */ - private Builder(DeleteCollectionOptions deleteCollectionOptions) { - this.environmentId = deleteCollectionOptions.environmentId; - this.collectionId = deleteCollectionOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a DeleteCollectionOptions. - * - * @return the new DeleteCollectionOptions instance - */ - public DeleteCollectionOptions build() { - return new DeleteCollectionOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteCollectionOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteCollectionOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected DeleteCollectionOptions() {} - - protected DeleteCollectionOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a DeleteCollectionOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponse.java deleted file mode 100644 index ead3c6d7f1..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Response object returned when deleting a colleciton. */ -public class DeleteCollectionResponse extends GenericModel { - - /** The status of the collection. The status of a successful deletion operation is `deleted`. */ - public interface Status { - /** deleted. */ - String DELETED = "deleted"; - } - - @SerializedName("collection_id") - protected String collectionId; - - protected String status; - - protected DeleteCollectionResponse() {} - - /** - * Gets the collectionId. - * - *

The unique identifier of the collection that is being deleted. - * - * @return the collectionId - */ - public String getCollectionId() { - return collectionId; - } - - /** - * Gets the status. - * - *

The status of the collection. The status of a successful deletion operation is `deleted`. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptions.java deleted file mode 100644 index 1792e033f8..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteConfiguration options. */ -public class DeleteConfigurationOptions extends GenericModel { - - protected String environmentId; - protected String configurationId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String configurationId; - - /** - * Instantiates a new Builder from an existing DeleteConfigurationOptions instance. - * - * @param deleteConfigurationOptions the instance to initialize the Builder with - */ - private Builder(DeleteConfigurationOptions deleteConfigurationOptions) { - this.environmentId = deleteConfigurationOptions.environmentId; - this.configurationId = deleteConfigurationOptions.configurationId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param configurationId the configurationId - */ - public Builder(String environmentId, String configurationId) { - this.environmentId = environmentId; - this.configurationId = configurationId; - } - - /** - * Builds a DeleteConfigurationOptions. - * - * @return the new DeleteConfigurationOptions instance - */ - public DeleteConfigurationOptions build() { - return new DeleteConfigurationOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteConfigurationOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the configurationId. - * - * @param configurationId the configurationId - * @return the DeleteConfigurationOptions builder - */ - public Builder configurationId(String configurationId) { - this.configurationId = configurationId; - return this; - } - } - - protected DeleteConfigurationOptions() {} - - protected DeleteConfigurationOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.configurationId, "configurationId cannot be empty"); - environmentId = builder.environmentId; - configurationId = builder.configurationId; - } - - /** - * New builder. - * - * @return a DeleteConfigurationOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the configurationId. - * - *

The ID of the configuration. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponse.java deleted file mode 100644 index f16984f80f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponse.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Information returned when a configuration is deleted. */ -public class DeleteConfigurationResponse extends GenericModel { - - /** Status of the configuration. A deleted configuration has the status deleted. */ - public interface Status { - /** deleted. */ - String DELETED = "deleted"; - } - - @SerializedName("configuration_id") - protected String configurationId; - - protected String status; - protected List notices; - - protected DeleteConfigurationResponse() {} - - /** - * Gets the configurationId. - * - *

The unique identifier for the configuration. - * - * @return the configurationId - */ - public String getConfigurationId() { - return configurationId; - } - - /** - * Gets the status. - * - *

Status of the configuration. A deleted configuration has the status deleted. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the notices. - * - *

An array of notice messages, if any. - * - * @return the notices - */ - public List getNotices() { - return notices; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentials.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentials.java deleted file mode 100644 index 6e2ed33ff4..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentials.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object returned after credentials are deleted. */ -public class DeleteCredentials extends GenericModel { - - /** The status of the deletion request. */ - public interface Status { - /** deleted. */ - String DELETED = "deleted"; - } - - @SerializedName("credential_id") - protected String credentialId; - - protected String status; - - protected DeleteCredentials() {} - - /** - * Gets the credentialId. - * - *

The unique identifier of the credentials that have been deleted. - * - * @return the credentialId - */ - public String getCredentialId() { - return credentialId; - } - - /** - * Gets the status. - * - *

The status of the deletion request. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptions.java deleted file mode 100644 index 81f261e93a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteCredentials options. */ -public class DeleteCredentialsOptions extends GenericModel { - - protected String environmentId; - protected String credentialId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String credentialId; - - /** - * Instantiates a new Builder from an existing DeleteCredentialsOptions instance. - * - * @param deleteCredentialsOptions the instance to initialize the Builder with - */ - private Builder(DeleteCredentialsOptions deleteCredentialsOptions) { - this.environmentId = deleteCredentialsOptions.environmentId; - this.credentialId = deleteCredentialsOptions.credentialId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param credentialId the credentialId - */ - public Builder(String environmentId, String credentialId) { - this.environmentId = environmentId; - this.credentialId = credentialId; - } - - /** - * Builds a DeleteCredentialsOptions. - * - * @return the new DeleteCredentialsOptions instance - */ - public DeleteCredentialsOptions build() { - return new DeleteCredentialsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteCredentialsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the credentialId. - * - * @param credentialId the credentialId - * @return the DeleteCredentialsOptions builder - */ - public Builder credentialId(String credentialId) { - this.credentialId = credentialId; - return this; - } - } - - protected DeleteCredentialsOptions() {} - - protected DeleteCredentialsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.credentialId, "credentialId cannot be empty"); - environmentId = builder.environmentId; - credentialId = builder.credentialId; - } - - /** - * New builder. - * - * @return a DeleteCredentialsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the credentialId. - * - *

The unique identifier for a set of source credentials. - * - * @return the credentialId - */ - public String credentialId() { - return credentialId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptions.java deleted file mode 100644 index 7b2487e101..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptions.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteDocument options. */ -public class DeleteDocumentOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String documentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String documentId; - - /** - * Instantiates a new Builder from an existing DeleteDocumentOptions instance. - * - * @param deleteDocumentOptions the instance to initialize the Builder with - */ - private Builder(DeleteDocumentOptions deleteDocumentOptions) { - this.environmentId = deleteDocumentOptions.environmentId; - this.collectionId = deleteDocumentOptions.collectionId; - this.documentId = deleteDocumentOptions.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param documentId the documentId - */ - public Builder(String environmentId, String collectionId, String documentId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.documentId = documentId; - } - - /** - * Builds a DeleteDocumentOptions. - * - * @return the new DeleteDocumentOptions instance - */ - public DeleteDocumentOptions build() { - return new DeleteDocumentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteDocumentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteDocumentOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the DeleteDocumentOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - } - - protected DeleteDocumentOptions() {} - - protected DeleteDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a DeleteDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the documentId. - * - *

The ID of the document. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponse.java deleted file mode 100644 index d660760416..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Information returned when a document is deleted. */ -public class DeleteDocumentResponse extends GenericModel { - - /** Status of the document. A deleted document has the status deleted. */ - public interface Status { - /** deleted. */ - String DELETED = "deleted"; - } - - @SerializedName("document_id") - protected String documentId; - - protected String status; - - protected DeleteDocumentResponse() {} - - /** - * Gets the documentId. - * - *

The unique identifier of the document. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the status. - * - *

Status of the document. A deleted document has the status deleted. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptions.java deleted file mode 100644 index d9e3544241..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteEnvironment options. */ -public class DeleteEnvironmentOptions extends GenericModel { - - protected String environmentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - - /** - * Instantiates a new Builder from an existing DeleteEnvironmentOptions instance. - * - * @param deleteEnvironmentOptions the instance to initialize the Builder with - */ - private Builder(DeleteEnvironmentOptions deleteEnvironmentOptions) { - this.environmentId = deleteEnvironmentOptions.environmentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a DeleteEnvironmentOptions. - * - * @return the new DeleteEnvironmentOptions instance - */ - public DeleteEnvironmentOptions build() { - return new DeleteEnvironmentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteEnvironmentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - } - - protected DeleteEnvironmentOptions() {} - - protected DeleteEnvironmentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - } - - /** - * New builder. - * - * @return a DeleteEnvironmentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponse.java deleted file mode 100644 index b5afc6872f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Response object returned when deleting an environment. */ -public class DeleteEnvironmentResponse extends GenericModel { - - /** Status of the environment. */ - public interface Status { - /** deleted. */ - String DELETED = "deleted"; - } - - @SerializedName("environment_id") - protected String environmentId; - - protected String status; - - protected DeleteEnvironmentResponse() {} - - /** - * Gets the environmentId. - * - *

The unique identifier for the environment. - * - * @return the environmentId - */ - public String getEnvironmentId() { - return environmentId; - } - - /** - * Gets the status. - * - *

Status of the environment. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptions.java deleted file mode 100644 index 1cd06cbd36..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteExpansions options. */ -public class DeleteExpansionsOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing DeleteExpansionsOptions instance. - * - * @param deleteExpansionsOptions the instance to initialize the Builder with - */ - private Builder(DeleteExpansionsOptions deleteExpansionsOptions) { - this.environmentId = deleteExpansionsOptions.environmentId; - this.collectionId = deleteExpansionsOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a DeleteExpansionsOptions. - * - * @return the new DeleteExpansionsOptions instance - */ - public DeleteExpansionsOptions build() { - return new DeleteExpansionsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteExpansionsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteExpansionsOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected DeleteExpansionsOptions() {} - - protected DeleteExpansionsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a DeleteExpansionsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptions.java deleted file mode 100644 index bbed8ee58b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptions.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteGateway options. */ -public class DeleteGatewayOptions extends GenericModel { - - protected String environmentId; - protected String gatewayId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String gatewayId; - - /** - * Instantiates a new Builder from an existing DeleteGatewayOptions instance. - * - * @param deleteGatewayOptions the instance to initialize the Builder with - */ - private Builder(DeleteGatewayOptions deleteGatewayOptions) { - this.environmentId = deleteGatewayOptions.environmentId; - this.gatewayId = deleteGatewayOptions.gatewayId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param gatewayId the gatewayId - */ - public Builder(String environmentId, String gatewayId) { - this.environmentId = environmentId; - this.gatewayId = gatewayId; - } - - /** - * Builds a DeleteGatewayOptions. - * - * @return the new DeleteGatewayOptions instance - */ - public DeleteGatewayOptions build() { - return new DeleteGatewayOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteGatewayOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the gatewayId. - * - * @param gatewayId the gatewayId - * @return the DeleteGatewayOptions builder - */ - public Builder gatewayId(String gatewayId) { - this.gatewayId = gatewayId; - return this; - } - } - - protected DeleteGatewayOptions() {} - - protected DeleteGatewayOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.gatewayId, "gatewayId cannot be empty"); - environmentId = builder.environmentId; - gatewayId = builder.gatewayId; - } - - /** - * New builder. - * - * @return a DeleteGatewayOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the gatewayId. - * - *

The requested gateway ID. - * - * @return the gatewayId - */ - public String gatewayId() { - return gatewayId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptions.java deleted file mode 100644 index 02ef122858..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteStopwordList options. */ -public class DeleteStopwordListOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing DeleteStopwordListOptions instance. - * - * @param deleteStopwordListOptions the instance to initialize the Builder with - */ - private Builder(DeleteStopwordListOptions deleteStopwordListOptions) { - this.environmentId = deleteStopwordListOptions.environmentId; - this.collectionId = deleteStopwordListOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a DeleteStopwordListOptions. - * - * @return the new DeleteStopwordListOptions instance - */ - public DeleteStopwordListOptions build() { - return new DeleteStopwordListOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteStopwordListOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteStopwordListOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected DeleteStopwordListOptions() {} - - protected DeleteStopwordListOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a DeleteStopwordListOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptions.java deleted file mode 100644 index b37ba0ffe6..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteTokenizationDictionary options. */ -public class DeleteTokenizationDictionaryOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing DeleteTokenizationDictionaryOptions instance. - * - * @param deleteTokenizationDictionaryOptions the instance to initialize the Builder with - */ - private Builder(DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions) { - this.environmentId = deleteTokenizationDictionaryOptions.environmentId; - this.collectionId = deleteTokenizationDictionaryOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a DeleteTokenizationDictionaryOptions. - * - * @return the new DeleteTokenizationDictionaryOptions instance - */ - public DeleteTokenizationDictionaryOptions build() { - return new DeleteTokenizationDictionaryOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteTokenizationDictionaryOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteTokenizationDictionaryOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected DeleteTokenizationDictionaryOptions() {} - - protected DeleteTokenizationDictionaryOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a DeleteTokenizationDictionaryOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptions.java deleted file mode 100644 index 2f9e334ca5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptions.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteTrainingData options. */ -public class DeleteTrainingDataOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - - /** - * Instantiates a new Builder from an existing DeleteTrainingDataOptions instance. - * - * @param deleteTrainingDataOptions the instance to initialize the Builder with - */ - private Builder(DeleteTrainingDataOptions deleteTrainingDataOptions) { - this.environmentId = deleteTrainingDataOptions.environmentId; - this.collectionId = deleteTrainingDataOptions.collectionId; - this.queryId = deleteTrainingDataOptions.queryId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - */ - public Builder(String environmentId, String collectionId, String queryId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - } - - /** - * Builds a DeleteTrainingDataOptions. - * - * @return the new DeleteTrainingDataOptions instance - */ - public DeleteTrainingDataOptions build() { - return new DeleteTrainingDataOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteTrainingDataOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteTrainingDataOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the DeleteTrainingDataOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - } - - protected DeleteTrainingDataOptions() {} - - protected DeleteTrainingDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - } - - /** - * New builder. - * - * @return a DeleteTrainingDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptions.java deleted file mode 100644 index a8d2497b33..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptions.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteTrainingExample options. */ -public class DeleteTrainingExampleOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - protected String exampleId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - private String exampleId; - - /** - * Instantiates a new Builder from an existing DeleteTrainingExampleOptions instance. - * - * @param deleteTrainingExampleOptions the instance to initialize the Builder with - */ - private Builder(DeleteTrainingExampleOptions deleteTrainingExampleOptions) { - this.environmentId = deleteTrainingExampleOptions.environmentId; - this.collectionId = deleteTrainingExampleOptions.collectionId; - this.queryId = deleteTrainingExampleOptions.queryId; - this.exampleId = deleteTrainingExampleOptions.exampleId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - * @param exampleId the exampleId - */ - public Builder(String environmentId, String collectionId, String queryId, String exampleId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - this.exampleId = exampleId; - } - - /** - * Builds a DeleteTrainingExampleOptions. - * - * @return the new DeleteTrainingExampleOptions instance - */ - public DeleteTrainingExampleOptions build() { - return new DeleteTrainingExampleOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the DeleteTrainingExampleOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the DeleteTrainingExampleOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the DeleteTrainingExampleOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Set the exampleId. - * - * @param exampleId the exampleId - * @return the DeleteTrainingExampleOptions builder - */ - public Builder exampleId(String exampleId) { - this.exampleId = exampleId; - return this; - } - } - - protected DeleteTrainingExampleOptions() {} - - protected DeleteTrainingExampleOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.exampleId, "exampleId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - exampleId = builder.exampleId; - } - - /** - * New builder. - * - * @return a DeleteTrainingExampleOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } - - /** - * Gets the exampleId. - * - *

The ID of the document as it is indexed. - * - * @return the exampleId - */ - public String exampleId() { - return exampleId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptions.java deleted file mode 100644 index eea50014f4..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptions.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteUserData options. */ -public class DeleteUserDataOptions extends GenericModel { - - protected String customerId; - - /** Builder. */ - public static class Builder { - private String customerId; - - /** - * Instantiates a new Builder from an existing DeleteUserDataOptions instance. - * - * @param deleteUserDataOptions the instance to initialize the Builder with - */ - private Builder(DeleteUserDataOptions deleteUserDataOptions) { - this.customerId = deleteUserDataOptions.customerId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param customerId the customerId - */ - public Builder(String customerId) { - this.customerId = customerId; - } - - /** - * Builds a DeleteUserDataOptions. - * - * @return the new DeleteUserDataOptions instance - */ - public DeleteUserDataOptions build() { - return new DeleteUserDataOptions(this); - } - - /** - * Set the customerId. - * - * @param customerId the customerId - * @return the DeleteUserDataOptions builder - */ - public Builder customerId(String customerId) { - this.customerId = customerId; - return this; - } - } - - protected DeleteUserDataOptions() {} - - protected DeleteUserDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.customerId, "customerId cannot be null"); - customerId = builder.customerId; - } - - /** - * New builder. - * - * @return a DeleteUserDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the customerId. - * - *

The customer ID for which all data is to be deleted. - * - * @return the customerId - */ - public String customerId() { - return customerId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DiskUsage.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DiskUsage.java deleted file mode 100644 index baf6f1e238..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DiskUsage.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Summary of the disk usage statistics for the environment. */ -public class DiskUsage extends GenericModel { - - @SerializedName("used_bytes") - protected Long usedBytes; - - @SerializedName("maximum_allowed_bytes") - protected Long maximumAllowedBytes; - - protected DiskUsage() {} - - /** - * Gets the usedBytes. - * - *

Number of bytes within the environment's disk capacity that are currently used to store - * data. - * - * @return the usedBytes - */ - public Long getUsedBytes() { - return usedBytes; - } - - /** - * Gets the maximumAllowedBytes. - * - *

Total number of bytes available in the environment's disk capacity. - * - * @return the maximumAllowedBytes - */ - public Long getMaximumAllowedBytes() { - return maximumAllowedBytes; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentAccepted.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentAccepted.java deleted file mode 100644 index d5c19bc6f2..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentAccepted.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Information returned after an uploaded document is accepted. */ -public class DocumentAccepted extends GenericModel { - - /** - * Status of the document in the ingestion process. A status of `processing` is returned for - * documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is - * returned for all others. - */ - public interface Status { - /** processing. */ - String PROCESSING = "processing"; - /** pending. */ - String PENDING = "pending"; - } - - @SerializedName("document_id") - protected String documentId; - - protected String status; - protected List notices; - - protected DocumentAccepted() {} - - /** - * Gets the documentId. - * - *

The unique identifier of the ingested document. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the status. - * - *

Status of the document in the ingestion process. A status of `processing` is returned for - * documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is - * returned for all others. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the notices. - * - *

Array of notices produced by the document-ingestion process. - * - * @return the notices - */ - public List getNotices() { - return notices; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentCounts.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentCounts.java deleted file mode 100644 index cfff490ae7..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentCounts.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing collection document count information. */ -public class DocumentCounts extends GenericModel { - - protected Long available; - protected Long processing; - protected Long failed; - protected Long pending; - - protected DocumentCounts() {} - - /** - * Gets the available. - * - *

The total number of available documents in the collection. - * - * @return the available - */ - public Long getAvailable() { - return available; - } - - /** - * Gets the processing. - * - *

The number of documents in the collection that are currently being processed. - * - * @return the processing - */ - public Long getProcessing() { - return processing; - } - - /** - * Gets the failed. - * - *

The number of documents in the collection that failed to be ingested. - * - * @return the failed - */ - public Long getFailed() { - return failed; - } - - /** - * Gets the pending. - * - *

The number of documents that have been uploaded to the collection, but have not yet started - * processing. - * - * @return the pending - */ - public Long getPending() { - return pending; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentStatus.java deleted file mode 100644 index dc92503051..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DocumentStatus.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Status information about a submitted document. */ -public class DocumentStatus extends GenericModel { - - /** Status of the document in the ingestion process. */ - public interface Status { - /** available. */ - String AVAILABLE = "available"; - /** available with notices. */ - String AVAILABLE_WITH_NOTICES = "available with notices"; - /** failed. */ - String FAILED = "failed"; - /** processing. */ - String PROCESSING = "processing"; - /** pending. */ - String PENDING = "pending"; - } - - /** The type of the original source file. */ - public interface FileType { - /** pdf. */ - String PDF = "pdf"; - /** html. */ - String HTML = "html"; - /** word. */ - String WORD = "word"; - /** json. */ - String JSON = "json"; - } - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("configuration_id") - protected String configurationId; - - protected String status; - - @SerializedName("status_description") - protected String statusDescription; - - protected String filename; - - @SerializedName("file_type") - protected String fileType; - - protected String sha1; - protected List notices; - - protected DocumentStatus() {} - - /** - * Gets the documentId. - * - *

The unique identifier of the document. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the configurationId. - * - *

The unique identifier for the configuration. - * - * @return the configurationId - */ - public String getConfigurationId() { - return configurationId; - } - - /** - * Gets the status. - * - *

Status of the document in the ingestion process. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the statusDescription. - * - *

Description of the document status. - * - * @return the statusDescription - */ - public String getStatusDescription() { - return statusDescription; - } - - /** - * Gets the filename. - * - *

Name of the original source file (if available). - * - * @return the filename - */ - public String getFilename() { - return filename; - } - - /** - * Gets the fileType. - * - *

The type of the original source file. - * - * @return the fileType - */ - public String getFileType() { - return fileType; - } - - /** - * Gets the sha1. - * - *

The SHA-1 hash of the original source file (formatted as a hexadecimal string). - * - * @return the sha1 - */ - public String getSha1() { - return sha1; - } - - /** - * Gets the notices. - * - *

Array of notices produced by the document-ingestion process. - * - * @return the notices - */ - public List getNotices() { - return notices; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Enrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Enrichment.java deleted file mode 100644 index d117e8420a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Enrichment.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Enrichment step to perform on the document. Each enrichment is performed on the specified field - * in the order that they are listed in the configuration. - */ -public class Enrichment extends GenericModel { - - protected String description; - - @SerializedName("destination_field") - protected String destinationField; - - @SerializedName("source_field") - protected String sourceField; - - protected Boolean overwrite; - protected String enrichment; - - @SerializedName("ignore_downstream_errors") - protected Boolean ignoreDownstreamErrors; - - protected EnrichmentOptions options; - - /** Builder. */ - public static class Builder { - private String description; - private String destinationField; - private String sourceField; - private Boolean overwrite; - private String enrichment; - private Boolean ignoreDownstreamErrors; - private EnrichmentOptions options; - - /** - * Instantiates a new Builder from an existing Enrichment instance. - * - * @param enrichment the instance to initialize the Builder with - */ - private Builder(Enrichment enrichment) { - this.description = enrichment.description; - this.destinationField = enrichment.destinationField; - this.sourceField = enrichment.sourceField; - this.overwrite = enrichment.overwrite; - this.enrichment = enrichment.enrichment; - this.ignoreDownstreamErrors = enrichment.ignoreDownstreamErrors; - this.options = enrichment.options; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param destinationField the destinationField - * @param sourceField the sourceField - * @param enrichment the enrichment - */ - public Builder(String destinationField, String sourceField, String enrichment) { - this.destinationField = destinationField; - this.sourceField = sourceField; - this.enrichment = enrichment; - } - - /** - * Builds a Enrichment. - * - * @return the new Enrichment instance - */ - public Enrichment build() { - return new Enrichment(this); - } - - /** - * Set the description. - * - * @param description the description - * @return the Enrichment builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the destinationField. - * - * @param destinationField the destinationField - * @return the Enrichment builder - */ - public Builder destinationField(String destinationField) { - this.destinationField = destinationField; - return this; - } - - /** - * Set the sourceField. - * - * @param sourceField the sourceField - * @return the Enrichment builder - */ - public Builder sourceField(String sourceField) { - this.sourceField = sourceField; - return this; - } - - /** - * Set the overwrite. - * - * @param overwrite the overwrite - * @return the Enrichment builder - */ - public Builder overwrite(Boolean overwrite) { - this.overwrite = overwrite; - return this; - } - - /** - * Set the enrichment. - * - * @param enrichment the enrichment - * @return the Enrichment builder - */ - public Builder enrichment(String enrichment) { - this.enrichment = enrichment; - return this; - } - - /** - * Set the ignoreDownstreamErrors. - * - * @param ignoreDownstreamErrors the ignoreDownstreamErrors - * @return the Enrichment builder - */ - public Builder ignoreDownstreamErrors(Boolean ignoreDownstreamErrors) { - this.ignoreDownstreamErrors = ignoreDownstreamErrors; - return this; - } - - /** - * Set the options. - * - * @param options the options - * @return the Enrichment builder - */ - public Builder options(EnrichmentOptions options) { - this.options = options; - return this; - } - } - - protected Enrichment() {} - - protected Enrichment(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.destinationField, "destinationField cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.sourceField, "sourceField cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.enrichment, "enrichment cannot be null"); - description = builder.description; - destinationField = builder.destinationField; - sourceField = builder.sourceField; - overwrite = builder.overwrite; - enrichment = builder.enrichment; - ignoreDownstreamErrors = builder.ignoreDownstreamErrors; - options = builder.options; - } - - /** - * New builder. - * - * @return a Enrichment builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the description. - * - *

Describes what the enrichment step does. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the destinationField. - * - *

Field where enrichments will be stored. This field must already exist or be at most 1 level - * deeper than an existing field. For example, if `text` is a top-level field with no sub-fields, - * `text.foo` is a valid destination but `text.foo.bar` is not. - * - * @return the destinationField - */ - public String destinationField() { - return destinationField; - } - - /** - * Gets the sourceField. - * - *

Field to be enriched. - * - *

Arrays can be specified as the **source_field** if the **enrichment** service for this - * enrichment is set to `natural_language_undstanding`. - * - * @return the sourceField - */ - public String sourceField() { - return sourceField; - } - - /** - * Gets the overwrite. - * - *

Indicates that the enrichments will overwrite the destination_field field if it already - * exists. - * - * @return the overwrite - */ - public Boolean overwrite() { - return overwrite; - } - - /** - * Gets the enrichment. - * - *

Name of the enrichment service to call. The only supported option is - * `natural_language_understanding`. The `elements` option is deprecated and support ended on 10 - * July 2020. - * - *

The **options** object must contain Natural Language Understanding options. - * - * @return the enrichment - */ - public String enrichment() { - return enrichment; - } - - /** - * Gets the ignoreDownstreamErrors. - * - *

If true, then most errors generated during the enrichment process will be treated as - * warnings and will not cause the document to fail processing. - * - * @return the ignoreDownstreamErrors - */ - public Boolean ignoreDownstreamErrors() { - return ignoreDownstreamErrors; - } - - /** - * Gets the options. - * - *

Options that are specific to a particular enrichment. - * - *

The `elements` enrichment type is deprecated. Use the [Create a - * project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 - * API to create a `content_intelligence` project type instead. - * - * @return the options - */ - public EnrichmentOptions options() { - return options; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnrichmentOptions.java deleted file mode 100644 index 3ededcc730..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnrichmentOptions.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Options that are specific to a particular enrichment. - * - *

The `elements` enrichment type is deprecated. Use the [Create a - * project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 - * API to create a `content_intelligence` project type instead. - */ -public class EnrichmentOptions extends GenericModel { - - /** - * ISO 639-1 code indicating the language to use for the analysis. This code overrides the - * automatic language detection performed by the service. Valid codes are `ar` (Arabic), `en` - * (English), `fr` (French), `de` (German), `it` (Italian), `pt` (Portuguese), `ru` (Russian), - * `es` (Spanish), and `sv` (Swedish). **Note:** Not all features support all languages, automatic - * detection is recommended. - */ - public interface Language { - /** ar. */ - String AR = "ar"; - /** en. */ - String EN = "en"; - /** fr. */ - String FR = "fr"; - /** de. */ - String DE = "de"; - /** it. */ - String IT = "it"; - /** pt. */ - String PT = "pt"; - /** ru. */ - String RU = "ru"; - /** es. */ - String ES = "es"; - /** sv. */ - String SV = "sv"; - } - - protected NluEnrichmentFeatures features; - protected String language; - protected String model; - - /** Builder. */ - public static class Builder { - private NluEnrichmentFeatures features; - private String language; - private String model; - - /** - * Instantiates a new Builder from an existing EnrichmentOptions instance. - * - * @param enrichmentOptions the instance to initialize the Builder with - */ - private Builder(EnrichmentOptions enrichmentOptions) { - this.features = enrichmentOptions.features; - this.language = enrichmentOptions.language; - this.model = enrichmentOptions.model; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a EnrichmentOptions. - * - * @return the new EnrichmentOptions instance - */ - public EnrichmentOptions build() { - return new EnrichmentOptions(this); - } - - /** - * Set the features. - * - * @param features the features - * @return the EnrichmentOptions builder - */ - public Builder features(NluEnrichmentFeatures features) { - this.features = features; - return this; - } - - /** - * Set the language. - * - * @param language the language - * @return the EnrichmentOptions builder - */ - public Builder language(String language) { - this.language = language; - return this; - } - - /** - * Set the model. - * - * @param model the model - * @return the EnrichmentOptions builder - * @deprecated this method is deprecated and may be removed in a future release - */ - @Deprecated - public Builder model(String model) { - this.model = model; - return this; - } - } - - protected EnrichmentOptions() {} - - protected EnrichmentOptions(Builder builder) { - features = builder.features; - language = builder.language; - model = builder.model; - } - - /** - * New builder. - * - * @return a EnrichmentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the features. - * - *

Object containing Natural Language Understanding features to be used. - * - * @return the features - */ - public NluEnrichmentFeatures features() { - return features; - } - - /** - * Gets the language. - * - *

ISO 639-1 code indicating the language to use for the analysis. This code overrides the - * automatic language detection performed by the service. Valid codes are `ar` (Arabic), `en` - * (English), `fr` (French), `de` (German), `it` (Italian), `pt` (Portuguese), `ru` (Russian), - * `es` (Spanish), and `sv` (Swedish). **Note:** Not all features support all languages, automatic - * detection is recommended. - * - * @return the language - */ - public String language() { - return language; - } - - /** - * Gets the model. - * - *

The element extraction model to use, which can be `contract` only. The `elements` enrichment - * is deprecated. - * - * @return the model - * @deprecated this method is deprecated and may be removed in a future release - */ - @Deprecated - public String model() { - return model; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Environment.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Environment.java deleted file mode 100644 index 625c8a0527..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Environment.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Details about an environment. */ -public class Environment extends GenericModel { - - /** - * Current status of the environment. `resizing` is displayed when a request to increase the - * environment size has been made, but is still in the process of being completed. - */ - public interface Status { - /** active. */ - String ACTIVE = "active"; - /** pending. */ - String PENDING = "pending"; - /** maintenance. */ - String MAINTENANCE = "maintenance"; - /** resizing. */ - String RESIZING = "resizing"; - } - - /** Current size of the environment. */ - public interface Size { - /** LT. */ - String LT = "LT"; - /** XS. */ - String XS = "XS"; - /** S. */ - String S = "S"; - /** MS. */ - String MS = "MS"; - /** M. */ - String M = "M"; - /** ML. */ - String ML = "ML"; - /** L. */ - String L = "L"; - /** XL. */ - String XL = "XL"; - /** XXL. */ - String XXL = "XXL"; - /** XXXL. */ - String XXXL = "XXXL"; - } - - @SerializedName("environment_id") - protected String environmentId; - - protected String name; - protected String description; - protected Date created; - protected Date updated; - protected String status; - - @SerializedName("read_only") - protected Boolean readOnly; - - protected String size; - - @SerializedName("requested_size") - protected String requestedSize; - - @SerializedName("index_capacity") - protected IndexCapacity indexCapacity; - - @SerializedName("search_status") - protected SearchStatus searchStatus; - - protected Environment() {} - - /** - * Gets the environmentId. - * - *

Unique identifier for the environment. - * - * @return the environmentId - */ - public String getEnvironmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

Name that identifies the environment. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the description. - * - *

Description of the environment. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the created. - * - *

Creation date of the environment, in the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Gets the updated. - * - *

Date of most recent environment update, in the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. - * - * @return the updated - */ - public Date getUpdated() { - return updated; - } - - /** - * Gets the status. - * - *

Current status of the environment. `resizing` is displayed when a request to increase the - * environment size has been made, but is still in the process of being completed. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the readOnly. - * - *

If `true`, the environment contains read-only collections that are maintained by IBM. - * - * @return the readOnly - */ - public Boolean isReadOnly() { - return readOnly; - } - - /** - * Gets the size. - * - *

Current size of the environment. - * - * @return the size - */ - public String getSize() { - return size; - } - - /** - * Gets the requestedSize. - * - *

The new size requested for this environment. Only returned when the environment *status* is - * `resizing`. - * - *

*Note:* Querying and indexing can still be performed during an environment upsize. - * - * @return the requestedSize - */ - public String getRequestedSize() { - return requestedSize; - } - - /** - * Gets the indexCapacity. - * - *

Details about the resource usage and capacity of the environment. - * - * @return the indexCapacity - */ - public IndexCapacity getIndexCapacity() { - return indexCapacity; - } - - /** - * Gets the searchStatus. - * - *

Information about the Continuous Relevancy Training for this environment. - * - * @return the searchStatus - */ - public SearchStatus getSearchStatus() { - return searchStatus; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnvironmentDocuments.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnvironmentDocuments.java deleted file mode 100644 index 21f8629e4b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EnvironmentDocuments.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Summary of the document usage statistics for the environment. */ -public class EnvironmentDocuments extends GenericModel { - - protected Long available; - - @SerializedName("maximum_allowed") - protected Long maximumAllowed; - - protected EnvironmentDocuments() {} - - /** - * Gets the available. - * - *

Number of documents indexed for the environment. - * - * @return the available - */ - public Long getAvailable() { - return available; - } - - /** - * Gets the maximumAllowed. - * - *

Total number of documents allowed in the environment's capacity. - * - * @return the maximumAllowed - */ - public Long getMaximumAllowed() { - return maximumAllowed; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EventData.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EventData.java deleted file mode 100644 index 84012c15bb..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/EventData.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Query event data object. */ -public class EventData extends GenericModel { - - @SerializedName("environment_id") - protected String environmentId; - - @SerializedName("session_token") - protected String sessionToken; - - @SerializedName("client_timestamp") - protected Date clientTimestamp; - - @SerializedName("display_rank") - protected Long displayRank; - - @SerializedName("collection_id") - protected String collectionId; - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("query_id") - protected String queryId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String sessionToken; - private Date clientTimestamp; - private Long displayRank; - private String collectionId; - private String documentId; - - /** - * Instantiates a new Builder from an existing EventData instance. - * - * @param eventData the instance to initialize the Builder with - */ - private Builder(EventData eventData) { - this.environmentId = eventData.environmentId; - this.sessionToken = eventData.sessionToken; - this.clientTimestamp = eventData.clientTimestamp; - this.displayRank = eventData.displayRank; - this.collectionId = eventData.collectionId; - this.documentId = eventData.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param sessionToken the sessionToken - * @param collectionId the collectionId - * @param documentId the documentId - */ - public Builder( - String environmentId, String sessionToken, String collectionId, String documentId) { - this.environmentId = environmentId; - this.sessionToken = sessionToken; - this.collectionId = collectionId; - this.documentId = documentId; - } - - /** - * Builds a EventData. - * - * @return the new EventData instance - */ - public EventData build() { - return new EventData(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the EventData builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the sessionToken. - * - * @param sessionToken the sessionToken - * @return the EventData builder - */ - public Builder sessionToken(String sessionToken) { - this.sessionToken = sessionToken; - return this; - } - - /** - * Set the clientTimestamp. - * - * @param clientTimestamp the clientTimestamp - * @return the EventData builder - */ - public Builder clientTimestamp(Date clientTimestamp) { - this.clientTimestamp = clientTimestamp; - return this; - } - - /** - * Set the displayRank. - * - * @param displayRank the displayRank - * @return the EventData builder - */ - public Builder displayRank(long displayRank) { - this.displayRank = displayRank; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the EventData builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the EventData builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - } - - protected EventData() {} - - protected EventData(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.environmentId, "environmentId cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.sessionToken, "sessionToken cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.collectionId, "collectionId cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.documentId, "documentId cannot be null"); - environmentId = builder.environmentId; - sessionToken = builder.sessionToken; - clientTimestamp = builder.clientTimestamp; - displayRank = builder.displayRank; - collectionId = builder.collectionId; - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a EventData builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The **environment_id** associated with the query that the event is associated with. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the sessionToken. - * - *

The session token that was returned as part of the query results that this event is - * associated with. - * - * @return the sessionToken - */ - public String sessionToken() { - return sessionToken; - } - - /** - * Gets the clientTimestamp. - * - *

The optional timestamp for the event that was created. If not provided, the time that the - * event was created in the log was used. - * - * @return the clientTimestamp - */ - public Date clientTimestamp() { - return clientTimestamp; - } - - /** - * Gets the displayRank. - * - *

The rank of the result item which the event is associated with. - * - * @return the displayRank - */ - public Long displayRank() { - return displayRank; - } - - /** - * Gets the collectionId. - * - *

The **collection_id** of the document that this event is associated with. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the documentId. - * - *

The **document_id** of the document that this event is associated with. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } - - /** - * Gets the queryId. - * - *

The query identifier stored in the log. The query and any events associated with that query - * are stored with the same **query_id**. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansion.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansion.java deleted file mode 100644 index 0bdaf75e62..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansion.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** - * An expansion definition. Each object respresents one set of expandable strings. For example, you - * could have expansions for the word `hot` in one object, and expansions for the word `cold` in - * another. - */ -public class Expansion extends GenericModel { - - @SerializedName("input_terms") - protected List inputTerms; - - @SerializedName("expanded_terms") - protected List expandedTerms; - - /** Builder. */ - public static class Builder { - private List inputTerms; - private List expandedTerms; - - /** - * Instantiates a new Builder from an existing Expansion instance. - * - * @param expansion the instance to initialize the Builder with - */ - private Builder(Expansion expansion) { - this.inputTerms = expansion.inputTerms; - this.expandedTerms = expansion.expandedTerms; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param expandedTerms the expandedTerms - */ - public Builder(List expandedTerms) { - this.expandedTerms = expandedTerms; - } - - /** - * Builds a Expansion. - * - * @return the new Expansion instance - */ - public Expansion build() { - return new Expansion(this); - } - - /** - * Adds a new element to inputTerms. - * - * @param inputTerms the new element to be added - * @return the Expansion builder - */ - public Builder addInputTerms(String inputTerms) { - com.ibm.cloud.sdk.core.util.Validator.notNull(inputTerms, "inputTerms cannot be null"); - if (this.inputTerms == null) { - this.inputTerms = new ArrayList(); - } - this.inputTerms.add(inputTerms); - return this; - } - - /** - * Adds a new element to expandedTerms. - * - * @param expandedTerms the new element to be added - * @return the Expansion builder - */ - public Builder addExpandedTerms(String expandedTerms) { - com.ibm.cloud.sdk.core.util.Validator.notNull(expandedTerms, "expandedTerms cannot be null"); - if (this.expandedTerms == null) { - this.expandedTerms = new ArrayList(); - } - this.expandedTerms.add(expandedTerms); - return this; - } - - /** - * Set the inputTerms. Existing inputTerms will be replaced. - * - * @param inputTerms the inputTerms - * @return the Expansion builder - */ - public Builder inputTerms(List inputTerms) { - this.inputTerms = inputTerms; - return this; - } - - /** - * Set the expandedTerms. Existing expandedTerms will be replaced. - * - * @param expandedTerms the expandedTerms - * @return the Expansion builder - */ - public Builder expandedTerms(List expandedTerms) { - this.expandedTerms = expandedTerms; - return this; - } - } - - protected Expansion() {} - - protected Expansion(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.expandedTerms, "expandedTerms cannot be null"); - inputTerms = builder.inputTerms; - expandedTerms = builder.expandedTerms; - } - - /** - * New builder. - * - * @return a Expansion builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the inputTerms. - * - *

A list of terms that will be expanded for this expansion. If specified, only the items in - * this list are expanded. - * - * @return the inputTerms - */ - public List inputTerms() { - return inputTerms; - } - - /** - * Gets the expandedTerms. - * - *

A list of terms that this expansion will be expanded to. If specified without - * **input_terms**, it also functions as the input term list. - * - * @return the expandedTerms - */ - public List expandedTerms() { - return expandedTerms; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansions.java deleted file mode 100644 index c31cdf32d6..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Expansions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The query expansion definitions for the specified collection. */ -public class Expansions extends GenericModel { - - protected List expansions; - - /** Builder. */ - public static class Builder { - private List expansions; - - /** - * Instantiates a new Builder from an existing Expansions instance. - * - * @param expansions the instance to initialize the Builder with - */ - private Builder(Expansions expansions) { - this.expansions = expansions.expansions; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param expansions the expansions - */ - public Builder(List expansions) { - this.expansions = expansions; - } - - /** - * Builds a Expansions. - * - * @return the new Expansions instance - */ - public Expansions build() { - return new Expansions(this); - } - - /** - * Adds a new element to expansions. - * - * @param expansions the new element to be added - * @return the Expansions builder - */ - public Builder addExpansions(Expansion expansions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(expansions, "expansions cannot be null"); - if (this.expansions == null) { - this.expansions = new ArrayList(); - } - this.expansions.add(expansions); - return this; - } - - /** - * Set the expansions. Existing expansions will be replaced. - * - * @param expansions the expansions - * @return the Expansions builder - */ - public Builder expansions(List expansions) { - this.expansions = expansions; - return this; - } - } - - protected Expansions() {} - - protected Expansions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.expansions, "expansions cannot be null"); - expansions = builder.expansions; - } - - /** - * New builder. - * - * @return a Expansions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the expansions. - * - *

An array of query expansion definitions. - * - *

Each object in the **expansions** array represents a term or set of terms that will be - * expanded into other terms. Each expansion object can be configured as bidirectional or - * unidirectional. Bidirectional means that all terms are expanded to all other terms in the - * object. Unidirectional means that a set list of terms can be expanded into a second list of - * terms. - * - *

To create a bi-directional expansion specify an **expanded_terms** array. When found in a - * query, all items in the **expanded_terms** array are then expanded to the other items in the - * same array. - * - *

To create a uni-directional expansion, specify both an array of **input_terms** and an array - * of **expanded_terms**. When items in the **input_terms** array are present in a query, they are - * expanded using the items listed in the **expanded_terms** array. - * - * @return the expansions - */ - public List expansions() { - return expansions; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptions.java deleted file mode 100644 index 3314da775a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptions.java +++ /dev/null @@ -1,560 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The federatedQueryNotices options. */ -public class FederatedQueryNoticesOptions extends GenericModel { - - protected String environmentId; - protected List collectionIds; - protected String filter; - protected String query; - protected String naturalLanguageQuery; - protected String aggregation; - protected Long count; - protected List xReturn; - protected Long offset; - protected List sort; - protected Boolean highlight; - protected String deduplicateField; - protected Boolean similar; - protected List similarDocumentIds; - protected List similarFields; - - /** Builder. */ - public static class Builder { - private String environmentId; - private List collectionIds; - private String filter; - private String query; - private String naturalLanguageQuery; - private String aggregation; - private Long count; - private List xReturn; - private Long offset; - private List sort; - private Boolean highlight; - private String deduplicateField; - private Boolean similar; - private List similarDocumentIds; - private List similarFields; - - /** - * Instantiates a new Builder from an existing FederatedQueryNoticesOptions instance. - * - * @param federatedQueryNoticesOptions the instance to initialize the Builder with - */ - private Builder(FederatedQueryNoticesOptions federatedQueryNoticesOptions) { - this.environmentId = federatedQueryNoticesOptions.environmentId; - this.collectionIds = federatedQueryNoticesOptions.collectionIds; - this.filter = federatedQueryNoticesOptions.filter; - this.query = federatedQueryNoticesOptions.query; - this.naturalLanguageQuery = federatedQueryNoticesOptions.naturalLanguageQuery; - this.aggregation = federatedQueryNoticesOptions.aggregation; - this.count = federatedQueryNoticesOptions.count; - this.xReturn = federatedQueryNoticesOptions.xReturn; - this.offset = federatedQueryNoticesOptions.offset; - this.sort = federatedQueryNoticesOptions.sort; - this.highlight = federatedQueryNoticesOptions.highlight; - this.deduplicateField = federatedQueryNoticesOptions.deduplicateField; - this.similar = federatedQueryNoticesOptions.similar; - this.similarDocumentIds = federatedQueryNoticesOptions.similarDocumentIds; - this.similarFields = federatedQueryNoticesOptions.similarFields; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionIds the collectionIds - */ - public Builder(String environmentId, List collectionIds) { - this.environmentId = environmentId; - this.collectionIds = collectionIds; - } - - /** - * Builds a FederatedQueryNoticesOptions. - * - * @return the new FederatedQueryNoticesOptions instance - */ - public FederatedQueryNoticesOptions build() { - return new FederatedQueryNoticesOptions(this); - } - - /** - * Adds a new element to collectionIds. - * - * @param collectionIds the new element to be added - * @return the FederatedQueryNoticesOptions builder - */ - public Builder addCollectionIds(String collectionIds) { - com.ibm.cloud.sdk.core.util.Validator.notNull(collectionIds, "collectionIds cannot be null"); - if (this.collectionIds == null) { - this.collectionIds = new ArrayList(); - } - this.collectionIds.add(collectionIds); - return this; - } - - /** - * Adds a new element to xReturn. - * - * @param returnField the new element to be added - * @return the FederatedQueryNoticesOptions builder - */ - public Builder addReturnField(String returnField) { - com.ibm.cloud.sdk.core.util.Validator.notNull(returnField, "returnField cannot be null"); - if (this.xReturn == null) { - this.xReturn = new ArrayList(); - } - this.xReturn.add(returnField); - return this; - } - - /** - * Adds a new element to sort. - * - * @param sort the new element to be added - * @return the FederatedQueryNoticesOptions builder - */ - public Builder addSort(String sort) { - com.ibm.cloud.sdk.core.util.Validator.notNull(sort, "sort cannot be null"); - if (this.sort == null) { - this.sort = new ArrayList(); - } - this.sort.add(sort); - return this; - } - - /** - * Adds a new element to similarDocumentIds. - * - * @param similarDocumentIds the new element to be added - * @return the FederatedQueryNoticesOptions builder - */ - public Builder addSimilarDocumentIds(String similarDocumentIds) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - similarDocumentIds, "similarDocumentIds cannot be null"); - if (this.similarDocumentIds == null) { - this.similarDocumentIds = new ArrayList(); - } - this.similarDocumentIds.add(similarDocumentIds); - return this; - } - - /** - * Adds a new element to similarFields. - * - * @param similarFields the new element to be added - * @return the FederatedQueryNoticesOptions builder - */ - public Builder addSimilarFields(String similarFields) { - com.ibm.cloud.sdk.core.util.Validator.notNull(similarFields, "similarFields cannot be null"); - if (this.similarFields == null) { - this.similarFields = new ArrayList(); - } - this.similarFields.add(similarFields); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the FederatedQueryNoticesOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionIds. Existing collectionIds will be replaced. - * - * @param collectionIds the collectionIds - * @return the FederatedQueryNoticesOptions builder - */ - public Builder collectionIds(List collectionIds) { - this.collectionIds = collectionIds; - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the FederatedQueryNoticesOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the query. - * - * @param query the query - * @return the FederatedQueryNoticesOptions builder - */ - public Builder query(String query) { - this.query = query; - return this; - } - - /** - * Set the naturalLanguageQuery. - * - * @param naturalLanguageQuery the naturalLanguageQuery - * @return the FederatedQueryNoticesOptions builder - */ - public Builder naturalLanguageQuery(String naturalLanguageQuery) { - this.naturalLanguageQuery = naturalLanguageQuery; - return this; - } - - /** - * Set the aggregation. - * - * @param aggregation the aggregation - * @return the FederatedQueryNoticesOptions builder - */ - public Builder aggregation(String aggregation) { - this.aggregation = aggregation; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the FederatedQueryNoticesOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - - /** - * Set the xReturn. Existing xReturn will be replaced. - * - * @param xReturn the xReturn - * @return the FederatedQueryNoticesOptions builder - */ - public Builder xReturn(List xReturn) { - this.xReturn = xReturn; - return this; - } - - /** - * Set the offset. - * - * @param offset the offset - * @return the FederatedQueryNoticesOptions builder - */ - public Builder offset(long offset) { - this.offset = offset; - return this; - } - - /** - * Set the sort. Existing sort will be replaced. - * - * @param sort the sort - * @return the FederatedQueryNoticesOptions builder - */ - public Builder sort(List sort) { - this.sort = sort; - return this; - } - - /** - * Set the highlight. - * - * @param highlight the highlight - * @return the FederatedQueryNoticesOptions builder - */ - public Builder highlight(Boolean highlight) { - this.highlight = highlight; - return this; - } - - /** - * Set the deduplicateField. - * - * @param deduplicateField the deduplicateField - * @return the FederatedQueryNoticesOptions builder - */ - public Builder deduplicateField(String deduplicateField) { - this.deduplicateField = deduplicateField; - return this; - } - - /** - * Set the similar. - * - * @param similar the similar - * @return the FederatedQueryNoticesOptions builder - */ - public Builder similar(Boolean similar) { - this.similar = similar; - return this; - } - - /** - * Set the similarDocumentIds. Existing similarDocumentIds will be replaced. - * - * @param similarDocumentIds the similarDocumentIds - * @return the FederatedQueryNoticesOptions builder - */ - public Builder similarDocumentIds(List similarDocumentIds) { - this.similarDocumentIds = similarDocumentIds; - return this; - } - - /** - * Set the similarFields. Existing similarFields will be replaced. - * - * @param similarFields the similarFields - * @return the FederatedQueryNoticesOptions builder - */ - public Builder similarFields(List similarFields) { - this.similarFields = similarFields; - return this; - } - } - - protected FederatedQueryNoticesOptions() {} - - protected FederatedQueryNoticesOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.collectionIds, "collectionIds cannot be null"); - environmentId = builder.environmentId; - collectionIds = builder.collectionIds; - filter = builder.filter; - query = builder.query; - naturalLanguageQuery = builder.naturalLanguageQuery; - aggregation = builder.aggregation; - count = builder.count; - xReturn = builder.xReturn; - offset = builder.offset; - sort = builder.sort; - highlight = builder.highlight; - deduplicateField = builder.deduplicateField; - similar = builder.similar; - similarDocumentIds = builder.similarDocumentIds; - similarFields = builder.similarFields; - } - - /** - * New builder. - * - * @return a FederatedQueryNoticesOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionIds. - * - *

A comma-separated list of collection IDs to be queried against. - * - * @return the collectionIds - */ - public List collectionIds() { - return collectionIds; - } - - /** - * Gets the filter. - * - *

A cacheable query that excludes documents that don't mention the query content. Filter - * searches are better for metadata-type searches and for assessing the concepts in the data set. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the query. - * - *

A query search returns all documents in your data set with full enrichments and full text, - * but with the most relevant documents listed first. - * - * @return the query - */ - public String query() { - return query; - } - - /** - * Gets the naturalLanguageQuery. - * - *

A natural language query that returns relevant documents by utilizing training data and - * natural language understanding. - * - * @return the naturalLanguageQuery - */ - public String naturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the aggregation. - * - *

An aggregation search that returns an exact answer by combining query search with filters. - * Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * - * @return the aggregation - */ - public String aggregation() { - return aggregation; - } - - /** - * Gets the count. - * - *

Number of results to return. The maximum for the **count** and **offset** values together in - * any one query is **10000**. - * - * @return the count - */ - public Long count() { - return count; - } - - /** - * Gets the xReturn. - * - *

A comma-separated list of the portion of the document hierarchy to return. - * - * @return the xReturn - */ - public List xReturn() { - return xReturn; - } - - /** - * Gets the offset. - * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. The - * maximum for the **count** and **offset** values together in any one query is **10000**. - * - * @return the offset - */ - public Long offset() { - return offset; - } - - /** - * Gets the sort. - * - *

A comma-separated list of fields in the document to sort on. You can optionally specify a - * sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending - * is the default sort direction if no prefix is specified. - * - * @return the sort - */ - public List sort() { - return sort; - } - - /** - * Gets the highlight. - * - *

When true, a highlight field is returned for each result which contains the fields which - * match the query with `<em></em>` tags around the matching query terms. - * - * @return the highlight - */ - public Boolean highlight() { - return highlight; - } - - /** - * Gets the deduplicateField. - * - *

When specified, duplicate results based on the field specified are removed from the returned - * results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * - * @return the deduplicateField - */ - public String deduplicateField() { - return deduplicateField; - } - - /** - * Gets the similar. - * - *

When `true`, results are returned based on their similarity to the document IDs specified in - * the **similar.document_ids** parameter. - * - * @return the similar - */ - public Boolean similar() { - return similar; - } - - /** - * Gets the similarDocumentIds. - * - *

A comma-separated list of document IDs to find similar documents. - * - *

**Tip:** Include the **natural_language_query** parameter to expand the scope of the - * document similarity search with the natural language query. Other query parameters, such as - * **filter** and **query**, are subsequently applied and reduce the scope. - * - * @return the similarDocumentIds - */ - public List similarDocumentIds() { - return similarDocumentIds; - } - - /** - * Gets the similarFields. - * - *

A comma-separated list of field names that are used as a basis for comparison to identify - * similar documents. If not specified, the entire document is used for comparison. - * - * @return the similarFields - */ - public List similarFields() { - return similarFields; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptions.java deleted file mode 100644 index b539321a90..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptions.java +++ /dev/null @@ -1,673 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The federatedQuery options. */ -public class FederatedQueryOptions extends GenericModel { - - protected String environmentId; - protected String collectionIds; - protected String filter; - protected String query; - protected String naturalLanguageQuery; - protected Boolean passages; - protected String aggregation; - protected Long count; - protected String xReturn; - protected Long offset; - protected String sort; - protected Boolean highlight; - protected String passagesFields; - protected Long passagesCount; - protected Long passagesCharacters; - protected Boolean deduplicate; - protected String deduplicateField; - protected Boolean similar; - protected String similarDocumentIds; - protected String similarFields; - protected String bias; - protected Boolean xWatsonLoggingOptOut; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionIds; - private String filter; - private String query; - private String naturalLanguageQuery; - private Boolean passages; - private String aggregation; - private Long count; - private String xReturn; - private Long offset; - private String sort; - private Boolean highlight; - private String passagesFields; - private Long passagesCount; - private Long passagesCharacters; - private Boolean deduplicate; - private String deduplicateField; - private Boolean similar; - private String similarDocumentIds; - private String similarFields; - private String bias; - private Boolean xWatsonLoggingOptOut; - - /** - * Instantiates a new Builder from an existing FederatedQueryOptions instance. - * - * @param federatedQueryOptions the instance to initialize the Builder with - */ - private Builder(FederatedQueryOptions federatedQueryOptions) { - this.environmentId = federatedQueryOptions.environmentId; - this.collectionIds = federatedQueryOptions.collectionIds; - this.filter = federatedQueryOptions.filter; - this.query = federatedQueryOptions.query; - this.naturalLanguageQuery = federatedQueryOptions.naturalLanguageQuery; - this.passages = federatedQueryOptions.passages; - this.aggregation = federatedQueryOptions.aggregation; - this.count = federatedQueryOptions.count; - this.xReturn = federatedQueryOptions.xReturn; - this.offset = federatedQueryOptions.offset; - this.sort = federatedQueryOptions.sort; - this.highlight = federatedQueryOptions.highlight; - this.passagesFields = federatedQueryOptions.passagesFields; - this.passagesCount = federatedQueryOptions.passagesCount; - this.passagesCharacters = federatedQueryOptions.passagesCharacters; - this.deduplicate = federatedQueryOptions.deduplicate; - this.deduplicateField = federatedQueryOptions.deduplicateField; - this.similar = federatedQueryOptions.similar; - this.similarDocumentIds = federatedQueryOptions.similarDocumentIds; - this.similarFields = federatedQueryOptions.similarFields; - this.bias = federatedQueryOptions.bias; - this.xWatsonLoggingOptOut = federatedQueryOptions.xWatsonLoggingOptOut; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionIds the collectionIds - */ - public Builder(String environmentId, String collectionIds) { - this.environmentId = environmentId; - this.collectionIds = collectionIds; - } - - /** - * Builds a FederatedQueryOptions. - * - * @return the new FederatedQueryOptions instance - */ - public FederatedQueryOptions build() { - return new FederatedQueryOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the FederatedQueryOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionIds. - * - * @param collectionIds the collectionIds - * @return the FederatedQueryOptions builder - */ - public Builder collectionIds(String collectionIds) { - this.collectionIds = collectionIds; - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the FederatedQueryOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the query. - * - * @param query the query - * @return the FederatedQueryOptions builder - */ - public Builder query(String query) { - this.query = query; - return this; - } - - /** - * Set the naturalLanguageQuery. - * - * @param naturalLanguageQuery the naturalLanguageQuery - * @return the FederatedQueryOptions builder - */ - public Builder naturalLanguageQuery(String naturalLanguageQuery) { - this.naturalLanguageQuery = naturalLanguageQuery; - return this; - } - - /** - * Set the passages. - * - * @param passages the passages - * @return the FederatedQueryOptions builder - */ - public Builder passages(Boolean passages) { - this.passages = passages; - return this; - } - - /** - * Set the aggregation. - * - * @param aggregation the aggregation - * @return the FederatedQueryOptions builder - */ - public Builder aggregation(String aggregation) { - this.aggregation = aggregation; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the FederatedQueryOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - - /** - * Set the xReturn. - * - * @param xReturn the xReturn - * @return the FederatedQueryOptions builder - */ - public Builder xReturn(String xReturn) { - this.xReturn = xReturn; - return this; - } - - /** - * Set the offset. - * - * @param offset the offset - * @return the FederatedQueryOptions builder - */ - public Builder offset(long offset) { - this.offset = offset; - return this; - } - - /** - * Set the sort. - * - * @param sort the sort - * @return the FederatedQueryOptions builder - */ - public Builder sort(String sort) { - this.sort = sort; - return this; - } - - /** - * Set the highlight. - * - * @param highlight the highlight - * @return the FederatedQueryOptions builder - */ - public Builder highlight(Boolean highlight) { - this.highlight = highlight; - return this; - } - - /** - * Set the passagesFields. - * - * @param passagesFields the passagesFields - * @return the FederatedQueryOptions builder - */ - public Builder passagesFields(String passagesFields) { - this.passagesFields = passagesFields; - return this; - } - - /** - * Set the passagesCount. - * - * @param passagesCount the passagesCount - * @return the FederatedQueryOptions builder - */ - public Builder passagesCount(long passagesCount) { - this.passagesCount = passagesCount; - return this; - } - - /** - * Set the passagesCharacters. - * - * @param passagesCharacters the passagesCharacters - * @return the FederatedQueryOptions builder - */ - public Builder passagesCharacters(long passagesCharacters) { - this.passagesCharacters = passagesCharacters; - return this; - } - - /** - * Set the deduplicate. - * - * @param deduplicate the deduplicate - * @return the FederatedQueryOptions builder - */ - public Builder deduplicate(Boolean deduplicate) { - this.deduplicate = deduplicate; - return this; - } - - /** - * Set the deduplicateField. - * - * @param deduplicateField the deduplicateField - * @return the FederatedQueryOptions builder - */ - public Builder deduplicateField(String deduplicateField) { - this.deduplicateField = deduplicateField; - return this; - } - - /** - * Set the similar. - * - * @param similar the similar - * @return the FederatedQueryOptions builder - */ - public Builder similar(Boolean similar) { - this.similar = similar; - return this; - } - - /** - * Set the similarDocumentIds. - * - * @param similarDocumentIds the similarDocumentIds - * @return the FederatedQueryOptions builder - */ - public Builder similarDocumentIds(String similarDocumentIds) { - this.similarDocumentIds = similarDocumentIds; - return this; - } - - /** - * Set the similarFields. - * - * @param similarFields the similarFields - * @return the FederatedQueryOptions builder - */ - public Builder similarFields(String similarFields) { - this.similarFields = similarFields; - return this; - } - - /** - * Set the bias. - * - * @param bias the bias - * @return the FederatedQueryOptions builder - */ - public Builder bias(String bias) { - this.bias = bias; - return this; - } - - /** - * Set the xWatsonLoggingOptOut. - * - * @param xWatsonLoggingOptOut the xWatsonLoggingOptOut - * @return the FederatedQueryOptions builder - */ - public Builder xWatsonLoggingOptOut(Boolean xWatsonLoggingOptOut) { - this.xWatsonLoggingOptOut = xWatsonLoggingOptOut; - return this; - } - } - - protected FederatedQueryOptions() {} - - protected FederatedQueryOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.collectionIds, "collectionIds cannot be null"); - environmentId = builder.environmentId; - collectionIds = builder.collectionIds; - filter = builder.filter; - query = builder.query; - naturalLanguageQuery = builder.naturalLanguageQuery; - passages = builder.passages; - aggregation = builder.aggregation; - count = builder.count; - xReturn = builder.xReturn; - offset = builder.offset; - sort = builder.sort; - highlight = builder.highlight; - passagesFields = builder.passagesFields; - passagesCount = builder.passagesCount; - passagesCharacters = builder.passagesCharacters; - deduplicate = builder.deduplicate; - deduplicateField = builder.deduplicateField; - similar = builder.similar; - similarDocumentIds = builder.similarDocumentIds; - similarFields = builder.similarFields; - bias = builder.bias; - xWatsonLoggingOptOut = builder.xWatsonLoggingOptOut; - } - - /** - * New builder. - * - * @return a FederatedQueryOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionIds. - * - *

A comma-separated list of collection IDs to be queried against. - * - * @return the collectionIds - */ - public String collectionIds() { - return collectionIds; - } - - /** - * Gets the filter. - * - *

A cacheable query that excludes documents that don't mention the query content. Filter - * searches are better for metadata-type searches and for assessing the concepts in the data set. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the query. - * - *

A query search returns all documents in your data set with full enrichments and full text, - * but with the most relevant documents listed first. Use a query search when you want to find the - * most relevant search results. - * - * @return the query - */ - public String query() { - return query; - } - - /** - * Gets the naturalLanguageQuery. - * - *

A natural language query that returns relevant documents by utilizing training data and - * natural language understanding. - * - * @return the naturalLanguageQuery - */ - public String naturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the passages. - * - *

A passages query that returns the most relevant passages from the results. - * - * @return the passages - */ - public Boolean passages() { - return passages; - } - - /** - * Gets the aggregation. - * - *

An aggregation search that returns an exact answer by combining query search with filters. - * Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * - * @return the aggregation - */ - public String aggregation() { - return aggregation; - } - - /** - * Gets the count. - * - *

Number of results to return. - * - * @return the count - */ - public Long count() { - return count; - } - - /** - * Gets the xReturn. - * - *

A comma-separated list of the portion of the document hierarchy to return. - * - * @return the xReturn - */ - public String xReturn() { - return xReturn; - } - - /** - * Gets the offset. - * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. - * - * @return the offset - */ - public Long offset() { - return offset; - } - - /** - * Gets the sort. - * - *

A comma-separated list of fields in the document to sort on. You can optionally specify a - * sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending - * is the default sort direction if no prefix is specified. This parameter cannot be used in the - * same query as the **bias** parameter. - * - * @return the sort - */ - public String sort() { - return sort; - } - - /** - * Gets the highlight. - * - *

When true, a highlight field is returned for each result which contains the fields which - * match the query with `<em></em>` tags around the matching query terms. - * - * @return the highlight - */ - public Boolean highlight() { - return highlight; - } - - /** - * Gets the passagesFields. - * - *

A comma-separated list of fields that passages are drawn from. If this parameter not - * specified, then all top-level fields are included. - * - * @return the passagesFields - */ - public String passagesFields() { - return passagesFields; - } - - /** - * Gets the passagesCount. - * - *

The maximum number of passages to return. The search returns fewer passages if the requested - * total is not found. The default is `10`. The maximum is `100`. - * - * @return the passagesCount - */ - public Long passagesCount() { - return passagesCount; - } - - /** - * Gets the passagesCharacters. - * - *

The approximate number of characters that any one passage will have. - * - * @return the passagesCharacters - */ - public Long passagesCharacters() { - return passagesCharacters; - } - - /** - * Gets the deduplicate. - * - *

When `true`, and used with a Watson Discovery News collection, duplicate results (based on - * the contents of the **title** field) are removed. Duplicate comparison is limited to the - * current query only; **offset** is not considered. This parameter is currently Beta - * functionality. - * - * @return the deduplicate - */ - public Boolean deduplicate() { - return deduplicate; - } - - /** - * Gets the deduplicateField. - * - *

When specified, duplicate results based on the field specified are removed from the returned - * results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * - * @return the deduplicateField - */ - public String deduplicateField() { - return deduplicateField; - } - - /** - * Gets the similar. - * - *

When `true`, results are returned based on their similarity to the document IDs specified in - * the **similar.document_ids** parameter. - * - * @return the similar - */ - public Boolean similar() { - return similar; - } - - /** - * Gets the similarDocumentIds. - * - *

A comma-separated list of document IDs to find similar documents. - * - *

**Tip:** Include the **natural_language_query** parameter to expand the scope of the - * document similarity search with the natural language query. Other query parameters, such as - * **filter** and **query**, are subsequently applied and reduce the scope. - * - * @return the similarDocumentIds - */ - public String similarDocumentIds() { - return similarDocumentIds; - } - - /** - * Gets the similarFields. - * - *

A comma-separated list of field names that are used as a basis for comparison to identify - * similar documents. If not specified, the entire document is used for comparison. - * - * @return the similarFields - */ - public String similarFields() { - return similarFields; - } - - /** - * Gets the bias. - * - *

Field which the returned results will be biased against. The specified field must be either - * a **date** or **number** format. When a **date** type field is specified returned results are - * biased towards field values closer to the current date. When a **number** type field is - * specified, returned results are biased towards higher field values. This parameter cannot be - * used in the same query as the **sort** parameter. - * - * @return the bias - */ - public String bias() { - return bias; - } - - /** - * Gets the xWatsonLoggingOptOut. - * - *

If `true`, queries are not stored in the Discovery **Logs** endpoint. - * - * @return the xWatsonLoggingOptOut - */ - public Boolean xWatsonLoggingOptOut() { - return xWatsonLoggingOptOut; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Field.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Field.java deleted file mode 100644 index cfddb1db04..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Field.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing field details. */ -public class Field extends GenericModel { - - /** The type of the field. */ - public interface Type { - /** nested. */ - String NESTED = "nested"; - /** string. */ - String STRING = "string"; - /** date. */ - String DATE = "date"; - /** long. */ - String X_LONG = "long"; - /** integer. */ - String INTEGER = "integer"; - /** short. */ - String X_SHORT = "short"; - /** byte. */ - String X_BYTE = "byte"; - /** double. */ - String X_DOUBLE = "double"; - /** float. */ - String X_FLOAT = "float"; - /** boolean. */ - String X_BOOLEAN = "boolean"; - /** binary. */ - String BINARY = "binary"; - } - - protected String field; - protected String type; - - protected Field() {} - - /** - * Gets the field. - * - *

The name of the field. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the type. - * - *

The type of the field. - * - * @return the type - */ - public String getType() { - return type; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FontSetting.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FontSetting.java deleted file mode 100644 index ac4216c9af..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/FontSetting.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Font matching configuration. */ -public class FontSetting extends GenericModel { - - protected Long level; - - @SerializedName("min_size") - protected Long minSize; - - @SerializedName("max_size") - protected Long maxSize; - - protected Boolean bold; - protected Boolean italic; - protected String name; - - /** Builder. */ - public static class Builder { - private Long level; - private Long minSize; - private Long maxSize; - private Boolean bold; - private Boolean italic; - private String name; - - /** - * Instantiates a new Builder from an existing FontSetting instance. - * - * @param fontSetting the instance to initialize the Builder with - */ - private Builder(FontSetting fontSetting) { - this.level = fontSetting.level; - this.minSize = fontSetting.minSize; - this.maxSize = fontSetting.maxSize; - this.bold = fontSetting.bold; - this.italic = fontSetting.italic; - this.name = fontSetting.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a FontSetting. - * - * @return the new FontSetting instance - */ - public FontSetting build() { - return new FontSetting(this); - } - - /** - * Set the level. - * - * @param level the level - * @return the FontSetting builder - */ - public Builder level(long level) { - this.level = level; - return this; - } - - /** - * Set the minSize. - * - * @param minSize the minSize - * @return the FontSetting builder - */ - public Builder minSize(long minSize) { - this.minSize = minSize; - return this; - } - - /** - * Set the maxSize. - * - * @param maxSize the maxSize - * @return the FontSetting builder - */ - public Builder maxSize(long maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Set the bold. - * - * @param bold the bold - * @return the FontSetting builder - */ - public Builder bold(Boolean bold) { - this.bold = bold; - return this; - } - - /** - * Set the italic. - * - * @param italic the italic - * @return the FontSetting builder - */ - public Builder italic(Boolean italic) { - this.italic = italic; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the FontSetting builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - } - - protected FontSetting() {} - - protected FontSetting(Builder builder) { - level = builder.level; - minSize = builder.minSize; - maxSize = builder.maxSize; - bold = builder.bold; - italic = builder.italic; - name = builder.name; - } - - /** - * New builder. - * - * @return a FontSetting builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the level. - * - *

The HTML heading level that any content with the matching font is converted to. - * - * @return the level - */ - public Long level() { - return level; - } - - /** - * Gets the minSize. - * - *

The minimum size of the font to match. - * - * @return the minSize - */ - public Long minSize() { - return minSize; - } - - /** - * Gets the maxSize. - * - *

The maximum size of the font to match. - * - * @return the maxSize - */ - public Long maxSize() { - return maxSize; - } - - /** - * Gets the bold. - * - *

When `true`, the font is matched if it is bold. - * - * @return the bold - */ - public Boolean bold() { - return bold; - } - - /** - * Gets the italic. - * - *

When `true`, the font is matched if it is italic. - * - * @return the italic - */ - public Boolean italic() { - return italic; - } - - /** - * Gets the name. - * - *

The name of the font. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Gateway.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Gateway.java deleted file mode 100644 index 15ccc223cd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Gateway.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object describing a specific gateway. */ -public class Gateway extends GenericModel { - - /** - * The current status of the gateway. `connected` means the gateway is connected to the remotly - * installed gateway. `idle` means this gateway is not currently in use. - */ - public interface Status { - /** connected. */ - String CONNECTED = "connected"; - /** idle. */ - String IDLE = "idle"; - } - - @SerializedName("gateway_id") - protected String gatewayId; - - protected String name; - protected String status; - protected String token; - - @SerializedName("token_id") - protected String tokenId; - - protected Gateway() {} - - /** - * Gets the gatewayId. - * - *

The gateway ID of the gateway. - * - * @return the gatewayId - */ - public String getGatewayId() { - return gatewayId; - } - - /** - * Gets the name. - * - *

The user defined name of the gateway. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the status. - * - *

The current status of the gateway. `connected` means the gateway is connected to the remotly - * installed gateway. `idle` means this gateway is not currently in use. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the token. - * - *

The generated **token** for this gateway. The value of this field is used when configuring - * the remotly installed gateway. - * - * @return the token - */ - public String getToken() { - return token; - } - - /** - * Gets the tokenId. - * - *

The generated **token_id** for this gateway. The value of this field is used when - * configuring the remotly installed gateway. - * - * @return the tokenId - */ - public String getTokenId() { - return tokenId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayDelete.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayDelete.java deleted file mode 100644 index 7c66c36a8c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayDelete.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Gatway deletion confirmation. */ -public class GatewayDelete extends GenericModel { - - @SerializedName("gateway_id") - protected String gatewayId; - - protected String status; - - protected GatewayDelete() {} - - /** - * Gets the gatewayId. - * - *

The gateway ID of the deleted gateway. - * - * @return the gatewayId - */ - public String getGatewayId() { - return gatewayId; - } - - /** - * Gets the status. - * - *

The status of the request. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayList.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayList.java deleted file mode 100644 index 56a05e17d5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GatewayList.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing gateways array. */ -public class GatewayList extends GenericModel { - - protected List gateways; - - protected GatewayList() {} - - /** - * Gets the gateways. - * - *

Array of configured gateway connections. - * - * @return the gateways - */ - public List getGateways() { - return gateways; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptions.java deleted file mode 100644 index 1b19f9a5b0..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptions.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getAutocompletion options. */ -public class GetAutocompletionOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String prefix; - protected String field; - protected Long count; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String prefix; - private String field; - private Long count; - - /** - * Instantiates a new Builder from an existing GetAutocompletionOptions instance. - * - * @param getAutocompletionOptions the instance to initialize the Builder with - */ - private Builder(GetAutocompletionOptions getAutocompletionOptions) { - this.environmentId = getAutocompletionOptions.environmentId; - this.collectionId = getAutocompletionOptions.collectionId; - this.prefix = getAutocompletionOptions.prefix; - this.field = getAutocompletionOptions.field; - this.count = getAutocompletionOptions.count; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param prefix the prefix - */ - public Builder(String environmentId, String collectionId, String prefix) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.prefix = prefix; - } - - /** - * Builds a GetAutocompletionOptions. - * - * @return the new GetAutocompletionOptions instance - */ - public GetAutocompletionOptions build() { - return new GetAutocompletionOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetAutocompletionOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetAutocompletionOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the prefix. - * - * @param prefix the prefix - * @return the GetAutocompletionOptions builder - */ - public Builder prefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Set the field. - * - * @param field the field - * @return the GetAutocompletionOptions builder - */ - public Builder field(String field) { - this.field = field; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the GetAutocompletionOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - } - - protected GetAutocompletionOptions() {} - - protected GetAutocompletionOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.prefix, "prefix cannot be null"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - prefix = builder.prefix; - field = builder.field; - count = builder.count; - } - - /** - * New builder. - * - * @return a GetAutocompletionOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the prefix. - * - *

The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete to - * `hot`, `housing`, or `how`. - * - * @return the prefix - */ - public String prefix() { - return prefix; - } - - /** - * Gets the field. - * - *

The field in the result documents that autocompletion suggestions are identified from. - * - * @return the field - */ - public String field() { - return field; - } - - /** - * Gets the count. - * - *

The number of autocompletion suggestions to return. - * - * @return the count - */ - public Long count() { - return count; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCollectionOptions.java deleted file mode 100644 index b25ffab45a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCollectionOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getCollection options. */ -public class GetCollectionOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing GetCollectionOptions instance. - * - * @param getCollectionOptions the instance to initialize the Builder with - */ - private Builder(GetCollectionOptions getCollectionOptions) { - this.environmentId = getCollectionOptions.environmentId; - this.collectionId = getCollectionOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a GetCollectionOptions. - * - * @return the new GetCollectionOptions instance - */ - public GetCollectionOptions build() { - return new GetCollectionOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetCollectionOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetCollectionOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected GetCollectionOptions() {} - - protected GetCollectionOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a GetCollectionOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptions.java deleted file mode 100644 index fd8469b093..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getConfiguration options. */ -public class GetConfigurationOptions extends GenericModel { - - protected String environmentId; - protected String configurationId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String configurationId; - - /** - * Instantiates a new Builder from an existing GetConfigurationOptions instance. - * - * @param getConfigurationOptions the instance to initialize the Builder with - */ - private Builder(GetConfigurationOptions getConfigurationOptions) { - this.environmentId = getConfigurationOptions.environmentId; - this.configurationId = getConfigurationOptions.configurationId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param configurationId the configurationId - */ - public Builder(String environmentId, String configurationId) { - this.environmentId = environmentId; - this.configurationId = configurationId; - } - - /** - * Builds a GetConfigurationOptions. - * - * @return the new GetConfigurationOptions instance - */ - public GetConfigurationOptions build() { - return new GetConfigurationOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetConfigurationOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the configurationId. - * - * @param configurationId the configurationId - * @return the GetConfigurationOptions builder - */ - public Builder configurationId(String configurationId) { - this.configurationId = configurationId; - return this; - } - } - - protected GetConfigurationOptions() {} - - protected GetConfigurationOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.configurationId, "configurationId cannot be empty"); - environmentId = builder.environmentId; - configurationId = builder.configurationId; - } - - /** - * New builder. - * - * @return a GetConfigurationOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the configurationId. - * - *

The ID of the configuration. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptions.java deleted file mode 100644 index 51d5e9f1aa..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getCredentials options. */ -public class GetCredentialsOptions extends GenericModel { - - protected String environmentId; - protected String credentialId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String credentialId; - - /** - * Instantiates a new Builder from an existing GetCredentialsOptions instance. - * - * @param getCredentialsOptions the instance to initialize the Builder with - */ - private Builder(GetCredentialsOptions getCredentialsOptions) { - this.environmentId = getCredentialsOptions.environmentId; - this.credentialId = getCredentialsOptions.credentialId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param credentialId the credentialId - */ - public Builder(String environmentId, String credentialId) { - this.environmentId = environmentId; - this.credentialId = credentialId; - } - - /** - * Builds a GetCredentialsOptions. - * - * @return the new GetCredentialsOptions instance - */ - public GetCredentialsOptions build() { - return new GetCredentialsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetCredentialsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the credentialId. - * - * @param credentialId the credentialId - * @return the GetCredentialsOptions builder - */ - public Builder credentialId(String credentialId) { - this.credentialId = credentialId; - return this; - } - } - - protected GetCredentialsOptions() {} - - protected GetCredentialsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.credentialId, "credentialId cannot be empty"); - environmentId = builder.environmentId; - credentialId = builder.credentialId; - } - - /** - * New builder. - * - * @return a GetCredentialsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the credentialId. - * - *

The unique identifier for a set of source credentials. - * - * @return the credentialId - */ - public String credentialId() { - return credentialId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptions.java deleted file mode 100644 index 9413d33d18..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptions.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getDocumentStatus options. */ -public class GetDocumentStatusOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String documentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String documentId; - - /** - * Instantiates a new Builder from an existing GetDocumentStatusOptions instance. - * - * @param getDocumentStatusOptions the instance to initialize the Builder with - */ - private Builder(GetDocumentStatusOptions getDocumentStatusOptions) { - this.environmentId = getDocumentStatusOptions.environmentId; - this.collectionId = getDocumentStatusOptions.collectionId; - this.documentId = getDocumentStatusOptions.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param documentId the documentId - */ - public Builder(String environmentId, String collectionId, String documentId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.documentId = documentId; - } - - /** - * Builds a GetDocumentStatusOptions. - * - * @return the new GetDocumentStatusOptions instance - */ - public GetDocumentStatusOptions build() { - return new GetDocumentStatusOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetDocumentStatusOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetDocumentStatusOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the GetDocumentStatusOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - } - - protected GetDocumentStatusOptions() {} - - protected GetDocumentStatusOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a GetDocumentStatusOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the documentId. - * - *

The ID of the document. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptions.java deleted file mode 100644 index f59478bbfd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getEnvironment options. */ -public class GetEnvironmentOptions extends GenericModel { - - protected String environmentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - - /** - * Instantiates a new Builder from an existing GetEnvironmentOptions instance. - * - * @param getEnvironmentOptions the instance to initialize the Builder with - */ - private Builder(GetEnvironmentOptions getEnvironmentOptions) { - this.environmentId = getEnvironmentOptions.environmentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a GetEnvironmentOptions. - * - * @return the new GetEnvironmentOptions instance - */ - public GetEnvironmentOptions build() { - return new GetEnvironmentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetEnvironmentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - } - - protected GetEnvironmentOptions() {} - - protected GetEnvironmentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - } - - /** - * New builder. - * - * @return a GetEnvironmentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetGatewayOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetGatewayOptions.java deleted file mode 100644 index 886aaa6208..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetGatewayOptions.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getGateway options. */ -public class GetGatewayOptions extends GenericModel { - - protected String environmentId; - protected String gatewayId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String gatewayId; - - /** - * Instantiates a new Builder from an existing GetGatewayOptions instance. - * - * @param getGatewayOptions the instance to initialize the Builder with - */ - private Builder(GetGatewayOptions getGatewayOptions) { - this.environmentId = getGatewayOptions.environmentId; - this.gatewayId = getGatewayOptions.gatewayId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param gatewayId the gatewayId - */ - public Builder(String environmentId, String gatewayId) { - this.environmentId = environmentId; - this.gatewayId = gatewayId; - } - - /** - * Builds a GetGatewayOptions. - * - * @return the new GetGatewayOptions instance - */ - public GetGatewayOptions build() { - return new GetGatewayOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetGatewayOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the gatewayId. - * - * @param gatewayId the gatewayId - * @return the GetGatewayOptions builder - */ - public Builder gatewayId(String gatewayId) { - this.gatewayId = gatewayId; - return this; - } - } - - protected GetGatewayOptions() {} - - protected GetGatewayOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.gatewayId, "gatewayId cannot be empty"); - environmentId = builder.environmentId; - gatewayId = builder.gatewayId; - } - - /** - * New builder. - * - * @return a GetGatewayOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the gatewayId. - * - *

The requested gateway ID. - * - * @return the gatewayId - */ - public String gatewayId() { - return gatewayId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptions.java deleted file mode 100644 index 7778a17f76..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptions.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** The getMetricsEventRate options. */ -public class GetMetricsEventRateOptions extends GenericModel { - - /** The type of result to consider when calculating the metric. */ - public interface ResultType { - /** document. */ - String DOCUMENT = "document"; - } - - protected Date startTime; - protected Date endTime; - protected String resultType; - - /** Builder. */ - public static class Builder { - private Date startTime; - private Date endTime; - private String resultType; - - /** - * Instantiates a new Builder from an existing GetMetricsEventRateOptions instance. - * - * @param getMetricsEventRateOptions the instance to initialize the Builder with - */ - private Builder(GetMetricsEventRateOptions getMetricsEventRateOptions) { - this.startTime = getMetricsEventRateOptions.startTime; - this.endTime = getMetricsEventRateOptions.endTime; - this.resultType = getMetricsEventRateOptions.resultType; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a GetMetricsEventRateOptions. - * - * @return the new GetMetricsEventRateOptions instance - */ - public GetMetricsEventRateOptions build() { - return new GetMetricsEventRateOptions(this); - } - - /** - * Set the startTime. - * - * @param startTime the startTime - * @return the GetMetricsEventRateOptions builder - */ - public Builder startTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Set the endTime. - * - * @param endTime the endTime - * @return the GetMetricsEventRateOptions builder - */ - public Builder endTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Set the resultType. - * - * @param resultType the resultType - * @return the GetMetricsEventRateOptions builder - */ - public Builder resultType(String resultType) { - this.resultType = resultType; - return this; - } - } - - protected GetMetricsEventRateOptions() {} - - protected GetMetricsEventRateOptions(Builder builder) { - startTime = builder.startTime; - endTime = builder.endTime; - resultType = builder.resultType; - } - - /** - * New builder. - * - * @return a GetMetricsEventRateOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the startTime. - * - *

Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the startTime - */ - public Date startTime() { - return startTime; - } - - /** - * Gets the endTime. - * - *

Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the endTime - */ - public Date endTime() { - return endTime; - } - - /** - * Gets the resultType. - * - *

The type of result to consider when calculating the metric. - * - * @return the resultType - */ - public String resultType() { - return resultType; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptions.java deleted file mode 100644 index fb2abf1234..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptions.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** The getMetricsQueryEvent options. */ -public class GetMetricsQueryEventOptions extends GenericModel { - - /** The type of result to consider when calculating the metric. */ - public interface ResultType { - /** document. */ - String DOCUMENT = "document"; - } - - protected Date startTime; - protected Date endTime; - protected String resultType; - - /** Builder. */ - public static class Builder { - private Date startTime; - private Date endTime; - private String resultType; - - /** - * Instantiates a new Builder from an existing GetMetricsQueryEventOptions instance. - * - * @param getMetricsQueryEventOptions the instance to initialize the Builder with - */ - private Builder(GetMetricsQueryEventOptions getMetricsQueryEventOptions) { - this.startTime = getMetricsQueryEventOptions.startTime; - this.endTime = getMetricsQueryEventOptions.endTime; - this.resultType = getMetricsQueryEventOptions.resultType; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a GetMetricsQueryEventOptions. - * - * @return the new GetMetricsQueryEventOptions instance - */ - public GetMetricsQueryEventOptions build() { - return new GetMetricsQueryEventOptions(this); - } - - /** - * Set the startTime. - * - * @param startTime the startTime - * @return the GetMetricsQueryEventOptions builder - */ - public Builder startTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Set the endTime. - * - * @param endTime the endTime - * @return the GetMetricsQueryEventOptions builder - */ - public Builder endTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Set the resultType. - * - * @param resultType the resultType - * @return the GetMetricsQueryEventOptions builder - */ - public Builder resultType(String resultType) { - this.resultType = resultType; - return this; - } - } - - protected GetMetricsQueryEventOptions() {} - - protected GetMetricsQueryEventOptions(Builder builder) { - startTime = builder.startTime; - endTime = builder.endTime; - resultType = builder.resultType; - } - - /** - * New builder. - * - * @return a GetMetricsQueryEventOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the startTime. - * - *

Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the startTime - */ - public Date startTime() { - return startTime; - } - - /** - * Gets the endTime. - * - *

Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the endTime - */ - public Date endTime() { - return endTime; - } - - /** - * Gets the resultType. - * - *

The type of result to consider when calculating the metric. - * - * @return the resultType - */ - public String resultType() { - return resultType; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptions.java deleted file mode 100644 index 73aa50c1df..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptions.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** The getMetricsQueryNoResults options. */ -public class GetMetricsQueryNoResultsOptions extends GenericModel { - - /** The type of result to consider when calculating the metric. */ - public interface ResultType { - /** document. */ - String DOCUMENT = "document"; - } - - protected Date startTime; - protected Date endTime; - protected String resultType; - - /** Builder. */ - public static class Builder { - private Date startTime; - private Date endTime; - private String resultType; - - /** - * Instantiates a new Builder from an existing GetMetricsQueryNoResultsOptions instance. - * - * @param getMetricsQueryNoResultsOptions the instance to initialize the Builder with - */ - private Builder(GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions) { - this.startTime = getMetricsQueryNoResultsOptions.startTime; - this.endTime = getMetricsQueryNoResultsOptions.endTime; - this.resultType = getMetricsQueryNoResultsOptions.resultType; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a GetMetricsQueryNoResultsOptions. - * - * @return the new GetMetricsQueryNoResultsOptions instance - */ - public GetMetricsQueryNoResultsOptions build() { - return new GetMetricsQueryNoResultsOptions(this); - } - - /** - * Set the startTime. - * - * @param startTime the startTime - * @return the GetMetricsQueryNoResultsOptions builder - */ - public Builder startTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Set the endTime. - * - * @param endTime the endTime - * @return the GetMetricsQueryNoResultsOptions builder - */ - public Builder endTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Set the resultType. - * - * @param resultType the resultType - * @return the GetMetricsQueryNoResultsOptions builder - */ - public Builder resultType(String resultType) { - this.resultType = resultType; - return this; - } - } - - protected GetMetricsQueryNoResultsOptions() {} - - protected GetMetricsQueryNoResultsOptions(Builder builder) { - startTime = builder.startTime; - endTime = builder.endTime; - resultType = builder.resultType; - } - - /** - * New builder. - * - * @return a GetMetricsQueryNoResultsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the startTime. - * - *

Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the startTime - */ - public Date startTime() { - return startTime; - } - - /** - * Gets the endTime. - * - *

Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the endTime - */ - public Date endTime() { - return endTime; - } - - /** - * Gets the resultType. - * - *

The type of result to consider when calculating the metric. - * - * @return the resultType - */ - public String resultType() { - return resultType; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptions.java deleted file mode 100644 index 6e9260b490..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptions.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** The getMetricsQuery options. */ -public class GetMetricsQueryOptions extends GenericModel { - - /** The type of result to consider when calculating the metric. */ - public interface ResultType { - /** document. */ - String DOCUMENT = "document"; - } - - protected Date startTime; - protected Date endTime; - protected String resultType; - - /** Builder. */ - public static class Builder { - private Date startTime; - private Date endTime; - private String resultType; - - /** - * Instantiates a new Builder from an existing GetMetricsQueryOptions instance. - * - * @param getMetricsQueryOptions the instance to initialize the Builder with - */ - private Builder(GetMetricsQueryOptions getMetricsQueryOptions) { - this.startTime = getMetricsQueryOptions.startTime; - this.endTime = getMetricsQueryOptions.endTime; - this.resultType = getMetricsQueryOptions.resultType; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a GetMetricsQueryOptions. - * - * @return the new GetMetricsQueryOptions instance - */ - public GetMetricsQueryOptions build() { - return new GetMetricsQueryOptions(this); - } - - /** - * Set the startTime. - * - * @param startTime the startTime - * @return the GetMetricsQueryOptions builder - */ - public Builder startTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Set the endTime. - * - * @param endTime the endTime - * @return the GetMetricsQueryOptions builder - */ - public Builder endTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Set the resultType. - * - * @param resultType the resultType - * @return the GetMetricsQueryOptions builder - */ - public Builder resultType(String resultType) { - this.resultType = resultType; - return this; - } - } - - protected GetMetricsQueryOptions() {} - - protected GetMetricsQueryOptions(Builder builder) { - startTime = builder.startTime; - endTime = builder.endTime; - resultType = builder.resultType; - } - - /** - * New builder. - * - * @return a GetMetricsQueryOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the startTime. - * - *

Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the startTime - */ - public Date startTime() { - return startTime; - } - - /** - * Gets the endTime. - * - *

Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the endTime - */ - public Date endTime() { - return endTime; - } - - /** - * Gets the resultType. - * - *

The type of result to consider when calculating the metric. - * - * @return the resultType - */ - public String resultType() { - return resultType; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptions.java deleted file mode 100644 index 8d7e337e1c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptions.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getMetricsQueryTokenEvent options. */ -public class GetMetricsQueryTokenEventOptions extends GenericModel { - - protected Long count; - - /** Builder. */ - public static class Builder { - private Long count; - - /** - * Instantiates a new Builder from an existing GetMetricsQueryTokenEventOptions instance. - * - * @param getMetricsQueryTokenEventOptions the instance to initialize the Builder with - */ - private Builder(GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions) { - this.count = getMetricsQueryTokenEventOptions.count; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a GetMetricsQueryTokenEventOptions. - * - * @return the new GetMetricsQueryTokenEventOptions instance - */ - public GetMetricsQueryTokenEventOptions build() { - return new GetMetricsQueryTokenEventOptions(this); - } - - /** - * Set the count. - * - * @param count the count - * @return the GetMetricsQueryTokenEventOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - } - - protected GetMetricsQueryTokenEventOptions() {} - - protected GetMetricsQueryTokenEventOptions(Builder builder) { - count = builder.count; - } - - /** - * New builder. - * - * @return a GetMetricsQueryTokenEventOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the count. - * - *

Number of results to return. The maximum for the **count** and **offset** values together in - * any one query is **10000**. - * - * @return the count - */ - public Long count() { - return count; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptions.java deleted file mode 100644 index 5817bb3478..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getStopwordListStatus options. */ -public class GetStopwordListStatusOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing GetStopwordListStatusOptions instance. - * - * @param getStopwordListStatusOptions the instance to initialize the Builder with - */ - private Builder(GetStopwordListStatusOptions getStopwordListStatusOptions) { - this.environmentId = getStopwordListStatusOptions.environmentId; - this.collectionId = getStopwordListStatusOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a GetStopwordListStatusOptions. - * - * @return the new GetStopwordListStatusOptions instance - */ - public GetStopwordListStatusOptions build() { - return new GetStopwordListStatusOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetStopwordListStatusOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetStopwordListStatusOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected GetStopwordListStatusOptions() {} - - protected GetStopwordListStatusOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a GetStopwordListStatusOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptions.java deleted file mode 100644 index c5e731db10..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getTokenizationDictionaryStatus options. */ -public class GetTokenizationDictionaryStatusOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing GetTokenizationDictionaryStatusOptions instance. - * - * @param getTokenizationDictionaryStatusOptions the instance to initialize the Builder with - */ - private Builder(GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions) { - this.environmentId = getTokenizationDictionaryStatusOptions.environmentId; - this.collectionId = getTokenizationDictionaryStatusOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a GetTokenizationDictionaryStatusOptions. - * - * @return the new GetTokenizationDictionaryStatusOptions instance - */ - public GetTokenizationDictionaryStatusOptions build() { - return new GetTokenizationDictionaryStatusOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetTokenizationDictionaryStatusOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetTokenizationDictionaryStatusOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected GetTokenizationDictionaryStatusOptions() {} - - protected GetTokenizationDictionaryStatusOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a GetTokenizationDictionaryStatusOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptions.java deleted file mode 100644 index cd79a26582..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptions.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getTrainingData options. */ -public class GetTrainingDataOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - - /** - * Instantiates a new Builder from an existing GetTrainingDataOptions instance. - * - * @param getTrainingDataOptions the instance to initialize the Builder with - */ - private Builder(GetTrainingDataOptions getTrainingDataOptions) { - this.environmentId = getTrainingDataOptions.environmentId; - this.collectionId = getTrainingDataOptions.collectionId; - this.queryId = getTrainingDataOptions.queryId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - */ - public Builder(String environmentId, String collectionId, String queryId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - } - - /** - * Builds a GetTrainingDataOptions. - * - * @return the new GetTrainingDataOptions instance - */ - public GetTrainingDataOptions build() { - return new GetTrainingDataOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetTrainingDataOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetTrainingDataOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the GetTrainingDataOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - } - - protected GetTrainingDataOptions() {} - - protected GetTrainingDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - } - - /** - * New builder. - * - * @return a GetTrainingDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptions.java deleted file mode 100644 index d8a2e3bc6d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptions.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getTrainingExample options. */ -public class GetTrainingExampleOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - protected String exampleId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - private String exampleId; - - /** - * Instantiates a new Builder from an existing GetTrainingExampleOptions instance. - * - * @param getTrainingExampleOptions the instance to initialize the Builder with - */ - private Builder(GetTrainingExampleOptions getTrainingExampleOptions) { - this.environmentId = getTrainingExampleOptions.environmentId; - this.collectionId = getTrainingExampleOptions.collectionId; - this.queryId = getTrainingExampleOptions.queryId; - this.exampleId = getTrainingExampleOptions.exampleId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - * @param exampleId the exampleId - */ - public Builder(String environmentId, String collectionId, String queryId, String exampleId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - this.exampleId = exampleId; - } - - /** - * Builds a GetTrainingExampleOptions. - * - * @return the new GetTrainingExampleOptions instance - */ - public GetTrainingExampleOptions build() { - return new GetTrainingExampleOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the GetTrainingExampleOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the GetTrainingExampleOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the GetTrainingExampleOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Set the exampleId. - * - * @param exampleId the exampleId - * @return the GetTrainingExampleOptions builder - */ - public Builder exampleId(String exampleId) { - this.exampleId = exampleId; - return this; - } - } - - protected GetTrainingExampleOptions() {} - - protected GetTrainingExampleOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.exampleId, "exampleId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - exampleId = builder.exampleId; - } - - /** - * New builder. - * - * @return a GetTrainingExampleOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } - - /** - * Gets the exampleId. - * - *

The ID of the document as it is indexed. - * - * @return the exampleId - */ - public String exampleId() { - return exampleId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/HtmlSettings.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/HtmlSettings.java deleted file mode 100644 index f50c2ac4db..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/HtmlSettings.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** A list of HTML conversion settings. */ -public class HtmlSettings extends GenericModel { - - @SerializedName("exclude_tags_completely") - protected List excludeTagsCompletely; - - @SerializedName("exclude_tags_keep_content") - protected List excludeTagsKeepContent; - - @SerializedName("keep_content") - protected XPathPatterns keepContent; - - @SerializedName("exclude_content") - protected XPathPatterns excludeContent; - - @SerializedName("keep_tag_attributes") - protected List keepTagAttributes; - - @SerializedName("exclude_tag_attributes") - protected List excludeTagAttributes; - - /** Builder. */ - public static class Builder { - private List excludeTagsCompletely; - private List excludeTagsKeepContent; - private XPathPatterns keepContent; - private XPathPatterns excludeContent; - private List keepTagAttributes; - private List excludeTagAttributes; - - /** - * Instantiates a new Builder from an existing HtmlSettings instance. - * - * @param htmlSettings the instance to initialize the Builder with - */ - private Builder(HtmlSettings htmlSettings) { - this.excludeTagsCompletely = htmlSettings.excludeTagsCompletely; - this.excludeTagsKeepContent = htmlSettings.excludeTagsKeepContent; - this.keepContent = htmlSettings.keepContent; - this.excludeContent = htmlSettings.excludeContent; - this.keepTagAttributes = htmlSettings.keepTagAttributes; - this.excludeTagAttributes = htmlSettings.excludeTagAttributes; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a HtmlSettings. - * - * @return the new HtmlSettings instance - */ - public HtmlSettings build() { - return new HtmlSettings(this); - } - - /** - * Adds a new element to excludeTagsCompletely. - * - * @param excludeTagsCompletely the new element to be added - * @return the HtmlSettings builder - */ - public Builder addExcludeTagsCompletely(String excludeTagsCompletely) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - excludeTagsCompletely, "excludeTagsCompletely cannot be null"); - if (this.excludeTagsCompletely == null) { - this.excludeTagsCompletely = new ArrayList(); - } - this.excludeTagsCompletely.add(excludeTagsCompletely); - return this; - } - - /** - * Adds a new element to excludeTagsKeepContent. - * - * @param excludeTagsKeepContent the new element to be added - * @return the HtmlSettings builder - */ - public Builder addExcludeTagsKeepContent(String excludeTagsKeepContent) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - excludeTagsKeepContent, "excludeTagsKeepContent cannot be null"); - if (this.excludeTagsKeepContent == null) { - this.excludeTagsKeepContent = new ArrayList(); - } - this.excludeTagsKeepContent.add(excludeTagsKeepContent); - return this; - } - - /** - * Adds a new element to keepTagAttributes. - * - * @param keepTagAttributes the new element to be added - * @return the HtmlSettings builder - */ - public Builder addKeepTagAttributes(String keepTagAttributes) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - keepTagAttributes, "keepTagAttributes cannot be null"); - if (this.keepTagAttributes == null) { - this.keepTagAttributes = new ArrayList(); - } - this.keepTagAttributes.add(keepTagAttributes); - return this; - } - - /** - * Adds a new element to excludeTagAttributes. - * - * @param excludeTagAttributes the new element to be added - * @return the HtmlSettings builder - */ - public Builder addExcludeTagAttributes(String excludeTagAttributes) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - excludeTagAttributes, "excludeTagAttributes cannot be null"); - if (this.excludeTagAttributes == null) { - this.excludeTagAttributes = new ArrayList(); - } - this.excludeTagAttributes.add(excludeTagAttributes); - return this; - } - - /** - * Set the excludeTagsCompletely. Existing excludeTagsCompletely will be replaced. - * - * @param excludeTagsCompletely the excludeTagsCompletely - * @return the HtmlSettings builder - */ - public Builder excludeTagsCompletely(List excludeTagsCompletely) { - this.excludeTagsCompletely = excludeTagsCompletely; - return this; - } - - /** - * Set the excludeTagsKeepContent. Existing excludeTagsKeepContent will be replaced. - * - * @param excludeTagsKeepContent the excludeTagsKeepContent - * @return the HtmlSettings builder - */ - public Builder excludeTagsKeepContent(List excludeTagsKeepContent) { - this.excludeTagsKeepContent = excludeTagsKeepContent; - return this; - } - - /** - * Set the keepContent. - * - * @param keepContent the keepContent - * @return the HtmlSettings builder - */ - public Builder keepContent(XPathPatterns keepContent) { - this.keepContent = keepContent; - return this; - } - - /** - * Set the excludeContent. - * - * @param excludeContent the excludeContent - * @return the HtmlSettings builder - */ - public Builder excludeContent(XPathPatterns excludeContent) { - this.excludeContent = excludeContent; - return this; - } - - /** - * Set the keepTagAttributes. Existing keepTagAttributes will be replaced. - * - * @param keepTagAttributes the keepTagAttributes - * @return the HtmlSettings builder - */ - public Builder keepTagAttributes(List keepTagAttributes) { - this.keepTagAttributes = keepTagAttributes; - return this; - } - - /** - * Set the excludeTagAttributes. Existing excludeTagAttributes will be replaced. - * - * @param excludeTagAttributes the excludeTagAttributes - * @return the HtmlSettings builder - */ - public Builder excludeTagAttributes(List excludeTagAttributes) { - this.excludeTagAttributes = excludeTagAttributes; - return this; - } - } - - protected HtmlSettings() {} - - protected HtmlSettings(Builder builder) { - excludeTagsCompletely = builder.excludeTagsCompletely; - excludeTagsKeepContent = builder.excludeTagsKeepContent; - keepContent = builder.keepContent; - excludeContent = builder.excludeContent; - keepTagAttributes = builder.keepTagAttributes; - excludeTagAttributes = builder.excludeTagAttributes; - } - - /** - * New builder. - * - * @return a HtmlSettings builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the excludeTagsCompletely. - * - *

Array of HTML tags that are excluded completely. - * - * @return the excludeTagsCompletely - */ - public List excludeTagsCompletely() { - return excludeTagsCompletely; - } - - /** - * Gets the excludeTagsKeepContent. - * - *

Array of HTML tags which are excluded but still retain content. - * - * @return the excludeTagsKeepContent - */ - public List excludeTagsKeepContent() { - return excludeTagsKeepContent; - } - - /** - * Gets the keepContent. - * - *

Object containing an array of XPaths. - * - * @return the keepContent - */ - public XPathPatterns keepContent() { - return keepContent; - } - - /** - * Gets the excludeContent. - * - *

Object containing an array of XPaths. - * - * @return the excludeContent - */ - public XPathPatterns excludeContent() { - return excludeContent; - } - - /** - * Gets the keepTagAttributes. - * - *

An array of HTML tag attributes to keep in the converted document. - * - * @return the keepTagAttributes - */ - public List keepTagAttributes() { - return keepTagAttributes; - } - - /** - * Gets the excludeTagAttributes. - * - *

Array of HTML tag attributes to exclude. - * - * @return the excludeTagAttributes - */ - public List excludeTagAttributes() { - return excludeTagAttributes; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/IndexCapacity.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/IndexCapacity.java deleted file mode 100644 index 0b09d5d117..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/IndexCapacity.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Details about the resource usage and capacity of the environment. */ -public class IndexCapacity extends GenericModel { - - protected EnvironmentDocuments documents; - - @SerializedName("disk_usage") - protected DiskUsage diskUsage; - - protected CollectionUsage collections; - - protected IndexCapacity() {} - - /** - * Gets the documents. - * - *

Summary of the document usage statistics for the environment. - * - * @return the documents - */ - public EnvironmentDocuments getDocuments() { - return documents; - } - - /** - * Gets the diskUsage. - * - *

Summary of the disk usage statistics for the environment. - * - * @return the diskUsage - */ - public DiskUsage getDiskUsage() { - return diskUsage; - } - - /** - * Gets the collections. - * - *

Summary of the collection usage in the environment. - * - * @return the collections - */ - public CollectionUsage getCollections() { - return collections; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptions.java deleted file mode 100644 index eff7f1a9bb..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listCollectionFields options. */ -public class ListCollectionFieldsOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing ListCollectionFieldsOptions instance. - * - * @param listCollectionFieldsOptions the instance to initialize the Builder with - */ - private Builder(ListCollectionFieldsOptions listCollectionFieldsOptions) { - this.environmentId = listCollectionFieldsOptions.environmentId; - this.collectionId = listCollectionFieldsOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a ListCollectionFieldsOptions. - * - * @return the new ListCollectionFieldsOptions instance - */ - public ListCollectionFieldsOptions build() { - return new ListCollectionFieldsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListCollectionFieldsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the ListCollectionFieldsOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected ListCollectionFieldsOptions() {} - - protected ListCollectionFieldsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a ListCollectionFieldsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponse.java deleted file mode 100644 index 7f4e21f19f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponse.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** - * The list of fetched fields. - * - *

The fields are returned using a fully qualified name format, however, the format differs - * slightly from that used by the query operations. - * - *

* Fields which contain nested JSON objects are assigned a type of "nested". - * - *

* Fields which belong to a nested object are prefixed with `.properties` (for example, - * `warnings.properties.severity` means that the `warnings` object has a property called - * `severity`). - * - *

* Fields returned from the News collection are prefixed with - * `v{N}-fullnews-t3-{YEAR}.mappings` (for example, - * `v5-fullnews-t3-2016.mappings.text.properties.author`). - */ -public class ListCollectionFieldsResponse extends GenericModel { - - protected List fields; - - protected ListCollectionFieldsResponse() {} - - /** - * Gets the fields. - * - *

An array containing information about each field in the collections. - * - * @return the fields - */ - public List getFields() { - return fields; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptions.java deleted file mode 100644 index 67fb0a0c67..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptions.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listCollections options. */ -public class ListCollectionsOptions extends GenericModel { - - protected String environmentId; - protected String name; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - - /** - * Instantiates a new Builder from an existing ListCollectionsOptions instance. - * - * @param listCollectionsOptions the instance to initialize the Builder with - */ - private Builder(ListCollectionsOptions listCollectionsOptions) { - this.environmentId = listCollectionsOptions.environmentId; - this.name = listCollectionsOptions.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a ListCollectionsOptions. - * - * @return the new ListCollectionsOptions instance - */ - public ListCollectionsOptions build() { - return new ListCollectionsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListCollectionsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the ListCollectionsOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - } - - protected ListCollectionsOptions() {} - - protected ListCollectionsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - name = builder.name; - } - - /** - * New builder. - * - * @return a ListCollectionsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

Find collections with the given name. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponse.java deleted file mode 100644 index fbbabf730a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Response object containing an array of collection details. */ -public class ListCollectionsResponse extends GenericModel { - - protected List collections; - - protected ListCollectionsResponse() {} - - /** - * Gets the collections. - * - *

An array containing information about each collection in the environment. - * - * @return the collections - */ - public List getCollections() { - return collections; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptions.java deleted file mode 100644 index 63f47a721d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptions.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listConfigurations options. */ -public class ListConfigurationsOptions extends GenericModel { - - protected String environmentId; - protected String name; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - - /** - * Instantiates a new Builder from an existing ListConfigurationsOptions instance. - * - * @param listConfigurationsOptions the instance to initialize the Builder with - */ - private Builder(ListConfigurationsOptions listConfigurationsOptions) { - this.environmentId = listConfigurationsOptions.environmentId; - this.name = listConfigurationsOptions.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a ListConfigurationsOptions. - * - * @return the new ListConfigurationsOptions instance - */ - public ListConfigurationsOptions build() { - return new ListConfigurationsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListConfigurationsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the ListConfigurationsOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - } - - protected ListConfigurationsOptions() {} - - protected ListConfigurationsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - name = builder.name; - } - - /** - * New builder. - * - * @return a ListConfigurationsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

Find configurations with the given name. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponse.java deleted file mode 100644 index 00353bd94f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing an array of available configurations. */ -public class ListConfigurationsResponse extends GenericModel { - - protected List configurations; - - protected ListConfigurationsResponse() {} - - /** - * Gets the configurations. - * - *

An array of configurations that are available for the service instance. - * - * @return the configurations - */ - public List getConfigurations() { - return configurations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptions.java deleted file mode 100644 index 538af7ee9c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listCredentials options. */ -public class ListCredentialsOptions extends GenericModel { - - protected String environmentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - - /** - * Instantiates a new Builder from an existing ListCredentialsOptions instance. - * - * @param listCredentialsOptions the instance to initialize the Builder with - */ - private Builder(ListCredentialsOptions listCredentialsOptions) { - this.environmentId = listCredentialsOptions.environmentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a ListCredentialsOptions. - * - * @return the new ListCredentialsOptions instance - */ - public ListCredentialsOptions build() { - return new ListCredentialsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListCredentialsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - } - - protected ListCredentialsOptions() {} - - protected ListCredentialsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - } - - /** - * New builder. - * - * @return a ListCredentialsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptions.java deleted file mode 100644 index 022ce2d9ec..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptions.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listEnvironments options. */ -public class ListEnvironmentsOptions extends GenericModel { - - protected String name; - - /** Builder. */ - public static class Builder { - private String name; - - /** - * Instantiates a new Builder from an existing ListEnvironmentsOptions instance. - * - * @param listEnvironmentsOptions the instance to initialize the Builder with - */ - private Builder(ListEnvironmentsOptions listEnvironmentsOptions) { - this.name = listEnvironmentsOptions.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a ListEnvironmentsOptions. - * - * @return the new ListEnvironmentsOptions instance - */ - public ListEnvironmentsOptions build() { - return new ListEnvironmentsOptions(this); - } - - /** - * Set the name. - * - * @param name the name - * @return the ListEnvironmentsOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - } - - protected ListEnvironmentsOptions() {} - - protected ListEnvironmentsOptions(Builder builder) { - name = builder.name; - } - - /** - * New builder. - * - * @return a ListEnvironmentsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the name. - * - *

Show only the environment with the given name. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponse.java deleted file mode 100644 index 4dbe6f21aa..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Response object containing an array of configured environments. */ -public class ListEnvironmentsResponse extends GenericModel { - - protected List environments; - - protected ListEnvironmentsResponse() {} - - /** - * Gets the environments. - * - *

An array of [environments] that are available for the service instance. - * - * @return the environments - */ - public List getEnvironments() { - return environments; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptions.java deleted file mode 100644 index 7809135af8..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listExpansions options. */ -public class ListExpansionsOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing ListExpansionsOptions instance. - * - * @param listExpansionsOptions the instance to initialize the Builder with - */ - private Builder(ListExpansionsOptions listExpansionsOptions) { - this.environmentId = listExpansionsOptions.environmentId; - this.collectionId = listExpansionsOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a ListExpansionsOptions. - * - * @return the new ListExpansionsOptions instance - */ - public ListExpansionsOptions build() { - return new ListExpansionsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListExpansionsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the ListExpansionsOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected ListExpansionsOptions() {} - - protected ListExpansionsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a ListExpansionsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListFieldsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListFieldsOptions.java deleted file mode 100644 index 22293d9fa5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListFieldsOptions.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The listFields options. */ -public class ListFieldsOptions extends GenericModel { - - protected String environmentId; - protected List collectionIds; - - /** Builder. */ - public static class Builder { - private String environmentId; - private List collectionIds; - - /** - * Instantiates a new Builder from an existing ListFieldsOptions instance. - * - * @param listFieldsOptions the instance to initialize the Builder with - */ - private Builder(ListFieldsOptions listFieldsOptions) { - this.environmentId = listFieldsOptions.environmentId; - this.collectionIds = listFieldsOptions.collectionIds; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionIds the collectionIds - */ - public Builder(String environmentId, List collectionIds) { - this.environmentId = environmentId; - this.collectionIds = collectionIds; - } - - /** - * Builds a ListFieldsOptions. - * - * @return the new ListFieldsOptions instance - */ - public ListFieldsOptions build() { - return new ListFieldsOptions(this); - } - - /** - * Adds a new element to collectionIds. - * - * @param collectionIds the new element to be added - * @return the ListFieldsOptions builder - */ - public Builder addCollectionIds(String collectionIds) { - com.ibm.cloud.sdk.core.util.Validator.notNull(collectionIds, "collectionIds cannot be null"); - if (this.collectionIds == null) { - this.collectionIds = new ArrayList(); - } - this.collectionIds.add(collectionIds); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListFieldsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionIds. Existing collectionIds will be replaced. - * - * @param collectionIds the collectionIds - * @return the ListFieldsOptions builder - */ - public Builder collectionIds(List collectionIds) { - this.collectionIds = collectionIds; - return this; - } - } - - protected ListFieldsOptions() {} - - protected ListFieldsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.collectionIds, "collectionIds cannot be null"); - environmentId = builder.environmentId; - collectionIds = builder.collectionIds; - } - - /** - * New builder. - * - * @return a ListFieldsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionIds. - * - *

A comma-separated list of collection IDs to be queried against. - * - * @return the collectionIds - */ - public List collectionIds() { - return collectionIds; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptions.java deleted file mode 100644 index e8b6bb6410..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listGateways options. */ -public class ListGatewaysOptions extends GenericModel { - - protected String environmentId; - - /** Builder. */ - public static class Builder { - private String environmentId; - - /** - * Instantiates a new Builder from an existing ListGatewaysOptions instance. - * - * @param listGatewaysOptions the instance to initialize the Builder with - */ - private Builder(ListGatewaysOptions listGatewaysOptions) { - this.environmentId = listGatewaysOptions.environmentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a ListGatewaysOptions. - * - * @return the new ListGatewaysOptions instance - */ - public ListGatewaysOptions build() { - return new ListGatewaysOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListGatewaysOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - } - - protected ListGatewaysOptions() {} - - protected ListGatewaysOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - } - - /** - * New builder. - * - * @return a ListGatewaysOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptions.java deleted file mode 100644 index 844df1362d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptions.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listTrainingData options. */ -public class ListTrainingDataOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - - /** - * Instantiates a new Builder from an existing ListTrainingDataOptions instance. - * - * @param listTrainingDataOptions the instance to initialize the Builder with - */ - private Builder(ListTrainingDataOptions listTrainingDataOptions) { - this.environmentId = listTrainingDataOptions.environmentId; - this.collectionId = listTrainingDataOptions.collectionId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a ListTrainingDataOptions. - * - * @return the new ListTrainingDataOptions instance - */ - public ListTrainingDataOptions build() { - return new ListTrainingDataOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListTrainingDataOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the ListTrainingDataOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - } - - protected ListTrainingDataOptions() {} - - protected ListTrainingDataOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - } - - /** - * New builder. - * - * @return a ListTrainingDataOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptions.java deleted file mode 100644 index 0702ed744b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptions.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listTrainingExamples options. */ -public class ListTrainingExamplesOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - - /** - * Instantiates a new Builder from an existing ListTrainingExamplesOptions instance. - * - * @param listTrainingExamplesOptions the instance to initialize the Builder with - */ - private Builder(ListTrainingExamplesOptions listTrainingExamplesOptions) { - this.environmentId = listTrainingExamplesOptions.environmentId; - this.collectionId = listTrainingExamplesOptions.collectionId; - this.queryId = listTrainingExamplesOptions.queryId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - */ - public Builder(String environmentId, String collectionId, String queryId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - } - - /** - * Builds a ListTrainingExamplesOptions. - * - * @return the new ListTrainingExamplesOptions instance - */ - public ListTrainingExamplesOptions build() { - return new ListTrainingExamplesOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the ListTrainingExamplesOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the ListTrainingExamplesOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the ListTrainingExamplesOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - } - - protected ListTrainingExamplesOptions() {} - - protected ListTrainingExamplesOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - } - - /** - * New builder. - * - * @return a ListTrainingExamplesOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponse.java deleted file mode 100644 index e0492d69b5..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponse.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing results that match the requested **logs** query. */ -public class LogQueryResponse extends GenericModel { - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List results; - - protected LogQueryResponse() {} - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the results. - * - *

Array of log query response results. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResult.java deleted file mode 100644 index 337b6c2e3d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResult.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** - * Individual result object for a **logs** query. Each object represents either a query to a - * Discovery collection or an event that is associated with a query. - */ -public class LogQueryResponseResult extends GenericModel { - - /** - * The type of log entry returned. - * - *

**query** indicates that the log represents the results of a call to the single collection - * **query** method. - * - *

**event** indicates that the log represents a call to the **events** API. - */ - public interface DocumentType { - /** query. */ - String QUERY = "query"; - /** event. */ - String EVENT = "event"; - } - - /** - * The type of event that this object respresents. Possible values are - * - *

- `query` the log of a query to a collection - * - *

- `click` the result of a call to the **events** endpoint. - */ - public interface EventType { - /** click. */ - String CLICK = "click"; - /** query. */ - String QUERY = "query"; - } - - /** - * The type of result that this **event** is associated with. Only returned with logs of type - * `event`. - */ - public interface ResultType { - /** document. */ - String DOCUMENT = "document"; - } - - @SerializedName("environment_id") - protected String environmentId; - - @SerializedName("customer_id") - protected String customerId; - - @SerializedName("document_type") - protected String documentType; - - @SerializedName("natural_language_query") - protected String naturalLanguageQuery; - - @SerializedName("document_results") - protected LogQueryResponseResultDocuments documentResults; - - @SerializedName("created_timestamp") - protected Date createdTimestamp; - - @SerializedName("client_timestamp") - protected Date clientTimestamp; - - @SerializedName("query_id") - protected String queryId; - - @SerializedName("session_token") - protected String sessionToken; - - @SerializedName("collection_id") - protected String collectionId; - - @SerializedName("display_rank") - protected Long displayRank; - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("event_type") - protected String eventType; - - @SerializedName("result_type") - protected String resultType; - - protected LogQueryResponseResult() {} - - /** - * Gets the environmentId. - * - *

The environment ID that is associated with this log entry. - * - * @return the environmentId - */ - public String getEnvironmentId() { - return environmentId; - } - - /** - * Gets the customerId. - * - *

The **customer_id** label that was specified in the header of the query or event API call - * that corresponds to this log entry. - * - * @return the customerId - */ - public String getCustomerId() { - return customerId; - } - - /** - * Gets the documentType. - * - *

The type of log entry returned. - * - *

**query** indicates that the log represents the results of a call to the single collection - * **query** method. - * - *

**event** indicates that the log represents a call to the **events** API. - * - * @return the documentType - */ - public String getDocumentType() { - return documentType; - } - - /** - * Gets the naturalLanguageQuery. - * - *

The value of the **natural_language_query** query parameter that was used to create these - * results. Only returned with logs of type **query**. - * - *

**Note:** Other query parameters (such as **filter** or **deduplicate**) might have been - * used with this query, but are not recorded. - * - * @return the naturalLanguageQuery - */ - public String getNaturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the documentResults. - * - *

Object containing result information that was returned by the query used to create this log - * entry. Only returned with logs of type `query`. - * - * @return the documentResults - */ - public LogQueryResponseResultDocuments getDocumentResults() { - return documentResults; - } - - /** - * Gets the createdTimestamp. - * - *

Date that the log result was created. Returned in `YYYY-MM-DDThh:mm:ssZ` format. - * - * @return the createdTimestamp - */ - public Date getCreatedTimestamp() { - return createdTimestamp; - } - - /** - * Gets the clientTimestamp. - * - *

Date specified by the user when recording an event. Returned in `YYYY-MM-DDThh:mm:ssZ` - * format. Only returned with logs of type **event**. - * - * @return the clientTimestamp - */ - public Date getClientTimestamp() { - return clientTimestamp; - } - - /** - * Gets the queryId. - * - *

Identifier that corresponds to the **natural_language_query** string used in the original or - * associated query. All **event** and **query** log entries that have the same original - * **natural_language_query** string also have them same **query_id**. This field can be used to - * recall all **event** and **query** log results that have the same original query (**event** - * logs do not contain the original **natural_language_query** field). - * - * @return the queryId - */ - public String getQueryId() { - return queryId; - } - - /** - * Gets the sessionToken. - * - *

Unique identifier (within a 24-hour period) that identifies a single `query` log and any - * `event` logs that were created for it. - * - *

**Note:** If the exact same query is run at the exact same time on different days, the - * **session_token** for those queries might be identical. However, the **created_timestamp** - * differs. - * - *

**Note:** Session tokens are case sensitive. To avoid matching on session tokens that are - * identical except for case, use the exact match operator (`::`) when you query for a specific - * session token. - * - * @return the sessionToken - */ - public String getSessionToken() { - return sessionToken; - } - - /** - * Gets the collectionId. - * - *

The collection ID of the document associated with this event. Only returned with logs of - * type `event`. - * - * @return the collectionId - */ - public String getCollectionId() { - return collectionId; - } - - /** - * Gets the displayRank. - * - *

The original display rank of the document associated with this event. Only returned with - * logs of type `event`. - * - * @return the displayRank - */ - public Long getDisplayRank() { - return displayRank; - } - - /** - * Gets the documentId. - * - *

The document ID of the document associated with this event. Only returned with logs of type - * `event`. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the eventType. - * - *

The type of event that this object respresents. Possible values are - * - *

- `query` the log of a query to a collection - * - *

- `click` the result of a call to the **events** endpoint. - * - * @return the eventType - */ - public String getEventType() { - return eventType; - } - - /** - * Gets the resultType. - * - *

The type of result that this **event** is associated with. Only returned with logs of type - * `event`. - * - * @return the resultType - */ - public String getResultType() { - return resultType; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocuments.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocuments.java deleted file mode 100644 index bc3c47641e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocuments.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** - * Object containing result information that was returned by the query used to create this log - * entry. Only returned with logs of type `query`. - */ -public class LogQueryResponseResultDocuments extends GenericModel { - - protected List results; - protected Long count; - - protected LogQueryResponseResultDocuments() {} - - /** - * Gets the results. - * - *

Array of log query response results. - * - * @return the results - */ - public List getResults() { - return results; - } - - /** - * Gets the count. - * - *

The number of results returned in the query associate with this log. - * - * @return the count - */ - public Long getCount() { - return count; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResult.java deleted file mode 100644 index d782dece3e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResult.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * Each object in the **results** array corresponds to an individual document returned by the - * original query. - */ -public class LogQueryResponseResultDocumentsResult extends GenericModel { - - protected Long position; - - @SerializedName("document_id") - protected String documentId; - - protected Double score; - protected Double confidence; - - @SerializedName("collection_id") - protected String collectionId; - - protected LogQueryResponseResultDocumentsResult() {} - - /** - * Gets the position. - * - *

The result rank of this document. A position of `1` indicates that it was the first returned - * result. - * - * @return the position - */ - public Long getPosition() { - return position; - } - - /** - * Gets the documentId. - * - *

The **document_id** of the document that this result represents. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the score. - * - *

The raw score of this result. A higher score indicates a greater match to the query - * parameters. - * - * @return the score - */ - public Double getScore() { - return score; - } - - /** - * Gets the confidence. - * - *

The confidence score of the result's analysis. A higher score indicating greater confidence. - * - * @return the confidence - */ - public Double getConfidence() { - return confidence; - } - - /** - * Gets the collectionId. - * - *

The **collection_id** of the document represented by this result. - * - * @return the collectionId - */ - public String getCollectionId() { - return collectionId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregation.java deleted file mode 100644 index 568421866c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregation.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** An aggregation analyzing log information for queries and events. */ -public class MetricAggregation extends GenericModel { - - protected String interval; - - @SerializedName("event_type") - protected String eventType; - - protected List results; - - protected MetricAggregation() {} - - /** - * Gets the interval. - * - *

The measurement interval for this metric. Metric intervals are always 1 day (`1d`). - * - * @return the interval - */ - public String getInterval() { - return interval; - } - - /** - * Gets the eventType. - * - *

The event type associated with this metric result. This field, when present, will always be - * `click`. - * - * @return the eventType - */ - public String getEventType() { - return eventType; - } - - /** - * Gets the results. - * - *

Array of metric aggregation query results. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregationResult.java deleted file mode 100644 index 639cb1b561..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricAggregationResult.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Aggregation result data for the requested metric. */ -public class MetricAggregationResult extends GenericModel { - - @SerializedName("key_as_string") - protected Date keyAsString; - - protected Long key; - - @SerializedName("matching_results") - protected Long matchingResults; - - @SerializedName("event_rate") - protected Double eventRate; - - protected MetricAggregationResult() {} - - /** - * Gets the keyAsString. - * - *

Date in string form representing the start of this interval. - * - * @return the keyAsString - */ - public Date getKeyAsString() { - return keyAsString; - } - - /** - * Gets the key. - * - *

Unix epoch time equivalent of the **key_as_string**, that represents the start of this - * interval. - * - * @return the key - */ - public Long getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the eventRate. - * - *

The number of queries with associated events divided by the total number of queries for the - * interval. Only returned with **event_rate** metrics. - * - * @return the eventRate - */ - public Double getEventRate() { - return eventRate; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricResponse.java deleted file mode 100644 index 0d0eb48ec7..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** The response generated from a call to a **metrics** method. */ -public class MetricResponse extends GenericModel { - - protected List aggregations; - - protected MetricResponse() {} - - /** - * Gets the aggregations. - * - *

Array of metric aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregation.java deleted file mode 100644 index 021dcfdce4..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregation.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** An aggregation analyzing log information for queries and events. */ -public class MetricTokenAggregation extends GenericModel { - - @SerializedName("event_type") - protected String eventType; - - protected List results; - - protected MetricTokenAggregation() {} - - /** - * Gets the eventType. - * - *

The event type associated with this metric result. This field, when present, will always be - * `click`. - * - * @return the eventType - */ - public String getEventType() { - return eventType; - } - - /** - * Gets the results. - * - *

Array of results for the metric token aggregation. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResult.java deleted file mode 100644 index 7cba0d068d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResult.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Aggregation result data for the requested metric. */ -public class MetricTokenAggregationResult extends GenericModel { - - protected String key; - - @SerializedName("matching_results") - protected Long matchingResults; - - @SerializedName("event_rate") - protected Double eventRate; - - protected MetricTokenAggregationResult() {} - - /** - * Gets the key. - * - *

The content of the **natural_language_query** parameter used in the query that this result - * represents. - * - * @return the key - */ - public String getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the eventRate. - * - *

The number of queries with associated events divided by the total number of queries - * currently stored (queries and events are stored in the log for 30 days). - * - * @return the eventRate - */ - public Double getEventRate() { - return eventRate; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenResponse.java deleted file mode 100644 index b9423753c9..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/MetricTokenResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** The response generated from a call to a **metrics** method that evaluates tokens. */ -public class MetricTokenResponse extends GenericModel { - - protected List aggregations; - - protected MetricTokenResponse() {} - - /** - * Gets the aggregations. - * - *

Array of metric token aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConcepts.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConcepts.java deleted file mode 100644 index 6a76900ed1..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConcepts.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object specifiying the concepts enrichment and related parameters. */ -public class NluEnrichmentConcepts extends GenericModel { - - protected Long limit; - - /** Builder. */ - public static class Builder { - private Long limit; - - /** - * Instantiates a new Builder from an existing NluEnrichmentConcepts instance. - * - * @param nluEnrichmentConcepts the instance to initialize the Builder with - */ - private Builder(NluEnrichmentConcepts nluEnrichmentConcepts) { - this.limit = nluEnrichmentConcepts.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentConcepts. - * - * @return the new NluEnrichmentConcepts instance - */ - public NluEnrichmentConcepts build() { - return new NluEnrichmentConcepts(this); - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the NluEnrichmentConcepts builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected NluEnrichmentConcepts() {} - - protected NluEnrichmentConcepts(Builder builder) { - limit = builder.limit; - } - - /** - * New builder. - * - * @return a NluEnrichmentConcepts builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the limit. - * - *

The maximum number of concepts enrichments to extact from each instance of the specified - * field. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotion.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotion.java deleted file mode 100644 index a51642975c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotion.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** An object specifying the emotion detection enrichment and related parameters. */ -public class NluEnrichmentEmotion extends GenericModel { - - protected Boolean document; - protected List targets; - - /** Builder. */ - public static class Builder { - private Boolean document; - private List targets; - - /** - * Instantiates a new Builder from an existing NluEnrichmentEmotion instance. - * - * @param nluEnrichmentEmotion the instance to initialize the Builder with - */ - private Builder(NluEnrichmentEmotion nluEnrichmentEmotion) { - this.document = nluEnrichmentEmotion.document; - this.targets = nluEnrichmentEmotion.targets; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentEmotion. - * - * @return the new NluEnrichmentEmotion instance - */ - public NluEnrichmentEmotion build() { - return new NluEnrichmentEmotion(this); - } - - /** - * Adds a new element to targets. - * - * @param target the new element to be added - * @return the NluEnrichmentEmotion builder - */ - public Builder addTarget(String target) { - com.ibm.cloud.sdk.core.util.Validator.notNull(target, "target cannot be null"); - if (this.targets == null) { - this.targets = new ArrayList(); - } - this.targets.add(target); - return this; - } - - /** - * Set the document. - * - * @param document the document - * @return the NluEnrichmentEmotion builder - */ - public Builder document(Boolean document) { - this.document = document; - return this; - } - - /** - * Set the targets. Existing targets will be replaced. - * - * @param targets the targets - * @return the NluEnrichmentEmotion builder - */ - public Builder targets(List targets) { - this.targets = targets; - return this; - } - } - - protected NluEnrichmentEmotion() {} - - protected NluEnrichmentEmotion(Builder builder) { - document = builder.document; - targets = builder.targets; - } - - /** - * New builder. - * - * @return a NluEnrichmentEmotion builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the document. - * - *

When `true`, emotion detection is performed on the entire field. - * - * @return the document - */ - public Boolean document() { - return document; - } - - /** - * Gets the targets. - * - *

A comma-separated list of target strings that will have any associated emotions detected. - * - * @return the targets - */ - public List targets() { - return targets; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntities.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntities.java deleted file mode 100644 index 6cdbde468a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntities.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object speficying the Entities enrichment and related parameters. */ -public class NluEnrichmentEntities extends GenericModel { - - protected Boolean sentiment; - protected Boolean emotion; - protected Long limit; - protected Boolean mentions; - - @SerializedName("mention_types") - protected Boolean mentionTypes; - - @SerializedName("sentence_locations") - protected Boolean sentenceLocations; - - protected String model; - - /** Builder. */ - public static class Builder { - private Boolean sentiment; - private Boolean emotion; - private Long limit; - private Boolean mentions; - private Boolean mentionTypes; - private Boolean sentenceLocations; - private String model; - - /** - * Instantiates a new Builder from an existing NluEnrichmentEntities instance. - * - * @param nluEnrichmentEntities the instance to initialize the Builder with - */ - private Builder(NluEnrichmentEntities nluEnrichmentEntities) { - this.sentiment = nluEnrichmentEntities.sentiment; - this.emotion = nluEnrichmentEntities.emotion; - this.limit = nluEnrichmentEntities.limit; - this.mentions = nluEnrichmentEntities.mentions; - this.mentionTypes = nluEnrichmentEntities.mentionTypes; - this.sentenceLocations = nluEnrichmentEntities.sentenceLocations; - this.model = nluEnrichmentEntities.model; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentEntities. - * - * @return the new NluEnrichmentEntities instance - */ - public NluEnrichmentEntities build() { - return new NluEnrichmentEntities(this); - } - - /** - * Set the sentiment. - * - * @param sentiment the sentiment - * @return the NluEnrichmentEntities builder - */ - public Builder sentiment(Boolean sentiment) { - this.sentiment = sentiment; - return this; - } - - /** - * Set the emotion. - * - * @param emotion the emotion - * @return the NluEnrichmentEntities builder - */ - public Builder emotion(Boolean emotion) { - this.emotion = emotion; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the NluEnrichmentEntities builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - - /** - * Set the mentions. - * - * @param mentions the mentions - * @return the NluEnrichmentEntities builder - */ - public Builder mentions(Boolean mentions) { - this.mentions = mentions; - return this; - } - - /** - * Set the mentionTypes. - * - * @param mentionTypes the mentionTypes - * @return the NluEnrichmentEntities builder - */ - public Builder mentionTypes(Boolean mentionTypes) { - this.mentionTypes = mentionTypes; - return this; - } - - /** - * Set the sentenceLocations. - * - * @param sentenceLocations the sentenceLocations - * @return the NluEnrichmentEntities builder - */ - public Builder sentenceLocations(Boolean sentenceLocations) { - this.sentenceLocations = sentenceLocations; - return this; - } - - /** - * Set the model. - * - * @param model the model - * @return the NluEnrichmentEntities builder - */ - public Builder model(String model) { - this.model = model; - return this; - } - } - - protected NluEnrichmentEntities() {} - - protected NluEnrichmentEntities(Builder builder) { - sentiment = builder.sentiment; - emotion = builder.emotion; - limit = builder.limit; - mentions = builder.mentions; - mentionTypes = builder.mentionTypes; - sentenceLocations = builder.sentenceLocations; - model = builder.model; - } - - /** - * New builder. - * - * @return a NluEnrichmentEntities builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the sentiment. - * - *

When `true`, sentiment analysis of entities will be performed on the specified field. - * - * @return the sentiment - */ - public Boolean sentiment() { - return sentiment; - } - - /** - * Gets the emotion. - * - *

When `true`, emotion detection of entities will be performed on the specified field. - * - * @return the emotion - */ - public Boolean emotion() { - return emotion; - } - - /** - * Gets the limit. - * - *

The maximum number of entities to extract for each instance of the specified field. - * - * @return the limit - */ - public Long limit() { - return limit; - } - - /** - * Gets the mentions. - * - *

When `true`, the number of mentions of each identified entity is recorded. The default is - * `false`. - * - * @return the mentions - */ - public Boolean mentions() { - return mentions; - } - - /** - * Gets the mentionTypes. - * - *

When `true`, the types of mentions for each idetifieid entity is recorded. The default is - * `false`. - * - * @return the mentionTypes - */ - public Boolean mentionTypes() { - return mentionTypes; - } - - /** - * Gets the sentenceLocations. - * - *

When `true`, a list of sentence locations for each instance of each identified entity is - * recorded. The default is `false`. - * - * @return the sentenceLocations - */ - public Boolean sentenceLocations() { - return sentenceLocations; - } - - /** - * Gets the model. - * - *

The enrichement model to use with entity extraction. May be a custom model provided by - * Watson Knowledge Studio, or the default public model `alchemy`. - * - * @return the model - */ - public String model() { - return model; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeatures.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeatures.java deleted file mode 100644 index 297886ad06..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeatures.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Map; - -/** Object containing Natural Language Understanding features to be used. */ -public class NluEnrichmentFeatures extends GenericModel { - - protected NluEnrichmentKeywords keywords; - protected NluEnrichmentEntities entities; - protected NluEnrichmentSentiment sentiment; - protected NluEnrichmentEmotion emotion; - protected Map categories; - - @SerializedName("semantic_roles") - protected NluEnrichmentSemanticRoles semanticRoles; - - protected NluEnrichmentRelations relations; - protected NluEnrichmentConcepts concepts; - - /** Builder. */ - public static class Builder { - private NluEnrichmentKeywords keywords; - private NluEnrichmentEntities entities; - private NluEnrichmentSentiment sentiment; - private NluEnrichmentEmotion emotion; - private Map categories; - private NluEnrichmentSemanticRoles semanticRoles; - private NluEnrichmentRelations relations; - private NluEnrichmentConcepts concepts; - - /** - * Instantiates a new Builder from an existing NluEnrichmentFeatures instance. - * - * @param nluEnrichmentFeatures the instance to initialize the Builder with - */ - private Builder(NluEnrichmentFeatures nluEnrichmentFeatures) { - this.keywords = nluEnrichmentFeatures.keywords; - this.entities = nluEnrichmentFeatures.entities; - this.sentiment = nluEnrichmentFeatures.sentiment; - this.emotion = nluEnrichmentFeatures.emotion; - this.categories = nluEnrichmentFeatures.categories; - this.semanticRoles = nluEnrichmentFeatures.semanticRoles; - this.relations = nluEnrichmentFeatures.relations; - this.concepts = nluEnrichmentFeatures.concepts; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentFeatures. - * - * @return the new NluEnrichmentFeatures instance - */ - public NluEnrichmentFeatures build() { - return new NluEnrichmentFeatures(this); - } - - /** - * Set the keywords. - * - * @param keywords the keywords - * @return the NluEnrichmentFeatures builder - */ - public Builder keywords(NluEnrichmentKeywords keywords) { - this.keywords = keywords; - return this; - } - - /** - * Set the entities. - * - * @param entities the entities - * @return the NluEnrichmentFeatures builder - */ - public Builder entities(NluEnrichmentEntities entities) { - this.entities = entities; - return this; - } - - /** - * Set the sentiment. - * - * @param sentiment the sentiment - * @return the NluEnrichmentFeatures builder - */ - public Builder sentiment(NluEnrichmentSentiment sentiment) { - this.sentiment = sentiment; - return this; - } - - /** - * Set the emotion. - * - * @param emotion the emotion - * @return the NluEnrichmentFeatures builder - */ - public Builder emotion(NluEnrichmentEmotion emotion) { - this.emotion = emotion; - return this; - } - - /** - * Set the categories. - * - * @param categories the categories - * @return the NluEnrichmentFeatures builder - */ - public Builder categories(Map categories) { - this.categories = categories; - return this; - } - - /** - * Set the semanticRoles. - * - * @param semanticRoles the semanticRoles - * @return the NluEnrichmentFeatures builder - */ - public Builder semanticRoles(NluEnrichmentSemanticRoles semanticRoles) { - this.semanticRoles = semanticRoles; - return this; - } - - /** - * Set the relations. - * - * @param relations the relations - * @return the NluEnrichmentFeatures builder - */ - public Builder relations(NluEnrichmentRelations relations) { - this.relations = relations; - return this; - } - - /** - * Set the concepts. - * - * @param concepts the concepts - * @return the NluEnrichmentFeatures builder - */ - public Builder concepts(NluEnrichmentConcepts concepts) { - this.concepts = concepts; - return this; - } - } - - protected NluEnrichmentFeatures() {} - - protected NluEnrichmentFeatures(Builder builder) { - keywords = builder.keywords; - entities = builder.entities; - sentiment = builder.sentiment; - emotion = builder.emotion; - categories = builder.categories; - semanticRoles = builder.semanticRoles; - relations = builder.relations; - concepts = builder.concepts; - } - - /** - * New builder. - * - * @return a NluEnrichmentFeatures builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the keywords. - * - *

An object specifying the Keyword enrichment and related parameters. - * - * @return the keywords - */ - public NluEnrichmentKeywords keywords() { - return keywords; - } - - /** - * Gets the entities. - * - *

An object speficying the Entities enrichment and related parameters. - * - * @return the entities - */ - public NluEnrichmentEntities entities() { - return entities; - } - - /** - * Gets the sentiment. - * - *

An object specifying the sentiment extraction enrichment and related parameters. - * - * @return the sentiment - */ - public NluEnrichmentSentiment sentiment() { - return sentiment; - } - - /** - * Gets the emotion. - * - *

An object specifying the emotion detection enrichment and related parameters. - * - * @return the emotion - */ - public NluEnrichmentEmotion emotion() { - return emotion; - } - - /** - * Gets the categories. - * - *

An object that indicates the Categories enrichment will be applied to the specified field. - * - * @return the categories - */ - public Map categories() { - return categories; - } - - /** - * Gets the semanticRoles. - * - *

An object specifiying the semantic roles enrichment and related parameters. - * - * @return the semanticRoles - */ - public NluEnrichmentSemanticRoles semanticRoles() { - return semanticRoles; - } - - /** - * Gets the relations. - * - *

An object specifying the relations enrichment and related parameters. - * - * @return the relations - */ - public NluEnrichmentRelations relations() { - return relations; - } - - /** - * Gets the concepts. - * - *

An object specifiying the concepts enrichment and related parameters. - * - * @return the concepts - */ - public NluEnrichmentConcepts concepts() { - return concepts; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywords.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywords.java deleted file mode 100644 index 4eea6c3569..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywords.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object specifying the Keyword enrichment and related parameters. */ -public class NluEnrichmentKeywords extends GenericModel { - - protected Boolean sentiment; - protected Boolean emotion; - protected Long limit; - - /** Builder. */ - public static class Builder { - private Boolean sentiment; - private Boolean emotion; - private Long limit; - - /** - * Instantiates a new Builder from an existing NluEnrichmentKeywords instance. - * - * @param nluEnrichmentKeywords the instance to initialize the Builder with - */ - private Builder(NluEnrichmentKeywords nluEnrichmentKeywords) { - this.sentiment = nluEnrichmentKeywords.sentiment; - this.emotion = nluEnrichmentKeywords.emotion; - this.limit = nluEnrichmentKeywords.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentKeywords. - * - * @return the new NluEnrichmentKeywords instance - */ - public NluEnrichmentKeywords build() { - return new NluEnrichmentKeywords(this); - } - - /** - * Set the sentiment. - * - * @param sentiment the sentiment - * @return the NluEnrichmentKeywords builder - */ - public Builder sentiment(Boolean sentiment) { - this.sentiment = sentiment; - return this; - } - - /** - * Set the emotion. - * - * @param emotion the emotion - * @return the NluEnrichmentKeywords builder - */ - public Builder emotion(Boolean emotion) { - this.emotion = emotion; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the NluEnrichmentKeywords builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected NluEnrichmentKeywords() {} - - protected NluEnrichmentKeywords(Builder builder) { - sentiment = builder.sentiment; - emotion = builder.emotion; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a NluEnrichmentKeywords builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the sentiment. - * - *

When `true`, sentiment analysis of keywords will be performed on the specified field. - * - * @return the sentiment - */ - public Boolean sentiment() { - return sentiment; - } - - /** - * Gets the emotion. - * - *

When `true`, emotion detection of keywords will be performed on the specified field. - * - * @return the emotion - */ - public Boolean emotion() { - return emotion; - } - - /** - * Gets the limit. - * - *

The maximum number of keywords to extract for each instance of the specified field. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelations.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelations.java deleted file mode 100644 index 42c9b9aac3..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelations.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object specifying the relations enrichment and related parameters. */ -public class NluEnrichmentRelations extends GenericModel { - - protected String model; - - /** Builder. */ - public static class Builder { - private String model; - - /** - * Instantiates a new Builder from an existing NluEnrichmentRelations instance. - * - * @param nluEnrichmentRelations the instance to initialize the Builder with - */ - private Builder(NluEnrichmentRelations nluEnrichmentRelations) { - this.model = nluEnrichmentRelations.model; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentRelations. - * - * @return the new NluEnrichmentRelations instance - */ - public NluEnrichmentRelations build() { - return new NluEnrichmentRelations(this); - } - - /** - * Set the model. - * - * @param model the model - * @return the NluEnrichmentRelations builder - */ - public Builder model(String model) { - this.model = model; - return this; - } - } - - protected NluEnrichmentRelations() {} - - protected NluEnrichmentRelations(Builder builder) { - model = builder.model; - } - - /** - * New builder. - * - * @return a NluEnrichmentRelations builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the model. - * - *

*For use with `natural_language_understanding` enrichments only.* The enrichement model to - * use with relationship extraction. May be a custom model provided by Watson Knowledge Studio, - * the default public model is`en-news`. - * - * @return the model - */ - public String model() { - return model; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRoles.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRoles.java deleted file mode 100644 index 76273e5f66..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRoles.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object specifiying the semantic roles enrichment and related parameters. */ -public class NluEnrichmentSemanticRoles extends GenericModel { - - protected Boolean entities; - protected Boolean keywords; - protected Long limit; - - /** Builder. */ - public static class Builder { - private Boolean entities; - private Boolean keywords; - private Long limit; - - /** - * Instantiates a new Builder from an existing NluEnrichmentSemanticRoles instance. - * - * @param nluEnrichmentSemanticRoles the instance to initialize the Builder with - */ - private Builder(NluEnrichmentSemanticRoles nluEnrichmentSemanticRoles) { - this.entities = nluEnrichmentSemanticRoles.entities; - this.keywords = nluEnrichmentSemanticRoles.keywords; - this.limit = nluEnrichmentSemanticRoles.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentSemanticRoles. - * - * @return the new NluEnrichmentSemanticRoles instance - */ - public NluEnrichmentSemanticRoles build() { - return new NluEnrichmentSemanticRoles(this); - } - - /** - * Set the entities. - * - * @param entities the entities - * @return the NluEnrichmentSemanticRoles builder - */ - public Builder entities(Boolean entities) { - this.entities = entities; - return this; - } - - /** - * Set the keywords. - * - * @param keywords the keywords - * @return the NluEnrichmentSemanticRoles builder - */ - public Builder keywords(Boolean keywords) { - this.keywords = keywords; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the NluEnrichmentSemanticRoles builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected NluEnrichmentSemanticRoles() {} - - protected NluEnrichmentSemanticRoles(Builder builder) { - entities = builder.entities; - keywords = builder.keywords; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a NluEnrichmentSemanticRoles builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the entities. - * - *

When `true`, entities are extracted from the identified sentence parts. - * - * @return the entities - */ - public Boolean entities() { - return entities; - } - - /** - * Gets the keywords. - * - *

When `true`, keywords are extracted from the identified sentence parts. - * - * @return the keywords - */ - public Boolean keywords() { - return keywords; - } - - /** - * Gets the limit. - * - *

The maximum number of semantic roles enrichments to extact from each instance of the - * specified field. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentiment.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentiment.java deleted file mode 100644 index a453c4f34d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentiment.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** An object specifying the sentiment extraction enrichment and related parameters. */ -public class NluEnrichmentSentiment extends GenericModel { - - protected Boolean document; - protected List targets; - - /** Builder. */ - public static class Builder { - private Boolean document; - private List targets; - - /** - * Instantiates a new Builder from an existing NluEnrichmentSentiment instance. - * - * @param nluEnrichmentSentiment the instance to initialize the Builder with - */ - private Builder(NluEnrichmentSentiment nluEnrichmentSentiment) { - this.document = nluEnrichmentSentiment.document; - this.targets = nluEnrichmentSentiment.targets; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NluEnrichmentSentiment. - * - * @return the new NluEnrichmentSentiment instance - */ - public NluEnrichmentSentiment build() { - return new NluEnrichmentSentiment(this); - } - - /** - * Adds a new element to targets. - * - * @param target the new element to be added - * @return the NluEnrichmentSentiment builder - */ - public Builder addTarget(String target) { - com.ibm.cloud.sdk.core.util.Validator.notNull(target, "target cannot be null"); - if (this.targets == null) { - this.targets = new ArrayList(); - } - this.targets.add(target); - return this; - } - - /** - * Set the document. - * - * @param document the document - * @return the NluEnrichmentSentiment builder - */ - public Builder document(Boolean document) { - this.document = document; - return this; - } - - /** - * Set the targets. Existing targets will be replaced. - * - * @param targets the targets - * @return the NluEnrichmentSentiment builder - */ - public Builder targets(List targets) { - this.targets = targets; - return this; - } - } - - protected NluEnrichmentSentiment() {} - - protected NluEnrichmentSentiment(Builder builder) { - document = builder.document; - targets = builder.targets; - } - - /** - * New builder. - * - * @return a NluEnrichmentSentiment builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the document. - * - *

When `true`, sentiment analysis is performed on the entire field. - * - * @return the document - */ - public Boolean document() { - return document; - } - - /** - * Gets the targets. - * - *

A comma-separated list of target strings that will have any associated sentiment analyzed. - * - * @return the targets - */ - public List targets() { - return targets; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NormalizationOperation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NormalizationOperation.java deleted file mode 100644 index e017b51096..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/NormalizationOperation.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing normalization operations. */ -public class NormalizationOperation extends GenericModel { - - /** - * Identifies what type of operation to perform. - * - *

**copy** - Copies the value of the **source_field** to the **destination_field** field. If - * the **destination_field** already exists, then the value of the **source_field** overwrites the - * original value of the **destination_field**. - * - *

**move** - Renames (moves) the **source_field** to the **destination_field**. If the - * **destination_field** already exists, then the value of the **source_field** overwrites the - * original value of the **destination_field**. Rename is identical to copy, except that the - * **source_field** is removed after the value has been copied to the **destination_field** (it is - * the same as a _copy_ followed by a _remove_). - * - *

**merge** - Merges the value of the **source_field** with the value of the - * **destination_field**. The **destination_field** is converted into an array if it is not - * already an array, and the value of the **source_field** is appended to the array. This - * operation removes the **source_field** after the merge. If the **source_field** does not exist - * in the current document, then the **destination_field** is still converted into an array (if it - * is not an array already). This conversion ensures the type for **destination_field** is - * consistent across all documents. - * - *

**remove** - Deletes the **source_field** field. The **destination_field** is ignored for - * this operation. - * - *

**remove_nulls** - Removes all nested null (blank) field values from the ingested document. - * **source_field** and **destination_field** are ignored by this operation because _remove_nulls_ - * operates on the entire ingested document. Typically, **remove_nulls** is invoked as the last - * normalization operation (if it is invoked at all, it can be time-expensive). - */ - public interface Operation { - /** copy. */ - String COPY = "copy"; - /** move. */ - String MOVE = "move"; - /** merge. */ - String MERGE = "merge"; - /** remove. */ - String REMOVE = "remove"; - /** remove_nulls. */ - String REMOVE_NULLS = "remove_nulls"; - } - - protected String operation; - - @SerializedName("source_field") - protected String sourceField; - - @SerializedName("destination_field") - protected String destinationField; - - /** Builder. */ - public static class Builder { - private String operation; - private String sourceField; - private String destinationField; - - /** - * Instantiates a new Builder from an existing NormalizationOperation instance. - * - * @param normalizationOperation the instance to initialize the Builder with - */ - private Builder(NormalizationOperation normalizationOperation) { - this.operation = normalizationOperation.operation; - this.sourceField = normalizationOperation.sourceField; - this.destinationField = normalizationOperation.destinationField; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a NormalizationOperation. - * - * @return the new NormalizationOperation instance - */ - public NormalizationOperation build() { - return new NormalizationOperation(this); - } - - /** - * Set the operation. - * - * @param operation the operation - * @return the NormalizationOperation builder - */ - public Builder operation(String operation) { - this.operation = operation; - return this; - } - - /** - * Set the sourceField. - * - * @param sourceField the sourceField - * @return the NormalizationOperation builder - */ - public Builder sourceField(String sourceField) { - this.sourceField = sourceField; - return this; - } - - /** - * Set the destinationField. - * - * @param destinationField the destinationField - * @return the NormalizationOperation builder - */ - public Builder destinationField(String destinationField) { - this.destinationField = destinationField; - return this; - } - } - - protected NormalizationOperation() {} - - protected NormalizationOperation(Builder builder) { - operation = builder.operation; - sourceField = builder.sourceField; - destinationField = builder.destinationField; - } - - /** - * New builder. - * - * @return a NormalizationOperation builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the operation. - * - *

Identifies what type of operation to perform. - * - *

**copy** - Copies the value of the **source_field** to the **destination_field** field. If - * the **destination_field** already exists, then the value of the **source_field** overwrites the - * original value of the **destination_field**. - * - *

**move** - Renames (moves) the **source_field** to the **destination_field**. If the - * **destination_field** already exists, then the value of the **source_field** overwrites the - * original value of the **destination_field**. Rename is identical to copy, except that the - * **source_field** is removed after the value has been copied to the **destination_field** (it is - * the same as a _copy_ followed by a _remove_). - * - *

**merge** - Merges the value of the **source_field** with the value of the - * **destination_field**. The **destination_field** is converted into an array if it is not - * already an array, and the value of the **source_field** is appended to the array. This - * operation removes the **source_field** after the merge. If the **source_field** does not exist - * in the current document, then the **destination_field** is still converted into an array (if it - * is not an array already). This conversion ensures the type for **destination_field** is - * consistent across all documents. - * - *

**remove** - Deletes the **source_field** field. The **destination_field** is ignored for - * this operation. - * - *

**remove_nulls** - Removes all nested null (blank) field values from the ingested document. - * **source_field** and **destination_field** are ignored by this operation because _remove_nulls_ - * operates on the entire ingested document. Typically, **remove_nulls** is invoked as the last - * normalization operation (if it is invoked at all, it can be time-expensive). - * - * @return the operation - */ - public String operation() { - return operation; - } - - /** - * Gets the sourceField. - * - *

The source field for the operation. - * - * @return the sourceField - */ - public String sourceField() { - return sourceField; - } - - /** - * Gets the destinationField. - * - *

The destination field for the operation. - * - * @return the destinationField - */ - public String destinationField() { - return destinationField; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Notice.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Notice.java deleted file mode 100644 index 149e2d42fd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Notice.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** A notice produced for the collection. */ -public class Notice extends GenericModel { - - /** Severity level of the notice. */ - public interface Severity { - /** warning. */ - String WARNING = "warning"; - /** error. */ - String ERROR = "error"; - } - - @SerializedName("notice_id") - protected String noticeId; - - protected Date created; - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("query_id") - protected String queryId; - - protected String severity; - protected String step; - protected String description; - - protected Notice() {} - - /** - * Gets the noticeId. - * - *

Identifies the notice. Many notices might have the same ID. This field exists so that user - * applications can programmatically identify a notice and take automatic corrective action. - * Typical notice IDs include: `index_failed`, `index_failed_too_many_requests`, - * `index_failed_incompatible_field`, `index_failed_cluster_unavailable`, `ingestion_timeout`, - * `ingestion_error`, `bad_request`, `internal_error`, `missing_model`, `unsupported_model`, - * `smart_document_understanding_failed_incompatible_field`, - * `smart_document_understanding_failed_internal_error`, - * `smart_document_understanding_failed_internal_error`, - * `smart_document_understanding_failed_warning`, `smart_document_understanding_page_error`, - * `smart_document_understanding_page_warning`. **Note:** This is not a complete list; other - * values might be returned. - * - * @return the noticeId - */ - public String getNoticeId() { - return noticeId; - } - - /** - * Gets the created. - * - *

The creation date of the collection in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Gets the documentId. - * - *

Unique identifier of the document. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the queryId. - * - *

Unique identifier of the query used for relevance training. - * - * @return the queryId - */ - public String getQueryId() { - return queryId; - } - - /** - * Gets the severity. - * - *

Severity level of the notice. - * - * @return the severity - */ - public String getSeverity() { - return severity; - } - - /** - * Gets the step. - * - *

Ingestion or training step in which the notice occurred. Typical step values include: - * `smartDocumentUnderstanding`, `ingestion`, `indexing`, `convert`. **Note:** This is not a - * complete list; other values might be returned. - * - * @return the step - */ - public String getStep() { - return step; - } - - /** - * Gets the description. - * - *

The description of the notice. - * - * @return the description - */ - public String getDescription() { - return description; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetection.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetection.java deleted file mode 100644 index 5719d4d4d9..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetection.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Object containing heading detection conversion settings for PDF documents. */ -public class PdfHeadingDetection extends GenericModel { - - protected List fonts; - - /** Builder. */ - public static class Builder { - private List fonts; - - /** - * Instantiates a new Builder from an existing PdfHeadingDetection instance. - * - * @param pdfHeadingDetection the instance to initialize the Builder with - */ - private Builder(PdfHeadingDetection pdfHeadingDetection) { - this.fonts = pdfHeadingDetection.fonts; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a PdfHeadingDetection. - * - * @return the new PdfHeadingDetection instance - */ - public PdfHeadingDetection build() { - return new PdfHeadingDetection(this); - } - - /** - * Adds a new element to fonts. - * - * @param fontSetting the new element to be added - * @return the PdfHeadingDetection builder - */ - public Builder addFontSetting(FontSetting fontSetting) { - com.ibm.cloud.sdk.core.util.Validator.notNull(fontSetting, "fontSetting cannot be null"); - if (this.fonts == null) { - this.fonts = new ArrayList(); - } - this.fonts.add(fontSetting); - return this; - } - - /** - * Set the fonts. Existing fonts will be replaced. - * - * @param fonts the fonts - * @return the PdfHeadingDetection builder - */ - public Builder fonts(List fonts) { - this.fonts = fonts; - return this; - } - } - - protected PdfHeadingDetection() {} - - protected PdfHeadingDetection(Builder builder) { - fonts = builder.fonts; - } - - /** - * New builder. - * - * @return a PdfHeadingDetection builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the fonts. - * - *

Array of font matching configurations. - * - * @return the fonts - */ - public List fonts() { - return fonts; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfSettings.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfSettings.java deleted file mode 100644 index 16e3f0d5eb..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/PdfSettings.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** A list of PDF conversion settings. */ -public class PdfSettings extends GenericModel { - - protected PdfHeadingDetection heading; - - /** Builder. */ - public static class Builder { - private PdfHeadingDetection heading; - - /** - * Instantiates a new Builder from an existing PdfSettings instance. - * - * @param pdfSettings the instance to initialize the Builder with - */ - private Builder(PdfSettings pdfSettings) { - this.heading = pdfSettings.heading; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a PdfSettings. - * - * @return the new PdfSettings instance - */ - public PdfSettings build() { - return new PdfSettings(this); - } - - /** - * Set the heading. - * - * @param heading the heading - * @return the PdfSettings builder - */ - public Builder heading(PdfHeadingDetection heading) { - this.heading = heading; - return this; - } - } - - protected PdfSettings() {} - - protected PdfSettings(Builder builder) { - heading = builder.heading; - } - - /** - * New builder. - * - * @return a PdfSettings builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the heading. - * - *

Object containing heading detection conversion settings for PDF documents. - * - * @return the heading - */ - public PdfHeadingDetection heading() { - return heading; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryAggregation.java deleted file mode 100644 index 798399c533..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryAggregation.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An aggregation produced by Discovery to analyze the input provided. */ -public class QueryAggregation extends GenericModel { - @SuppressWarnings("unused") - protected static String discriminatorPropertyName = "type"; - - protected static java.util.Map> discriminatorMapping; - - static { - discriminatorMapping = new java.util.HashMap<>(); - discriminatorMapping.put("histogram", QueryHistogramAggregation.class); - discriminatorMapping.put("max", QueryCalculationAggregation.class); - discriminatorMapping.put("min", QueryCalculationAggregation.class); - discriminatorMapping.put("average", QueryCalculationAggregation.class); - discriminatorMapping.put("sum", QueryCalculationAggregation.class); - discriminatorMapping.put("unique_count", QueryCalculationAggregation.class); - discriminatorMapping.put("term", QueryTermAggregation.class); - discriminatorMapping.put("filter", QueryFilterAggregation.class); - discriminatorMapping.put("nested", QueryNestedAggregation.class); - discriminatorMapping.put("timeslice", QueryTimesliceAggregation.class); - discriminatorMapping.put("top_hits", QueryTopHitsAggregation.class); - } - - protected String type; - - protected QueryAggregation() {} - - /** - * Gets the type. - * - *

The type of aggregation command used. For example: term, filter, max, min, etc. - * - * @return the type - */ - public String getType() { - return type; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregation.java deleted file mode 100644 index ed52909462..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregation.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -/** - * Returns a scalar calculation across all documents for the field specified. Possible calculations - * include min, max, sum, average, and unique_count. - */ -public class QueryCalculationAggregation extends QueryAggregation { - - protected String field; - protected Double value; - - protected QueryCalculationAggregation() {} - - /** - * Gets the field. - * - *

The field to perform the calculation on. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the value. - * - *

The value of the calculation. - * - * @return the value - */ - public Double getValue() { - return value; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregation.java deleted file mode 100644 index 3d1c5e45b8..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregation.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import java.util.List; - -/** A modifier that narrows the document set of the sub-aggregations it precedes. */ -public class QueryFilterAggregation extends QueryAggregation { - - protected String match; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - protected QueryFilterAggregation() {} - - /** - * Gets the match. - * - *

The filter that is written in Discovery Query Language syntax and is applied to the - * documents before sub-aggregations are run. - * - * @return the match - */ - public String getMatch() { - return match; - } - - /** - * Gets the matchingResults. - * - *

Number of documents that match the filter. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregation.java deleted file mode 100644 index 2b7aedb6f4..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregation.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import java.util.List; - -/** - * Numeric interval segments to categorize documents by using field values from a single numeric - * field to describe the category. - */ -public class QueryHistogramAggregation extends QueryAggregation { - - protected String field; - protected Long interval; - protected String name; - protected List results; - - protected QueryHistogramAggregation() {} - - /** - * Gets the field. - * - *

The numeric field name used to create the histogram. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the interval. - * - *

The size of the sections that the results are split into. - * - * @return the interval - */ - public Long getInterval() { - return interval; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of numeric intervals. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResult.java deleted file mode 100644 index 8c0162e93d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResult.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Histogram numeric interval result. */ -public class QueryHistogramAggregationResult extends GenericModel { - - protected Long key; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - protected QueryHistogramAggregationResult() {} - - /** - * Gets the key. - * - *

The value of the upper bound for the numeric segment. - * - * @return the key - */ - public Long getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of documents with the specified key as the upper bound. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryLogOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryLogOptions.java deleted file mode 100644 index 7bef1b17fa..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryLogOptions.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The queryLog options. */ -public class QueryLogOptions extends GenericModel { - - protected String filter; - protected String query; - protected Long count; - protected Long offset; - protected List sort; - - /** Builder. */ - public static class Builder { - private String filter; - private String query; - private Long count; - private Long offset; - private List sort; - - /** - * Instantiates a new Builder from an existing QueryLogOptions instance. - * - * @param queryLogOptions the instance to initialize the Builder with - */ - private Builder(QueryLogOptions queryLogOptions) { - this.filter = queryLogOptions.filter; - this.query = queryLogOptions.query; - this.count = queryLogOptions.count; - this.offset = queryLogOptions.offset; - this.sort = queryLogOptions.sort; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a QueryLogOptions. - * - * @return the new QueryLogOptions instance - */ - public QueryLogOptions build() { - return new QueryLogOptions(this); - } - - /** - * Adds a new element to sort. - * - * @param sort the new element to be added - * @return the QueryLogOptions builder - */ - public Builder addSort(String sort) { - com.ibm.cloud.sdk.core.util.Validator.notNull(sort, "sort cannot be null"); - if (this.sort == null) { - this.sort = new ArrayList(); - } - this.sort.add(sort); - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the QueryLogOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the query. - * - * @param query the query - * @return the QueryLogOptions builder - */ - public Builder query(String query) { - this.query = query; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the QueryLogOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - - /** - * Set the offset. - * - * @param offset the offset - * @return the QueryLogOptions builder - */ - public Builder offset(long offset) { - this.offset = offset; - return this; - } - - /** - * Set the sort. Existing sort will be replaced. - * - * @param sort the sort - * @return the QueryLogOptions builder - */ - public Builder sort(List sort) { - this.sort = sort; - return this; - } - } - - protected QueryLogOptions() {} - - protected QueryLogOptions(Builder builder) { - filter = builder.filter; - query = builder.query; - count = builder.count; - offset = builder.offset; - sort = builder.sort; - } - - /** - * New builder. - * - * @return a QueryLogOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the filter. - * - *

A cacheable query that excludes documents that don't mention the query content. Filter - * searches are better for metadata-type searches and for assessing the concepts in the data set. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the query. - * - *

A query search returns all documents in your data set with full enrichments and full text, - * but with the most relevant documents listed first. - * - * @return the query - */ - public String query() { - return query; - } - - /** - * Gets the count. - * - *

Number of results to return. The maximum for the **count** and **offset** values together in - * any one query is **10000**. - * - * @return the count - */ - public Long count() { - return count; - } - - /** - * Gets the offset. - * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. The - * maximum for the **count** and **offset** values together in any one query is **10000**. - * - * @return the offset - */ - public Long offset() { - return offset; - } - - /** - * Gets the sort. - * - *

A comma-separated list of fields in the document to sort on. You can optionally specify a - * sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending - * is the default sort direction if no prefix is specified. - * - * @return the sort - */ - public List sort() { - return sort; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregation.java deleted file mode 100644 index 4afd77ab57..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregation.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import java.util.List; - -/** - * A restriction that alters the document set that is used for sub-aggregations it precedes to - * nested documents found in the field specified. - */ -public class QueryNestedAggregation extends QueryAggregation { - - protected String path; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - protected QueryNestedAggregation() {} - - /** - * Gets the path. - * - *

The path to the document field to scope sub-aggregations to. - * - * @return the path - */ - public String getPath() { - return path; - } - - /** - * Gets the matchingResults. - * - *

Number of nested documents found in the specified field. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptions.java deleted file mode 100644 index a7a0d907d9..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptions.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The queryNotices options. */ -public class QueryNoticesOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String filter; - protected String query; - protected String naturalLanguageQuery; - protected Boolean passages; - protected String aggregation; - protected Long count; - protected List xReturn; - protected Long offset; - protected List sort; - protected Boolean highlight; - protected List passagesFields; - protected Long passagesCount; - protected Long passagesCharacters; - protected String deduplicateField; - protected Boolean similar; - protected List similarDocumentIds; - protected List similarFields; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String filter; - private String query; - private String naturalLanguageQuery; - private Boolean passages; - private String aggregation; - private Long count; - private List xReturn; - private Long offset; - private List sort; - private Boolean highlight; - private List passagesFields; - private Long passagesCount; - private Long passagesCharacters; - private String deduplicateField; - private Boolean similar; - private List similarDocumentIds; - private List similarFields; - - /** - * Instantiates a new Builder from an existing QueryNoticesOptions instance. - * - * @param queryNoticesOptions the instance to initialize the Builder with - */ - private Builder(QueryNoticesOptions queryNoticesOptions) { - this.environmentId = queryNoticesOptions.environmentId; - this.collectionId = queryNoticesOptions.collectionId; - this.filter = queryNoticesOptions.filter; - this.query = queryNoticesOptions.query; - this.naturalLanguageQuery = queryNoticesOptions.naturalLanguageQuery; - this.passages = queryNoticesOptions.passages; - this.aggregation = queryNoticesOptions.aggregation; - this.count = queryNoticesOptions.count; - this.xReturn = queryNoticesOptions.xReturn; - this.offset = queryNoticesOptions.offset; - this.sort = queryNoticesOptions.sort; - this.highlight = queryNoticesOptions.highlight; - this.passagesFields = queryNoticesOptions.passagesFields; - this.passagesCount = queryNoticesOptions.passagesCount; - this.passagesCharacters = queryNoticesOptions.passagesCharacters; - this.deduplicateField = queryNoticesOptions.deduplicateField; - this.similar = queryNoticesOptions.similar; - this.similarDocumentIds = queryNoticesOptions.similarDocumentIds; - this.similarFields = queryNoticesOptions.similarFields; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a QueryNoticesOptions. - * - * @return the new QueryNoticesOptions instance - */ - public QueryNoticesOptions build() { - return new QueryNoticesOptions(this); - } - - /** - * Adds a new element to xReturn. - * - * @param returnField the new element to be added - * @return the QueryNoticesOptions builder - */ - public Builder addReturnField(String returnField) { - com.ibm.cloud.sdk.core.util.Validator.notNull(returnField, "returnField cannot be null"); - if (this.xReturn == null) { - this.xReturn = new ArrayList(); - } - this.xReturn.add(returnField); - return this; - } - - /** - * Adds a new element to sort. - * - * @param sort the new element to be added - * @return the QueryNoticesOptions builder - */ - public Builder addSort(String sort) { - com.ibm.cloud.sdk.core.util.Validator.notNull(sort, "sort cannot be null"); - if (this.sort == null) { - this.sort = new ArrayList(); - } - this.sort.add(sort); - return this; - } - - /** - * Adds a new element to passagesFields. - * - * @param passagesFields the new element to be added - * @return the QueryNoticesOptions builder - */ - public Builder addPassagesFields(String passagesFields) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - passagesFields, "passagesFields cannot be null"); - if (this.passagesFields == null) { - this.passagesFields = new ArrayList(); - } - this.passagesFields.add(passagesFields); - return this; - } - - /** - * Adds a new element to similarDocumentIds. - * - * @param similarDocumentIds the new element to be added - * @return the QueryNoticesOptions builder - */ - public Builder addSimilarDocumentIds(String similarDocumentIds) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - similarDocumentIds, "similarDocumentIds cannot be null"); - if (this.similarDocumentIds == null) { - this.similarDocumentIds = new ArrayList(); - } - this.similarDocumentIds.add(similarDocumentIds); - return this; - } - - /** - * Adds a new element to similarFields. - * - * @param similarFields the new element to be added - * @return the QueryNoticesOptions builder - */ - public Builder addSimilarFields(String similarFields) { - com.ibm.cloud.sdk.core.util.Validator.notNull(similarFields, "similarFields cannot be null"); - if (this.similarFields == null) { - this.similarFields = new ArrayList(); - } - this.similarFields.add(similarFields); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the QueryNoticesOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the QueryNoticesOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the QueryNoticesOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the query. - * - * @param query the query - * @return the QueryNoticesOptions builder - */ - public Builder query(String query) { - this.query = query; - return this; - } - - /** - * Set the naturalLanguageQuery. - * - * @param naturalLanguageQuery the naturalLanguageQuery - * @return the QueryNoticesOptions builder - */ - public Builder naturalLanguageQuery(String naturalLanguageQuery) { - this.naturalLanguageQuery = naturalLanguageQuery; - return this; - } - - /** - * Set the passages. - * - * @param passages the passages - * @return the QueryNoticesOptions builder - */ - public Builder passages(Boolean passages) { - this.passages = passages; - return this; - } - - /** - * Set the aggregation. - * - * @param aggregation the aggregation - * @return the QueryNoticesOptions builder - */ - public Builder aggregation(String aggregation) { - this.aggregation = aggregation; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the QueryNoticesOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - - /** - * Set the xReturn. Existing xReturn will be replaced. - * - * @param xReturn the xReturn - * @return the QueryNoticesOptions builder - */ - public Builder xReturn(List xReturn) { - this.xReturn = xReturn; - return this; - } - - /** - * Set the offset. - * - * @param offset the offset - * @return the QueryNoticesOptions builder - */ - public Builder offset(long offset) { - this.offset = offset; - return this; - } - - /** - * Set the sort. Existing sort will be replaced. - * - * @param sort the sort - * @return the QueryNoticesOptions builder - */ - public Builder sort(List sort) { - this.sort = sort; - return this; - } - - /** - * Set the highlight. - * - * @param highlight the highlight - * @return the QueryNoticesOptions builder - */ - public Builder highlight(Boolean highlight) { - this.highlight = highlight; - return this; - } - - /** - * Set the passagesFields. Existing passagesFields will be replaced. - * - * @param passagesFields the passagesFields - * @return the QueryNoticesOptions builder - */ - public Builder passagesFields(List passagesFields) { - this.passagesFields = passagesFields; - return this; - } - - /** - * Set the passagesCount. - * - * @param passagesCount the passagesCount - * @return the QueryNoticesOptions builder - */ - public Builder passagesCount(long passagesCount) { - this.passagesCount = passagesCount; - return this; - } - - /** - * Set the passagesCharacters. - * - * @param passagesCharacters the passagesCharacters - * @return the QueryNoticesOptions builder - */ - public Builder passagesCharacters(long passagesCharacters) { - this.passagesCharacters = passagesCharacters; - return this; - } - - /** - * Set the deduplicateField. - * - * @param deduplicateField the deduplicateField - * @return the QueryNoticesOptions builder - */ - public Builder deduplicateField(String deduplicateField) { - this.deduplicateField = deduplicateField; - return this; - } - - /** - * Set the similar. - * - * @param similar the similar - * @return the QueryNoticesOptions builder - */ - public Builder similar(Boolean similar) { - this.similar = similar; - return this; - } - - /** - * Set the similarDocumentIds. Existing similarDocumentIds will be replaced. - * - * @param similarDocumentIds the similarDocumentIds - * @return the QueryNoticesOptions builder - */ - public Builder similarDocumentIds(List similarDocumentIds) { - this.similarDocumentIds = similarDocumentIds; - return this; - } - - /** - * Set the similarFields. Existing similarFields will be replaced. - * - * @param similarFields the similarFields - * @return the QueryNoticesOptions builder - */ - public Builder similarFields(List similarFields) { - this.similarFields = similarFields; - return this; - } - } - - protected QueryNoticesOptions() {} - - protected QueryNoticesOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - filter = builder.filter; - query = builder.query; - naturalLanguageQuery = builder.naturalLanguageQuery; - passages = builder.passages; - aggregation = builder.aggregation; - count = builder.count; - xReturn = builder.xReturn; - offset = builder.offset; - sort = builder.sort; - highlight = builder.highlight; - passagesFields = builder.passagesFields; - passagesCount = builder.passagesCount; - passagesCharacters = builder.passagesCharacters; - deduplicateField = builder.deduplicateField; - similar = builder.similar; - similarDocumentIds = builder.similarDocumentIds; - similarFields = builder.similarFields; - } - - /** - * New builder. - * - * @return a QueryNoticesOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the filter. - * - *

A cacheable query that excludes documents that don't mention the query content. Filter - * searches are better for metadata-type searches and for assessing the concepts in the data set. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the query. - * - *

A query search returns all documents in your data set with full enrichments and full text, - * but with the most relevant documents listed first. - * - * @return the query - */ - public String query() { - return query; - } - - /** - * Gets the naturalLanguageQuery. - * - *

A natural language query that returns relevant documents by utilizing training data and - * natural language understanding. - * - * @return the naturalLanguageQuery - */ - public String naturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the passages. - * - *

A passages query that returns the most relevant passages from the results. - * - * @return the passages - */ - public Boolean passages() { - return passages; - } - - /** - * Gets the aggregation. - * - *

An aggregation search that returns an exact answer by combining query search with filters. - * Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * - * @return the aggregation - */ - public String aggregation() { - return aggregation; - } - - /** - * Gets the count. - * - *

Number of results to return. The maximum for the **count** and **offset** values together in - * any one query is **10000**. - * - * @return the count - */ - public Long count() { - return count; - } - - /** - * Gets the xReturn. - * - *

A comma-separated list of the portion of the document hierarchy to return. - * - * @return the xReturn - */ - public List xReturn() { - return xReturn; - } - - /** - * Gets the offset. - * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. The - * maximum for the **count** and **offset** values together in any one query is **10000**. - * - * @return the offset - */ - public Long offset() { - return offset; - } - - /** - * Gets the sort. - * - *

A comma-separated list of fields in the document to sort on. You can optionally specify a - * sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending - * is the default sort direction if no prefix is specified. - * - * @return the sort - */ - public List sort() { - return sort; - } - - /** - * Gets the highlight. - * - *

When true, a highlight field is returned for each result which contains the fields which - * match the query with `<em></em>` tags around the matching query terms. - * - * @return the highlight - */ - public Boolean highlight() { - return highlight; - } - - /** - * Gets the passagesFields. - * - *

A comma-separated list of fields that passages are drawn from. If this parameter not - * specified, then all top-level fields are included. - * - * @return the passagesFields - */ - public List passagesFields() { - return passagesFields; - } - - /** - * Gets the passagesCount. - * - *

The maximum number of passages to return. The search returns fewer passages if the requested - * total is not found. - * - * @return the passagesCount - */ - public Long passagesCount() { - return passagesCount; - } - - /** - * Gets the passagesCharacters. - * - *

The approximate number of characters that any one passage will have. - * - * @return the passagesCharacters - */ - public Long passagesCharacters() { - return passagesCharacters; - } - - /** - * Gets the deduplicateField. - * - *

When specified, duplicate results based on the field specified are removed from the returned - * results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * - * @return the deduplicateField - */ - public String deduplicateField() { - return deduplicateField; - } - - /** - * Gets the similar. - * - *

When `true`, results are returned based on their similarity to the document IDs specified in - * the **similar.document_ids** parameter. - * - * @return the similar - */ - public Boolean similar() { - return similar; - } - - /** - * Gets the similarDocumentIds. - * - *

A comma-separated list of document IDs to find similar documents. - * - *

**Tip:** Include the **natural_language_query** parameter to expand the scope of the - * document similarity search with the natural language query. Other query parameters, such as - * **filter** and **query**, are subsequently applied and reduce the scope. - * - * @return the similarDocumentIds - */ - public List similarDocumentIds() { - return similarDocumentIds; - } - - /** - * Gets the similarFields. - * - *

A comma-separated list of field names that are used as a basis for comparison to identify - * similar documents. If not specified, the entire document is used for comparison. - * - * @return the similarFields - */ - public List similarFields() { - return similarFields; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponse.java deleted file mode 100644 index 095c085e22..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponse.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing notice query results. */ -public class QueryNoticesResponse extends GenericModel { - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List results; - protected List aggregations; - protected List passages; - - @SerializedName("duplicates_removed") - protected Long duplicatesRemoved; - - protected QueryNoticesResponse() {} - - /** - * Gets the matchingResults. - * - *

The number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the results. - * - *

Array of document results that match the query. - * - * @return the results - */ - public List getResults() { - return results; - } - - /** - * Gets the aggregations. - * - *

Array of aggregation results that match the query. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } - - /** - * Gets the passages. - * - *

Array of passage results that match the query. - * - * @return the passages - */ - public List getPassages() { - return passages; - } - - /** - * Gets the duplicatesRemoved. - * - *

The number of duplicates removed from this notices query. - * - * @return the duplicatesRemoved - */ - public Long getDuplicatesRemoved() { - return duplicatesRemoved; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResult.java deleted file mode 100644 index 9dfb9603ea..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesResult.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.ibm.cloud.sdk.core.service.model.DynamicModel; -import java.util.List; -import java.util.Map; - -/** Query result object. */ -public class QueryNoticesResult extends DynamicModel { - - /** The type of the original source file. */ - public interface FileType { - /** pdf. */ - String PDF = "pdf"; - /** html. */ - String HTML = "html"; - /** word. */ - String WORD = "word"; - /** json. */ - String JSON = "json"; - } - - @SerializedName("id") - protected String id; - - @SerializedName("metadata") - protected Map metadata; - - @SerializedName("collection_id") - protected String collectionId; - - @SerializedName("result_metadata") - protected QueryResultMetadata resultMetadata; - - @SerializedName("code") - protected Long code; - - @SerializedName("filename") - protected String filename; - - @SerializedName("file_type") - protected String fileType; - - @SerializedName("sha1") - protected String sha1; - - @SerializedName("notices") - protected List notices; - - public QueryNoticesResult() { - super(new TypeToken() {}); - } - - /** - * Gets the id. - * - *

The unique identifier of the document. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Gets the metadata. - * - *

Metadata of the document. - * - * @return the metadata - */ - public Map getMetadata() { - return this.metadata; - } - - /** - * Gets the collectionId. - * - *

The collection ID of the collection containing the document for this result. - * - * @return the collectionId - */ - public String getCollectionId() { - return this.collectionId; - } - - /** - * Gets the resultMetadata. - * - *

Metadata of a query result. - * - * @return the resultMetadata - */ - public QueryResultMetadata getResultMetadata() { - return this.resultMetadata; - } - - /** - * Gets the code. - * - *

The internal status code returned by the ingestion subsystem indicating the overall result - * of ingesting the source document. - * - * @return the code - */ - public Long getCode() { - return this.code; - } - - /** - * Gets the filename. - * - *

Name of the original source file (if available). - * - * @return the filename - */ - public String getFilename() { - return this.filename; - } - - /** - * Gets the fileType. - * - *

The type of the original source file. - * - * @return the fileType - */ - public String getFileType() { - return this.fileType; - } - - /** - * Gets the sha1. - * - *

The SHA-1 hash of the original source file (formatted as a hexadecimal string). - * - * @return the sha1 - */ - public String getSha1() { - return this.sha1; - } - - /** - * Gets the notices. - * - *

Array of notices for the document. - * - * @return the notices - */ - public List getNotices() { - return this.notices; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryOptions.java deleted file mode 100644 index 65a598ebf4..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryOptions.java +++ /dev/null @@ -1,703 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The query options. */ -public class QueryOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String filter; - protected String query; - protected String naturalLanguageQuery; - protected Boolean passages; - protected String aggregation; - protected Long count; - protected String xReturn; - protected Long offset; - protected String sort; - protected Boolean highlight; - protected String passagesFields; - protected Long passagesCount; - protected Long passagesCharacters; - protected Boolean deduplicate; - protected String deduplicateField; - protected Boolean similar; - protected String similarDocumentIds; - protected String similarFields; - protected String bias; - protected Boolean spellingSuggestions; - protected Boolean xWatsonLoggingOptOut; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String filter; - private String query; - private String naturalLanguageQuery; - private Boolean passages; - private String aggregation; - private Long count; - private String xReturn; - private Long offset; - private String sort; - private Boolean highlight; - private String passagesFields; - private Long passagesCount; - private Long passagesCharacters; - private Boolean deduplicate; - private String deduplicateField; - private Boolean similar; - private String similarDocumentIds; - private String similarFields; - private String bias; - private Boolean spellingSuggestions; - private Boolean xWatsonLoggingOptOut; - - /** - * Instantiates a new Builder from an existing QueryOptions instance. - * - * @param queryOptions the instance to initialize the Builder with - */ - private Builder(QueryOptions queryOptions) { - this.environmentId = queryOptions.environmentId; - this.collectionId = queryOptions.collectionId; - this.filter = queryOptions.filter; - this.query = queryOptions.query; - this.naturalLanguageQuery = queryOptions.naturalLanguageQuery; - this.passages = queryOptions.passages; - this.aggregation = queryOptions.aggregation; - this.count = queryOptions.count; - this.xReturn = queryOptions.xReturn; - this.offset = queryOptions.offset; - this.sort = queryOptions.sort; - this.highlight = queryOptions.highlight; - this.passagesFields = queryOptions.passagesFields; - this.passagesCount = queryOptions.passagesCount; - this.passagesCharacters = queryOptions.passagesCharacters; - this.deduplicate = queryOptions.deduplicate; - this.deduplicateField = queryOptions.deduplicateField; - this.similar = queryOptions.similar; - this.similarDocumentIds = queryOptions.similarDocumentIds; - this.similarFields = queryOptions.similarFields; - this.bias = queryOptions.bias; - this.spellingSuggestions = queryOptions.spellingSuggestions; - this.xWatsonLoggingOptOut = queryOptions.xWatsonLoggingOptOut; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - */ - public Builder(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - /** - * Builds a QueryOptions. - * - * @return the new QueryOptions instance - */ - public QueryOptions build() { - return new QueryOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the QueryOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the QueryOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the filter. - * - * @param filter the filter - * @return the QueryOptions builder - */ - public Builder filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set the query. - * - * @param query the query - * @return the QueryOptions builder - */ - public Builder query(String query) { - this.query = query; - return this; - } - - /** - * Set the naturalLanguageQuery. - * - * @param naturalLanguageQuery the naturalLanguageQuery - * @return the QueryOptions builder - */ - public Builder naturalLanguageQuery(String naturalLanguageQuery) { - this.naturalLanguageQuery = naturalLanguageQuery; - return this; - } - - /** - * Set the passages. - * - * @param passages the passages - * @return the QueryOptions builder - */ - public Builder passages(Boolean passages) { - this.passages = passages; - return this; - } - - /** - * Set the aggregation. - * - * @param aggregation the aggregation - * @return the QueryOptions builder - */ - public Builder aggregation(String aggregation) { - this.aggregation = aggregation; - return this; - } - - /** - * Set the count. - * - * @param count the count - * @return the QueryOptions builder - */ - public Builder count(long count) { - this.count = count; - return this; - } - - /** - * Set the xReturn. - * - * @param xReturn the xReturn - * @return the QueryOptions builder - */ - public Builder xReturn(String xReturn) { - this.xReturn = xReturn; - return this; - } - - /** - * Set the offset. - * - * @param offset the offset - * @return the QueryOptions builder - */ - public Builder offset(long offset) { - this.offset = offset; - return this; - } - - /** - * Set the sort. - * - * @param sort the sort - * @return the QueryOptions builder - */ - public Builder sort(String sort) { - this.sort = sort; - return this; - } - - /** - * Set the highlight. - * - * @param highlight the highlight - * @return the QueryOptions builder - */ - public Builder highlight(Boolean highlight) { - this.highlight = highlight; - return this; - } - - /** - * Set the passagesFields. - * - * @param passagesFields the passagesFields - * @return the QueryOptions builder - */ - public Builder passagesFields(String passagesFields) { - this.passagesFields = passagesFields; - return this; - } - - /** - * Set the passagesCount. - * - * @param passagesCount the passagesCount - * @return the QueryOptions builder - */ - public Builder passagesCount(long passagesCount) { - this.passagesCount = passagesCount; - return this; - } - - /** - * Set the passagesCharacters. - * - * @param passagesCharacters the passagesCharacters - * @return the QueryOptions builder - */ - public Builder passagesCharacters(long passagesCharacters) { - this.passagesCharacters = passagesCharacters; - return this; - } - - /** - * Set the deduplicate. - * - * @param deduplicate the deduplicate - * @return the QueryOptions builder - */ - public Builder deduplicate(Boolean deduplicate) { - this.deduplicate = deduplicate; - return this; - } - - /** - * Set the deduplicateField. - * - * @param deduplicateField the deduplicateField - * @return the QueryOptions builder - */ - public Builder deduplicateField(String deduplicateField) { - this.deduplicateField = deduplicateField; - return this; - } - - /** - * Set the similar. - * - * @param similar the similar - * @return the QueryOptions builder - */ - public Builder similar(Boolean similar) { - this.similar = similar; - return this; - } - - /** - * Set the similarDocumentIds. - * - * @param similarDocumentIds the similarDocumentIds - * @return the QueryOptions builder - */ - public Builder similarDocumentIds(String similarDocumentIds) { - this.similarDocumentIds = similarDocumentIds; - return this; - } - - /** - * Set the similarFields. - * - * @param similarFields the similarFields - * @return the QueryOptions builder - */ - public Builder similarFields(String similarFields) { - this.similarFields = similarFields; - return this; - } - - /** - * Set the bias. - * - * @param bias the bias - * @return the QueryOptions builder - */ - public Builder bias(String bias) { - this.bias = bias; - return this; - } - - /** - * Set the spellingSuggestions. - * - * @param spellingSuggestions the spellingSuggestions - * @return the QueryOptions builder - */ - public Builder spellingSuggestions(Boolean spellingSuggestions) { - this.spellingSuggestions = spellingSuggestions; - return this; - } - - /** - * Set the xWatsonLoggingOptOut. - * - * @param xWatsonLoggingOptOut the xWatsonLoggingOptOut - * @return the QueryOptions builder - */ - public Builder xWatsonLoggingOptOut(Boolean xWatsonLoggingOptOut) { - this.xWatsonLoggingOptOut = xWatsonLoggingOptOut; - return this; - } - } - - protected QueryOptions() {} - - protected QueryOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - filter = builder.filter; - query = builder.query; - naturalLanguageQuery = builder.naturalLanguageQuery; - passages = builder.passages; - aggregation = builder.aggregation; - count = builder.count; - xReturn = builder.xReturn; - offset = builder.offset; - sort = builder.sort; - highlight = builder.highlight; - passagesFields = builder.passagesFields; - passagesCount = builder.passagesCount; - passagesCharacters = builder.passagesCharacters; - deduplicate = builder.deduplicate; - deduplicateField = builder.deduplicateField; - similar = builder.similar; - similarDocumentIds = builder.similarDocumentIds; - similarFields = builder.similarFields; - bias = builder.bias; - spellingSuggestions = builder.spellingSuggestions; - xWatsonLoggingOptOut = builder.xWatsonLoggingOptOut; - } - - /** - * New builder. - * - * @return a QueryOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the filter. - * - *

A cacheable query that excludes documents that don't mention the query content. Filter - * searches are better for metadata-type searches and for assessing the concepts in the data set. - * - * @return the filter - */ - public String filter() { - return filter; - } - - /** - * Gets the query. - * - *

A query search returns all documents in your data set with full enrichments and full text, - * but with the most relevant documents listed first. Use a query search when you want to find the - * most relevant search results. - * - * @return the query - */ - public String query() { - return query; - } - - /** - * Gets the naturalLanguageQuery. - * - *

A natural language query that returns relevant documents by utilizing training data and - * natural language understanding. - * - * @return the naturalLanguageQuery - */ - public String naturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the passages. - * - *

A passages query that returns the most relevant passages from the results. - * - * @return the passages - */ - public Boolean passages() { - return passages; - } - - /** - * Gets the aggregation. - * - *

An aggregation search that returns an exact answer by combining query search with filters. - * Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * - * @return the aggregation - */ - public String aggregation() { - return aggregation; - } - - /** - * Gets the count. - * - *

Number of results to return. - * - * @return the count - */ - public Long count() { - return count; - } - - /** - * Gets the xReturn. - * - *

A comma-separated list of the portion of the document hierarchy to return. - * - * @return the xReturn - */ - public String xReturn() { - return xReturn; - } - - /** - * Gets the offset. - * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. - * - * @return the offset - */ - public Long offset() { - return offset; - } - - /** - * Gets the sort. - * - *

A comma-separated list of fields in the document to sort on. You can optionally specify a - * sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending - * is the default sort direction if no prefix is specified. This parameter cannot be used in the - * same query as the **bias** parameter. - * - * @return the sort - */ - public String sort() { - return sort; - } - - /** - * Gets the highlight. - * - *

When true, a highlight field is returned for each result which contains the fields which - * match the query with `<em></em>` tags around the matching query terms. - * - * @return the highlight - */ - public Boolean highlight() { - return highlight; - } - - /** - * Gets the passagesFields. - * - *

A comma-separated list of fields that passages are drawn from. If this parameter not - * specified, then all top-level fields are included. - * - * @return the passagesFields - */ - public String passagesFields() { - return passagesFields; - } - - /** - * Gets the passagesCount. - * - *

The maximum number of passages to return. The search returns fewer passages if the requested - * total is not found. The default is `10`. The maximum is `100`. - * - * @return the passagesCount - */ - public Long passagesCount() { - return passagesCount; - } - - /** - * Gets the passagesCharacters. - * - *

The approximate number of characters that any one passage will have. - * - * @return the passagesCharacters - */ - public Long passagesCharacters() { - return passagesCharacters; - } - - /** - * Gets the deduplicate. - * - *

When `true`, and used with a Watson Discovery News collection, duplicate results (based on - * the contents of the **title** field) are removed. Duplicate comparison is limited to the - * current query only; **offset** is not considered. This parameter is currently Beta - * functionality. - * - * @return the deduplicate - */ - public Boolean deduplicate() { - return deduplicate; - } - - /** - * Gets the deduplicateField. - * - *

When specified, duplicate results based on the field specified are removed from the returned - * results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * - * @return the deduplicateField - */ - public String deduplicateField() { - return deduplicateField; - } - - /** - * Gets the similar. - * - *

When `true`, results are returned based on their similarity to the document IDs specified in - * the **similar.document_ids** parameter. - * - * @return the similar - */ - public Boolean similar() { - return similar; - } - - /** - * Gets the similarDocumentIds. - * - *

A comma-separated list of document IDs to find similar documents. - * - *

**Tip:** Include the **natural_language_query** parameter to expand the scope of the - * document similarity search with the natural language query. Other query parameters, such as - * **filter** and **query**, are subsequently applied and reduce the scope. - * - * @return the similarDocumentIds - */ - public String similarDocumentIds() { - return similarDocumentIds; - } - - /** - * Gets the similarFields. - * - *

A comma-separated list of field names that are used as a basis for comparison to identify - * similar documents. If not specified, the entire document is used for comparison. - * - * @return the similarFields - */ - public String similarFields() { - return similarFields; - } - - /** - * Gets the bias. - * - *

Field which the returned results will be biased against. The specified field must be either - * a **date** or **number** format. When a **date** type field is specified returned results are - * biased towards field values closer to the current date. When a **number** type field is - * specified, returned results are biased towards higher field values. This parameter cannot be - * used in the same query as the **sort** parameter. - * - * @return the bias - */ - public String bias() { - return bias; - } - - /** - * Gets the spellingSuggestions. - * - *

When `true` and the **natural_language_query** parameter is used, the - * **natural_languge_query** parameter is spell checked. The most likely correction is returned in - * the **suggested_query** field of the response (if one exists). - * - *

**Important:** this parameter is only valid when using the Cloud Pak version of Discovery. - * - * @return the spellingSuggestions - */ - public Boolean spellingSuggestions() { - return spellingSuggestions; - } - - /** - * Gets the xWatsonLoggingOptOut. - * - *

If `true`, queries are not stored in the Discovery **Logs** endpoint. - * - * @return the xWatsonLoggingOptOut - */ - public Boolean xWatsonLoggingOptOut() { - return xWatsonLoggingOptOut; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryPassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryPassages.java deleted file mode 100644 index f2a12ecf78..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryPassages.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** A passage query result. */ -public class QueryPassages extends GenericModel { - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("passage_score") - protected Double passageScore; - - @SerializedName("passage_text") - protected String passageText; - - @SerializedName("start_offset") - protected Long startOffset; - - @SerializedName("end_offset") - protected Long endOffset; - - protected String field; - - protected QueryPassages() {} - - /** - * Gets the documentId. - * - *

The unique identifier of the document from which the passage has been extracted. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the passageScore. - * - *

The confidence score of the passages's analysis. A higher score indicates greater - * confidence. - * - * @return the passageScore - */ - public Double getPassageScore() { - return passageScore; - } - - /** - * Gets the passageText. - * - *

The content of the extracted passage. - * - * @return the passageText - */ - public String getPassageText() { - return passageText; - } - - /** - * Gets the startOffset. - * - *

The position of the first character of the extracted passage in the originating field. - * - * @return the startOffset - */ - public Long getStartOffset() { - return startOffset; - } - - /** - * Gets the endOffset. - * - *

The position of the last character of the extracted passage in the originating field. - * - * @return the endOffset - */ - public Long getEndOffset() { - return endOffset; - } - - /** - * Gets the field. - * - *

The label of the field from which the passage has been extracted. - * - * @return the field - */ - public String getField() { - return field; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResponse.java deleted file mode 100644 index 1df2929808..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResponse.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** A response containing the documents and aggregations for the query. */ -public class QueryResponse extends GenericModel { - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List results; - protected List aggregations; - protected List passages; - - @SerializedName("duplicates_removed") - protected Long duplicatesRemoved; - - @SerializedName("session_token") - protected String sessionToken; - - @SerializedName("retrieval_details") - protected RetrievalDetails retrievalDetails; - - @SerializedName("suggested_query") - protected String suggestedQuery; - - protected QueryResponse() {} - - /** - * Gets the matchingResults. - * - *

The number of matching results for the query. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the results. - * - *

Array of document results for the query. - * - * @return the results - */ - public List getResults() { - return results; - } - - /** - * Gets the aggregations. - * - *

Array of aggregation results for the query. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } - - /** - * Gets the passages. - * - *

Array of passage results for the query. - * - * @return the passages - */ - public List getPassages() { - return passages; - } - - /** - * Gets the duplicatesRemoved. - * - *

The number of duplicate results removed. - * - * @return the duplicatesRemoved - */ - public Long getDuplicatesRemoved() { - return duplicatesRemoved; - } - - /** - * Gets the sessionToken. - * - *

The session token for this query. The session token can be used to add events associated - * with this query to the query and event log. - * - *

**Important:** Session tokens are case sensitive. - * - * @return the sessionToken - */ - public String getSessionToken() { - return sessionToken; - } - - /** - * Gets the retrievalDetails. - * - *

An object contain retrieval type information. - * - * @return the retrievalDetails - */ - public RetrievalDetails getRetrievalDetails() { - return retrievalDetails; - } - - /** - * Gets the suggestedQuery. - * - *

The suggestions for a misspelled natural language query. - * - * @return the suggestedQuery - */ - public String getSuggestedQuery() { - return suggestedQuery; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResult.java deleted file mode 100644 index eebea29e8e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResult.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.ibm.cloud.sdk.core.service.model.DynamicModel; -import java.util.Map; - -/** Query result object. */ -public class QueryResult extends DynamicModel { - - @SerializedName("id") - protected String id; - - @SerializedName("metadata") - protected Map metadata; - - @SerializedName("collection_id") - protected String collectionId; - - @SerializedName("result_metadata") - protected QueryResultMetadata resultMetadata; - - public QueryResult() { - super(new TypeToken() {}); - } - - /** - * Gets the id. - * - *

The unique identifier of the document. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Gets the metadata. - * - *

Metadata of the document. - * - * @return the metadata - */ - public Map getMetadata() { - return this.metadata; - } - - /** - * Gets the collectionId. - * - *

The collection ID of the collection containing the document for this result. - * - * @return the collectionId - */ - public String getCollectionId() { - return this.collectionId; - } - - /** - * Gets the resultMetadata. - * - *

Metadata of a query result. - * - * @return the resultMetadata - */ - public QueryResultMetadata getResultMetadata() { - return this.resultMetadata; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResultMetadata.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResultMetadata.java deleted file mode 100644 index e6e294229d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryResultMetadata.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Metadata of a query result. */ -public class QueryResultMetadata extends GenericModel { - - protected Double score; - protected Double confidence; - - protected QueryResultMetadata() {} - - /** - * Gets the score. - * - *

An unbounded measure of the relevance of a particular result, dependent on the query and - * matching document. A higher score indicates a greater match to the query parameters. - * - * @return the score - */ - public Double getScore() { - return score; - } - - /** - * Gets the confidence. - * - *

The confidence score for the given result. Calculated based on how relevant the result is - * estimated to be. confidence can range from `0.0` to `1.0`. The higher the number, the more - * relevant the document. The `confidence` value for a result was calculated using the model - * specified in the `document_retrieval_strategy` field of the result set. - * - * @return the confidence - */ - public Double getConfidence() { - return confidence; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregation.java deleted file mode 100644 index 042e60b622..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregation.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import java.util.List; - -/** Returns the top values for the field specified. */ -public class QueryTermAggregation extends QueryAggregation { - - protected String field; - protected Long count; - protected String name; - protected List results; - - protected QueryTermAggregation() {} - - /** - * Gets the field. - * - *

The field in the document used to generate top values from. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the count. - * - *

The number of top values returned. - * - * @return the count - */ - public Long getCount() { - return count; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of top values for the field. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResult.java deleted file mode 100644 index fadb524a0b..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResult.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Top value result for the term aggregation. */ -public class QueryTermAggregationResult extends GenericModel { - - protected String key; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected Double relevancy; - - @SerializedName("total_matching_documents") - protected Long totalMatchingDocuments; - - @SerializedName("estimated_matching_documents") - protected Long estimatedMatchingDocuments; - - protected List aggregations; - - protected QueryTermAggregationResult() {} - - /** - * Gets the key. - * - *

Value of the field with a non-zero frequency in the document set. - * - * @return the key - */ - public String getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of documents that contain the 'key'. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the relevancy. - * - *

The relevancy for this term. - * - * @return the relevancy - */ - public Double getRelevancy() { - return relevancy; - } - - /** - * Gets the totalMatchingDocuments. - * - *

The number of documents which have the term as the value of specified field in the whole set - * of documents in this collection. Returned only when the `relevancy` parameter is set to `true`. - * - * @return the totalMatchingDocuments - */ - public Long getTotalMatchingDocuments() { - return totalMatchingDocuments; - } - - /** - * Gets the estimatedMatchingDocuments. - * - *

The estimated number of documents which would match the query and also meet the condition. - * Returned only when the `relevancy` parameter is set to `true`. - * - * @return the estimatedMatchingDocuments - */ - public Long getEstimatedMatchingDocuments() { - return estimatedMatchingDocuments; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregation.java deleted file mode 100644 index 9b664c111a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregation.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import java.util.List; - -/** A specialized histogram aggregation that uses dates to create interval segments. */ -public class QueryTimesliceAggregation extends QueryAggregation { - - protected String field; - protected String interval; - protected String name; - protected List results; - - protected QueryTimesliceAggregation() {} - - /** - * Gets the field. - * - *

The date field name used to create the timeslice. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the interval. - * - *

The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years. - * - * @return the interval - */ - public String getInterval() { - return interval; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of aggregation results. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResult.java deleted file mode 100644 index fc42778b42..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResult.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** A timeslice interval segment. */ -public class QueryTimesliceAggregationResult extends GenericModel { - - @SerializedName("key_as_string") - protected String keyAsString; - - protected Long key; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - protected QueryTimesliceAggregationResult() {} - - /** - * Gets the keyAsString. - * - *

String date value of the upper bound for the timeslice interval in ISO-8601 format. - * - * @return the keyAsString - */ - public String getKeyAsString() { - return keyAsString; - } - - /** - * Gets the key. - * - *

Numeric date value of the upper bound for the timeslice interval in UNIX milliseconds since - * epoch. - * - * @return the key - */ - public Long getKey() { - return key; - } - - /** - * Gets the matchingResults. - * - *

Number of documents with the specified key as the upper bound. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregation.java deleted file mode 100644 index 0d3071527f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregation.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -/** Returns the top documents ranked by the score of the query. */ -public class QueryTopHitsAggregation extends QueryAggregation { - - protected Long size; - protected String name; - protected QueryTopHitsAggregationResult hits; - - protected QueryTopHitsAggregation() {} - - /** - * Gets the size. - * - *

The number of documents to return. - * - * @return the size - */ - public Long getSize() { - return size; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the hits. - * - * @return the hits - */ - public QueryTopHitsAggregationResult getHits() { - return hits; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResult.java deleted file mode 100644 index b7b8a98a04..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResult.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; -import java.util.Map; - -/** A query response that contains the matching documents for the preceding aggregations. */ -public class QueryTopHitsAggregationResult extends GenericModel { - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List> hits; - - protected QueryTopHitsAggregationResult() {} - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the hits. - * - *

An array of the document results. - * - * @return the hits - */ - public List> getHits() { - return hits; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/RetrievalDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/RetrievalDetails.java deleted file mode 100644 index f707e433d7..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/RetrievalDetails.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** An object contain retrieval type information. */ -public class RetrievalDetails extends GenericModel { - - /** - * Indentifies the document retrieval strategy used for this query. `relevancy_training` indicates - * that the results were returned using a relevancy trained model. `continuous_relevancy_training` - * indicates that the results were returned using the continuous relevancy training model created - * by result feedback analysis. `untrained` means the results were returned using the standard - * untrained model. - * - *

**Note**: In the event of trained collections being queried, but the trained model is not - * used to return results, the **document_retrieval_strategy** will be listed as `untrained`. - */ - public interface DocumentRetrievalStrategy { - /** untrained. */ - String UNTRAINED = "untrained"; - /** relevancy_training. */ - String RELEVANCY_TRAINING = "relevancy_training"; - /** continuous_relevancy_training. */ - String CONTINUOUS_RELEVANCY_TRAINING = "continuous_relevancy_training"; - } - - @SerializedName("document_retrieval_strategy") - protected String documentRetrievalStrategy; - - protected RetrievalDetails() {} - - /** - * Gets the documentRetrievalStrategy. - * - *

Indentifies the document retrieval strategy used for this query. `relevancy_training` - * indicates that the results were returned using a relevancy trained model. - * `continuous_relevancy_training` indicates that the results were returned using the continuous - * relevancy training model created by result feedback analysis. `untrained` means the results - * were returned using the standard untrained model. - * - *

**Note**: In the event of trained collections being queried, but the trained model is not - * used to return results, the **document_retrieval_strategy** will be listed as `untrained`. - * - * @return the documentRetrievalStrategy - */ - public String getDocumentRetrievalStrategy() { - return documentRetrievalStrategy; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatus.java deleted file mode 100644 index f44955092a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatus.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing smart document understanding information for this collection. */ -public class SduStatus extends GenericModel { - - protected Boolean enabled; - - @SerializedName("total_annotated_pages") - protected Long totalAnnotatedPages; - - @SerializedName("total_pages") - protected Long totalPages; - - @SerializedName("total_documents") - protected Long totalDocuments; - - @SerializedName("custom_fields") - protected SduStatusCustomFields customFields; - - protected SduStatus() {} - - /** - * Gets the enabled. - * - *

When `true`, smart document understanding conversion is enabled for this collection. All - * collections created with a version date after `2019-04-30` have smart document understanding - * enabled. If `false`, documents added to the collection are converted using the **conversion** - * settings specified in the configuration associated with the collection. - * - * @return the enabled - */ - public Boolean isEnabled() { - return enabled; - } - - /** - * Gets the totalAnnotatedPages. - * - *

The total number of pages annotated using smart document understanding in this collection. - * - * @return the totalAnnotatedPages - */ - public Long getTotalAnnotatedPages() { - return totalAnnotatedPages; - } - - /** - * Gets the totalPages. - * - *

The current number of pages that can be used for training smart document understanding. The - * `total_pages` number is calculated as the total number of pages identified from the documents - * listed in the **total_documents** field. - * - * @return the totalPages - */ - public Long getTotalPages() { - return totalPages; - } - - /** - * Gets the totalDocuments. - * - *

The total number of documents in this collection that can be used to train smart document - * understanding. For **lite** plan collections, the maximum is the first 20 uploaded documents - * (not including HTML or JSON documents). For other plans, the maximum is the first 40 uploaded - * documents (not including HTML or JSON documents). When the maximum is reached, additional - * documents uploaded to the collection are not considered for training smart document - * understanding. - * - * @return the totalDocuments - */ - public Long getTotalDocuments() { - return totalDocuments; - } - - /** - * Gets the customFields. - * - *

Information about custom smart document understanding fields that exist in this collection. - * - * @return the customFields - */ - public SduStatusCustomFields getCustomFields() { - return customFields; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFields.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFields.java deleted file mode 100644 index 2225c3de2a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFields.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Information about custom smart document understanding fields that exist in this collection. */ -public class SduStatusCustomFields extends GenericModel { - - protected Long defined; - - @SerializedName("maximum_allowed") - protected Long maximumAllowed; - - protected SduStatusCustomFields() {} - - /** - * Gets the defined. - * - *

The number of custom fields defined for this collection. - * - * @return the defined - */ - public Long getDefined() { - return defined; - } - - /** - * Gets the maximumAllowed. - * - *

The maximum number of custom fields that are allowed in this collection. - * - * @return the maximumAllowed - */ - public Long getMaximumAllowed() { - return maximumAllowed; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SearchStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SearchStatus.java deleted file mode 100644 index 24b59ef8dd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SearchStatus.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import com.ibm.cloud.sdk.core.util.DateTypeAdapter; -import java.util.Date; - -/** Information about the Continuous Relevancy Training for this environment. */ -public class SearchStatus extends GenericModel { - - /** The current status of Continuous Relevancy Training for this environment. */ - public interface Status { - /** NO_DATA. */ - String NO_DATA = "NO_DATA"; - /** INSUFFICENT_DATA. */ - String INSUFFICENT_DATA = "INSUFFICENT_DATA"; - /** TRAINING. */ - String TRAINING = "TRAINING"; - /** TRAINED. */ - String TRAINED = "TRAINED"; - /** NOT_APPLICABLE. */ - String NOT_APPLICABLE = "NOT_APPLICABLE"; - } - - protected String scope; - protected String status; - - @SerializedName("status_description") - protected String statusDescription; - - @JsonAdapter(DateTypeAdapter.class) - @SerializedName("last_trained") - protected Date lastTrained; - - protected SearchStatus() {} - - /** - * Gets the scope. - * - *

Current scope of the training. Always returned as `environment`. - * - * @return the scope - */ - public String getScope() { - return scope; - } - - /** - * Gets the status. - * - *

The current status of Continuous Relevancy Training for this environment. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the statusDescription. - * - *

Long description of the current Continuous Relevancy Training status. - * - * @return the statusDescription - */ - public String getStatusDescription() { - return statusDescription; - } - - /** - * Gets the lastTrained. - * - *

The date stamp of the most recent completed training for this environment. - * - * @return the lastTrained - */ - public Date getLastTrained() { - return lastTrained; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SegmentSettings.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SegmentSettings.java deleted file mode 100644 index 4e431ff8a2..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SegmentSettings.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** A list of Document Segmentation settings. */ -public class SegmentSettings extends GenericModel { - - protected Boolean enabled; - - @SerializedName("selector_tags") - protected List selectorTags; - - @SerializedName("annotated_fields") - protected List annotatedFields; - - /** Builder. */ - public static class Builder { - private Boolean enabled; - private List selectorTags; - private List annotatedFields; - - /** - * Instantiates a new Builder from an existing SegmentSettings instance. - * - * @param segmentSettings the instance to initialize the Builder with - */ - private Builder(SegmentSettings segmentSettings) { - this.enabled = segmentSettings.enabled; - this.selectorTags = segmentSettings.selectorTags; - this.annotatedFields = segmentSettings.annotatedFields; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a SegmentSettings. - * - * @return the new SegmentSettings instance - */ - public SegmentSettings build() { - return new SegmentSettings(this); - } - - /** - * Adds a new element to selectorTags. - * - * @param selectorTags the new element to be added - * @return the SegmentSettings builder - */ - public Builder addSelectorTags(String selectorTags) { - com.ibm.cloud.sdk.core.util.Validator.notNull(selectorTags, "selectorTags cannot be null"); - if (this.selectorTags == null) { - this.selectorTags = new ArrayList(); - } - this.selectorTags.add(selectorTags); - return this; - } - - /** - * Adds a new element to annotatedFields. - * - * @param annotatedFields the new element to be added - * @return the SegmentSettings builder - */ - public Builder addAnnotatedFields(String annotatedFields) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - annotatedFields, "annotatedFields cannot be null"); - if (this.annotatedFields == null) { - this.annotatedFields = new ArrayList(); - } - this.annotatedFields.add(annotatedFields); - return this; - } - - /** - * Set the enabled. - * - * @param enabled the enabled - * @return the SegmentSettings builder - */ - public Builder enabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Set the selectorTags. Existing selectorTags will be replaced. - * - * @param selectorTags the selectorTags - * @return the SegmentSettings builder - */ - public Builder selectorTags(List selectorTags) { - this.selectorTags = selectorTags; - return this; - } - - /** - * Set the annotatedFields. Existing annotatedFields will be replaced. - * - * @param annotatedFields the annotatedFields - * @return the SegmentSettings builder - */ - public Builder annotatedFields(List annotatedFields) { - this.annotatedFields = annotatedFields; - return this; - } - } - - protected SegmentSettings() {} - - protected SegmentSettings(Builder builder) { - enabled = builder.enabled; - selectorTags = builder.selectorTags; - annotatedFields = builder.annotatedFields; - } - - /** - * New builder. - * - * @return a SegmentSettings builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the enabled. - * - *

Enables/disables the Document Segmentation feature. - * - * @return the enabled - */ - public Boolean enabled() { - return enabled; - } - - /** - * Gets the selectorTags. - * - *

Defines the heading level that splits into document segments. Valid values are h1, h2, h3, - * h4, h5, h6. The content of the header field that the segmentation splits at is used as the - * **title** field for that segmented result. Only valid if used with a collection that has - * **enabled** set to `false` in the **smart_document_understanding** object. - * - * @return the selectorTags - */ - public List selectorTags() { - return selectorTags; - } - - /** - * Gets the annotatedFields. - * - *

Defines the annotated smart document understanding fields that the document is split on. The - * content of the annotated field that the segmentation splits at is used as the **title** field - * for that segmented result. For example, if the field `sub-title` is specified, when a document - * is uploaded each time the smart document understanding conversion encounters a field of type - * `sub-title` the document is split at that point and the content of the field used as the title - * of the remaining content. This split is performed for all instances of the listed fields in the - * uploaded document. Only valid if used with a collection that has **enabled** set to `true` in - * the **smart_document_understanding** object. - * - * @return the annotatedFields - */ - public List annotatedFields() { - return annotatedFields; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Source.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Source.java deleted file mode 100644 index a05838fee9..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/Source.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing source parameters for the configuration. */ -public class Source extends GenericModel { - - /** - * The type of source to connect to. - `box` indicates the configuration is to connect an instance - * of Enterprise Box. - `salesforce` indicates the configuration is to connect to Salesforce. - - * `sharepoint` indicates the configuration is to connect to Microsoft SharePoint Online. - - * `web_crawl` indicates the configuration is to perform a web page crawl. - - * `cloud_object_storage` indicates the configuration is to connect to a cloud object store. - */ - public interface Type { - /** box. */ - String BOX = "box"; - /** salesforce. */ - String SALESFORCE = "salesforce"; - /** sharepoint. */ - String SHAREPOINT = "sharepoint"; - /** web_crawl. */ - String WEB_CRAWL = "web_crawl"; - /** cloud_object_storage. */ - String CLOUD_OBJECT_STORAGE = "cloud_object_storage"; - } - - protected String type; - - @SerializedName("credential_id") - protected String credentialId; - - protected SourceSchedule schedule; - protected SourceOptions options; - - /** Builder. */ - public static class Builder { - private String type; - private String credentialId; - private SourceSchedule schedule; - private SourceOptions options; - - /** - * Instantiates a new Builder from an existing Source instance. - * - * @param source the instance to initialize the Builder with - */ - private Builder(Source source) { - this.type = source.type; - this.credentialId = source.credentialId; - this.schedule = source.schedule; - this.options = source.options; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a Source. - * - * @return the new Source instance - */ - public Source build() { - return new Source(this); - } - - /** - * Set the type. - * - * @param type the type - * @return the Source builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Set the credentialId. - * - * @param credentialId the credentialId - * @return the Source builder - */ - public Builder credentialId(String credentialId) { - this.credentialId = credentialId; - return this; - } - - /** - * Set the schedule. - * - * @param schedule the schedule - * @return the Source builder - */ - public Builder schedule(SourceSchedule schedule) { - this.schedule = schedule; - return this; - } - - /** - * Set the options. - * - * @param options the options - * @return the Source builder - */ - public Builder options(SourceOptions options) { - this.options = options; - return this; - } - } - - protected Source() {} - - protected Source(Builder builder) { - type = builder.type; - credentialId = builder.credentialId; - schedule = builder.schedule; - options = builder.options; - } - - /** - * New builder. - * - * @return a Source builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the type. - * - *

The type of source to connect to. - `box` indicates the configuration is to connect an - * instance of Enterprise Box. - `salesforce` indicates the configuration is to connect to - * Salesforce. - `sharepoint` indicates the configuration is to connect to Microsoft SharePoint - * Online. - `web_crawl` indicates the configuration is to perform a web page crawl. - - * `cloud_object_storage` indicates the configuration is to connect to a cloud object store. - * - * @return the type - */ - public String type() { - return type; - } - - /** - * Gets the credentialId. - * - *

The **credential_id** of the credentials to use to connect to the source. Credentials are - * defined using the **credentials** method. The **source_type** of the credentials used must - * match the **type** field specified in this object. - * - * @return the credentialId - */ - public String credentialId() { - return credentialId; - } - - /** - * Gets the schedule. - * - *

Object containing the schedule information for the source. - * - * @return the schedule - */ - public SourceSchedule schedule() { - return schedule; - } - - /** - * Gets the options. - * - *

The **options** object defines which items to crawl from the source system. - * - * @return the options - */ - public SourceOptions options() { - return options; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptions.java deleted file mode 100644 index d7e04a458c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptions.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The **options** object defines which items to crawl from the source system. */ -public class SourceOptions extends GenericModel { - - protected List folders; - protected List objects; - - @SerializedName("site_collections") - protected List siteCollections; - - protected List urls; - protected List buckets; - - @SerializedName("crawl_all_buckets") - protected Boolean crawlAllBuckets; - - /** Builder. */ - public static class Builder { - private List folders; - private List objects; - private List siteCollections; - private List urls; - private List buckets; - private Boolean crawlAllBuckets; - - /** - * Instantiates a new Builder from an existing SourceOptions instance. - * - * @param sourceOptions the instance to initialize the Builder with - */ - private Builder(SourceOptions sourceOptions) { - this.folders = sourceOptions.folders; - this.objects = sourceOptions.objects; - this.siteCollections = sourceOptions.siteCollections; - this.urls = sourceOptions.urls; - this.buckets = sourceOptions.buckets; - this.crawlAllBuckets = sourceOptions.crawlAllBuckets; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a SourceOptions. - * - * @return the new SourceOptions instance - */ - public SourceOptions build() { - return new SourceOptions(this); - } - - /** - * Adds a new element to folders. - * - * @param folders the new element to be added - * @return the SourceOptions builder - */ - public Builder addFolders(SourceOptionsFolder folders) { - com.ibm.cloud.sdk.core.util.Validator.notNull(folders, "folders cannot be null"); - if (this.folders == null) { - this.folders = new ArrayList(); - } - this.folders.add(folders); - return this; - } - - /** - * Adds a new element to objects. - * - * @param objects the new element to be added - * @return the SourceOptions builder - */ - public Builder addObjects(SourceOptionsObject objects) { - com.ibm.cloud.sdk.core.util.Validator.notNull(objects, "objects cannot be null"); - if (this.objects == null) { - this.objects = new ArrayList(); - } - this.objects.add(objects); - return this; - } - - /** - * Adds a new element to siteCollections. - * - * @param siteCollections the new element to be added - * @return the SourceOptions builder - */ - public Builder addSiteCollections(SourceOptionsSiteColl siteCollections) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - siteCollections, "siteCollections cannot be null"); - if (this.siteCollections == null) { - this.siteCollections = new ArrayList(); - } - this.siteCollections.add(siteCollections); - return this; - } - - /** - * Adds a new element to urls. - * - * @param urls the new element to be added - * @return the SourceOptions builder - */ - public Builder addUrls(SourceOptionsWebCrawl urls) { - com.ibm.cloud.sdk.core.util.Validator.notNull(urls, "urls cannot be null"); - if (this.urls == null) { - this.urls = new ArrayList(); - } - this.urls.add(urls); - return this; - } - - /** - * Adds a new element to buckets. - * - * @param buckets the new element to be added - * @return the SourceOptions builder - */ - public Builder addBuckets(SourceOptionsBuckets buckets) { - com.ibm.cloud.sdk.core.util.Validator.notNull(buckets, "buckets cannot be null"); - if (this.buckets == null) { - this.buckets = new ArrayList(); - } - this.buckets.add(buckets); - return this; - } - - /** - * Set the folders. Existing folders will be replaced. - * - * @param folders the folders - * @return the SourceOptions builder - */ - public Builder folders(List folders) { - this.folders = folders; - return this; - } - - /** - * Set the objects. Existing objects will be replaced. - * - * @param objects the objects - * @return the SourceOptions builder - */ - public Builder objects(List objects) { - this.objects = objects; - return this; - } - - /** - * Set the siteCollections. Existing siteCollections will be replaced. - * - * @param siteCollections the siteCollections - * @return the SourceOptions builder - */ - public Builder siteCollections(List siteCollections) { - this.siteCollections = siteCollections; - return this; - } - - /** - * Set the urls. Existing urls will be replaced. - * - * @param urls the urls - * @return the SourceOptions builder - */ - public Builder urls(List urls) { - this.urls = urls; - return this; - } - - /** - * Set the buckets. Existing buckets will be replaced. - * - * @param buckets the buckets - * @return the SourceOptions builder - */ - public Builder buckets(List buckets) { - this.buckets = buckets; - return this; - } - - /** - * Set the crawlAllBuckets. - * - * @param crawlAllBuckets the crawlAllBuckets - * @return the SourceOptions builder - */ - public Builder crawlAllBuckets(Boolean crawlAllBuckets) { - this.crawlAllBuckets = crawlAllBuckets; - return this; - } - } - - protected SourceOptions() {} - - protected SourceOptions(Builder builder) { - folders = builder.folders; - objects = builder.objects; - siteCollections = builder.siteCollections; - urls = builder.urls; - buckets = builder.buckets; - crawlAllBuckets = builder.crawlAllBuckets; - } - - /** - * New builder. - * - * @return a SourceOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the folders. - * - *

Array of folders to crawl from the Box source. Only valid, and required, when the **type** - * field of the **source** object is set to `box`. - * - * @return the folders - */ - public List folders() { - return folders; - } - - /** - * Gets the objects. - * - *

Array of Salesforce document object types to crawl from the Salesforce source. Only valid, - * and required, when the **type** field of the **source** object is set to `salesforce`. - * - * @return the objects - */ - public List objects() { - return objects; - } - - /** - * Gets the siteCollections. - * - *

Array of Microsoft SharePointoint Online site collections to crawl from the SharePoint - * source. Only valid and required when the **type** field of the **source** object is set to - * `sharepoint`. - * - * @return the siteCollections - */ - public List siteCollections() { - return siteCollections; - } - - /** - * Gets the urls. - * - *

Array of Web page URLs to begin crawling the web from. Only valid and required when the - * **type** field of the **source** object is set to `web_crawl`. - * - * @return the urls - */ - public List urls() { - return urls; - } - - /** - * Gets the buckets. - * - *

Array of cloud object store buckets to begin crawling. Only valid and required when the - * **type** field of the **source** object is set to `cloud_object_store`, and the - * **crawl_all_buckets** field is `false` or not specified. - * - * @return the buckets - */ - public List buckets() { - return buckets; - } - - /** - * Gets the crawlAllBuckets. - * - *

When `true`, all buckets in the specified cloud object store are crawled. If set to `true`, - * the **buckets** array must not be specified. - * - * @return the crawlAllBuckets - */ - public Boolean crawlAllBuckets() { - return crawlAllBuckets; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsBuckets.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsBuckets.java deleted file mode 100644 index 60e4c4ac75..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsBuckets.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object defining a cloud object store bucket to crawl. */ -public class SourceOptionsBuckets extends GenericModel { - - protected String name; - protected Long limit; - - /** Builder. */ - public static class Builder { - private String name; - private Long limit; - - /** - * Instantiates a new Builder from an existing SourceOptionsBuckets instance. - * - * @param sourceOptionsBuckets the instance to initialize the Builder with - */ - private Builder(SourceOptionsBuckets sourceOptionsBuckets) { - this.name = sourceOptionsBuckets.name; - this.limit = sourceOptionsBuckets.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param name the name - */ - public Builder(String name) { - this.name = name; - } - - /** - * Builds a SourceOptionsBuckets. - * - * @return the new SourceOptionsBuckets instance - */ - public SourceOptionsBuckets build() { - return new SourceOptionsBuckets(this); - } - - /** - * Set the name. - * - * @param name the name - * @return the SourceOptionsBuckets builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the SourceOptionsBuckets builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected SourceOptionsBuckets() {} - - protected SourceOptionsBuckets(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - name = builder.name; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a SourceOptionsBuckets builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the name. - * - *

The name of the cloud object store bucket to crawl. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the limit. - * - *

The number of documents to crawl from this cloud object store bucket. If not specified, all - * documents in the bucket are crawled. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolder.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolder.java deleted file mode 100644 index 2f01810660..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolder.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object that defines a box folder to crawl with this configuration. */ -public class SourceOptionsFolder extends GenericModel { - - @SerializedName("owner_user_id") - protected String ownerUserId; - - @SerializedName("folder_id") - protected String folderId; - - protected Long limit; - - /** Builder. */ - public static class Builder { - private String ownerUserId; - private String folderId; - private Long limit; - - /** - * Instantiates a new Builder from an existing SourceOptionsFolder instance. - * - * @param sourceOptionsFolder the instance to initialize the Builder with - */ - private Builder(SourceOptionsFolder sourceOptionsFolder) { - this.ownerUserId = sourceOptionsFolder.ownerUserId; - this.folderId = sourceOptionsFolder.folderId; - this.limit = sourceOptionsFolder.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param ownerUserId the ownerUserId - * @param folderId the folderId - */ - public Builder(String ownerUserId, String folderId) { - this.ownerUserId = ownerUserId; - this.folderId = folderId; - } - - /** - * Builds a SourceOptionsFolder. - * - * @return the new SourceOptionsFolder instance - */ - public SourceOptionsFolder build() { - return new SourceOptionsFolder(this); - } - - /** - * Set the ownerUserId. - * - * @param ownerUserId the ownerUserId - * @return the SourceOptionsFolder builder - */ - public Builder ownerUserId(String ownerUserId) { - this.ownerUserId = ownerUserId; - return this; - } - - /** - * Set the folderId. - * - * @param folderId the folderId - * @return the SourceOptionsFolder builder - */ - public Builder folderId(String folderId) { - this.folderId = folderId; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the SourceOptionsFolder builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected SourceOptionsFolder() {} - - protected SourceOptionsFolder(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.ownerUserId, "ownerUserId cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.folderId, "folderId cannot be null"); - ownerUserId = builder.ownerUserId; - folderId = builder.folderId; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a SourceOptionsFolder builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the ownerUserId. - * - *

The Box user ID of the user who owns the folder to crawl. - * - * @return the ownerUserId - */ - public String ownerUserId() { - return ownerUserId; - } - - /** - * Gets the folderId. - * - *

The Box folder ID of the folder to crawl. - * - * @return the folderId - */ - public String folderId() { - return folderId; - } - - /** - * Gets the limit. - * - *

The maximum number of documents to crawl for this folder. By default, all documents in the - * folder are crawled. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsObject.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsObject.java deleted file mode 100644 index 8b95e6216d..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsObject.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object that defines a Salesforce document object type crawl with this configuration. */ -public class SourceOptionsObject extends GenericModel { - - protected String name; - protected Long limit; - - /** Builder. */ - public static class Builder { - private String name; - private Long limit; - - /** - * Instantiates a new Builder from an existing SourceOptionsObject instance. - * - * @param sourceOptionsObject the instance to initialize the Builder with - */ - private Builder(SourceOptionsObject sourceOptionsObject) { - this.name = sourceOptionsObject.name; - this.limit = sourceOptionsObject.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param name the name - */ - public Builder(String name) { - this.name = name; - } - - /** - * Builds a SourceOptionsObject. - * - * @return the new SourceOptionsObject instance - */ - public SourceOptionsObject build() { - return new SourceOptionsObject(this); - } - - /** - * Set the name. - * - * @param name the name - * @return the SourceOptionsObject builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the SourceOptionsObject builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected SourceOptionsObject() {} - - protected SourceOptionsObject(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - name = builder.name; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a SourceOptionsObject builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the name. - * - *

The name of the Salesforce document object to crawl. For example, `case`. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the limit. - * - *

The maximum number of documents to crawl for this document object. By default, all documents - * in the document object are crawled. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteColl.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteColl.java deleted file mode 100644 index 8cc93bbf7a..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteColl.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object that defines a Microsoft SharePoint site collection to crawl with this configuration. */ -public class SourceOptionsSiteColl extends GenericModel { - - @SerializedName("site_collection_path") - protected String siteCollectionPath; - - protected Long limit; - - /** Builder. */ - public static class Builder { - private String siteCollectionPath; - private Long limit; - - /** - * Instantiates a new Builder from an existing SourceOptionsSiteColl instance. - * - * @param sourceOptionsSiteColl the instance to initialize the Builder with - */ - private Builder(SourceOptionsSiteColl sourceOptionsSiteColl) { - this.siteCollectionPath = sourceOptionsSiteColl.siteCollectionPath; - this.limit = sourceOptionsSiteColl.limit; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param siteCollectionPath the siteCollectionPath - */ - public Builder(String siteCollectionPath) { - this.siteCollectionPath = siteCollectionPath; - } - - /** - * Builds a SourceOptionsSiteColl. - * - * @return the new SourceOptionsSiteColl instance - */ - public SourceOptionsSiteColl build() { - return new SourceOptionsSiteColl(this); - } - - /** - * Set the siteCollectionPath. - * - * @param siteCollectionPath the siteCollectionPath - * @return the SourceOptionsSiteColl builder - */ - public Builder siteCollectionPath(String siteCollectionPath) { - this.siteCollectionPath = siteCollectionPath; - return this; - } - - /** - * Set the limit. - * - * @param limit the limit - * @return the SourceOptionsSiteColl builder - */ - public Builder limit(long limit) { - this.limit = limit; - return this; - } - } - - protected SourceOptionsSiteColl() {} - - protected SourceOptionsSiteColl(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.siteCollectionPath, "siteCollectionPath cannot be null"); - siteCollectionPath = builder.siteCollectionPath; - limit = builder.limit; - } - - /** - * New builder. - * - * @return a SourceOptionsSiteColl builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the siteCollectionPath. - * - *

The Microsoft SharePoint Online site collection path to crawl. The path must be be relative - * to the **organization_url** that was specified in the credentials associated with this source - * configuration. - * - * @return the siteCollectionPath - */ - public String siteCollectionPath() { - return siteCollectionPath; - } - - /** - * Gets the limit. - * - *

The maximum number of documents to crawl for this site collection. By default, all documents - * in the site collection are crawled. - * - * @return the limit - */ - public Long limit() { - return limit; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawl.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawl.java deleted file mode 100644 index 82053c1e19..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawl.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Object defining which URL to crawl and how to crawl it. */ -public class SourceOptionsWebCrawl extends GenericModel { - - /** - * The number of concurrent URLs to fetch. `gentle` means one URL is fetched at a time with a - * delay between each call. `normal` means as many as two URLs are fectched concurrently with a - * short delay between fetch calls. `aggressive` means that up to ten URLs are fetched - * concurrently with a short delay between fetch calls. - */ - public interface CrawlSpeed { - /** gentle. */ - String GENTLE = "gentle"; - /** normal. */ - String NORMAL = "normal"; - /** aggressive. */ - String AGGRESSIVE = "aggressive"; - } - - protected String url; - - @SerializedName("limit_to_starting_hosts") - protected Boolean limitToStartingHosts; - - @SerializedName("crawl_speed") - protected String crawlSpeed; - - @SerializedName("allow_untrusted_certificate") - protected Boolean allowUntrustedCertificate; - - @SerializedName("maximum_hops") - protected Long maximumHops; - - @SerializedName("request_timeout") - protected Long requestTimeout; - - @SerializedName("override_robots_txt") - protected Boolean overrideRobotsTxt; - - protected List blacklist; - - /** Builder. */ - public static class Builder { - private String url; - private Boolean limitToStartingHosts; - private String crawlSpeed; - private Boolean allowUntrustedCertificate; - private Long maximumHops; - private Long requestTimeout; - private Boolean overrideRobotsTxt; - private List blacklist; - - /** - * Instantiates a new Builder from an existing SourceOptionsWebCrawl instance. - * - * @param sourceOptionsWebCrawl the instance to initialize the Builder with - */ - private Builder(SourceOptionsWebCrawl sourceOptionsWebCrawl) { - this.url = sourceOptionsWebCrawl.url; - this.limitToStartingHosts = sourceOptionsWebCrawl.limitToStartingHosts; - this.crawlSpeed = sourceOptionsWebCrawl.crawlSpeed; - this.allowUntrustedCertificate = sourceOptionsWebCrawl.allowUntrustedCertificate; - this.maximumHops = sourceOptionsWebCrawl.maximumHops; - this.requestTimeout = sourceOptionsWebCrawl.requestTimeout; - this.overrideRobotsTxt = sourceOptionsWebCrawl.overrideRobotsTxt; - this.blacklist = sourceOptionsWebCrawl.blacklist; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param url the url - */ - public Builder(String url) { - this.url = url; - } - - /** - * Builds a SourceOptionsWebCrawl. - * - * @return the new SourceOptionsWebCrawl instance - */ - public SourceOptionsWebCrawl build() { - return new SourceOptionsWebCrawl(this); - } - - /** - * Adds a new element to blacklist. - * - * @param blacklist the new element to be added - * @return the SourceOptionsWebCrawl builder - */ - public Builder addBlacklist(String blacklist) { - com.ibm.cloud.sdk.core.util.Validator.notNull(blacklist, "blacklist cannot be null"); - if (this.blacklist == null) { - this.blacklist = new ArrayList(); - } - this.blacklist.add(blacklist); - return this; - } - - /** - * Set the url. - * - * @param url the url - * @return the SourceOptionsWebCrawl builder - */ - public Builder url(String url) { - this.url = url; - return this; - } - - /** - * Set the limitToStartingHosts. - * - * @param limitToStartingHosts the limitToStartingHosts - * @return the SourceOptionsWebCrawl builder - */ - public Builder limitToStartingHosts(Boolean limitToStartingHosts) { - this.limitToStartingHosts = limitToStartingHosts; - return this; - } - - /** - * Set the crawlSpeed. - * - * @param crawlSpeed the crawlSpeed - * @return the SourceOptionsWebCrawl builder - */ - public Builder crawlSpeed(String crawlSpeed) { - this.crawlSpeed = crawlSpeed; - return this; - } - - /** - * Set the allowUntrustedCertificate. - * - * @param allowUntrustedCertificate the allowUntrustedCertificate - * @return the SourceOptionsWebCrawl builder - */ - public Builder allowUntrustedCertificate(Boolean allowUntrustedCertificate) { - this.allowUntrustedCertificate = allowUntrustedCertificate; - return this; - } - - /** - * Set the maximumHops. - * - * @param maximumHops the maximumHops - * @return the SourceOptionsWebCrawl builder - */ - public Builder maximumHops(long maximumHops) { - this.maximumHops = maximumHops; - return this; - } - - /** - * Set the requestTimeout. - * - * @param requestTimeout the requestTimeout - * @return the SourceOptionsWebCrawl builder - */ - public Builder requestTimeout(long requestTimeout) { - this.requestTimeout = requestTimeout; - return this; - } - - /** - * Set the overrideRobotsTxt. - * - * @param overrideRobotsTxt the overrideRobotsTxt - * @return the SourceOptionsWebCrawl builder - */ - public Builder overrideRobotsTxt(Boolean overrideRobotsTxt) { - this.overrideRobotsTxt = overrideRobotsTxt; - return this; - } - - /** - * Set the blacklist. Existing blacklist will be replaced. - * - * @param blacklist the blacklist - * @return the SourceOptionsWebCrawl builder - */ - public Builder blacklist(List blacklist) { - this.blacklist = blacklist; - return this; - } - } - - protected SourceOptionsWebCrawl() {} - - protected SourceOptionsWebCrawl(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.url, "url cannot be null"); - url = builder.url; - limitToStartingHosts = builder.limitToStartingHosts; - crawlSpeed = builder.crawlSpeed; - allowUntrustedCertificate = builder.allowUntrustedCertificate; - maximumHops = builder.maximumHops; - requestTimeout = builder.requestTimeout; - overrideRobotsTxt = builder.overrideRobotsTxt; - blacklist = builder.blacklist; - } - - /** - * New builder. - * - * @return a SourceOptionsWebCrawl builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the url. - * - *

The starting URL to crawl. - * - * @return the url - */ - public String url() { - return url; - } - - /** - * Gets the limitToStartingHosts. - * - *

When `true`, crawls of the specified URL are limited to the host part of the **url** field. - * - * @return the limitToStartingHosts - */ - public Boolean limitToStartingHosts() { - return limitToStartingHosts; - } - - /** - * Gets the crawlSpeed. - * - *

The number of concurrent URLs to fetch. `gentle` means one URL is fetched at a time with a - * delay between each call. `normal` means as many as two URLs are fectched concurrently with a - * short delay between fetch calls. `aggressive` means that up to ten URLs are fetched - * concurrently with a short delay between fetch calls. - * - * @return the crawlSpeed - */ - public String crawlSpeed() { - return crawlSpeed; - } - - /** - * Gets the allowUntrustedCertificate. - * - *

When `true`, allows the crawl to interact with HTTPS sites with SSL certificates with - * untrusted signers. - * - * @return the allowUntrustedCertificate - */ - public Boolean allowUntrustedCertificate() { - return allowUntrustedCertificate; - } - - /** - * Gets the maximumHops. - * - *

The maximum number of hops to make from the initial URL. When a page is crawled each link on - * that page will also be crawled if it is within the **maximum_hops** from the initial URL. The - * first page crawled is 0 hops, each link crawled from the first page is 1 hop, each link crawled - * from those pages is 2 hops, and so on. - * - * @return the maximumHops - */ - public Long maximumHops() { - return maximumHops; - } - - /** - * Gets the requestTimeout. - * - *

The maximum milliseconds to wait for a response from the web server. - * - * @return the requestTimeout - */ - public Long requestTimeout() { - return requestTimeout; - } - - /** - * Gets the overrideRobotsTxt. - * - *

When `true`, the crawler will ignore any `robots.txt` encountered by the crawler. This - * should only ever be done when crawling a web site the user owns. This must be be set to `true` - * when a **gateway_id** is specied in the **credentials**. - * - * @return the overrideRobotsTxt - */ - public Boolean overrideRobotsTxt() { - return overrideRobotsTxt; - } - - /** - * Gets the blacklist. - * - *

Array of URL's to be excluded while crawling. The crawler will not follow links which - * contains this string. For example, listing `https://ibm.com/watson` also excludes - * `https://ibm.com/watson/discovery`. - * - * @return the blacklist - */ - public List blacklist() { - return blacklist; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceSchedule.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceSchedule.java deleted file mode 100644 index dd2f36a716..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceSchedule.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object containing the schedule information for the source. */ -public class SourceSchedule extends GenericModel { - - /** - * The crawl schedule in the specified **time_zone**. - * - *

- `five_minutes`: Runs every five minutes. - `hourly`: Runs every hour. - `daily`: Runs - * every day between 00:00 and 06:00. - `weekly`: Runs every week on Sunday between 00:00 and - * 06:00. - `monthly`: Runs the on the first Sunday of every month between 00:00 and 06:00. - */ - public interface Frequency { - /** daily. */ - String DAILY = "daily"; - /** weekly. */ - String WEEKLY = "weekly"; - /** monthly. */ - String MONTHLY = "monthly"; - /** five_minutes. */ - String FIVE_MINUTES = "five_minutes"; - /** hourly. */ - String HOURLY = "hourly"; - } - - protected Boolean enabled; - - @SerializedName("time_zone") - protected String timeZone; - - protected String frequency; - - /** Builder. */ - public static class Builder { - private Boolean enabled; - private String timeZone; - private String frequency; - - /** - * Instantiates a new Builder from an existing SourceSchedule instance. - * - * @param sourceSchedule the instance to initialize the Builder with - */ - private Builder(SourceSchedule sourceSchedule) { - this.enabled = sourceSchedule.enabled; - this.timeZone = sourceSchedule.timeZone; - this.frequency = sourceSchedule.frequency; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a SourceSchedule. - * - * @return the new SourceSchedule instance - */ - public SourceSchedule build() { - return new SourceSchedule(this); - } - - /** - * Set the enabled. - * - * @param enabled the enabled - * @return the SourceSchedule builder - */ - public Builder enabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Set the timeZone. - * - * @param timeZone the timeZone - * @return the SourceSchedule builder - */ - public Builder timeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Set the frequency. - * - * @param frequency the frequency - * @return the SourceSchedule builder - */ - public Builder frequency(String frequency) { - this.frequency = frequency; - return this; - } - } - - protected SourceSchedule() {} - - protected SourceSchedule(Builder builder) { - enabled = builder.enabled; - timeZone = builder.timeZone; - frequency = builder.frequency; - } - - /** - * New builder. - * - * @return a SourceSchedule builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the enabled. - * - *

When `true`, the source is re-crawled based on the **frequency** field in this object. When - * `false` the source is not re-crawled; When `false` and connecting to Salesforce the source is - * crawled annually. - * - * @return the enabled - */ - public Boolean enabled() { - return enabled; - } - - /** - * Gets the timeZone. - * - *

The time zone to base source crawl times on. Possible values correspond to the IANA - * (Internet Assigned Numbers Authority) time zones list. - * - * @return the timeZone - */ - public String timeZone() { - return timeZone; - } - - /** - * Gets the frequency. - * - *

The crawl schedule in the specified **time_zone**. - * - *

- `five_minutes`: Runs every five minutes. - `hourly`: Runs every hour. - `daily`: Runs - * every day between 00:00 and 06:00. - `weekly`: Runs every week on Sunday between 00:00 and - * 06:00. - `monthly`: Runs the on the first Sunday of every month between 00:00 and 06:00. - * - * @return the frequency - */ - public String frequency() { - return frequency; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceStatus.java deleted file mode 100644 index 7ddef6ab62..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/SourceStatus.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Object containing source crawl status information. */ -public class SourceStatus extends GenericModel { - - /** - * The current status of the source crawl for this collection. This field returns `not_configured` - * if the default configuration for this source does not have a **source** object defined. - * - *

- `running` indicates that a crawl to fetch more documents is in progress. - `complete` - * indicates that the crawl has completed with no errors. - `queued` indicates that the crawl has - * been paused by the system and will automatically restart when possible. - `unknown` indicates - * that an unidentified error has occured in the service. - */ - public interface Status { - /** running. */ - String RUNNING = "running"; - /** complete. */ - String COMPLETE = "complete"; - /** not_configured. */ - String NOT_CONFIGURED = "not_configured"; - /** queued. */ - String QUEUED = "queued"; - /** unknown. */ - String UNKNOWN = "unknown"; - } - - protected String status; - - @SerializedName("next_crawl") - protected Date nextCrawl; - - protected SourceStatus() {} - - /** - * Gets the status. - * - *

The current status of the source crawl for this collection. This field returns - * `not_configured` if the default configuration for this source does not have a **source** object - * defined. - * - *

- `running` indicates that a crawl to fetch more documents is in progress. - `complete` - * indicates that the crawl has completed with no errors. - `queued` indicates that the crawl has - * been paused by the system and will automatically restart when possible. - `unknown` indicates - * that an unidentified error has occured in the service. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the nextCrawl. - * - *

Date in `RFC 3339` format indicating the time of the next crawl attempt. - * - * @return the nextCrawl - */ - public Date getNextCrawl() { - return nextCrawl; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/StatusDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/StatusDetails.java deleted file mode 100644 index 9dd5ad5702..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/StatusDetails.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2021, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object that contains details about the status of the authentication process. */ -public class StatusDetails extends GenericModel { - - protected Boolean authenticated; - - @SerializedName("error_message") - protected String errorMessage; - - /** Builder. */ - public static class Builder { - private Boolean authenticated; - private String errorMessage; - - /** - * Instantiates a new Builder from an existing StatusDetails instance. - * - * @param statusDetails the instance to initialize the Builder with - */ - private Builder(StatusDetails statusDetails) { - this.authenticated = statusDetails.authenticated; - this.errorMessage = statusDetails.errorMessage; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a StatusDetails. - * - * @return the new StatusDetails instance - */ - public StatusDetails build() { - return new StatusDetails(this); - } - - /** - * Set the authenticated. - * - * @param authenticated the authenticated - * @return the StatusDetails builder - */ - public Builder authenticated(Boolean authenticated) { - this.authenticated = authenticated; - return this; - } - - /** - * Set the errorMessage. - * - * @param errorMessage the errorMessage - * @return the StatusDetails builder - */ - public Builder errorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - } - - protected StatusDetails() {} - - protected StatusDetails(Builder builder) { - authenticated = builder.authenticated; - errorMessage = builder.errorMessage; - } - - /** - * New builder. - * - * @return a StatusDetails builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the authenticated. - * - *

Indicates whether the credential is accepted by the target data source. - * - * @return the authenticated - */ - public Boolean authenticated() { - return authenticated; - } - - /** - * Gets the errorMessage. - * - *

If `authenticated` is `false`, a message describes why authentication is unsuccessful. - * - * @return the errorMessage - */ - public String errorMessage() { - return errorMessage; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictRule.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictRule.java deleted file mode 100644 index 0533d82f96..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictRule.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** An object defining a single tokenizaion rule. */ -public class TokenDictRule extends GenericModel { - - protected String text; - protected List tokens; - protected List readings; - - @SerializedName("part_of_speech") - protected String partOfSpeech; - - /** Builder. */ - public static class Builder { - private String text; - private List tokens; - private List readings; - private String partOfSpeech; - - /** - * Instantiates a new Builder from an existing TokenDictRule instance. - * - * @param tokenDictRule the instance to initialize the Builder with - */ - private Builder(TokenDictRule tokenDictRule) { - this.text = tokenDictRule.text; - this.tokens = tokenDictRule.tokens; - this.readings = tokenDictRule.readings; - this.partOfSpeech = tokenDictRule.partOfSpeech; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param text the text - * @param tokens the tokens - * @param partOfSpeech the partOfSpeech - */ - public Builder(String text, List tokens, String partOfSpeech) { - this.text = text; - this.tokens = tokens; - this.partOfSpeech = partOfSpeech; - } - - /** - * Builds a TokenDictRule. - * - * @return the new TokenDictRule instance - */ - public TokenDictRule build() { - return new TokenDictRule(this); - } - - /** - * Adds a new element to tokens. - * - * @param tokens the new element to be added - * @return the TokenDictRule builder - */ - public Builder addTokens(String tokens) { - com.ibm.cloud.sdk.core.util.Validator.notNull(tokens, "tokens cannot be null"); - if (this.tokens == null) { - this.tokens = new ArrayList(); - } - this.tokens.add(tokens); - return this; - } - - /** - * Adds a new element to readings. - * - * @param readings the new element to be added - * @return the TokenDictRule builder - */ - public Builder addReadings(String readings) { - com.ibm.cloud.sdk.core.util.Validator.notNull(readings, "readings cannot be null"); - if (this.readings == null) { - this.readings = new ArrayList(); - } - this.readings.add(readings); - return this; - } - - /** - * Set the text. - * - * @param text the text - * @return the TokenDictRule builder - */ - public Builder text(String text) { - this.text = text; - return this; - } - - /** - * Set the tokens. Existing tokens will be replaced. - * - * @param tokens the tokens - * @return the TokenDictRule builder - */ - public Builder tokens(List tokens) { - this.tokens = tokens; - return this; - } - - /** - * Set the readings. Existing readings will be replaced. - * - * @param readings the readings - * @return the TokenDictRule builder - */ - public Builder readings(List readings) { - this.readings = readings; - return this; - } - - /** - * Set the partOfSpeech. - * - * @param partOfSpeech the partOfSpeech - * @return the TokenDictRule builder - */ - public Builder partOfSpeech(String partOfSpeech) { - this.partOfSpeech = partOfSpeech; - return this; - } - } - - protected TokenDictRule() {} - - protected TokenDictRule(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text, "text cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.tokens, "tokens cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.partOfSpeech, "partOfSpeech cannot be null"); - text = builder.text; - tokens = builder.tokens; - readings = builder.readings; - partOfSpeech = builder.partOfSpeech; - } - - /** - * New builder. - * - * @return a TokenDictRule builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the text. - * - *

The string to tokenize. - * - * @return the text - */ - public String text() { - return text; - } - - /** - * Gets the tokens. - * - *

Array of tokens that the `text` field is split into when found. - * - * @return the tokens - */ - public List tokens() { - return tokens; - } - - /** - * Gets the readings. - * - *

Array of tokens that represent the content of the `text` field in an alternate character - * set. - * - * @return the readings - */ - public List readings() { - return readings; - } - - /** - * Gets the partOfSpeech. - * - *

The part of speech that the `text` string belongs to. For example `noun`. Custom parts of - * speech can be specified. - * - * @return the partOfSpeech - */ - public String partOfSpeech() { - return partOfSpeech; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponse.java deleted file mode 100644 index e974870858..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Object describing the current status of the wordlist. */ -public class TokenDictStatusResponse extends GenericModel { - - /** Current wordlist status for the specified collection. */ - public interface Status { - /** active. */ - String ACTIVE = "active"; - /** pending. */ - String PENDING = "pending"; - /** not found. */ - String NOT_FOUND = "not found"; - } - - protected String status; - protected String type; - - protected TokenDictStatusResponse() {} - - /** - * Gets the status. - * - *

Current wordlist status for the specified collection. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the type. - * - *

The type for this wordlist. Can be `tokenization_dictionary` or `stopwords`. - * - * @return the type - */ - public String getType() { - return type; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TopHitsResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TopHitsResults.java deleted file mode 100644 index 4f3147d3cf..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TopHitsResults.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Top hit information for this query. */ -public class TopHitsResults extends GenericModel { - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List hits; - - /** - * Gets the matchingResults. - * - *

Number of matching results. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the hits. - * - *

Top results returned by the aggregation. - * - * @return the hits - */ - public List getHits() { - return hits; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingDataSet.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingDataSet.java deleted file mode 100644 index 65b9f94e15..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingDataSet.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Training information for a specific collection. */ -public class TrainingDataSet extends GenericModel { - - @SerializedName("environment_id") - protected String environmentId; - - @SerializedName("collection_id") - protected String collectionId; - - protected List queries; - - protected TrainingDataSet() {} - - /** - * Gets the environmentId. - * - *

The environment id associated with this training data set. - * - * @return the environmentId - */ - public String getEnvironmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The collection id associated with this training data set. - * - * @return the collectionId - */ - public String getCollectionId() { - return collectionId; - } - - /** - * Gets the queries. - * - *

Array of training queries. At least 50 queries are required for training to begin. A maximum - * of 10,000 queries are returned. - * - * @return the queries - */ - public List getQueries() { - return queries; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExample.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExample.java deleted file mode 100644 index 1de799911c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExample.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Training example details. */ -public class TrainingExample extends GenericModel { - - @SerializedName("document_id") - protected String documentId; - - @SerializedName("cross_reference") - protected String crossReference; - - protected Long relevance; - - /** Builder. */ - public static class Builder { - private String documentId; - private String crossReference; - private Long relevance; - - /** - * Instantiates a new Builder from an existing TrainingExample instance. - * - * @param trainingExample the instance to initialize the Builder with - */ - private Builder(TrainingExample trainingExample) { - this.documentId = trainingExample.documentId; - this.crossReference = trainingExample.crossReference; - this.relevance = trainingExample.relevance; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a TrainingExample. - * - * @return the new TrainingExample instance - */ - public TrainingExample build() { - return new TrainingExample(this); - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the TrainingExample builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Set the crossReference. - * - * @param crossReference the crossReference - * @return the TrainingExample builder - */ - public Builder crossReference(String crossReference) { - this.crossReference = crossReference; - return this; - } - - /** - * Set the relevance. - * - * @param relevance the relevance - * @return the TrainingExample builder - */ - public Builder relevance(long relevance) { - this.relevance = relevance; - return this; - } - } - - protected TrainingExample() {} - - protected TrainingExample(Builder builder) { - documentId = builder.documentId; - crossReference = builder.crossReference; - relevance = builder.relevance; - } - - /** - * New builder. - * - * @return a TrainingExample builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the documentId. - * - *

The document ID associated with this training example. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } - - /** - * Gets the crossReference. - * - *

The cross reference associated with this training example. - * - * @return the crossReference - */ - public String crossReference() { - return crossReference; - } - - /** - * Gets the relevance. - * - *

The relevance of the training example. - * - * @return the relevance - */ - public Long relevance() { - return relevance; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExampleList.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExampleList.java deleted file mode 100644 index c86eeebecf..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingExampleList.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Object containing an array of training examples. */ -public class TrainingExampleList extends GenericModel { - - protected List examples; - - protected TrainingExampleList() {} - - /** - * Gets the examples. - * - *

Array of training examples. - * - * @return the examples - */ - public List getExamples() { - return examples; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingQuery.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingQuery.java deleted file mode 100644 index ec7c32e5ff..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingQuery.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** Training query details. */ -public class TrainingQuery extends GenericModel { - - @SerializedName("query_id") - protected String queryId; - - @SerializedName("natural_language_query") - protected String naturalLanguageQuery; - - protected String filter; - protected List examples; - - protected TrainingQuery() {} - - /** - * Gets the queryId. - * - *

The query ID associated with the training query. - * - * @return the queryId - */ - public String getQueryId() { - return queryId; - } - - /** - * Gets the naturalLanguageQuery. - * - *

The natural text query for the training query. - * - * @return the naturalLanguageQuery - */ - public String getNaturalLanguageQuery() { - return naturalLanguageQuery; - } - - /** - * Gets the filter. - * - *

The filter used on the collection before the **natural_language_query** is applied. - * - * @return the filter - */ - public String getFilter() { - return filter; - } - - /** - * Gets the examples. - * - *

Array of training examples. - * - * @return the examples - */ - public List getExamples() { - return examples; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingStatus.java deleted file mode 100644 index ceea5c0f36..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/TrainingStatus.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Training status details. */ -public class TrainingStatus extends GenericModel { - - @SerializedName("total_examples") - protected Long totalExamples; - - protected Boolean available; - protected Boolean processing; - - @SerializedName("minimum_queries_added") - protected Boolean minimumQueriesAdded; - - @SerializedName("minimum_examples_added") - protected Boolean minimumExamplesAdded; - - @SerializedName("sufficient_label_diversity") - protected Boolean sufficientLabelDiversity; - - protected Long notices; - - @SerializedName("successfully_trained") - protected Date successfullyTrained; - - @SerializedName("data_updated") - protected Date dataUpdated; - - protected TrainingStatus() {} - - /** - * Gets the totalExamples. - * - *

The total number of training examples uploaded to this collection. - * - * @return the totalExamples - */ - public Long getTotalExamples() { - return totalExamples; - } - - /** - * Gets the available. - * - *

When `true`, the collection has been successfully trained. - * - * @return the available - */ - public Boolean isAvailable() { - return available; - } - - /** - * Gets the processing. - * - *

When `true`, the collection is currently processing training. - * - * @return the processing - */ - public Boolean isProcessing() { - return processing; - } - - /** - * Gets the minimumQueriesAdded. - * - *

When `true`, the collection has a sufficent amount of queries added for training to occur. - * - * @return the minimumQueriesAdded - */ - public Boolean isMinimumQueriesAdded() { - return minimumQueriesAdded; - } - - /** - * Gets the minimumExamplesAdded. - * - *

When `true`, the collection has a sufficent amount of examples added for training to occur. - * - * @return the minimumExamplesAdded - */ - public Boolean isMinimumExamplesAdded() { - return minimumExamplesAdded; - } - - /** - * Gets the sufficientLabelDiversity. - * - *

When `true`, the collection has a sufficent amount of diversity in labeled results for - * training to occur. - * - * @return the sufficientLabelDiversity - */ - public Boolean isSufficientLabelDiversity() { - return sufficientLabelDiversity; - } - - /** - * Gets the notices. - * - *

The number of notices associated with this data set. - * - * @return the notices - */ - public Long getNotices() { - return notices; - } - - /** - * Gets the successfullyTrained. - * - *

The timestamp of when the collection was successfully trained. - * - * @return the successfullyTrained - */ - public Date getSuccessfullyTrained() { - return successfullyTrained; - } - - /** - * Gets the dataUpdated. - * - *

The timestamp of when the data was uploaded. - * - * @return the dataUpdated - */ - public Date getDataUpdated() { - return dataUpdated; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptions.java deleted file mode 100644 index 2f636c11bd..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptions.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The updateCollection options. */ -public class UpdateCollectionOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String name; - protected String description; - protected String configurationId; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String name; - private String description; - private String configurationId; - - /** - * Instantiates a new Builder from an existing UpdateCollectionOptions instance. - * - * @param updateCollectionOptions the instance to initialize the Builder with - */ - private Builder(UpdateCollectionOptions updateCollectionOptions) { - this.environmentId = updateCollectionOptions.environmentId; - this.collectionId = updateCollectionOptions.collectionId; - this.name = updateCollectionOptions.name; - this.description = updateCollectionOptions.description; - this.configurationId = updateCollectionOptions.configurationId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param name the name - */ - public Builder(String environmentId, String collectionId, String name) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.name = name; - } - - /** - * Builds a UpdateCollectionOptions. - * - * @return the new UpdateCollectionOptions instance - */ - public UpdateCollectionOptions build() { - return new UpdateCollectionOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateCollectionOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the UpdateCollectionOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the UpdateCollectionOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the UpdateCollectionOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the configurationId. - * - * @param configurationId the configurationId - * @return the UpdateCollectionOptions builder - */ - public Builder configurationId(String configurationId) { - this.configurationId = configurationId; - return this; - } - } - - protected UpdateCollectionOptions() {} - - protected UpdateCollectionOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - name = builder.name; - description = builder.description; - configurationId = builder.configurationId; - } - - /** - * New builder. - * - * @return a UpdateCollectionOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the name. - * - *

The name of the collection. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

A description of the collection. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the configurationId. - * - *

The ID of the configuration in which the collection is to be updated. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptions.java deleted file mode 100644 index 93c343f47f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptions.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The updateConfiguration options. */ -public class UpdateConfigurationOptions extends GenericModel { - - protected String environmentId; - protected String configurationId; - protected String name; - protected String description; - protected Conversions conversions; - protected List enrichments; - protected List normalizations; - protected Source source; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String configurationId; - private String name; - private String description; - private Conversions conversions; - private List enrichments; - private List normalizations; - private Source source; - - /** - * Instantiates a new Builder from an existing UpdateConfigurationOptions instance. - * - * @param updateConfigurationOptions the instance to initialize the Builder with - */ - private Builder(UpdateConfigurationOptions updateConfigurationOptions) { - this.environmentId = updateConfigurationOptions.environmentId; - this.configurationId = updateConfigurationOptions.configurationId; - this.name = updateConfigurationOptions.name; - this.description = updateConfigurationOptions.description; - this.conversions = updateConfigurationOptions.conversions; - this.enrichments = updateConfigurationOptions.enrichments; - this.normalizations = updateConfigurationOptions.normalizations; - this.source = updateConfigurationOptions.source; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param configurationId the configurationId - * @param name the name - */ - public Builder(String environmentId, String configurationId, String name) { - this.environmentId = environmentId; - this.configurationId = configurationId; - this.name = name; - } - - /** - * Builds a UpdateConfigurationOptions. - * - * @return the new UpdateConfigurationOptions instance - */ - public UpdateConfigurationOptions build() { - return new UpdateConfigurationOptions(this); - } - - /** - * Adds a new element to enrichments. - * - * @param enrichment the new element to be added - * @return the UpdateConfigurationOptions builder - */ - public Builder addEnrichment(Enrichment enrichment) { - com.ibm.cloud.sdk.core.util.Validator.notNull(enrichment, "enrichment cannot be null"); - if (this.enrichments == null) { - this.enrichments = new ArrayList(); - } - this.enrichments.add(enrichment); - return this; - } - - /** - * Adds a new element to normalizations. - * - * @param normalization the new element to be added - * @return the UpdateConfigurationOptions builder - */ - public Builder addNormalization(NormalizationOperation normalization) { - com.ibm.cloud.sdk.core.util.Validator.notNull(normalization, "normalization cannot be null"); - if (this.normalizations == null) { - this.normalizations = new ArrayList(); - } - this.normalizations.add(normalization); - return this; - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateConfigurationOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the configurationId. - * - * @param configurationId the configurationId - * @return the UpdateConfigurationOptions builder - */ - public Builder configurationId(String configurationId) { - this.configurationId = configurationId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the UpdateConfigurationOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the UpdateConfigurationOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the conversions. - * - * @param conversions the conversions - * @return the UpdateConfigurationOptions builder - */ - public Builder conversions(Conversions conversions) { - this.conversions = conversions; - return this; - } - - /** - * Set the enrichments. Existing enrichments will be replaced. - * - * @param enrichments the enrichments - * @return the UpdateConfigurationOptions builder - */ - public Builder enrichments(List enrichments) { - this.enrichments = enrichments; - return this; - } - - /** - * Set the normalizations. Existing normalizations will be replaced. - * - * @param normalizations the normalizations - * @return the UpdateConfigurationOptions builder - */ - public Builder normalizations(List normalizations) { - this.normalizations = normalizations; - return this; - } - - /** - * Set the source. - * - * @param source the source - * @return the UpdateConfigurationOptions builder - */ - public Builder source(Source source) { - this.source = source; - return this; - } - - /** - * Set the configuration. - * - * @param configuration the configuration - * @return the UpdateConfigurationOptions builder - */ - public Builder configuration(Configuration configuration) { - this.name = configuration.name(); - this.description = configuration.description(); - this.conversions = configuration.conversions(); - this.enrichments = configuration.enrichments(); - this.normalizations = configuration.normalizations(); - this.source = configuration.source(); - return this; - } - } - - protected UpdateConfigurationOptions() {} - - protected UpdateConfigurationOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.configurationId, "configurationId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name, "name cannot be null"); - environmentId = builder.environmentId; - configurationId = builder.configurationId; - name = builder.name; - description = builder.description; - conversions = builder.conversions; - enrichments = builder.enrichments; - normalizations = builder.normalizations; - source = builder.source; - } - - /** - * New builder. - * - * @return a UpdateConfigurationOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the configurationId. - * - *

The ID of the configuration. - * - * @return the configurationId - */ - public String configurationId() { - return configurationId; - } - - /** - * Gets the name. - * - *

The name of the configuration. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

The description of the configuration, if available. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the conversions. - * - *

Document conversion settings. - * - * @return the conversions - */ - public Conversions conversions() { - return conversions; - } - - /** - * Gets the enrichments. - * - *

An array of document enrichment settings for the configuration. - * - * @return the enrichments - */ - public List enrichments() { - return enrichments; - } - - /** - * Gets the normalizations. - * - *

Defines operations that can be used to transform the final output JSON into a normalized - * form. Operations are executed in the order that they appear in the array. - * - * @return the normalizations - */ - public List normalizations() { - return normalizations; - } - - /** - * Gets the source. - * - *

Object containing source parameters for the configuration. - * - * @return the source - */ - public Source source() { - return source; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptions.java deleted file mode 100644 index 02c906333e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptions.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The updateCredentials options. */ -public class UpdateCredentialsOptions extends GenericModel { - - /** - * The source that this credentials object connects to. - `box` indicates the credentials are used - * to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to - * connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - */ - public interface SourceType { - /** box. */ - String BOX = "box"; - /** salesforce. */ - String SALESFORCE = "salesforce"; - /** sharepoint. */ - String SHAREPOINT = "sharepoint"; - /** web_crawl. */ - String WEB_CRAWL = "web_crawl"; - /** cloud_object_storage. */ - String CLOUD_OBJECT_STORAGE = "cloud_object_storage"; - } - - protected String environmentId; - protected String credentialId; - protected String sourceType; - protected CredentialDetails credentialDetails; - protected StatusDetails status; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String credentialId; - private String sourceType; - private CredentialDetails credentialDetails; - private StatusDetails status; - - /** - * Instantiates a new Builder from an existing UpdateCredentialsOptions instance. - * - * @param updateCredentialsOptions the instance to initialize the Builder with - */ - private Builder(UpdateCredentialsOptions updateCredentialsOptions) { - this.environmentId = updateCredentialsOptions.environmentId; - this.credentialId = updateCredentialsOptions.credentialId; - this.sourceType = updateCredentialsOptions.sourceType; - this.credentialDetails = updateCredentialsOptions.credentialDetails; - this.status = updateCredentialsOptions.status; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param credentialId the credentialId - */ - public Builder(String environmentId, String credentialId) { - this.environmentId = environmentId; - this.credentialId = credentialId; - } - - /** - * Builds a UpdateCredentialsOptions. - * - * @return the new UpdateCredentialsOptions instance - */ - public UpdateCredentialsOptions build() { - return new UpdateCredentialsOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateCredentialsOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the credentialId. - * - * @param credentialId the credentialId - * @return the UpdateCredentialsOptions builder - */ - public Builder credentialId(String credentialId) { - this.credentialId = credentialId; - return this; - } - - /** - * Set the sourceType. - * - * @param sourceType the sourceType - * @return the UpdateCredentialsOptions builder - */ - public Builder sourceType(String sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Set the credentialDetails. - * - * @param credentialDetails the credentialDetails - * @return the UpdateCredentialsOptions builder - */ - public Builder credentialDetails(CredentialDetails credentialDetails) { - this.credentialDetails = credentialDetails; - return this; - } - - /** - * Set the status. - * - * @param status the status - * @return the UpdateCredentialsOptions builder - */ - public Builder status(StatusDetails status) { - this.status = status; - return this; - } - - /** - * Set the credentials. - * - * @param credentials the credentials - * @return the UpdateCredentialsOptions builder - */ - public Builder credentials(Credentials credentials) { - this.sourceType = credentials.sourceType(); - this.credentialDetails = credentials.credentialDetails(); - this.status = credentials.status(); - return this; - } - } - - protected UpdateCredentialsOptions() {} - - protected UpdateCredentialsOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.credentialId, "credentialId cannot be empty"); - environmentId = builder.environmentId; - credentialId = builder.credentialId; - sourceType = builder.sourceType; - credentialDetails = builder.credentialDetails; - status = builder.status; - } - - /** - * New builder. - * - * @return a UpdateCredentialsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the credentialId. - * - *

The unique identifier for a set of source credentials. - * - * @return the credentialId - */ - public String credentialId() { - return credentialId; - } - - /** - * Gets the sourceType. - * - *

The source that this credentials object connects to. - `box` indicates the credentials are - * used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are - * used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to - * Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web - * crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud - * Object Store. - * - * @return the sourceType - */ - public String sourceType() { - return sourceType; - } - - /** - * Gets the credentialDetails. - * - *

Object containing details of the stored credentials. - * - *

Obtain credentials for your source from the administrator of the source. - * - * @return the credentialDetails - */ - public CredentialDetails credentialDetails() { - return credentialDetails; - } - - /** - * Gets the status. - * - *

Object that contains details about the status of the authentication process. - * - * @return the status - */ - public StatusDetails status() { - return status; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptions.java deleted file mode 100644 index e6bda70ece..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptions.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** The updateDocument options. */ -public class UpdateDocumentOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String documentId; - protected InputStream file; - protected String filename; - protected String fileContentType; - protected String metadata; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String documentId; - private InputStream file; - private String filename; - private String fileContentType; - private String metadata; - - /** - * Instantiates a new Builder from an existing UpdateDocumentOptions instance. - * - * @param updateDocumentOptions the instance to initialize the Builder with - */ - private Builder(UpdateDocumentOptions updateDocumentOptions) { - this.environmentId = updateDocumentOptions.environmentId; - this.collectionId = updateDocumentOptions.collectionId; - this.documentId = updateDocumentOptions.documentId; - this.file = updateDocumentOptions.file; - this.filename = updateDocumentOptions.filename; - this.fileContentType = updateDocumentOptions.fileContentType; - this.metadata = updateDocumentOptions.metadata; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param documentId the documentId - */ - public Builder(String environmentId, String collectionId, String documentId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.documentId = documentId; - } - - /** - * Builds a UpdateDocumentOptions. - * - * @return the new UpdateDocumentOptions instance - */ - public UpdateDocumentOptions build() { - return new UpdateDocumentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateDocumentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the UpdateDocumentOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the UpdateDocumentOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Set the file. - * - * @param file the file - * @return the UpdateDocumentOptions builder - */ - public Builder file(InputStream file) { - this.file = file; - return this; - } - - /** - * Set the filename. - * - * @param filename the filename - * @return the UpdateDocumentOptions builder - */ - public Builder filename(String filename) { - this.filename = filename; - return this; - } - - /** - * Set the fileContentType. - * - * @param fileContentType the fileContentType - * @return the UpdateDocumentOptions builder - */ - public Builder fileContentType(String fileContentType) { - this.fileContentType = fileContentType; - return this; - } - - /** - * Set the metadata. - * - * @param metadata the metadata - * @return the UpdateDocumentOptions builder - */ - public Builder metadata(String metadata) { - this.metadata = metadata; - return this; - } - - /** - * Set the file. - * - * @param file the file - * @return the UpdateDocumentOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder file(File file) throws FileNotFoundException { - this.file = new FileInputStream(file); - this.filename = file.getName(); - return this; - } - } - - protected UpdateDocumentOptions() {} - - protected UpdateDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.isTrue( - (builder.file == null) || (builder.filename != null), - "filename cannot be null if file is not null."); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - documentId = builder.documentId; - file = builder.file; - filename = builder.filename; - fileContentType = builder.fileContentType; - metadata = builder.metadata; - } - - /** - * New builder. - * - * @return a UpdateDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the documentId. - * - *

The ID of the document. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } - - /** - * Gets the file. - * - *

The content of the document to ingest. The maximum supported file size when adding a file to - * a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 - * megabyte. Files larger than the supported size are rejected. - * - * @return the file - */ - public InputStream file() { - return file; - } - - /** - * Gets the filename. - * - *

The filename for file. - * - * @return the filename - */ - public String filename() { - return filename; - } - - /** - * Gets the fileContentType. - * - *

The content type of file. Values for this parameter can be obtained from the HttpMediaType - * class. - * - * @return the fileContentType - */ - public String fileContentType() { - return fileContentType; - } - - /** - * Gets the metadata. - * - *

The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are - * rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. - * - * @return the metadata - */ - public String metadata() { - return metadata; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptions.java deleted file mode 100644 index 930d02e74f..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptions.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The updateEnvironment options. */ -public class UpdateEnvironmentOptions extends GenericModel { - - /** - * Size to change the environment to. **Note:** Lite plan users cannot change the environment - * size. - */ - public interface Size { - /** S. */ - String S = "S"; - /** MS. */ - String MS = "MS"; - /** M. */ - String M = "M"; - /** ML. */ - String ML = "ML"; - /** L. */ - String L = "L"; - /** XL. */ - String XL = "XL"; - /** XXL. */ - String XXL = "XXL"; - /** XXXL. */ - String XXXL = "XXXL"; - } - - protected String environmentId; - protected String name; - protected String description; - protected String size; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String name; - private String description; - private String size; - - /** - * Instantiates a new Builder from an existing UpdateEnvironmentOptions instance. - * - * @param updateEnvironmentOptions the instance to initialize the Builder with - */ - private Builder(UpdateEnvironmentOptions updateEnvironmentOptions) { - this.environmentId = updateEnvironmentOptions.environmentId; - this.name = updateEnvironmentOptions.name; - this.description = updateEnvironmentOptions.description; - this.size = updateEnvironmentOptions.size; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - */ - public Builder(String environmentId) { - this.environmentId = environmentId; - } - - /** - * Builds a UpdateEnvironmentOptions. - * - * @return the new UpdateEnvironmentOptions instance - */ - public UpdateEnvironmentOptions build() { - return new UpdateEnvironmentOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateEnvironmentOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the UpdateEnvironmentOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the description. - * - * @param description the description - * @return the UpdateEnvironmentOptions builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Set the size. - * - * @param size the size - * @return the UpdateEnvironmentOptions builder - */ - public Builder size(String size) { - this.size = size; - return this; - } - } - - protected UpdateEnvironmentOptions() {} - - protected UpdateEnvironmentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - environmentId = builder.environmentId; - name = builder.name; - description = builder.description; - size = builder.size; - } - - /** - * New builder. - * - * @return a UpdateEnvironmentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the name. - * - *

Name that identifies the environment. - * - * @return the name - */ - public String name() { - return name; - } - - /** - * Gets the description. - * - *

Description of the environment. - * - * @return the description - */ - public String description() { - return description; - } - - /** - * Gets the size. - * - *

Size to change the environment to. **Note:** Lite plan users cannot change the environment - * size. - * - * @return the size - */ - public String size() { - return size; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptions.java deleted file mode 100644 index a2f9d197b9..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptions.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The updateTrainingExample options. */ -public class UpdateTrainingExampleOptions extends GenericModel { - - protected String environmentId; - protected String collectionId; - protected String queryId; - protected String exampleId; - protected String crossReference; - protected Long relevance; - - /** Builder. */ - public static class Builder { - private String environmentId; - private String collectionId; - private String queryId; - private String exampleId; - private String crossReference; - private Long relevance; - - /** - * Instantiates a new Builder from an existing UpdateTrainingExampleOptions instance. - * - * @param updateTrainingExampleOptions the instance to initialize the Builder with - */ - private Builder(UpdateTrainingExampleOptions updateTrainingExampleOptions) { - this.environmentId = updateTrainingExampleOptions.environmentId; - this.collectionId = updateTrainingExampleOptions.collectionId; - this.queryId = updateTrainingExampleOptions.queryId; - this.exampleId = updateTrainingExampleOptions.exampleId; - this.crossReference = updateTrainingExampleOptions.crossReference; - this.relevance = updateTrainingExampleOptions.relevance; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param environmentId the environmentId - * @param collectionId the collectionId - * @param queryId the queryId - * @param exampleId the exampleId - */ - public Builder(String environmentId, String collectionId, String queryId, String exampleId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.queryId = queryId; - this.exampleId = exampleId; - } - - /** - * Builds a UpdateTrainingExampleOptions. - * - * @return the new UpdateTrainingExampleOptions instance - */ - public UpdateTrainingExampleOptions build() { - return new UpdateTrainingExampleOptions(this); - } - - /** - * Set the environmentId. - * - * @param environmentId the environmentId - * @return the UpdateTrainingExampleOptions builder - */ - public Builder environmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Set the collectionId. - * - * @param collectionId the collectionId - * @return the UpdateTrainingExampleOptions builder - */ - public Builder collectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Set the queryId. - * - * @param queryId the queryId - * @return the UpdateTrainingExampleOptions builder - */ - public Builder queryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Set the exampleId. - * - * @param exampleId the exampleId - * @return the UpdateTrainingExampleOptions builder - */ - public Builder exampleId(String exampleId) { - this.exampleId = exampleId; - return this; - } - - /** - * Set the crossReference. - * - * @param crossReference the crossReference - * @return the UpdateTrainingExampleOptions builder - */ - public Builder crossReference(String crossReference) { - this.crossReference = crossReference; - return this; - } - - /** - * Set the relevance. - * - * @param relevance the relevance - * @return the UpdateTrainingExampleOptions builder - */ - public Builder relevance(long relevance) { - this.relevance = relevance; - return this; - } - } - - protected UpdateTrainingExampleOptions() {} - - protected UpdateTrainingExampleOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.environmentId, "environmentId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.collectionId, "collectionId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.queryId, "queryId cannot be empty"); - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.exampleId, "exampleId cannot be empty"); - environmentId = builder.environmentId; - collectionId = builder.collectionId; - queryId = builder.queryId; - exampleId = builder.exampleId; - crossReference = builder.crossReference; - relevance = builder.relevance; - } - - /** - * New builder. - * - * @return a UpdateTrainingExampleOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the environmentId. - * - *

The ID of the environment. - * - * @return the environmentId - */ - public String environmentId() { - return environmentId; - } - - /** - * Gets the collectionId. - * - *

The ID of the collection. - * - * @return the collectionId - */ - public String collectionId() { - return collectionId; - } - - /** - * Gets the queryId. - * - *

The ID of the query used for training. - * - * @return the queryId - */ - public String queryId() { - return queryId; - } - - /** - * Gets the exampleId. - * - *

The ID of the document as it is indexed. - * - * @return the exampleId - */ - public String exampleId() { - return exampleId; - } - - /** - * Gets the crossReference. - * - *

The example to add. - * - * @return the crossReference - */ - public String crossReference() { - return crossReference; - } - - /** - * Gets the relevance. - * - *

The relevance value for this example. - * - * @return the relevance - */ - public Long relevance() { - return relevance; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordHeadingDetection.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordHeadingDetection.java deleted file mode 100644 index bf3d38a458..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordHeadingDetection.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Object containing heading detection conversion settings for Microsoft Word documents. */ -public class WordHeadingDetection extends GenericModel { - - protected List fonts; - protected List styles; - - /** Builder. */ - public static class Builder { - private List fonts; - private List styles; - - /** - * Instantiates a new Builder from an existing WordHeadingDetection instance. - * - * @param wordHeadingDetection the instance to initialize the Builder with - */ - private Builder(WordHeadingDetection wordHeadingDetection) { - this.fonts = wordHeadingDetection.fonts; - this.styles = wordHeadingDetection.styles; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a WordHeadingDetection. - * - * @return the new WordHeadingDetection instance - */ - public WordHeadingDetection build() { - return new WordHeadingDetection(this); - } - - /** - * Adds a new element to fonts. - * - * @param fontSetting the new element to be added - * @return the WordHeadingDetection builder - */ - public Builder addFontSetting(FontSetting fontSetting) { - com.ibm.cloud.sdk.core.util.Validator.notNull(fontSetting, "fontSetting cannot be null"); - if (this.fonts == null) { - this.fonts = new ArrayList(); - } - this.fonts.add(fontSetting); - return this; - } - - /** - * Adds a new element to styles. - * - * @param wordStyle the new element to be added - * @return the WordHeadingDetection builder - */ - public Builder addWordStyle(WordStyle wordStyle) { - com.ibm.cloud.sdk.core.util.Validator.notNull(wordStyle, "wordStyle cannot be null"); - if (this.styles == null) { - this.styles = new ArrayList(); - } - this.styles.add(wordStyle); - return this; - } - - /** - * Set the fonts. Existing fonts will be replaced. - * - * @param fonts the fonts - * @return the WordHeadingDetection builder - */ - public Builder fonts(List fonts) { - this.fonts = fonts; - return this; - } - - /** - * Set the styles. Existing styles will be replaced. - * - * @param styles the styles - * @return the WordHeadingDetection builder - */ - public Builder styles(List styles) { - this.styles = styles; - return this; - } - } - - protected WordHeadingDetection() {} - - protected WordHeadingDetection(Builder builder) { - fonts = builder.fonts; - styles = builder.styles; - } - - /** - * New builder. - * - * @return a WordHeadingDetection builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the fonts. - * - *

Array of font matching configurations. - * - * @return the fonts - */ - public List fonts() { - return fonts; - } - - /** - * Gets the styles. - * - *

Array of Microsoft Word styles to convert. - * - * @return the styles - */ - public List styles() { - return styles; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordSettings.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordSettings.java deleted file mode 100644 index 858ae9a60c..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordSettings.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** A list of Word conversion settings. */ -public class WordSettings extends GenericModel { - - protected WordHeadingDetection heading; - - /** Builder. */ - public static class Builder { - private WordHeadingDetection heading; - - /** - * Instantiates a new Builder from an existing WordSettings instance. - * - * @param wordSettings the instance to initialize the Builder with - */ - private Builder(WordSettings wordSettings) { - this.heading = wordSettings.heading; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a WordSettings. - * - * @return the new WordSettings instance - */ - public WordSettings build() { - return new WordSettings(this); - } - - /** - * Set the heading. - * - * @param heading the heading - * @return the WordSettings builder - */ - public Builder heading(WordHeadingDetection heading) { - this.heading = heading; - return this; - } - } - - protected WordSettings() {} - - protected WordSettings(Builder builder) { - heading = builder.heading; - } - - /** - * New builder. - * - * @return a WordSettings builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the heading. - * - *

Object containing heading detection conversion settings for Microsoft Word documents. - * - * @return the heading - */ - public WordHeadingDetection heading() { - return heading; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordStyle.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordStyle.java deleted file mode 100644 index 6499462293..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/WordStyle.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Microsoft Word styles to convert into a specified HTML head level. */ -public class WordStyle extends GenericModel { - - protected Long level; - protected List names; - - /** Builder. */ - public static class Builder { - private Long level; - private List names; - - /** - * Instantiates a new Builder from an existing WordStyle instance. - * - * @param wordStyle the instance to initialize the Builder with - */ - private Builder(WordStyle wordStyle) { - this.level = wordStyle.level; - this.names = wordStyle.names; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a WordStyle. - * - * @return the new WordStyle instance - */ - public WordStyle build() { - return new WordStyle(this); - } - - /** - * Adds a new element to names. - * - * @param names the new element to be added - * @return the WordStyle builder - */ - public Builder addNames(String names) { - com.ibm.cloud.sdk.core.util.Validator.notNull(names, "names cannot be null"); - if (this.names == null) { - this.names = new ArrayList(); - } - this.names.add(names); - return this; - } - - /** - * Set the level. - * - * @param level the level - * @return the WordStyle builder - */ - public Builder level(long level) { - this.level = level; - return this; - } - - /** - * Set the names. Existing names will be replaced. - * - * @param names the names - * @return the WordStyle builder - */ - public Builder names(List names) { - this.names = names; - return this; - } - } - - protected WordStyle() {} - - protected WordStyle(Builder builder) { - level = builder.level; - names = builder.names; - } - - /** - * New builder. - * - * @return a WordStyle builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the level. - * - *

HTML head level that content matching this style is tagged with. - * - * @return the level - */ - public Long level() { - return level; - } - - /** - * Gets the names. - * - *

Array of word style names to convert. - * - * @return the names - */ - public List names() { - return names; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/XPathPatterns.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/XPathPatterns.java deleted file mode 100644 index af4b0b123e..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/XPathPatterns.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** Object containing an array of XPaths. */ -public class XPathPatterns extends GenericModel { - - protected List xpaths; - - /** Builder. */ - public static class Builder { - private List xpaths; - - /** - * Instantiates a new Builder from an existing XPathPatterns instance. - * - * @param xPathPatterns the instance to initialize the Builder with - */ - private Builder(XPathPatterns xPathPatterns) { - this.xpaths = xPathPatterns.xpaths; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a XPathPatterns. - * - * @return the new XPathPatterns instance - */ - public XPathPatterns build() { - return new XPathPatterns(this); - } - - /** - * Adds a new element to xpaths. - * - * @param xpaths the new element to be added - * @return the XPathPatterns builder - */ - public Builder addXpaths(String xpaths) { - com.ibm.cloud.sdk.core.util.Validator.notNull(xpaths, "xpaths cannot be null"); - if (this.xpaths == null) { - this.xpaths = new ArrayList(); - } - this.xpaths.add(xpaths); - return this; - } - - /** - * Set the xpaths. Existing xpaths will be replaced. - * - * @param xpaths the xpaths - * @return the XPathPatterns builder - */ - public Builder xpaths(List xpaths) { - this.xpaths = xpaths; - return this; - } - } - - protected XPathPatterns() {} - - protected XPathPatterns(Builder builder) { - xpaths = builder.xpaths; - } - - /** - * New builder. - * - * @return a XPathPatterns builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the xpaths. - * - *

An array to XPaths. - * - * @return the xpaths - */ - public List xpaths() { - return xpaths; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/package-info.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/package-info.java deleted file mode 100644 index 7918da3fed..0000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v1/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -/** Discovery v1. */ -package com.ibm.watson.discovery.v1; diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java deleted file mode 100644 index b7a1039e87..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java +++ /dev/null @@ -1,2401 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; -import com.google.gson.internal.LazilyParsedNumber; -import com.ibm.cloud.sdk.core.http.HttpConfigOptions; -import com.ibm.cloud.sdk.core.http.HttpMediaType; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.BasicAuthenticator; -import com.ibm.cloud.sdk.core.security.BearerTokenAuthenticator; -import com.ibm.cloud.sdk.core.security.IamAuthenticator; -import com.ibm.cloud.sdk.core.service.exception.*; -import com.ibm.cloud.sdk.core.util.GsonSingleton; -import com.ibm.watson.common.RetryRunner; -import com.ibm.watson.common.WaitFor; -import com.ibm.watson.common.WatsonServiceTest; -import com.ibm.watson.discovery.query.AggregationType; -import com.ibm.watson.discovery.query.Operator; -import com.ibm.watson.discovery.v1.model.*; -import com.ibm.watson.discovery.v1.model.NormalizationOperation.Operation; -import java.awt.*; -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.TimeUnit; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** Integration tests for {@link Discovery}. */ -@RunWith(RetryRunner.class) -public class DiscoveryServiceIT extends WatsonServiceTest { - - private static final String DISCOVERY1_TEST_CONFIG_FILE = - "src/test/resources/discovery/v1/issue517.json"; - private static final String DISCOVERY2_TEST_CONFIG_FILE = - "src/test/resources/discovery/v1/issue518.json"; - private static final String PASSAGES_TEST_FILE_1 = - "src/test/resources/discovery/v1/passages_test_doc_1.json"; - private static final String PASSAGES_TEST_FILE_2 = - "src/test/resources/discovery/v1/passages_test_doc_2.json"; - private static final String STOPWORDS_TEST_FILE = "src/test/resources/discovery/v1/stopwords.txt"; - private static String environmentId; - private static String collectionId; - private Discovery discovery; - private String uniqueName; - - private Set configurationIds = new HashSet<>(); - private Set collectionIds = new HashSet<>(); - - private static DiscoveryServiceIT dummyTest; - - /** - * Setup class. - * - * @throws Exception the exception - */ - @BeforeClass - public static void setupClass() throws Exception { - // get the properties - dummyTest = new DiscoveryServiceIT(); - String apiKey = System.getenv("DISCOVERY_APIKEY"); - - if (apiKey == null) { - apiKey = dummyTest.getProperty("discovery.apikey"); - } - - assertNotNull( - "DISCOVERY_APIKEY is not defined and config.properties doesn't have valid credentials.", - apiKey); - - dummyTest.setup(); - - ListEnvironmentsOptions listOptions = new ListEnvironmentsOptions.Builder().build(); - ListEnvironmentsResponse listResponse = - dummyTest.discovery.listEnvironments(listOptions).execute().getResult(); - for (Environment environment : listResponse.getEnvironments()) { - // look for an existing environment that isn't read only - if (!environment.isReadOnly()) { - environmentId = environment.getEnvironmentId(); - break; - } - } - - if (environmentId == null) { - // no environment found, create a new one (assuming we are a FREE plan) - String environmentName = "watson_developer_cloud_test_environment"; - CreateEnvironmentOptions createOptions = - new CreateEnvironmentOptions.Builder().name(environmentName).build(); - Environment createResponse = - dummyTest.discovery.createEnvironment(createOptions).execute().getResult(); - environmentId = createResponse.getEnvironmentId(); - WaitFor.Condition environmentReady = new EnvironmentReady(dummyTest.discovery, environmentId); - WaitFor.waitFor(environmentReady, 30, TimeUnit.SECONDS, 500); - } - - collectionId = dummyTest.setupTestDocuments(); - } - - /** - * Cleanup class. - * - * @throws Exception the exception - */ - @AfterClass - public static void cleanupClass() throws Exception { - dummyTest.cleanup(); - } - - /** - * Setup. - * - * @throws Exception the exception - */ - @Before - public void setup() throws Exception { - super.setUp(); - String apiKey = System.getenv("DISCOVERY_APIKEY"); - String serviceUrl = System.getenv("DISCOVERY_URL"); - - if (apiKey == null) { - apiKey = getProperty("discovery.apikey"); - serviceUrl = getProperty("discovery.url"); - } - - Authenticator authenticator = new IamAuthenticator(apiKey); - discovery = new Discovery("2019-04-30", authenticator); - discovery.setServiceUrl(serviceUrl); - discovery.setDefaultHeaders(getDefaultHeaders()); - - uniqueName = UUID.randomUUID().toString(); - } - - /** Cleanup. */ - public void cleanup() { - for (String collectionId : collectionIds) { - DeleteCollectionOptions deleteOptions = - new DeleteCollectionOptions.Builder(environmentId, collectionId).build(); - try { - discovery.deleteCollection(deleteOptions).execute(); - } catch (NotFoundException ex) { - // Ignore this failure - just print msg - // System.out.println("deleteCollection failed. Collection " + collectionId + " not found"); - } - } - - for (String configurationId : configurationIds) { - DeleteConfigurationOptions deleteOptions = - new DeleteConfigurationOptions.Builder(environmentId, configurationId).build(); - try { - discovery.deleteConfiguration(deleteOptions).execute(); - } catch (NotFoundException ex) { - // Ignore this failure - just print msg - // System.out.println("deleteConfiguration failed. Configuration " + configurationId + " not - // found"); - } - } - - ListCollectionsOptions listCollectionsOptions = - new ListCollectionsOptions.Builder().environmentId(environmentId).build(); - ListCollectionsResponse response = - discovery.listCollections(listCollectionsOptions).execute().getResult(); - for (Collection collection : response.getCollections()) { - if (collection.getName().matches("java-sdk-.*collection") - || collection.getName().matches("my_watson_developer_cloud_collection.*") - || collection.getName().matches("tokenization-dict-testing-collection.*")) { - DeleteCollectionOptions deleteCollectionOptions = - new DeleteCollectionOptions.Builder() - .collectionId(collection.getCollectionId()) - .environmentId(environmentId) - .build(); - try { - DeleteCollectionResponse deleteCollectionResponse = - discovery.deleteCollection(deleteCollectionOptions).execute().getResult(); - } catch (NotFoundException ex) { - // System.out.println("deleteCollection failed. Collection " + collectionId + " not - // found"); - } - } - } - collectionId = null; - } - - /** - * Ping. - * - * @throws RuntimeException the runtime exception - */ - public boolean ping() throws RuntimeException { - discovery.listEnvironments(null).execute().getResult(); - return true; - } - - private static final String DEFAULT_CONFIG_NAME = "Default Configuration"; - - /** Example is successful. */ - @Test - public void exampleIsSuccessful() { - // Discovery discovery = new Discovery("2016-12-15"); - // discovery.setServiceUrl("https://api.us-south.discovery.watson.cloud.ibm.com"); - // discovery.setUsernameAndPassword("", " normalizations = Collections.singletonList(operation); - - NluEnrichmentSentiment sentiment = new NluEnrichmentSentiment.Builder().document(true).build(); - NluEnrichmentEmotion emotion = new NluEnrichmentEmotion.Builder().document(true).build(); - NluEnrichmentEntities entities = - new NluEnrichmentEntities.Builder() - .emotion(true) - .sentiment(true) - .model("WhatComesAfterQux") - .build(); - NluEnrichmentKeywords keywords = - new NluEnrichmentKeywords.Builder().emotion(true).sentiment(true).build(); - NluEnrichmentSemanticRoles semanticRoles = - new NluEnrichmentSemanticRoles.Builder().entities(true).build(); - NluEnrichmentFeatures features = - new NluEnrichmentFeatures.Builder() - .sentiment(sentiment) - .emotion(emotion) - .entities(entities) - .keywords(keywords) - .semanticRoles(semanticRoles) - .build(); - EnrichmentOptions options = - new EnrichmentOptions.Builder() - .features(features) - .language(EnrichmentOptions.Language.EN) - .build(); - - Enrichment enrichment = - new Enrichment.Builder() - .sourceField("foo") - .destinationField("bar") - .enrichment("baz") - .description("Erich foo to bar with baz") - .ignoreDownstreamErrors(true) - .overwrite(false) - .options(options) - .build(); - List enrichments = Collections.singletonList(enrichment); - - CreateConfigurationOptions createOptions = - new CreateConfigurationOptions.Builder() - .environmentId(environmentId) - .name(uniqueConfigName) - .description(description) - .conversions(conversionsBuilder.build()) - .normalizations(normalizations) - .enrichments(enrichments) - .build(); - Configuration createResponse = createConfiguration(createOptions); - - assertEquals(uniqueConfigName, createResponse.name()); - assertEquals(description, createResponse.description()); - assertEquals(conversionsBuilder.build(), createResponse.conversions()); - assertEquals(normalizations, createResponse.normalizations()); - assertEquals(enrichments, createResponse.enrichments()); - - Date now = new Date(); - assertTrue(fuzzyBefore(createResponse.created(), now)); - assertTrue(fuzzyAfter(createResponse.created(), start)); - assertTrue(fuzzyBefore(createResponse.updated(), now)); - assertTrue(fuzzyAfter(createResponse.updated(), start)); - } - - /** Delete configuration is successful. */ - @Test - public void deleteConfigurationIsSuccessful() { - Configuration createResponse = createTestConfig(); - - DeleteConfigurationOptions deleteOptions = - new DeleteConfigurationOptions.Builder(environmentId, createResponse.configurationId()) - .build(); - deleteConfiguration(deleteOptions); - } - - /** Gets the configuration is successful. */ - @Test - public void getConfigurationIsSuccessful() { - Configuration createResponse = createTestConfig(); - - GetConfigurationOptions getOptions = - new GetConfigurationOptions.Builder(environmentId, createResponse.configurationId()) - .build(); - Configuration getResponse = discovery.getConfiguration(getOptions).execute().getResult(); - - assertEquals(createResponse.name(), getResponse.name()); - } - - /** Gets the configurations by name is successful. */ - @Test - public void getConfigurationsByNameIsSuccessful() { - Configuration createResponse = createTestConfig(); - - ListConfigurationsOptions.Builder getBuilder = - new ListConfigurationsOptions.Builder(environmentId); - getBuilder.name(createResponse.name()); - ListConfigurationsResponse getResponse = - discovery.listConfigurations(getBuilder.build()).execute().getResult(); - - assertEquals(1, getResponse.getConfigurations().size()); - assertEquals(createResponse.name(), getResponse.getConfigurations().get(0).name()); - } - - /** Gets the configurations with funky name is successful. */ - @Test - public void getConfigurationsWithFunkyNameIsSuccessful() { - String uniqueConfigName = - uniqueName + " with \"funky\" ?x=y&foo=bar ,[x](y) ~!@#$%^&*()-+ {} | ;:<>\\/ chars"; - - CreateConfigurationOptions.Builder createBuilder = - new CreateConfigurationOptions.Builder(environmentId, uniqueConfigName); - createConfiguration(createBuilder.build()); - - ListConfigurationsOptions.Builder getBuilder = - new ListConfigurationsOptions.Builder(environmentId); - getBuilder.name(uniqueConfigName); - ListConfigurationsResponse getResponse = - discovery.listConfigurations(getBuilder.build()).execute().getResult(); - - assertEquals(1, getResponse.getConfigurations().size()); - assertEquals(uniqueConfigName, getResponse.getConfigurations().get(0).name()); - } - - /** Update configuration is successful. */ - @Test - public void updateConfigurationIsSuccessful() { - - Configuration testConfig = createTestConfig(); - - Date start = new Date(); - - String updatedName = testConfig.name() + UUID.randomUUID().toString(); - String updatedDescription = "Description of " + updatedName; - HtmlSettings newHtmlSettings = - new HtmlSettings.Builder() - .excludeTagsCompletely(Arrays.asList("table", "h6", "header")) - .build(); - Conversions updatedConversions = new Conversions.Builder().html(newHtmlSettings).build(); - NormalizationOperation operation = - new NormalizationOperation.Builder() - .operation("foo") - .sourceField("bar") - .destinationField("baz") - .build(); - List updatedNormalizations = Arrays.asList(operation); - - NluEnrichmentSentiment sentiment = new NluEnrichmentSentiment.Builder().document(true).build(); - NluEnrichmentEmotion emotion = new NluEnrichmentEmotion.Builder().document(true).build(); - NluEnrichmentEntities entities = - new NluEnrichmentEntities.Builder() - .emotion(true) - .sentiment(true) - .model("WhatComesAfterQux") - .build(); - NluEnrichmentKeywords keywords = - new NluEnrichmentKeywords.Builder().emotion(true).sentiment(true).build(); - NluEnrichmentSemanticRoles semanticRoles = - new NluEnrichmentSemanticRoles.Builder().entities(true).build(); - NluEnrichmentFeatures features = - new NluEnrichmentFeatures.Builder() - .sentiment(sentiment) - .emotion(emotion) - .entities(entities) - .keywords(keywords) - .semanticRoles(semanticRoles) - .build(); - EnrichmentOptions options = new EnrichmentOptions.Builder().features(features).build(); - - Enrichment enrichment = - new Enrichment.Builder() - .sourceField("foo") - .destinationField("bar") - .enrichment("baz") - .description("Erich foo to bar with baz") - .ignoreDownstreamErrors(true) - .overwrite(false) - .options(options) - .build(); - List updatedEnrichments = Collections.singletonList(enrichment); - - UpdateConfigurationOptions.Builder updateBuilder = - new UpdateConfigurationOptions.Builder( - environmentId, testConfig.configurationId(), updatedName); - updateBuilder.description(updatedDescription); - updateBuilder.conversions(updatedConversions); - updateBuilder.normalizations(updatedNormalizations); - updateBuilder.enrichments(updatedEnrichments); - Configuration updatedConfiguration = - discovery.updateConfiguration(updateBuilder.build()).execute().getResult(); - - assertEquals(updatedName, updatedConfiguration.name()); - assertEquals(updatedDescription, updatedConfiguration.description()); - assertEquals(updatedConversions, updatedConfiguration.conversions()); - assertEquals(updatedNormalizations, updatedConfiguration.normalizations()); - assertEquals(updatedEnrichments, updatedConfiguration.enrichments()); - - Date now = new Date(); - assertTrue(fuzzyBefore(updatedConfiguration.created(), start)); - assertTrue(fuzzyBefore(updatedConfiguration.updated(), now)); - assertTrue(fuzzyAfter(updatedConfiguration.updated(), start)); - } - - // Collections - - /** List collections is successful. */ - @Test - public void listCollectionsIsSuccessful() { - createTestCollection(); - ListCollectionsOptions listOptions = new ListCollectionsOptions.Builder(environmentId).build(); - ListCollectionsResponse listResponse = - discovery.listCollections(listOptions).execute().getResult(); - - assertFalse(listResponse.getCollections().isEmpty()); - } - - /** Creates the collection is successful. */ - @Test - public void createCollectionIsSuccessful() { - Configuration createConfigResponse = createTestConfig(); - - String uniqueCollectionName = uniqueName + "-collection"; - String uniqueCollectionDescription = "Description of " + uniqueCollectionName; - - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(createConfigResponse.configurationId()) - .description(uniqueCollectionDescription); - Collection createResponse = createCollection(createCollectionBuilder.build()); - - assertEquals(createConfigResponse.configurationId(), createResponse.getConfigurationId()); - assertEquals(uniqueCollectionName, createResponse.getName()); - assertEquals(uniqueCollectionDescription, createResponse.getDescription()); - } - - /** Creates the collection with minimal parameters is successful. */ - @Test - public void createCollectionWithMinimalParametersIsSuccessful() { - String uniqueCollectionName = uniqueName + "-collection"; - CreateCollectionOptions createOptions = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName).build(); - Collection createResponse = createCollection(createOptions); - - assertNotNull(createResponse.getCollectionId()); - } - - /** Update collection is successful. */ - @Test - public void updateCollectionIsSuccessful() { - String uniqueCollectionName = uniqueName + "-collection"; - CreateCollectionOptions createOptions = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName).build(); - Collection collection = createCollection(createOptions); - assertNotNull(collection.getCollectionId()); - - Configuration testConfig = createTestConfig(); - String updatedCollectionName = UUID.randomUUID().toString() + "-collection"; - String updatedCollectionDescription = "Description for " + updatedCollectionName; - String newCollectionId = collection.getCollectionId(); - - UpdateCollectionOptions updateOptions = - new UpdateCollectionOptions.Builder() - .environmentId(environmentId) - .collectionId(newCollectionId) - .name(updatedCollectionName) - .description(updatedCollectionDescription) - .configurationId(testConfig.configurationId()) - .build(); - Collection updatedCollection = discovery.updateCollection(updateOptions).execute().getResult(); - - assertEquals(updatedCollectionName, updatedCollection.getName()); - assertEquals(updatedCollectionDescription, updatedCollection.getDescription()); - assertEquals(testConfig.configurationId(), updatedCollection.getConfigurationId()); - } - - /** Delete collection is successful. */ - @Test - public void deleteCollectionIsSuccessful() { - Configuration createConfigResponse = createTestConfig(); - - String uniqueCollectionName = uniqueName + "-collection"; - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(createConfigResponse.configurationId()); - Collection createResponse = createCollection(createCollectionBuilder.build()); - - // need to wait for collection to be ready - - DeleteCollectionOptions deleteOptions = - new DeleteCollectionOptions.Builder(environmentId, createResponse.getCollectionId()) - .build(); - deleteCollection(deleteOptions); - } - - /** Gets the collection is successful. */ - @Test - public void getCollectionIsSuccessful() { - Configuration createConfigResponse = createTestConfig(); - - String uniqueCollectionName = uniqueName + "-collection"; - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(createConfigResponse.configurationId()); - Collection createResponse = createCollection(createCollectionBuilder.build()); - - GetCollectionOptions getOptions = - new GetCollectionOptions.Builder(environmentId, createResponse.getCollectionId()).build(); - - // need to wait for collection to be ready - - Collection getResponse = discovery.getCollection(getOptions).execute().getResult(); - - assertEquals(createResponse.getName(), getResponse.getName()); - } - - /** Gets the collections by name is successful. */ - @Test - public void getCollectionsByNameIsSuccessful() { - Configuration createConfigResponse = createTestConfig(); - - String uniqueCollectionName = uniqueName + "-collection"; - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(createConfigResponse.configurationId()); - createCollection(createCollectionBuilder.build()); - - ListCollectionsOptions.Builder getBuilder = new ListCollectionsOptions.Builder(environmentId); - getBuilder.name(uniqueCollectionName); - ListCollectionsResponse getResponse = - discovery.listCollections(getBuilder.build()).execute().getResult(); - - assertEquals(1, getResponse.getCollections().size()); - assertEquals(uniqueCollectionName, getResponse.getCollections().get(0).getName()); - } - - /** Adds the document is successful. */ - @SuppressWarnings("deprecation") - @Test - public void addDocumentIsSuccessful() { - String myDocumentJson = "{\"field\":\"value\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = new AddDocumentOptions.Builder(); - builder.environmentId(environmentId); - builder.collectionId(collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename(UUID.randomUUID().toString()); - DocumentAccepted createResponse = discovery.addDocument(builder.build()).execute().getResult(); - - assertFalse(createResponse.getDocumentId().isEmpty()); - assertNull(createResponse.getNotices()); - } - - /** Adds the document with configuration is successful. */ - @Test - public void addDocumentWithConfigurationIsSuccessful() { - uniqueName = UUID.randomUUID().toString(); - - String myDocumentJson = "{\"field\":\"value\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = new AddDocumentOptions.Builder(); - builder.environmentId(environmentId); - builder.collectionId(collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename(UUID.randomUUID().toString()); - DocumentAccepted createResponse = discovery.addDocument(builder.build()).execute().getResult(); - - assertFalse(createResponse.getDocumentId().isEmpty()); - assertNull(createResponse.getNotices()); - } - - /** Adds the document with metadata is successful. */ - @Ignore - @SuppressWarnings("deprecation") - @Test - public void addDocumentWithMetadataIsSuccessful() { - String myDocumentJson = "{\"field\":\"value\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename(UUID.randomUUID().toString()); - builder.metadata(myMetadata.toString()); - - DocumentAccepted createResponse = discovery.addDocument(builder.build()).execute().getResult(); - - WaitFor.Condition documentAccepted = - new WaitForDocumentAccepted(environmentId, collectionId, createResponse.getDocumentId()); - WaitFor.waitFor(documentAccepted, 5, TimeUnit.SECONDS, 500); - - QueryOptions queryOptions = new QueryOptions.Builder(environmentId, collectionId).build(); - QueryResponse queryResponse = discovery.query(queryOptions).execute().getResult(); - - assertTrue(queryResponse.getResults().get(0).getMetadata() != null); - } - - /** Delete document is successful. */ - @Ignore - @Test - public void deleteDocumentIsSuccessful() { - DocumentAccepted createResponse = createTestDocument(collectionId); - String documentId = createResponse.getDocumentId(); - - WaitFor.Condition documentAccepted = - new WaitForDocumentAccepted(environmentId, collectionId, documentId); - WaitFor.waitFor(documentAccepted, 5, TimeUnit.SECONDS, 500); - - DeleteDocumentOptions deleteOptions = - new DeleteDocumentOptions.Builder(environmentId, collectionId, documentId).build(); - discovery.deleteDocument(deleteOptions).execute(); - } - - /** Gets the document is successful. */ - @Ignore - @Test - public void getDocumentIsSuccessful() { - DocumentAccepted documentAccepted = createTestDocument(collectionId); - - GetDocumentStatusOptions getOptions = - new GetDocumentStatusOptions.Builder( - environmentId, collectionId, documentAccepted.getDocumentId()) - .build(); - DocumentStatus getResponse = discovery.getDocumentStatus(getOptions).execute().getResult(); - - assertEquals(DocumentStatus.Status.AVAILABLE, getResponse.getStatus()); - } - - /** Update document is successful. */ - @Test - public void updateDocumentIsSuccessful() { - DocumentAccepted documentAccepted = createTestDocument(collectionId); - - uniqueName = UUID.randomUUID().toString(); - String myDocumentJson = "{\"field\":\"value2\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - UpdateDocumentOptions.Builder updateBuilder = - new UpdateDocumentOptions.Builder( - environmentId, collectionId, documentAccepted.getDocumentId()); - updateBuilder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - updateBuilder.filename(UUID.randomUUID().toString()); - DocumentAccepted updateResponse = - discovery.updateDocument(updateBuilder.build()).execute().getResult(); - - GetDocumentStatusOptions getOptions = - new GetDocumentStatusOptions.Builder( - environmentId, collectionId, updateResponse.getDocumentId()) - .build(); - DocumentStatus getResponse = discovery.getDocumentStatus(getOptions).execute().getResult(); - - assertNotNull(getResponse); - } - - /** Update another document is successful. */ - @Test - public void updateAnotherDocumentIsSuccessful() { - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.metadata(myMetadata.toString()); - DocumentAccepted documentAccepted = - discovery.addDocument(builder.build()).execute().getResult(); - - String myDocumentJson = "{\"field\":\"value2\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - UpdateDocumentOptions.Builder updateBuilder = - new UpdateDocumentOptions.Builder( - environmentId, collectionId, documentAccepted.getDocumentId()); - updateBuilder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - updateBuilder.filename(UUID.randomUUID().toString()); - DocumentAccepted updateResponse = - discovery.updateDocument(updateBuilder.build()).execute().getResult(); - - GetDocumentStatusOptions getOptions = - new GetDocumentStatusOptions.Builder( - environmentId, collectionId, updateResponse.getDocumentId()) - .build(); - DocumentStatus getResponse = discovery.getDocumentStatus(getOptions).execute().getResult(); - - assertNotNull(getResponse); - } - - /** Update document with metadata is successful. */ - @Test - @Ignore("Pending implementation of 'processing' after document update") - public void updateDocumentWithMetadataIsSuccessful() { - Collection collection = createTestCollection(); - String collectionId = collection.getCollectionId(); - DocumentAccepted documentAccepted = createTestDocument(collectionId); - - String myDocumentJson = "{\"field\":\"value2\"}"; - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - - UpdateDocumentOptions.Builder updateBuilder = - new UpdateDocumentOptions.Builder( - environmentId, collectionId, documentAccepted.getDocumentId()); - updateBuilder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - updateBuilder.metadata(myMetadata.toString()); - DocumentAccepted updateResponse = - discovery.updateDocument(updateBuilder.build()).execute().getResult(); - - WaitFor.Condition waitForDocumentAccepted = - new WaitForDocumentAccepted(environmentId, collectionId, updateResponse.getDocumentId()); - WaitFor.waitFor(waitForDocumentAccepted, 5, TimeUnit.SECONDS, 500); - - QueryOptions queryOptions = new QueryOptions.Builder(environmentId, collectionId).build(); - QueryResponse queryResponse = discovery.query(queryOptions).execute().getResult(); - - assertTrue(queryResponse.getResults().get(0).getMetadata() != null); - } - - /** Gets the collection fields is successful. */ - @Ignore - @Test - public void getCollectionFieldsIsSuccessful() { - ListCollectionFieldsOptions getOptions = - new ListCollectionFieldsOptions.Builder(environmentId, collectionId).build(); - ListCollectionFieldsResponse getResponse = - discovery.listCollectionFields(getOptions).execute().getResult(); - - assertFalse(getResponse.getFields().isEmpty()); - } - - // query tests - - /** Query with count is successful. */ - @Test - public void queryWithCountIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.count(5L); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertTrue(queryResponse.getMatchingResults() > 0); - } - - /** Query with offset is successful. */ - @Test - public void queryWithOffsetIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.offset(5L); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertTrue(queryResponse.getMatchingResults() > 0); - } - - /** Query with query is successful. */ - @Ignore - @Test - public void queryWithQueryIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.query("field" + Operator.CONTAINS + 1); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertEquals(new Long(1), queryResponse.getMatchingResults()); - assertEquals(1, queryResponse.getResults().size()); - } - - /** Query with filter is successful. */ - @Test - public void queryWithFilterIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.filter("field" + Operator.CONTAINS + 1); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertEquals(new Long(1), queryResponse.getMatchingResults()); - assertEquals(1, queryResponse.getResults().size()); - } - - /** Query with sort is successful. */ - @Test - public void queryWithSortIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - String sortList = "field"; - queryBuilder.sort(sortList); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertTrue(queryResponse.getResults().size() > 1); - int v0 = ((LazilyParsedNumber) queryResponse.getResults().get(0).get("field")).intValue(); - int v1 = ((LazilyParsedNumber) queryResponse.getResults().get(1).get("field")).intValue(); - assertTrue(v0 <= v1); - } - - /** Query with aggregation term is successful. */ - @Test - public void queryWithAggregationTermIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.TERM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.AND); - sb.append(10L); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryTermAggregation term = (QueryTermAggregation) queryResponse.getAggregations().get(0); - assertEquals(1, queryResponse.getAggregations().size()); - assertEquals(new Long(10), term.getCount()); - } - - /** - * Query with aggregation histogram is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationHistogramIsSuccessful() throws InterruptedException { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.HISTOGRAM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.AND); - sb.append(5L); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryHistogramAggregation histogram = - (QueryHistogramAggregation) queryResponse.getAggregations().get(0); - Long interval = histogram.getInterval(); - assertEquals(new Long(5), interval); - assertEquals(2, histogram.getResults().size()); - } - - /** - * Query with aggregation maximum is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationMaximumIsSuccessful() throws InterruptedException { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.MAX); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryCalculationAggregation max = - (QueryCalculationAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.MAX.getName(), max.getType()); - assertEquals(new Double(9), max.getValue()); - } - - /** - * Query with aggregation minimum is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationMinimumIsSuccessful() throws InterruptedException { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.MIN); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryCalculationAggregation min = - (QueryCalculationAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.MIN.getName(), min.getType()); - assertEquals(new Double(0), min.getValue()); - } - - /** - * Query with aggregation summation is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationSummationIsSuccessful() throws InterruptedException { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.SUM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryCalculationAggregation sum = - (QueryCalculationAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.SUM.getName(), sum.getType()); - assertEquals(new Double(45), sum.getValue()); - } - - /** - * Query with aggregation average is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationAverageIsSuccessful() throws InterruptedException { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.AVERAGE); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryCalculationAggregation avg = - (QueryCalculationAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.AVERAGE.getName(), avg.getType()); - assertEquals(new Double(4.5), avg.getValue()); - } - - /** Query with aggregation filter is successful. */ - @Test - public void queryWithAggregationFilterIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.FILTER); - sb.append(Operator.OPENING_GROUPING); - sb.append("field:9"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryFilterAggregation filter = (QueryFilterAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.FILTER.getName(), filter.getType()); - assertEquals("field:9", filter.getMatch()); - assertEquals(new Long(1), filter.getMatchingResults()); - } - - /** - * Query with aggregation nested is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationNestedIsSuccessful() throws InterruptedException { - DocumentAccepted testDocument = createNestedTestDocument(collectionId); - String documentId = testDocument.getDocumentId(); - - WaitFor.Condition documentAccepted = - new WaitForDocumentAccepted(environmentId, collectionId, documentId); - WaitFor.waitFor(documentAccepted, 5, TimeUnit.SECONDS, 500); - - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.NESTED); - sb.append(Operator.OPENING_GROUPING); - sb.append("nested_fields"); - sb.append(Operator.CLOSING_GROUPING); - sb.append(Operator.NEST_AGGREGATION); - sb.append(AggregationType.TERM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - assertNotNull(queryResponse.getAggregations()); - } - - /** - * Query with aggregation timeslice is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationTimesliceIsSuccessful() throws InterruptedException { - String myDocumentJson = "{\"time\":\"1999-02-16T00:00:00.000-05:00\"}"; - DocumentAccepted testDocument1 = - createTestDocument(myDocumentJson, UUID.randomUUID().toString(), collectionId); - String documentId1 = testDocument1.getDocumentId(); - myDocumentJson = "{\"time\":\"1999-04-16T00:00:00.000-05:00\"}"; - DocumentAccepted testDocument2 = - createTestDocument(myDocumentJson, UUID.randomUUID().toString(), collectionId); - String documentId2 = testDocument2.getDocumentId(); - - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.TIMESLICE); - sb.append(Operator.OPENING_GROUPING); - sb.append("time,1day,EST"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - - GetDocumentStatusOptions getOptions1 = - new GetDocumentStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .documentId(documentId1) - .build(); - DocumentStatus status1 = discovery.getDocumentStatus(getOptions1).execute().getResult(); - GetDocumentStatusOptions getOptions2 = - new GetDocumentStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .documentId(documentId2) - .build(); - DocumentStatus status2 = discovery.getDocumentStatus(getOptions2).execute().getResult(); - while (status1.getStatus().equals(DocumentAccepted.Status.PROCESSING) - || status2.getStatus().equals(DocumentAccepted.Status.PROCESSING)) { - Thread.sleep(3000); - status1 = discovery.getDocumentStatus(getOptions1).execute().getResult(); - status2 = discovery.getDocumentStatus(getOptions2).execute().getResult(); - } - - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryTimesliceAggregation timeslice = - (QueryTimesliceAggregation) queryResponse.getAggregations().get(0); - assertEquals(AggregationType.TIMESLICE.getName(), timeslice.getType()); - assertNotNull(timeslice.getResults()); - } - - /** Query with aggregation top hits is successful. */ - @Test - public void queryWithAggregationTopHitsIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.TERM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - sb.append(Operator.NEST_AGGREGATION); - sb.append(AggregationType.TOP_HITS); - sb.append(Operator.OPENING_GROUPING); - sb.append("3"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryTermAggregation term = (QueryTermAggregation) queryResponse.getAggregations().get(0); - QueryTopHitsAggregation topHits = - (QueryTopHitsAggregation) term.getResults().get(0).getAggregations().get(0); - assertEquals(new Long(3), topHits.getSize()); - assertNotNull(topHits.getHits()); - } - - /** Query with aggregation unique count is successful. */ - public void queryWithAggregationUniqueCountIsSuccessful() { - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.UNIQUE_COUNT); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - QueryCalculationAggregation uniqueCount = - (QueryCalculationAggregation) queryResponse.getAggregations().get(0); - assertEquals(new Double(10), uniqueCount.getValue()); - } - - /** - * Query with passages is successful. - * - * @throws InterruptedException the interrupted exception - * @throws FileNotFoundException the file not found exception - */ - @Test - public void queryWithPassagesIsSuccessful() throws InterruptedException, FileNotFoundException { - createTestDocument( - getStringFromInputStream(new FileInputStream(PASSAGES_TEST_FILE_1)), - UUID.randomUUID().toString(), - collectionId); - createTestDocument( - getStringFromInputStream(new FileInputStream(PASSAGES_TEST_FILE_2)), - UUID.randomUUID().toString(), - collectionId); - - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.passages(true); - queryBuilder.naturalLanguageQuery("Watson"); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - List passages = queryResponse.getPassages(); - assertNotNull(passages); - } - - // queryNotices tests - - /** Query notices count is successful. */ - @Test - public void queryNoticesCountIsSuccessful() { - QueryNoticesOptions.Builder queryBuilder = - new QueryNoticesOptions.Builder(environmentId, collectionId); - queryBuilder.count(5L); - QueryNoticesResponse queryResponse = - discovery.queryNotices(queryBuilder.build()).execute().getResult(); - assertTrue(queryResponse.getResults().size() <= 5); - } - - // Tests for reported issues - - /** Issue number 517. */ - @Test - public void issueNumber517() { - String uniqueConfigName = uniqueName + "-config"; - CreateConfigurationOptions.Builder createBuilder = new CreateConfigurationOptions.Builder(); - createBuilder.environmentId(environmentId); - Configuration configuration = getTestConfiguration(DISCOVERY1_TEST_CONFIG_FILE); - - configuration = configuration.newBuilder().name(uniqueConfigName).build(); - createBuilder.configuration(configuration); - Configuration createResponse = createConfiguration(createBuilder.build()); - - GetConfigurationOptions getOptions = - new GetConfigurationOptions.Builder(environmentId, createResponse.configurationId()) - .build(); - Configuration getResponse = discovery.getConfiguration(getOptions).execute().getResult(); - - // returned config should have some json data - assertEquals(1, getResponse.conversions().jsonNormalizations().size()); - } - - /** Issue number 518. */ - @Test - public void issueNumber518() { - String[] operations = - new String[] { - Operation.MOVE, Operation.COPY, Operation.MERGE, Operation.REMOVE, Operation.REMOVE_NULLS - }; - - String uniqueConfigName = uniqueName + "-config"; - CreateConfigurationOptions.Builder createBuilder = new CreateConfigurationOptions.Builder(); - createBuilder.environmentId(environmentId); - Configuration configuration = getTestConfiguration(DISCOVERY2_TEST_CONFIG_FILE); - - configuration = configuration.newBuilder().name(uniqueConfigName).build(); - createBuilder.configuration(configuration); - Configuration createResponse = createConfiguration(createBuilder.build()); - - GetConfigurationOptions getOptions = - new GetConfigurationOptions.Builder(environmentId, createResponse.configurationId()) - .build(); - Configuration getResponse = discovery.getConfiguration(getOptions).execute().getResult(); - - // verify getResponse deserializes the operations appropriately - for (NormalizationOperation normalization : getResponse.normalizations()) { - String operation = normalization.operation(); - assertEquals(true, Arrays.asList(operations).contains(operation)); - } - } - - /** Issue number 654. */ - @Test - public void issueNumber654() { - String collectionId = setupTestDocuments(); - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.query("field:1|3"); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute().getResult(); - - assertEquals(new Long(2), queryResponse.getMatchingResults()); - assertEquals(2, queryResponse.getResults().size()); - } - - /** Issue number 659. */ - /* Issue 659: creating a collection does not use the configuration id */ - @Test - public void issueNumber659() { - String uniqueConfigName = UUID.randomUUID().toString() + "-config"; - CreateConfigurationOptions configOptions = - new CreateConfigurationOptions.Builder() - .environmentId(environmentId) - .name(uniqueConfigName) - .build(); - Configuration configuration = - discovery.createConfiguration(configOptions).execute().getResult(); - configurationIds.add(configuration.configurationId()); - - String uniqueCollectionName = UUID.randomUUID().toString() + "-collection"; - CreateCollectionOptions collectionOptions = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(configuration.configurationId()) - .build(); - Collection collection = discovery.createCollection(collectionOptions).execute().getResult(); - collectionIds.add(collection.getCollectionId()); - - assertEquals(collection.getConfigurationId(), configuration.configurationId()); - } - - /** Adds the training data is successful. */ - @Test - public void addTrainingDataIsSuccessful() { - AddTrainingDataOptions.Builder builder = - new AddTrainingDataOptions.Builder(environmentId, collectionId); - String naturalLanguageQuery = "Example query" + UUID.randomUUID().toString(); - builder.naturalLanguageQuery(naturalLanguageQuery); - String documentId = createTestDocument(collectionId).getDocumentId(); - int relevance = 0; - TrainingExample example = - new TrainingExample.Builder().documentId(documentId).relevance(relevance).build(); - builder.addExamples(example); - TrainingQuery response = discovery.addTrainingData(builder.build()).execute().getResult(); - - assertFalse(response.getQueryId().isEmpty()); - assertEquals(response.getNaturalLanguageQuery(), naturalLanguageQuery); - assertTrue(response.getFilter().isEmpty()); - assertEquals(response.getExamples().size(), 1); - - TrainingExample returnedExample = response.getExamples().get(0); - assertEquals(returnedExample.documentId(), documentId); - assertTrue(returnedExample.crossReference().isEmpty()); - assertEquals(returnedExample.relevance(), new Long(relevance)); - } - - /** Adds the training example is successful. */ - @Test - public void addTrainingExampleIsSuccessful() { - TrainingQuery query = createTestQuery(collectionId, "Query" + UUID.randomUUID().toString()); - int startingExampleCount = query.getExamples().size(); - String queryId = query.getQueryId(); - - String documentId = "document_id"; - String crossReference = "cross_reference"; - int relevance = 50; - CreateTrainingExampleOptions.Builder exampleBuilder = - new CreateTrainingExampleOptions.Builder(environmentId, collectionId, queryId); - exampleBuilder.documentId(documentId); - exampleBuilder.crossReference(crossReference); - exampleBuilder.relevance(relevance); - discovery.createTrainingExample(exampleBuilder.build()).execute().getResult(); - - GetTrainingDataOptions.Builder queryBuilder = - new GetTrainingDataOptions.Builder(environmentId, collectionId, queryId); - TrainingQuery updatedQuery = - discovery.getTrainingData(queryBuilder.build()).execute().getResult(); - - assertTrue(updatedQuery.getExamples().size() > startingExampleCount); - TrainingExample newExample = updatedQuery.getExamples().get(0); - assertEquals(newExample.documentId(), documentId); - assertEquals(newExample.crossReference(), crossReference); - assertEquals(newExample.relevance(), new Long(relevance)); - } - - /** Delete all collection training data is successful. */ - @Test - public void deleteAllCollectionTrainingDataIsSuccessful() { - String collId = setupTestQueries(collectionId); - DeleteAllTrainingDataOptions.Builder deleteBuilder = - new DeleteAllTrainingDataOptions.Builder(environmentId, collId); - discovery.deleteAllTrainingData(deleteBuilder.build()).execute(); - - ListTrainingDataOptions.Builder listBuilder = - new ListTrainingDataOptions.Builder(environmentId, collId); - TrainingDataSet trainingData = - discovery.listTrainingData(listBuilder.build()).execute().getResult(); - - assertEquals(trainingData.getQueries().size(), 0); - } - - /** Delete training data query is successful. */ - @Test - public void deleteTrainingDataQueryIsSuccessful() { - TrainingQuery query = createTestQuery(collectionId, "Query" + UUID.randomUUID().toString()); - String queryId = query.getQueryId(); - - ListTrainingDataOptions.Builder listBuilder = - new ListTrainingDataOptions.Builder(environmentId, collectionId); - TrainingDataSet trainingData = - discovery.listTrainingData(listBuilder.build()).execute().getResult(); - List queryList = trainingData.getQueries(); - boolean doesQueryExist = false; - for (TrainingQuery q : queryList) { - if (q.getQueryId().equals(queryId)) { - doesQueryExist = true; - break; - } - } - assertTrue(doesQueryExist); - - DeleteTrainingDataOptions.Builder deleteBuilder = - new DeleteTrainingDataOptions.Builder(environmentId, collectionId, queryId); - discovery.deleteTrainingData(deleteBuilder.build()).execute(); - - listBuilder = new ListTrainingDataOptions.Builder(environmentId, collectionId); - trainingData = discovery.listTrainingData(listBuilder.build()).execute().getResult(); - queryList = trainingData.getQueries(); - doesQueryExist = false; - for (TrainingQuery q : queryList) { - if (q.getQueryId().equals(queryId)) { - doesQueryExist = true; - break; - } - } - assertFalse(doesQueryExist); - } - - /** Delete training data example is successful. */ - @Test - public void deleteTrainingDataExampleIsSuccessful() { - TrainingQuery newQuery = createTestQuery(collectionId, "Query" + UUID.randomUUID().toString()); - String queryId = newQuery.getQueryId(); - - String documentId = "document_id"; - String crossReference = "cross_reference"; - int relevance = 50; - CreateTrainingExampleOptions.Builder exampleBuilder = - new CreateTrainingExampleOptions.Builder(environmentId, collectionId, queryId); - exampleBuilder.documentId(documentId); - exampleBuilder.crossReference(crossReference); - exampleBuilder.relevance(relevance); - TrainingExample createdExample = - discovery.createTrainingExample(exampleBuilder.build()).execute().getResult(); - String exampleId = createdExample.documentId(); - - GetTrainingDataOptions.Builder queryBuilder = - new GetTrainingDataOptions.Builder(environmentId, collectionId, queryId); - TrainingQuery queryWithAddedExample = - discovery.getTrainingData(queryBuilder.build()).execute().getResult(); - int startingCount = queryWithAddedExample.getExamples().size(); - - DeleteTrainingExampleOptions.Builder deleteBuilder = - new DeleteTrainingExampleOptions.Builder(environmentId, collectionId, queryId, exampleId); - discovery.deleteTrainingExample(deleteBuilder.build()).execute(); - - GetTrainingDataOptions.Builder newQueryBuilder = - new GetTrainingDataOptions.Builder(environmentId, collectionId, queryId); - TrainingQuery queryWithDeletedExample = - discovery.getTrainingData(newQueryBuilder.build()).execute().getResult(); - - assertTrue(startingCount > queryWithDeletedExample.getExamples().size()); - } - - /** Gets the training data is successful. */ - @Test - public void getTrainingDataIsSuccessful() { - String naturalLanguageQuery = "Query" + UUID.randomUUID().toString(); - TrainingQuery newQuery = createTestQuery(collectionId, naturalLanguageQuery); - String queryId = newQuery.getQueryId(); - - GetTrainingDataOptions.Builder queryBuilder = - new GetTrainingDataOptions.Builder(environmentId, collectionId, queryId); - TrainingQuery queryResponse = - discovery.getTrainingData(queryBuilder.build()).execute().getResult(); - - assertEquals(queryResponse.getNaturalLanguageQuery(), naturalLanguageQuery); - } - - /** Gets the training example is successful. */ - @Test - public void getTrainingExampleIsSuccessful() { - AddTrainingDataOptions.Builder builder = - new AddTrainingDataOptions.Builder(environmentId, collectionId); - String naturalLanguageQuery = "Query" + UUID.randomUUID().toString(); - builder.naturalLanguageQuery(naturalLanguageQuery); - String documentId = "Document" + UUID.randomUUID().toString(); - int relevance = 0; - TrainingExample example = - new TrainingExample.Builder().documentId(documentId).relevance(relevance).build(); - builder.addExamples(example); - TrainingQuery response = discovery.addTrainingData(builder.build()).execute().getResult(); - String queryId = response.getQueryId(); - - GetTrainingExampleOptions.Builder getExampleBuilder = - new GetTrainingExampleOptions.Builder(environmentId, collectionId, queryId, documentId); - TrainingExample returnedExample = - discovery.getTrainingExample(getExampleBuilder.build()).execute().getResult(); - - assertEquals(returnedExample.documentId(), documentId); - } - - /** Update training example is successful. */ - @Test - public void updateTrainingExampleIsSuccessful() { - AddTrainingDataOptions.Builder builder = - new AddTrainingDataOptions.Builder(environmentId, collectionId); - String naturalLanguageQuery = "Query" + UUID.randomUUID().toString(); - builder.naturalLanguageQuery(naturalLanguageQuery); - String documentId = "Document" + UUID.randomUUID().toString(); - int relevance = 0; - TrainingExample example = - new TrainingExample.Builder().documentId(documentId).relevance(relevance).build(); - builder.addExamples(example); - TrainingQuery response = discovery.addTrainingData(builder.build()).execute().getResult(); - String queryId = response.getQueryId(); - - UpdateTrainingExampleOptions.Builder updateBuilder = - new UpdateTrainingExampleOptions.Builder(environmentId, collectionId, queryId, documentId); - String newCrossReference = "cross_reference"; - updateBuilder.crossReference(newCrossReference); - int newRelevance = 50; - updateBuilder.relevance(newRelevance); - TrainingExample updatedExample = - discovery.updateTrainingExample(updateBuilder.build()).execute().getResult(); - - assertEquals(updatedExample.crossReference(), newCrossReference); - assertEquals(updatedExample.relevance(), new Long(newRelevance)); - } - - /** Expansions operations are successful. */ - @Test - public void expansionsOperationsAreSuccessful() { - List expansion1InputTerms = Arrays.asList("weekday", "week day"); - List expansion1ExpandedTerms = - Arrays.asList("monday", "tuesday", "wednesday", "thursday", "friday"); - List expansion2InputTerms = Arrays.asList("weekend", "week end"); - List expansion2ExpandedTerms = Arrays.asList("saturday", "sunday"); - Expansion expansion1 = - new Expansion.Builder() - .inputTerms(expansion1InputTerms) - .expandedTerms(expansion1ExpandedTerms) - .build(); - Expansion expansion2 = - new Expansion.Builder() - .inputTerms(expansion2InputTerms) - .expandedTerms(expansion2ExpandedTerms) - .build(); - Expansions expansions = - new Expansions.Builder().expansions(Arrays.asList(expansion1, expansion2)).build(); - CreateExpansionsOptions createOptions = - new CreateExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .expansions(expansions) - .build(); - try { - Expansions createResults = discovery.createExpansions(createOptions).execute().getResult(); - assertEquals(createResults.expansions().size(), 2); - assertEquals(createResults.expansions().get(0).inputTerms(), expansion1InputTerms); - assertEquals(createResults.expansions().get(0).expandedTerms(), expansion1ExpandedTerms); - assertEquals(createResults.expansions().get(1).inputTerms(), expansion2InputTerms); - assertEquals(createResults.expansions().get(1).expandedTerms(), expansion2ExpandedTerms); - - ListExpansionsOptions listOptions = - new ListExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - Expansions listResults = discovery.listExpansions(listOptions).execute().getResult(); - - assertEquals(listResults.expansions().size(), 2); - - DeleteExpansionsOptions deleteOptions = - new DeleteExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - discovery.deleteExpansions(deleteOptions).execute(); - - Expansions emptyListResults = discovery.listExpansions(listOptions).execute().getResult(); - - assertTrue( - emptyListResults.expansions().get(0).inputTerms() == null - || emptyListResults.expansions().get(0).inputTerms().isEmpty()); - assertTrue( - emptyListResults.expansions().get(0).expandedTerms() == null - || emptyListResults.expansions().get(0).expandedTerms().get(0).isEmpty()); - } catch (InternalServerErrorException e) { - /** - * System.out.println( "Internal server error while trying to create expansion ¯\\_(ツ)_/¯ - * Probably not our issue" + " but may be worth looking into."); * - */ - e.printStackTrace(); - } - } - - /** Delete user data is successful. */ - @Test - public void deleteUserDataIsSuccessful() { - String customerId = "java_sdk_test_id"; - - try { - DeleteUserDataOptions deleteOptions = - new DeleteUserDataOptions.Builder().customerId(customerId).build(); - discovery.deleteUserData(deleteOptions).execute(); - } catch (Exception ex) { - fail(ex.getMessage()); - } - } - - /** Credentials operations are successful. */ - @Test - public void credentialsOperationsAreSuccessful() { - String url = "https://login.salesforce.com"; - String username = "test@username.com"; - String password = "test_password"; // pragma: whitelist secret - CredentialDetails credentialDetails = - new CredentialDetails.Builder() - .credentialType(CredentialDetails.CredentialType.USERNAME_PASSWORD) - .url(url) - .username(username) - .password(password) - .build(); - Credentials credentials = - new Credentials.Builder() - .sourceType(Credentials.SourceType.SALESFORCE) - .credentialDetails(credentialDetails) - .build(); - - CreateCredentialsOptions createOptions = - new CreateCredentialsOptions.Builder() - .environmentId(environmentId) - .credentials(credentials) - .build(); - Credentials createdCredentials = - discovery.createCredentials(createOptions).execute().getResult(); - String credentialId = createdCredentials.credentialId(); - - // Create assertions - assertEquals(Credentials.SourceType.SALESFORCE, createdCredentials.sourceType()); - assertEquals( - CredentialDetails.CredentialType.USERNAME_PASSWORD, - createdCredentials.credentialDetails().credentialType()); - assertEquals(url, createdCredentials.credentialDetails().url()); - assertEquals(username, createdCredentials.credentialDetails().username()); - - String newUrl = "https://newlogin.salesforce.com"; - CredentialDetails updatedDetails = - new CredentialDetails.Builder() - .credentialType(CredentialDetails.CredentialType.USERNAME_PASSWORD) - .url(newUrl) - .username(username) - .password(password) - .build(); - - UpdateCredentialsOptions updateOptions = - new UpdateCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId(credentialId) - .sourceType(Credentials.SourceType.SALESFORCE) - .credentialDetails(updatedDetails) - .build(); - Credentials updatedCredentials = - discovery.updateCredentials(updateOptions).execute().getResult(); - - // Update assertion - assertEquals(newUrl, updatedCredentials.credentialDetails().url()); - - GetCredentialsOptions getOptions = - new GetCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId(credentialId) - .build(); - Credentials retrievedCredentials = discovery.getCredentials(getOptions).execute().getResult(); - - // Get assertions - assertEquals(Credentials.SourceType.SALESFORCE, retrievedCredentials.sourceType()); - assertEquals( - CredentialDetails.CredentialType.USERNAME_PASSWORD, - retrievedCredentials.credentialDetails().credentialType()); - assertEquals(newUrl, retrievedCredentials.credentialDetails().url()); - assertEquals(username, retrievedCredentials.credentialDetails().username()); - - ListCredentialsOptions listOptions = - new ListCredentialsOptions.Builder().environmentId(environmentId).build(); - CredentialsList credentialsList = discovery.listCredentials(listOptions).execute().getResult(); - - // List assertion - assertTrue(!credentialsList.getCredentials().isEmpty()); - - DeleteCredentialsOptions deleteOptions = - new DeleteCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId(credentialId) - .build(); - discovery.deleteCredentials(deleteOptions).execute(); - } - - /** Creates the event is successful. */ - @Test - public void createEventIsSuccessful() { - // create test document - DocumentAccepted accepted = createTestDocument(collectionId); - - // make query to get session_token - QueryOptions queryOptions = - new QueryOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .naturalLanguageQuery("field number 1") - .build(); - QueryResponse queryResponse = discovery.query(queryOptions).execute().getResult(); - String sessionToken = queryResponse.getSessionToken(); - - // make createEvent call - EventData eventData = - new EventData.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .documentId(accepted.getDocumentId()) - .sessionToken(sessionToken) - .build(); - CreateEventOptions createEventOptions = - new CreateEventOptions.Builder() - .type(CreateEventOptions.Type.CLICK) - .data(eventData) - .build(); - CreateEventResponse response = discovery.createEvent(createEventOptions).execute().getResult(); - - assertNotNull(response); - } - - /** Query log is successful. */ - // @Test - public void queryLogIsSuccessful() { - LogQueryResponse response = discovery.queryLog().execute().getResult(); - assertNotNull(response); - } - - /** Gets the metrics event rate is successful. */ - // @Test - public void getMetricsEventRateIsSuccessful() { - MetricResponse response = discovery.getMetricsEventRate().execute().getResult(); - assertNotNull(response); - } - - /** Gets the metrics query is successful. */ - // @Test - public void getMetricsQueryIsSuccessful() { - MetricResponse response = discovery.getMetricsQuery().execute().getResult(); - assertNotNull(response); - } - - /** Gets the metrics query event is successful. */ - // @Test - public void getMetricsQueryEventIsSuccessful() { - MetricResponse response = discovery.getMetricsQueryEvent().execute().getResult(); - assertNotNull(response); - } - - /** Gets the metrics query no results is successful. */ - // @Test - public void getMetricsQueryNoResultsIsSuccessful() { - MetricResponse response = discovery.getMetricsQueryNoResults().execute().getResult(); - assertNotNull(response); - } - - /** Gets the metrics query token event is successful. */ - // @Test - public void getMetricsQueryTokenEventIsSuccessful() { - MetricTokenResponse response = discovery.getMetricsQueryTokenEvent().execute().getResult(); - assertNotNull(response); - } - - /** - * Tokenization dictionary operations are successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void tokenizationDictionaryOperationsAreSuccessful() throws InterruptedException { - // create collection first because creating a tokenization dictionary currently is only - // supported in Japanese - // collections - CreateCollectionOptions createCollectionOptions = - new CreateCollectionOptions.Builder() - .environmentId(environmentId) - .name("tokenization-dict-testing-collection " + UUID.randomUUID().toString()) - .language(CreateCollectionOptions.Language.JA) - .build(); - Collection tokenDictTestCollection = - discovery.createCollection(createCollectionOptions).execute().getResult(); - String testCollectionId = tokenDictTestCollection.getCollectionId(); - - // System.out.println("Test collection created!"); - - try { - TokenDictRule tokenDictRule = - new TokenDictRule.Builder() - .text("token") - .partOfSpeech("noun") - .readings(Arrays.asList("reading_1", "reading_2")) - .tokens(Arrays.asList("token_1", "token_2")) - .build(); - - // the service doesn't seem to like when we try and move too fast - Thread.sleep(5000); - - // test creating tokenization dictionary - CreateTokenizationDictionaryOptions createOptions = - new CreateTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .addTokenizationRules(tokenDictRule) - .build(); - TokenDictStatusResponse createResponse = - discovery.createTokenizationDictionary(createOptions).execute().getResult(); - assertNotNull(createResponse); - - // test getting tokenization dictionary - GetTokenizationDictionaryStatusOptions getOptions = - new GetTokenizationDictionaryStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - TokenDictStatusResponse getResponse = - discovery.getTokenizationDictionaryStatus(getOptions).execute().getResult(); - assertNotNull(getResponse); - - Thread.sleep(5000); - - // test deleting tokenization dictionary - DeleteTokenizationDictionaryOptions deleteOptions = - new DeleteTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - discovery.deleteTokenizationDictionary(deleteOptions).execute(); - } catch (BadRequestException ex) { - // this most likely means the environment wasn't ready to handle another tokenization file - - // this is fine - // System.out.println("Service wasn't ready yet! Error: " + ex.getMessage()); - } finally { - // delete test collection - DeleteCollectionOptions deleteCollectionOptions = - new DeleteCollectionOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - discovery.deleteCollection(deleteCollectionOptions).execute(); - - // System.out.println("Test collection deleted"); - } - } - - /** - * Stopword list operations are successful. - * - * @throws FileNotFoundException the file not found exception - * @throws InterruptedException the interrupted exception - */ - @Test - public void stopwordListOperationsAreSuccessful() - throws FileNotFoundException, InterruptedException { - CreateCollectionOptions createCollectionOptions = - new CreateCollectionOptions.Builder() - .environmentId(environmentId) - .name("stopword-list-testing-collection " + UUID.randomUUID().toString()) - .language(CreateCollectionOptions.Language.EN) - .build(); - Collection tokenDictTestCollection = - discovery.createCollection(createCollectionOptions).execute().getResult(); - String testCollectionId = tokenDictTestCollection.getCollectionId(); - // System.out.println("Test collection created!"); - - try { - CreateStopwordListOptions createStopwordListOptions = - new CreateStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .stopwordFile(new FileInputStream(STOPWORDS_TEST_FILE)) - .stopwordFilename("test_stopword_file") - .build(); - TokenDictStatusResponse createResponse = - discovery.createStopwordList(createStopwordListOptions).execute().getResult(); - assertEquals("stopwords", createResponse.getType()); - - GetStopwordListStatusOptions getStopwordListStatusOptions = - new GetStopwordListStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - TokenDictStatusResponse getResponse = - discovery.getStopwordListStatus(getStopwordListStatusOptions).execute().getResult(); - assertEquals("stopwords", getResponse.getType()); - - DeleteStopwordListOptions deleteStopwordListOptions = - new DeleteStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - discovery.deleteStopwordList(deleteStopwordListOptions).execute(); - } catch (BadRequestException ex) { - // this most likely means the environment wasn't ready to handle another stopwords file - this - // is fine - // System.out.println("Service wasn't ready yet! Error: " + ex.getMessage()); - } finally { - DeleteCollectionOptions deleteCollectionOptions = - new DeleteCollectionOptions.Builder() - .environmentId(environmentId) - .collectionId(testCollectionId) - .build(); - discovery.deleteCollection(deleteCollectionOptions).execute(); - // System.out.println("Test collection deleted"); - } - } - - /** Gateway operations are successful. */ - @Test - public void gatewayOperationsAreSuccessful() { - String gatewayName = "java-sdk-test-gateway"; - - ListGatewaysOptions listGatewaysOptions = - new ListGatewaysOptions.Builder().environmentId(environmentId).build(); - GatewayList gatewayList = discovery.listGateways(listGatewaysOptions).execute().getResult(); - assertNotNull(gatewayList); - int originalListSize = gatewayList.getGateways().size(); - - CreateGatewayOptions createGatewayOptions = - new CreateGatewayOptions.Builder().environmentId(environmentId).name(gatewayName).build(); - Gateway gatewayResponse = discovery.createGateway(createGatewayOptions).execute().getResult(); - assertNotNull(gatewayResponse); - assertEquals(gatewayName, gatewayResponse.getName()); - String testGatewayId = gatewayResponse.getGatewayId(); - - gatewayList = discovery.listGateways(listGatewaysOptions).execute().getResult(); - assertTrue(gatewayList.getGateways().size() > originalListSize); - - GetGatewayOptions getGatewayOptions = - new GetGatewayOptions.Builder() - .environmentId(environmentId) - .gatewayId(testGatewayId) - .build(); - Gateway getGatewayResponse = discovery.getGateway(getGatewayOptions).execute().getResult(); - assertNotNull(getGatewayResponse); - assertEquals(gatewayName, getGatewayResponse.getName()); - - DeleteGatewayOptions deleteGatewayOptions = - new DeleteGatewayOptions.Builder() - .environmentId(environmentId) - .gatewayId(testGatewayId) - .build(); - discovery.deleteGateway(deleteGatewayOptions).execute(); - } - - private Environment createEnvironment(CreateEnvironmentOptions createOptions) { - return discovery.createEnvironment(createOptions).execute().getResult(); - } - - private void deleteEnvironment(DeleteEnvironmentOptions deleteOptions) { - discovery.deleteEnvironment(deleteOptions).execute(); - } - - private Configuration createConfiguration(CreateConfigurationOptions createOptions) { - Configuration createResponse = - discovery.createConfiguration(createOptions).execute().getResult(); - configurationIds.add(createResponse.configurationId()); - return createResponse; - } - - private void deleteConfiguration(DeleteConfigurationOptions deleteOptions) { - discovery.deleteConfiguration(deleteOptions).execute(); - configurationIds.remove(deleteOptions.configurationId()); - } - - private Configuration createTestConfig() { - String uniqueConfigName = uniqueName + "-config"; - CreateConfigurationOptions.Builder createBuilder = - new CreateConfigurationOptions.Builder(environmentId, uniqueConfigName); - return createConfiguration(createBuilder.build()); - } - - private Collection createCollection(CreateCollectionOptions createOptions) { - Collection createResponse = discovery.createCollection(createOptions).execute().getResult(); - collectionIds.add(createResponse.getCollectionId()); - return createResponse; - } - - private void deleteCollection(DeleteCollectionOptions deleteOptions) { - discovery.deleteCollection(deleteOptions).execute(); - collectionIds.remove(deleteOptions.collectionId()); - } - - private Collection createTestCollection() { - Configuration createConfigResponse = createTestConfig(); - - String uniqueCollectionName = "java-sdk-" + uniqueName + "-collection"; - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(createConfigResponse.configurationId()); - return createCollection(createCollectionBuilder.build()); - } - - private DocumentAccepted createNestedTestDocument(String collectionId) { - String myDocumentJson = "{\"nested_fields\":{\"field\":\"value\"}}"; - return createTestDocument(myDocumentJson, UUID.randomUUID().toString(), collectionId); - } - - private DocumentAccepted createTestDocument(String collectionId) { - String myDocumentJson = "{\"field\":\"value\"}"; - return createTestDocument(myDocumentJson, UUID.randomUUID().toString(), collectionId); - } - - private DocumentAccepted createTestDocument(String filename, String collectionId) { - String myDocumentJson = "{\"field\":\"value\"}"; - return createTestDocument(myDocumentJson, filename, collectionId); - } - - @SuppressWarnings("deprecation") - private DocumentAccepted createTestDocument(String json, String filename, String collectionId) { - InputStream documentStream = new ByteArrayInputStream(json.getBytes()); - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename(filename); - DocumentAccepted createResponse = discovery.addDocument(builder.build()).execute().getResult(); - WaitFor.Condition documentAccepted = - new WaitForDocumentAccepted(environmentId, collectionId, createResponse.getDocumentId()); - WaitFor.waitFor(documentAccepted, 5, TimeUnit.SECONDS, 500); - return createResponse; - } - - private List createTestDocuments(String collectionId, int totalDocuments) { - List responses = new ArrayList(); - String baseDocumentJson = "{\"field\":"; - for (int i = 0; i < totalDocuments; i++) { - String json = baseDocumentJson + i + "}"; - String filename = "test_document_" + i; - responses.add(createTestDocument(json, filename, collectionId)); - } - return responses; - } - - private synchronized String setupTestDocuments() { - if (collectionId != null) { - return collectionId; - } - Collection collection = createTestCollection(); - String collectionId = collection.getCollectionId(); - @SuppressWarnings("unused") - List documentAccepted = createTestDocuments(collectionId, 10); - - WaitFor.Condition collectionAvailable = - new WaitForCollectionAvailable(environmentId, collectionId); - WaitFor.waitFor(collectionAvailable, 5, TimeUnit.SECONDS, 500); - - return collectionId; - } - - private TrainingQuery createTestQuery(String collectionId, String naturalLanguageQuery) { - AddTrainingDataOptions.Builder builder = - new AddTrainingDataOptions.Builder(environmentId, collectionId); - builder.naturalLanguageQuery(naturalLanguageQuery); - return discovery.addTrainingData(builder.build()).execute().getResult(); - } - - private List createTestQueries(String collectionId, int totalQueries) { - List responses = new ArrayList<>(); - for (int i = 0; i < totalQueries; i++) { - String naturalLanguageQuery = "Test query " + i; - responses.add(createTestQuery(collectionId, naturalLanguageQuery)); - } - return responses; - } - - private synchronized String setupTestQueries(String collectionId) { - ListTrainingDataOptions.Builder builder = - new ListTrainingDataOptions.Builder(environmentId, collectionId); - if (discovery.listTrainingData(builder.build()).execute().getResult().getQueries().size() > 0) { - return collectionId; - } - createTestQueries(collectionId, 10); - - WaitFor.Condition collectionAvailable = - new WaitForCollectionAvailable(environmentId, collectionId); - WaitFor.waitFor(collectionAvailable, 5, TimeUnit.SECONDS, 500); - - return collectionId; - } - - /** - * Gets the test configuration. - * - * @param jsonFile the json file - */ - public static Configuration getTestConfiguration(String jsonFile) { - try { - return GsonSingleton.getGson().fromJson(new FileReader(jsonFile), Configuration.class); - } catch (FileNotFoundException e) { - return null; - } - } - - private static class EnvironmentReady implements WaitFor.Condition { - private final Discovery discovery; - private final String environmentId; - - private EnvironmentReady(Discovery discovery, String environmentId) { - this.discovery = discovery; - this.environmentId = environmentId; - } - - @Override - public boolean isSatisfied() { - GetEnvironmentOptions getOptions = new GetEnvironmentOptions.Builder(environmentId).build(); - String status = discovery.getEnvironment(getOptions).execute().getResult().getStatus(); - return status.equals(Environment.Status.ACTIVE); - } - } - - private class WaitForDocumentAccepted implements WaitFor.Condition { - WaitForDocumentAccepted(String environmentId, String collectionId, String documentId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - this.documentId = documentId; - } - - @Override - public boolean isSatisfied() { - GetDocumentStatusOptions getOptions = - new GetDocumentStatusOptions.Builder(environmentId, collectionId, documentId).build(); - String status = discovery.getDocumentStatus(getOptions).execute().getResult().getStatus(); - return status.equals(DocumentStatus.Status.AVAILABLE); - } - - private final String environmentId; - private final String collectionId; - private final String documentId; - } - - private class WaitForCollectionAvailable implements WaitFor.Condition { - WaitForCollectionAvailable(String environmentId, String collectionId) { - this.environmentId = environmentId; - this.collectionId = collectionId; - } - - @Override - public boolean isSatisfied() { - GetCollectionOptions getOptions = - new GetCollectionOptions.Builder(environmentId, collectionId).build(); - Collection collectionResult = discovery.getCollection(getOptions).execute().getResult(); - String status = collectionResult.getStatus(); - return status.equals(Collection.Status.ACTIVE); - } - - private final String environmentId; - private final String collectionId; - } - - /** This only works on a Cloud Pak for Data instance, so ignoring to just run manually. */ - @Test - @Ignore - public void testQueryWithSpellingSuggestions() { - Authenticator authenticator = new BearerTokenAuthenticator(""); // fill in - Discovery service = new Discovery("2019-10-03", authenticator); - service.setServiceUrl(""); - - HttpConfigOptions configOptions = - new HttpConfigOptions.Builder().disableSslVerification(true).build(); - service.configureClient(configOptions); - - QueryOptions options = - new QueryOptions.Builder() - .naturalLanguageQuery("cluod") - .spellingSuggestions(true) - .environmentId("") // fill in - .collectionId("") // fill in - .build(); - QueryResponse response = service.query(options).execute().getResult(); - // System.out.println(response); - } - - /** This only works on a Cloud Pak for Data instance, so ignoring to just run manually. */ - @Test - @Ignore - public void testGetAutocompletion() { - Authenticator authenticator = new BearerTokenAuthenticator(""); // fill in - Discovery service = new Discovery("2019-10-03", authenticator); - service.setServiceUrl(""); - - HttpConfigOptions configOptions = - new HttpConfigOptions.Builder().disableSslVerification(true).build(); - service.configureClient(configOptions); - - GetAutocompletionOptions options = - new GetAutocompletionOptions.Builder() - .environmentId("") // fill in - .collectionId("") // fill in - .prefix("Ba") - .count(10L) - .build(); - Completions response = service.getAutocompletion(options).execute().getResult(); - // System.out.println(response); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceTest.java deleted file mode 100644 index 381ce68bcf..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceTest.java +++ /dev/null @@ -1,2553 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.google.gson.JsonIOException; -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSyntaxException; -import com.ibm.cloud.sdk.core.http.HttpMediaType; -import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; -import com.ibm.cloud.sdk.core.util.GsonSingleton; -import com.ibm.watson.common.WatsonServiceUnitTest; -import com.ibm.watson.discovery.query.AggregationType; -import com.ibm.watson.discovery.query.Operator; -import com.ibm.watson.discovery.v1.model.AddDocumentOptions; -import com.ibm.watson.discovery.v1.model.AddTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.Collection; -import com.ibm.watson.discovery.v1.model.Configuration; -import com.ibm.watson.discovery.v1.model.Conversions; -import com.ibm.watson.discovery.v1.model.CreateCollectionOptions; -import com.ibm.watson.discovery.v1.model.CreateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.CreateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.CreateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.CreateEventOptions; -import com.ibm.watson.discovery.v1.model.CreateEventResponse; -import com.ibm.watson.discovery.v1.model.CreateExpansionsOptions; -import com.ibm.watson.discovery.v1.model.CreateGatewayOptions; -import com.ibm.watson.discovery.v1.model.CreateStopwordListOptions; -import com.ibm.watson.discovery.v1.model.CreateTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.CreateTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.CredentialDetails; -import com.ibm.watson.discovery.v1.model.Credentials; -import com.ibm.watson.discovery.v1.model.CredentialsList; -import com.ibm.watson.discovery.v1.model.DeleteAllTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionResponse; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationOptions; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationResponse; -import com.ibm.watson.discovery.v1.model.DeleteCredentials; -import com.ibm.watson.discovery.v1.model.DeleteCredentialsOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentResponse; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentResponse; -import com.ibm.watson.discovery.v1.model.DeleteExpansionsOptions; -import com.ibm.watson.discovery.v1.model.DeleteGatewayOptions; -import com.ibm.watson.discovery.v1.model.DeleteStopwordListOptions; -import com.ibm.watson.discovery.v1.model.DeleteTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.DeleteUserDataOptions; -import com.ibm.watson.discovery.v1.model.DocumentAccepted; -import com.ibm.watson.discovery.v1.model.DocumentStatus; -import com.ibm.watson.discovery.v1.model.Enrichment; -import com.ibm.watson.discovery.v1.model.Environment; -import com.ibm.watson.discovery.v1.model.EventData; -import com.ibm.watson.discovery.v1.model.Expansion; -import com.ibm.watson.discovery.v1.model.Expansions; -import com.ibm.watson.discovery.v1.model.FederatedQueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.FederatedQueryOptions; -import com.ibm.watson.discovery.v1.model.Gateway; -import com.ibm.watson.discovery.v1.model.GatewayDelete; -import com.ibm.watson.discovery.v1.model.GatewayList; -import com.ibm.watson.discovery.v1.model.GetCollectionOptions; -import com.ibm.watson.discovery.v1.model.GetConfigurationOptions; -import com.ibm.watson.discovery.v1.model.GetCredentialsOptions; -import com.ibm.watson.discovery.v1.model.GetDocumentStatusOptions; -import com.ibm.watson.discovery.v1.model.GetEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.GetGatewayOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsEventRateOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryEventOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryNoResultsOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryTokenEventOptions; -import com.ibm.watson.discovery.v1.model.GetStopwordListStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTokenizationDictionaryStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsResponse; -import com.ibm.watson.discovery.v1.model.ListCollectionsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionsResponse; -import com.ibm.watson.discovery.v1.model.ListConfigurationsOptions; -import com.ibm.watson.discovery.v1.model.ListConfigurationsResponse; -import com.ibm.watson.discovery.v1.model.ListCredentialsOptions; -import com.ibm.watson.discovery.v1.model.ListEnvironmentsResponse; -import com.ibm.watson.discovery.v1.model.ListExpansionsOptions; -import com.ibm.watson.discovery.v1.model.ListFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListGatewaysOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingExamplesOptions; -import com.ibm.watson.discovery.v1.model.LogQueryResponse; -import com.ibm.watson.discovery.v1.model.MetricResponse; -import com.ibm.watson.discovery.v1.model.MetricTokenResponse; -import com.ibm.watson.discovery.v1.model.NormalizationOperation; -import com.ibm.watson.discovery.v1.model.QueryLogOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesResponse; -import com.ibm.watson.discovery.v1.model.QueryOptions; -import com.ibm.watson.discovery.v1.model.QueryResponse; -import com.ibm.watson.discovery.v1.model.Source; -import com.ibm.watson.discovery.v1.model.SourceOptions; -import com.ibm.watson.discovery.v1.model.SourceOptionsBuckets; -import com.ibm.watson.discovery.v1.model.SourceOptionsFolder; -import com.ibm.watson.discovery.v1.model.SourceOptionsObject; -import com.ibm.watson.discovery.v1.model.SourceOptionsSiteColl; -import com.ibm.watson.discovery.v1.model.SourceOptionsWebCrawl; -import com.ibm.watson.discovery.v1.model.TokenDictRule; -import com.ibm.watson.discovery.v1.model.TokenDictStatusResponse; -import com.ibm.watson.discovery.v1.model.TrainingDataSet; -import com.ibm.watson.discovery.v1.model.TrainingExample; -import com.ibm.watson.discovery.v1.model.TrainingExampleList; -import com.ibm.watson.discovery.v1.model.TrainingQuery; -import com.ibm.watson.discovery.v1.model.UpdateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.UpdateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.UpdateDocumentOptions; -import com.ibm.watson.discovery.v1.model.UpdateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.UpdateTrainingExampleOptions; -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.RecordedRequest; -import org.junit.*; - -/** Unit tests for {@link Discovery}. */ -@Ignore -public class DiscoveryServiceTest extends WatsonServiceUnitTest { - private Discovery discoveryService; - - private static final String VERSION = "2019-04-30"; - - private static final String RESOURCE = "src/test/resources/discovery/v1/"; - private static final String DISCOVERY_TEST_CONFIG_FILE = RESOURCE + "test-config.json"; - private static final String ENV1_PATH = "/v1/environments/mock_envid?version=" + VERSION; - private static final String ENV2_PATH = "/v1/environments?version=" + VERSION; - private static final String CONF1_PATH = - "/v1/environments/mock_envid/configurations?version=" + VERSION; - private static final String CONF2_PATH = - "/v1/environments/mock_envid/configurations/mock_confid?version=" + VERSION; - private static final String COLL1_PATH = - "/v1/environments/mock_envid/collections?version=" + VERSION; - private static final String COLL2_PATH = - "/v1/environments/mock_envid/collections/mock_collid?version=" + VERSION; - private static final String COLL3_PATH = - "/v1/environments/mock_envid/collections/mock_collid/fields?version=" + VERSION; - private static final String DOCS1_PATH = - "/v1/environments/mock_envid/collections/mock_collid/documents?version=" + VERSION; - private static final String DOCS2_PATH = - "/v1/environments/mock_envid/collections/mock_collid/documents/mock_docid?version=" + VERSION; - private static final String Q1_PATH = - "/v1/environments/mock_envid/collections/mock_collid/query?version=" + VERSION; - private static final String Q2_PATH = "/v1/environments/mock_envid/query?version=" + VERSION; - private static final String Q3_PATH = - "/v1/environments/mock_envid/notices?version=" + VERSION + "&collection_ids=mock_collid"; - private static final String Q4_PATH = - "/v1/environments/mock_envid/collections/mock_collid/notices?version=" + VERSION; - private static final String TRAINING1_PATH = - "/v1/environments/mock_envid/collections/mock_collid/training_data?version=" + VERSION; - private static final String TRAINING2_PATH = - "/v1/environments/mock_envid/collections/mock_collid/training_data/mock_queryid/examples?version=" - + VERSION; - private static final String TRAINING3_PATH = - "/v1/environments/mock_envid/collections/mock_collid/training_data/mock_queryid?version=" - + VERSION; - private static final String TRAINING4_PATH = - "/v1/environments/mock_envid/collections/mock_collid/training_data/mock_queryid/examples/mock_docid?version=" - + VERSION; - private static final String FIELD_PATH = - "/v1/environments/mock_envid/fields?version=" + VERSION + "&collection_ids=mock_collid"; - private static final String EXPANSIONS_PATH = - "/v1/environments/mock_envid/collections/mock_collid/expansions?version=" + VERSION; - private static final String DELETE_USER_DATA_PATH = - "/v1/user_data?version=" + VERSION + "&customer_id=java_sdk_test_id"; - private static final String CREATE_CREDENTIALS_PATH = - "/v1/environments/mock_envid/credentials?version=" + VERSION; - private static final String DELETE_CREDENTIALS_PATH = - "/v1/environments/mock_envid/credentials/credential_id?version=" + VERSION; - private static final String GET_CREDENTIALS_PATH = - "/v1/environments/mock_envid/credentials/credential_id?version=" + VERSION; - private static final String LIST_CREDENTIALS_PATH = - "/v1/environments/mock_envid/credentials?version=" + VERSION; - private static final String UPDATE_CREDENTIALS_PATH = - "/v1/environments/mock_envid/credentials/new_credential_id?version=" + VERSION; - private static final String CREATE_EVENT_PATH = "/v1/events?version=" + VERSION; - private static final String GET_METRICS_EVENT_RATE_PATH = - "/v1/metrics/event_rate?version=" + VERSION; - private static final String GET_METRICS_QUERY_PATH = - "/v1/metrics/number_of_queries?version=" + VERSION; - private static final String GET_METRICS_QUERY_EVENT_PATH = - "/v1/metrics/number_of_queries_with_event?version=" + VERSION; - private static final String GET_METRICS_QUERY_NO_RESULTS_PATH = - "/v1/metrics/number_of_queries_with_no_search_results?version=" + VERSION; - private static final String GET_METRICS_QUERY_TOKEN_EVENT_PATH = - "/v1/metrics/top_query_tokens_with_event_rate?version=" + VERSION; - private static final String QUERY_LOG_PATH = "/v1/logs?version=" + VERSION; - - private String environmentId; - private String environmentName; - private String environmentDesc; - private String uniqueConfigName; - private String configurationId; - private String uniqueCollectionName; - private String collectionId; - private String documentId; - private String queryId; - private Date date; - private InputStream testStream; - - private Environment envResp; - private ListEnvironmentsResponse envsResp; - private Environment createEnvResp; - private DeleteEnvironmentResponse deleteEnvResp; - private Environment updateEnvResp; - private Configuration createConfResp; - private ListConfigurationsResponse getConfsResp; - private Configuration getConfResp; - private DeleteConfigurationResponse deleteConfResp; - private Configuration updateConfResp; - private Collection createCollResp; - private ListCollectionsResponse getCollsResp; - private Collection getCollResp; - private DeleteCollectionResponse deleteCollResp; - private ListCollectionFieldsResponse listfieldsCollResp; - private DocumentAccepted createDocResp; - private DocumentAccepted updateDocResp; - private DocumentStatus getDocResp; - private DeleteDocumentResponse deleteDocResp; - private QueryResponse queryResp; - private QueryNoticesResponse queryNoticesResp; - private TrainingQuery addTrainingQueryResp; - private TrainingDataSet listTrainingDataResp; - private TrainingExample createTrainingExampleResp; - private TrainingQuery getTrainingDataResp; - private TrainingExample getTrainingExampleResp; - private TrainingExample updateTrainingExampleResp; - private TrainingExampleList listTrainingExamplesResp; - private ListCollectionFieldsResponse listFieldsResp; - private Expansions expansionsResp; - private Credentials credentialsResp; - private CredentialsList listCredentialsResp; - private DeleteCredentials deleteCredentialsResp; - private CreateEventResponse createEventResp; - private MetricResponse metricResp; - private MetricTokenResponse metricTokenResp; - private LogQueryResponse logQueryResp; - private TokenDictStatusResponse tokenDictStatusResponse; - private TokenDictStatusResponse tokenDictStatusResponseStopwords; - private Gateway gatewayResponse; - private GatewayList listGatewaysResponse; - private GatewayDelete deleteGatewayResponse; - - /** Setup class. */ - @BeforeClass - public static void setupClass() {} - - /** - * Setup. - * - * @throws Exception the exception - */ - @Before - public void setup() throws Exception { - super.setUp(); - discoveryService = new Discovery(VERSION, new NoAuthAuthenticator()); - discoveryService.setServiceUrl(getMockWebServerUrl()); - - environmentId = "mock_envid"; - environmentName = "my_environment"; - environmentDesc = "My environment"; - uniqueConfigName = "my-config"; - configurationId = "mock_confid"; - uniqueCollectionName = "mock_collname"; - collectionId = "mock_collid"; - documentId = "mock_docid"; - queryId = "mock_queryid"; - date = new Date(); - testStream = new FileInputStream(RESOURCE + "get_env_resp.json"); - - envResp = loadFixture(RESOURCE + "get_env_resp.json", Environment.class); - envsResp = loadFixture(RESOURCE + "get_envs_resp.json", ListEnvironmentsResponse.class); - createEnvResp = loadFixture(RESOURCE + "create_env_resp.json", Environment.class); - deleteEnvResp = loadFixture(RESOURCE + "delete_env_resp.json", DeleteEnvironmentResponse.class); - updateEnvResp = loadFixture(RESOURCE + "update_env_resp.json", Environment.class); - createConfResp = loadFixture(RESOURCE + "create_conf_resp.json", Configuration.class); - getConfsResp = loadFixture(RESOURCE + "get_confs_resp.json", ListConfigurationsResponse.class); - getConfResp = loadFixture(RESOURCE + "get_conf_resp.json", Configuration.class); - deleteConfResp = - loadFixture(RESOURCE + "delete_conf_resp.json", DeleteConfigurationResponse.class); - updateConfResp = loadFixture(RESOURCE + "update_conf_resp.json", Configuration.class); - createCollResp = loadFixture(RESOURCE + "create_coll_resp.json", Collection.class); - getCollsResp = loadFixture(RESOURCE + "get_coll_resp.json", ListCollectionsResponse.class); - getCollResp = loadFixture(RESOURCE + "get_coll1_resp.json", Collection.class); - deleteCollResp = - loadFixture(RESOURCE + "delete_coll_resp.json", DeleteCollectionResponse.class); - listfieldsCollResp = - loadFixture(RESOURCE + "listfields_coll_resp.json", ListCollectionFieldsResponse.class); - createDocResp = loadFixture(RESOURCE + "create_doc_resp.json", DocumentAccepted.class); - updateDocResp = loadFixture(RESOURCE + "update_doc_resp.json", DocumentAccepted.class); - getDocResp = loadFixture(RESOURCE + "get_doc_resp.json", DocumentStatus.class); - deleteDocResp = loadFixture(RESOURCE + "delete_doc_resp.json", DeleteDocumentResponse.class); - queryResp = loadFixture(RESOURCE + "query1_resp.json", QueryResponse.class); - queryNoticesResp = loadFixture(RESOURCE + "query1_resp.json", QueryNoticesResponse.class); - addTrainingQueryResp = - loadFixture(RESOURCE + "add_training_query_resp.json", TrainingQuery.class); - listTrainingDataResp = - loadFixture(RESOURCE + "list_training_data_resp.json", TrainingDataSet.class); - createTrainingExampleResp = - loadFixture(RESOURCE + "add_training_example_resp.json", TrainingExample.class); - getTrainingDataResp = - loadFixture(RESOURCE + "get_training_data_resp.json", TrainingQuery.class); - getTrainingExampleResp = - loadFixture(RESOURCE + "get_training_example_resp.json", TrainingExample.class); - updateTrainingExampleResp = - loadFixture(RESOURCE + "update_training_example_resp.json", TrainingExample.class); - listTrainingExamplesResp = - loadFixture(RESOURCE + "list_training_examples_resp.json", TrainingExampleList.class); - listFieldsResp = - loadFixture(RESOURCE + "list_fields_resp.json", ListCollectionFieldsResponse.class); - expansionsResp = loadFixture(RESOURCE + "expansions_resp.json", Expansions.class); - credentialsResp = loadFixture(RESOURCE + "credentials_resp.json", Credentials.class); - listCredentialsResp = - loadFixture(RESOURCE + "list_credentials_resp.json", CredentialsList.class); - deleteCredentialsResp = - loadFixture(RESOURCE + "delete_credentials_resp.json", DeleteCredentials.class); - createEventResp = loadFixture(RESOURCE + "create_event_resp.json", CreateEventResponse.class); - metricResp = loadFixture(RESOURCE + "metric_resp.json", MetricResponse.class); - metricTokenResp = loadFixture(RESOURCE + "metric_token_resp.json", MetricTokenResponse.class); - logQueryResp = loadFixture(RESOURCE + "log_query_resp.json", LogQueryResponse.class); - tokenDictStatusResponse = - loadFixture(RESOURCE + "token_dict_status_resp.json", TokenDictStatusResponse.class); - tokenDictStatusResponseStopwords = - loadFixture( - RESOURCE + "token_dict_status_resp_stopwords.json", TokenDictStatusResponse.class); - gatewayResponse = loadFixture(RESOURCE + "gateway_resp.json", Gateway.class); - listGatewaysResponse = loadFixture(RESOURCE + "list_gateways_resp.json", GatewayList.class); - deleteGatewayResponse = loadFixture(RESOURCE + "delete_gateway_resp.json", GatewayDelete.class); - } - - /** Cleanup. */ - @After - public void cleanup() {} - - /** Negative - Test constructor with null version date. */ - @Test(expected = IllegalArgumentException.class) - public void testConstructorWithNullVersionDate() { - new Discovery(null, new NoAuthAuthenticator()); - } - - /** Negative - Test constructor with empty version date. */ - @Test(expected = IllegalArgumentException.class) - public void testConstructorWithEmptyVersionDate() { - new Discovery("", new NoAuthAuthenticator()); - } - - /** - * Gets the environment is successful. - * - * @throws InterruptedException the interrupted exception - */ - // Environment tests - @Test - public void getEnvironmentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(envResp)); - GetEnvironmentOptions getRequest = new GetEnvironmentOptions.Builder(environmentId).build(); - Environment response = discoveryService.getEnvironment(getRequest).execute().getResult(); - final RecordedRequest request = server.takeRequest(); - - assertEquals(ENV1_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(envResp, response); - } - - /** Gets the environment fails 1. */ - @Test(expected = IllegalArgumentException.class) - public void getEnvironmentFails1() { - GetEnvironmentOptions getRequest = new GetEnvironmentOptions.Builder().build(); - @SuppressWarnings("unused") - Environment response = discoveryService.getEnvironment(getRequest).execute().getResult(); - } - - /** Gets the environment fails 2. */ - @Test(expected = IllegalArgumentException.class) - public void getEnvironmentFails2() { - @SuppressWarnings("unused") - Environment response = discoveryService.getEnvironment(null).execute().getResult(); - } - - /** - * List environments is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listEnvironmentsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(envsResp)); - ListEnvironmentsResponse response = - discoveryService.listEnvironments(null).execute().getResult(); - final RecordedRequest request = server.takeRequest(); - - assertEquals(ENV2_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(envsResp, response); - } - - // Deleted test for listEnvironments with null name as this does not fail in the current SDK - - /** - * Creates the environment is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void createEnvironmentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createEnvResp)); - CreateEnvironmentOptions.Builder createRequestBuilder = - new CreateEnvironmentOptions.Builder() - .name(environmentName) - .size(CreateEnvironmentOptions.Size.XS); - createRequestBuilder.description(environmentDesc); - Environment response = - discoveryService.createEnvironment(createRequestBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(ENV2_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createEnvResp, response); - } - - // Deleted test for createEnvironment with null name as this does not fail in the current SDK - - /** - * Delete environment is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteEnvironmentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(deleteEnvResp)); - DeleteEnvironmentOptions deleteRequest = - new DeleteEnvironmentOptions.Builder(environmentId).build(); - DeleteEnvironmentResponse response = - discoveryService.deleteEnvironment(deleteRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(ENV1_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - assertEquals(deleteEnvResp.getEnvironmentId(), response.getEnvironmentId()); - assertEquals(deleteEnvResp.getStatus(), response.getStatus()); - } - - /** Delete environment fails. */ - @Test(expected = IllegalArgumentException.class) - public void deleteEnvironmentFails() { - discoveryService.deleteEnvironment(null).execute().getResult(); - } - - /** - * Update environment is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void updateEnvironmentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(updateEnvResp)); - UpdateEnvironmentOptions updateOptions = - new UpdateEnvironmentOptions.Builder(environmentId) - .name(environmentName) - .description(environmentDesc) - .size(UpdateEnvironmentOptions.Size.L) - .build(); - - assertEquals(environmentId, updateOptions.environmentId()); - assertEquals(environmentName, updateOptions.name()); - assertEquals(environmentDesc, updateOptions.description()); - assertEquals(UpdateEnvironmentOptions.Size.L, updateOptions.size()); - - Environment response = discoveryService.updateEnvironment(updateOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(ENV1_PATH, request.getPath()); - assertEquals(PUT, request.getMethod()); - assertEquals(updateEnvResp, response); - } - - /** Test source options. */ - @Test - public void testSourceOptions() { - String folderOwnerUserId = "folder_owner_user_id"; - String folderId = "folder_id"; - Long limit = 10L; - String objectName = "object_name"; - String siteCollectionPath = "site_collection_path"; - String url = "url"; - Long maximumHops = 5L; - Long requestTimeout = 2L; - String bucketName = "bucket_name"; - - SourceOptionsFolder folder = - new SourceOptionsFolder.Builder() - .ownerUserId(folderOwnerUserId) - .folderId(folderId) - .limit(limit) - .build(); - SourceOptionsObject object = - new SourceOptionsObject.Builder().name(objectName).limit(limit).build(); - SourceOptionsSiteColl siteColl = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath(siteCollectionPath) - .limit(limit) - .build(); - SourceOptionsWebCrawl webCrawl = - new SourceOptionsWebCrawl.Builder() - .url(url) - .limitToStartingHosts(true) - .crawlSpeed(SourceOptionsWebCrawl.CrawlSpeed.AGGRESSIVE) - .allowUntrustedCertificate(true) - .maximumHops(maximumHops) - .requestTimeout(requestTimeout) - .overrideRobotsTxt(true) - .build(); - SourceOptionsBuckets buckets = - new SourceOptionsBuckets.Builder().name(bucketName).limit(limit).build(); - SourceOptions sourceOptions = - new SourceOptions.Builder() - .folders(Collections.singletonList(folder)) - .objects(Collections.singletonList(object)) - .siteCollections(Collections.singletonList(siteColl)) - .urls(Collections.singletonList(webCrawl)) - .buckets(Collections.singletonList(buckets)) - .crawlAllBuckets(true) - .build(); - - assertEquals(folderOwnerUserId, sourceOptions.folders().get(0).ownerUserId()); - assertEquals(folderId, sourceOptions.folders().get(0).folderId()); - assertEquals(limit, sourceOptions.folders().get(0).limit()); - assertEquals(objectName, sourceOptions.objects().get(0).name()); - assertEquals(limit, sourceOptions.objects().get(0).limit()); - assertEquals(siteCollectionPath, sourceOptions.siteCollections().get(0).siteCollectionPath()); - assertEquals(limit, sourceOptions.siteCollections().get(0).limit()); - assertEquals(url, sourceOptions.urls().get(0).url()); - assertTrue(sourceOptions.urls().get(0).limitToStartingHosts()); - assertEquals( - SourceOptionsWebCrawl.CrawlSpeed.AGGRESSIVE, sourceOptions.urls().get(0).crawlSpeed()); - assertTrue(sourceOptions.urls().get(0).allowUntrustedCertificate()); - assertEquals(maximumHops, sourceOptions.urls().get(0).maximumHops()); - assertEquals(requestTimeout, sourceOptions.urls().get(0).requestTimeout()); - assertTrue(sourceOptions.urls().get(0).overrideRobotsTxt()); - assertEquals(bucketName, sourceOptions.buckets().get(0).name()); - assertEquals(limit, sourceOptions.buckets().get(0).limit()); - assertTrue(sourceOptions.crawlAllBuckets()); - } - - /** Test create configuration options. */ - // Configuration tests - @Test - public void testCreateConfigurationOptions() { - String name = "name"; - String description = "description"; - Conversions conversions = new Conversions.Builder().build(); - String firstEnrichmentName = "first"; - String secondEnrichmentName = "second"; - String sourceField = "source_field"; - String destinationField = "destination_field"; - List enrichments = new ArrayList<>(); - Enrichment firstEnrichment = - new Enrichment.Builder() - .enrichment(firstEnrichmentName) - .sourceField(sourceField) - .destinationField(destinationField) - .build(); - enrichments.add(firstEnrichment); - Enrichment secondEnrichment = - new Enrichment.Builder() - .enrichment(secondEnrichmentName) - .sourceField(sourceField) - .destinationField(destinationField) - .build(); - List normalizationOperations = new ArrayList<>(); - NormalizationOperation firstOp = - new NormalizationOperation.Builder() - .operation(NormalizationOperation.Operation.MERGE) - .build(); - NormalizationOperation secondOp = - new NormalizationOperation.Builder() - .operation(NormalizationOperation.Operation.COPY) - .build(); - normalizationOperations.add(firstOp); - Source source = new Source.Builder().build(); - - CreateConfigurationOptions createConfigurationOptions = - new CreateConfigurationOptions.Builder() - .environmentId(environmentId) - .name(name) - .description(description) - .conversions(conversions) - .enrichments(enrichments) - .addEnrichment(secondEnrichment) - .normalizations(normalizationOperations) - .addNormalization(secondOp) - .source(source) - .build(); - createConfigurationOptions = createConfigurationOptions.newBuilder().build(); - - enrichments.add(secondEnrichment); - normalizationOperations.add(secondOp); - - assertEquals(environmentId, createConfigurationOptions.environmentId()); - assertEquals(name, createConfigurationOptions.name()); - assertEquals(description, createConfigurationOptions.description()); - assertEquals(conversions, createConfigurationOptions.conversions()); - assertEquals(enrichments, createConfigurationOptions.enrichments()); - assertEquals(normalizationOperations, createConfigurationOptions.normalizations()); - assertEquals(source, createConfigurationOptions.source()); - } - - /** - * Creates the configuration is successful. - * - * @throws JsonSyntaxException the json syntax exception - * @throws JsonIOException the json IO exception - * @throws FileNotFoundException the file not found exception - * @throws InterruptedException the interrupted exception - */ - @Test - public void createConfigurationIsSuccessful() - throws JsonSyntaxException, JsonIOException, FileNotFoundException, InterruptedException { - server.enqueue(jsonResponse(createConfResp)); - CreateConfigurationOptions.Builder createBuilder = new CreateConfigurationOptions.Builder(); - Configuration configuration = - GsonSingleton.getGson() - .fromJson(new FileReader(DISCOVERY_TEST_CONFIG_FILE), Configuration.class); - createBuilder.configuration(configuration); - createBuilder.environmentId(environmentId); - createBuilder.name(uniqueConfigName); - Configuration response = - discoveryService.createConfiguration(createBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CONF1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createConfResp, response); - } - - /** - * Gets the configuration is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getConfigurationIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getConfResp)); - - GetConfigurationOptions getRequest = - new GetConfigurationOptions.Builder(environmentId, configurationId).build(); - Configuration response = discoveryService.getConfiguration(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CONF2_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getConfResp, response); - } - - /** - * Gets the configurations is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getConfigurationsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getConfsResp)); - ListConfigurationsOptions getRequest = - new ListConfigurationsOptions.Builder(environmentId).build(); - ListConfigurationsResponse response = - discoveryService.listConfigurations(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CONF1_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getConfsResp, response); - } - - /** - * Delete configuration is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteConfigurationIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(deleteConfResp)); - DeleteConfigurationOptions deleteRequest = - new DeleteConfigurationOptions.Builder(environmentId, configurationId).build(); - DeleteConfigurationResponse response = - discoveryService.deleteConfiguration(deleteRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CONF2_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - assertEquals(deleteConfResp.getConfigurationId(), response.getConfigurationId()); - assertEquals(DeleteConfigurationResponse.Status.DELETED, response.getStatus()); - assertNotNull(response.getNotices()); - } - - /** - * Update configuration is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void updateConfigurationIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(updateConfResp)); - UpdateConfigurationOptions.Builder updateBuilder = new UpdateConfigurationOptions.Builder(); - updateBuilder.configurationId(configurationId); - updateBuilder.environmentId(environmentId); - Configuration newConf = new Configuration.Builder().name("newName").build(); - updateBuilder.configuration(newConf); - - Configuration response = - discoveryService.updateConfiguration(updateBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CONF2_PATH, request.getPath()); - assertEquals(PUT, request.getMethod()); - assertEquals(updateConfResp, response); - } - - /** - * Creates the collection is successful. - * - * @throws InterruptedException the interrupted exception - */ - // Collection tests - @Test - public void createCollectionIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createCollResp)); - CreateCollectionOptions.Builder createCollectionBuilder = - new CreateCollectionOptions.Builder(environmentId, uniqueCollectionName) - .configurationId(configurationId); - Collection response = - discoveryService.createCollection(createCollectionBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(COLL1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createCollResp, response); - } - - /** - * Gets the collections is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getCollectionsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getCollsResp)); - ListCollectionsOptions getRequest = new ListCollectionsOptions.Builder(environmentId).build(); - ListCollectionsResponse response = - discoveryService.listCollections(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(COLL1_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getCollsResp, response); - } - - /** - * Gets the collection is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getCollectionIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getCollResp)); - GetCollectionOptions getRequest = - new GetCollectionOptions.Builder(environmentId, collectionId).build(); - Collection response = discoveryService.getCollection(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(COLL2_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getCollResp, response); - } - - // no updateCollection yet? - - /** - * Listfields collection is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listfieldsCollectionIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(listfieldsCollResp)); - ListCollectionFieldsOptions getRequest = - new ListCollectionFieldsOptions.Builder(environmentId, collectionId).build(); - ListCollectionFieldsResponse response = - discoveryService.listCollectionFields(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(COLL3_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(listfieldsCollResp, response); - } - - /** - * Delete collection is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteCollectionIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(deleteCollResp)); - DeleteCollectionOptions deleteRequest = - new DeleteCollectionOptions.Builder(environmentId, collectionId).build(); - DeleteCollectionResponse response = - discoveryService.deleteCollection(deleteRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(COLL2_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - assertEquals(DeleteCollectionResponse.Status.DELETED, response.getStatus()); - assertEquals(deleteCollResp.getCollectionId(), response.getCollectionId()); - } - - /** - * Adds the document is successful. - * - * @throws InterruptedException the interrupted exception - */ - // Document tests - @Test - public void addDocumentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createDocResp)); - String myDocumentJson = "{\"field\":\"value\"}"; - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename("test_file"); - builder.metadata(myMetadata.toString()); - DocumentAccepted response = discoveryService.addDocument(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createDocResp, response); - } - - /** - * Adds the document from input stream is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void addDocumentFromInputStreamIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createDocResp)); - String myDocumentJson = "{\"field\":\"value\"}"; - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream); - builder.filename("test_file"); - builder.metadata(myMetadata.toString()); - DocumentAccepted response = discoveryService.addDocument(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createDocResp, response); - } - - /** - * Adds the document from input stream with media type is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void addDocumentFromInputStreamWithMediaTypeIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createDocResp)); - String myDocumentJson = "{\"field\":\"value\"}"; - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename("test_file"); - builder.metadata(myMetadata.toString()); - DocumentAccepted response = discoveryService.addDocument(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createDocResp, response); - } - - /** Adds the document without required parameters fails. */ - @Test(expected = IllegalArgumentException.class) - public void addDocumentWithoutRequiredParametersFails() { - AddDocumentOptions options = - new AddDocumentOptions.Builder(environmentId, collectionId).build(); - discoveryService.addDocument(options).execute().getResult(); - } - - /** - * Adds the document from input stream with file name and media type is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void addDocumentFromInputStreamWithFileNameAndMediaTypeIsSuccessful() - throws InterruptedException { - server.enqueue(jsonResponse(createDocResp)); - String myDocumentJson = "{\"field\":\"value\"}"; - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - - AddDocumentOptions.Builder builder = - new AddDocumentOptions.Builder(environmentId, collectionId); - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - builder.filename("test_file"); - builder.metadata(myMetadata.toString()); - DocumentAccepted response = discoveryService.addDocument(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createDocResp, response); - } - - // Deleted tests for (create)addDocument with file parameter as this is deprecated - - /** - * Update document is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void updateDocumentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(updateDocResp)); - UpdateDocumentOptions.Builder updateBuilder = - new UpdateDocumentOptions.Builder(environmentId, collectionId, documentId); - String myDocumentJson = "{\"field\":\"value2\"}"; - JsonObject myMetadata = new JsonObject(); - myMetadata.add("foo", new JsonPrimitive("bar")); - - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); - updateBuilder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); - updateBuilder.filename("test_file"); - updateBuilder.metadata(myMetadata.toString()); - DocumentAccepted response = - discoveryService.updateDocument(updateBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS2_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(updateDocResp, response); - } - - /** Update document without required parameters fails. */ - @Test(expected = IllegalArgumentException.class) - public void updateDocumentWithoutRequiredParametersFails() { - UpdateDocumentOptions options = - new UpdateDocumentOptions.Builder(environmentId, collectionId, documentId).build(); - discoveryService.updateDocument(options).execute().getResult(); - } - - /** - * Gets the document is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getDocumentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getDocResp)); - GetDocumentStatusOptions getRequest = - new GetDocumentStatusOptions.Builder(environmentId, collectionId, documentId).build(); - DocumentStatus response = discoveryService.getDocumentStatus(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS2_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getDocResp, response); - } - - /** - * Delete document is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteDocumentIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(deleteDocResp)); - DeleteDocumentOptions deleteRequest = - new DeleteDocumentOptions.Builder(environmentId, collectionId, documentId).build(); - DeleteDocumentResponse response = - discoveryService.deleteDocument(deleteRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DOCS2_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - assertEquals(deleteDocResp.getDocumentId(), response.getDocumentId()); - assertEquals(deleteDocResp.getStatus(), response.getStatus()); - } - - /** - * Query is successful. - * - * @throws InterruptedException the interrupted exception - */ - // Query tests - @Test - public void queryIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(queryResp)); - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - queryBuilder.count(5L); - queryBuilder.offset(5L); - String fieldNames = "field"; - queryBuilder.xReturn(fieldNames); - queryBuilder.query("field" + Operator.CONTAINS + 1); - queryBuilder.filter("field" + Operator.CONTAINS + 1); - queryBuilder.similar(true); - String similarDocumentIds = "doc1, doc2"; - queryBuilder.similarDocumentIds(similarDocumentIds); - String similarFields = "field1, field2"; - queryBuilder.similarFields(similarFields); - queryBuilder.xWatsonLoggingOptOut(true); - queryBuilder.bias("bias"); - QueryResponse response = discoveryService.query(queryBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(Q1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals( - GsonSingleton.getGson().toJsonTree(queryResp), - GsonSingleton.getGson().toJsonTree(response)); - } - - /** - * Query with aggregation term is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryWithAggregationTermIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(queryResp)); - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - StringBuilder sb = new StringBuilder(); - sb.append(AggregationType.TERM); - sb.append(Operator.OPENING_GROUPING); - sb.append("field"); - sb.append(Operator.CLOSING_GROUPING); - String aggregation = sb.toString(); - queryBuilder.aggregation(aggregation); - QueryResponse response = discoveryService.query(queryBuilder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(Q1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals( - GsonSingleton.getGson().toJsonTree(queryResp), - GsonSingleton.getGson().toJsonTree(response)); - } - - /** - * Adds the training data is successful. - * - * @throws InterruptedException the interrupted exception - */ - // Training data tests - @Test - public void addTrainingDataIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(addTrainingQueryResp)); - AddTrainingDataOptions.Builder builder = - new AddTrainingDataOptions.Builder(environmentId, collectionId); - builder.naturalLanguageQuery("Example query"); - TrainingExample example = - new TrainingExample.Builder().documentId(documentId).relevance(0).build(); - builder.addExamples(example); - TrainingQuery response = - discoveryService.addTrainingData(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING1_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(addTrainingQueryResp, response); - } - - /** - * List training data is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listTrainingDataIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(listTrainingDataResp)); - ListTrainingDataOptions getRequest = - new ListTrainingDataOptions.Builder(environmentId, collectionId).build(); - TrainingDataSet response = discoveryService.listTrainingData(getRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING1_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(listTrainingDataResp, response); - } - - /** - * Delete all collection training data is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteAllCollectionTrainingDataIsSuccessful() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(204); - server.enqueue(desiredResponse); - DeleteAllTrainingDataOptions deleteRequest = - new DeleteAllTrainingDataOptions.Builder(environmentId, collectionId).build(); - discoveryService.deleteAllTrainingData(deleteRequest).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING1_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - } - - /** - * Creates the training example is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void createTrainingExampleIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createTrainingExampleResp)); - CreateTrainingExampleOptions.Builder builder = - new CreateTrainingExampleOptions.Builder(environmentId, collectionId, queryId); - builder.documentId(documentId); - builder.relevance(0); - TrainingExample response = - discoveryService.createTrainingExample(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING2_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(createTrainingExampleResp, response); - } - - /** - * Gets the training data is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getTrainingDataIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getTrainingDataResp)); - GetTrainingDataOptions.Builder builder = - new GetTrainingDataOptions.Builder(environmentId, collectionId, queryId); - TrainingQuery response = - discoveryService.getTrainingData(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING3_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getTrainingDataResp, response); - } - - /** - * Gets the training example is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getTrainingExampleIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(getTrainingExampleResp)); - GetTrainingExampleOptions.Builder builder = - new GetTrainingExampleOptions.Builder(environmentId, collectionId, queryId, documentId); - TrainingExample response = - discoveryService.getTrainingExample(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING4_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(getTrainingExampleResp, response); - } - - /** - * Delete training data is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteTrainingDataIsSuccessful() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(204); - server.enqueue(desiredResponse); - DeleteTrainingDataOptions.Builder builder = - new DeleteTrainingDataOptions.Builder(environmentId, collectionId, queryId); - discoveryService.deleteTrainingData(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING3_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - } - - /** - * Delete training example is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteTrainingExampleIsSuccessful() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(204); - server.enqueue(desiredResponse); - DeleteTrainingExampleOptions.Builder builder = - new DeleteTrainingExampleOptions.Builder(environmentId, collectionId, queryId, documentId); - discoveryService.deleteTrainingExample(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING4_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - } - - /** - * Update training example is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void updateTrainingExampleIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(updateTrainingExampleResp)); - UpdateTrainingExampleOptions.Builder builder = - new UpdateTrainingExampleOptions.Builder(environmentId, collectionId, queryId, documentId); - builder.relevance(100); - TrainingExample response = - discoveryService.updateTrainingExample(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING4_PATH, request.getPath()); - assertEquals(PUT, request.getMethod()); - assertEquals(updateTrainingExampleResp, response); - } - - /** - * List training examples is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listTrainingExamplesIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(listTrainingExamplesResp)); - ListTrainingExamplesOptions.Builder builder = - new ListTrainingExamplesOptions.Builder(environmentId, collectionId, queryId); - TrainingExampleList response = - discoveryService.listTrainingExamples(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(TRAINING2_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(listTrainingExamplesResp, response); - } - - /** - * List fields is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listFieldsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(listFieldsResp)); - ListFieldsOptions.Builder builder = - new ListFieldsOptions.Builder(environmentId, new ArrayList<>(Arrays.asList(collectionId))); - ListCollectionFieldsResponse response = - discoveryService.listFields(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(FIELD_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(listFieldsResp, response); - } - - /** - * Query notices is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryNoticesIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(queryNoticesResp)); - QueryNoticesOptions.Builder builder = - new QueryNoticesOptions.Builder(environmentId, collectionId); - discoveryService.queryNotices(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(Q4_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - } - - /** - * Federated query is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void federatedQueryIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(queryResp)); - FederatedQueryOptions.Builder builder = - new FederatedQueryOptions.Builder() - .environmentId(environmentId) - .collectionIds(collectionId) - .bias("bias") - .xWatsonLoggingOptOut(true); - discoveryService.federatedQuery(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(Q2_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - } - - /** - * Federated query notices is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void federatedQueryNoticesIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(queryNoticesResp)); - FederatedQueryNoticesOptions.Builder builder = - new FederatedQueryNoticesOptions.Builder( - environmentId, new ArrayList<>(Arrays.asList(collectionId))); - discoveryService.federatedQueryNotices(builder.build()).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(Q3_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - } - - /** - * Creates the expansions is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void createExpansionsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(expansionsResp)); - - List expansion1InputTerms = Arrays.asList("weekday", "week day"); - List expansion1ExpandedTerms = - Arrays.asList("monday", "tuesday", "wednesday", "thursday", "friday"); - List expansion2InputTerms = Arrays.asList("weekend", "week end"); - List expansion2ExpandedTerms = Arrays.asList("saturday", "sunday"); - Expansion expansion1 = - new Expansion.Builder() - .inputTerms(expansion1InputTerms) - .expandedTerms(expansion1ExpandedTerms) - .build(); - Expansion expansion2 = - new Expansion.Builder() - .inputTerms(expansion2InputTerms) - .expandedTerms(expansion2ExpandedTerms) - .build(); - Expansions expansions = - new Expansions.Builder().expansions(Arrays.asList(expansion1, expansion2)).build(); - - CreateExpansionsOptions createOptions = - new CreateExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .expansions(expansions) - .build(); - Expansions createResults = - discoveryService.createExpansions(createOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(EXPANSIONS_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(expansion1, createResults.expansions().get(0)); - assertEquals(expansion2, createResults.expansions().get(1)); - } - - /** - * List expansions is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listExpansionsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(expansionsResp)); - - List expansion1InputTerms = Arrays.asList("weekday", "week day"); - List expansion1ExpandedTerms = - Arrays.asList("monday", "tuesday", "wednesday", "thursday", "friday"); - List expansion2InputTerms = Arrays.asList("weekend", "week end"); - List expansion2ExpandedTerms = Arrays.asList("saturday", "sunday"); - Expansion expansion1 = - new Expansion.Builder() - .inputTerms(expansion1InputTerms) - .expandedTerms(expansion1ExpandedTerms) - .build(); - Expansion expansion2 = - new Expansion.Builder() - .inputTerms(expansion2InputTerms) - .expandedTerms(expansion2ExpandedTerms) - .build(); - - ListExpansionsOptions listOptions = - new ListExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - Expansions listResults = discoveryService.listExpansions(listOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(EXPANSIONS_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(expansion1, listResults.expansions().get(0)); - assertEquals(expansion2, listResults.expansions().get(1)); - } - - /** - * Delete expansions is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteExpansionsIsSuccessful() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(200); - server.enqueue(desiredResponse); - - DeleteExpansionsOptions deleteOptions = - new DeleteExpansionsOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - discoveryService.deleteExpansions(deleteOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(EXPANSIONS_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - } - - /** - * Delete user data is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteUserDataIsSuccessful() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(200); - server.enqueue(desiredResponse); - - String customerId = "java_sdk_test_id"; - - DeleteUserDataOptions deleteOptions = - new DeleteUserDataOptions.Builder().customerId(customerId).build(); - discoveryService.deleteUserData(deleteOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DELETE_USER_DATA_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - } - - /** Test credential details. */ - @Test - public void testCredentialDetails() { - String clientId = "client_id"; - String clientSecret = "client_secret"; // pragma: whitelist secret - String enterpriseId = "enterprise_id"; - String organizationUrl = "organization_url"; - String passphrase = "passphrase"; - String password = "password"; // pragma: whitelist secret - String privateKey = "private_key"; - String publicKeyId = "public_key_id"; - String siteCollectionPath = "site_collection_path"; - String url = "url"; - String username = "username"; - String gatewayId = "gateway_id"; - String sourceVersion = "source_version"; - String webApplicationUrl = "web_application_url"; - String domain = "domain"; - String endpoint = "endpoint"; - String accessKeyId = "access_key"; - String secretAccessKey = "secret_access_key"; - - CredentialDetails details = - new CredentialDetails.Builder() - .clientId(clientId) - .clientSecret(clientSecret) - .credentialType(CredentialDetails.CredentialType.USERNAME_PASSWORD) - .enterpriseId(enterpriseId) - .organizationUrl(organizationUrl) - .passphrase(passphrase) - .password(password) - .privateKey(privateKey) - .publicKeyId(publicKeyId) - .siteCollectionPath(siteCollectionPath) - .url(url) - .username(username) - .gatewayId(gatewayId) - .sourceVersion(sourceVersion) - .webApplicationUrl(webApplicationUrl) - .domain(domain) - .endpoint(endpoint) - .accessKeyId(accessKeyId) - .secretAccessKey(secretAccessKey) - .build(); - - assertEquals(clientId, details.clientId()); - assertEquals(clientSecret, details.clientSecret()); - assertEquals(CredentialDetails.CredentialType.USERNAME_PASSWORD, details.credentialType()); - assertEquals(enterpriseId, details.enterpriseId()); - assertEquals(organizationUrl, details.organizationUrl()); - assertEquals(passphrase, details.passphrase()); - assertEquals(password, details.password()); - assertEquals(privateKey, details.privateKey()); - assertEquals(publicKeyId, details.publicKeyId()); - assertEquals(siteCollectionPath, details.siteCollectionPath()); - assertEquals(url, details.url()); - assertEquals(username, details.username()); - assertEquals(gatewayId, details.gatewayId()); - assertEquals(sourceVersion, details.sourceVersion()); - assertEquals(webApplicationUrl, details.webApplicationUrl()); - assertEquals(domain, details.domain()); - assertEquals(accessKeyId, details.accessKeyId()); - assertEquals(secretAccessKey, details.secretAccessKey()); - } - - /** - * Creates the credentials is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void createCredentialsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(credentialsResp)); - - CredentialDetails details = - new CredentialDetails.Builder() - .credentialType(CredentialDetails.CredentialType.USERNAME_PASSWORD) - .url("url") - .username("username") - .build(); - Credentials credentials = - new Credentials.Builder() - .sourceType(Credentials.SourceType.SALESFORCE) - .credentialDetails(details) - .build(); - - CreateCredentialsOptions options = - new CreateCredentialsOptions.Builder() - .environmentId(environmentId) - .sourceType(Credentials.SourceType.SALESFORCE) - .credentials(credentials) - .credentialDetails(details) - .build(); - Credentials credentialsResponse = - discoveryService.createCredentials(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CREATE_CREDENTIALS_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(credentialsResp, credentialsResponse); - assertEquals(credentialsResp.credentialDetails(), credentialsResponse.credentialDetails()); - } - - /** - * Delete credentials is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void deleteCredentialsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(deleteCredentialsResp)); - - DeleteCredentialsOptions options = - new DeleteCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId("credential_id") - .build(); - DeleteCredentials response = discoveryService.deleteCredentials(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DELETE_CREDENTIALS_PATH, request.getPath()); - assertEquals(DELETE, request.getMethod()); - assertEquals(deleteCredentialsResp.getCredentialId(), response.getCredentialId()); - assertEquals(deleteCredentialsResp.getStatus(), response.getStatus()); - } - - /** - * Gets the credentials is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getCredentialsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(credentialsResp)); - - GetCredentialsOptions options = - new GetCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId("credential_id") - .build(); - Credentials credentialsResponse = - discoveryService.getCredentials(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_CREDENTIALS_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(credentialsResp, credentialsResponse); - } - - /** - * List credentials is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void listCredentialsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(listCredentialsResp)); - - ListCredentialsOptions options = - new ListCredentialsOptions.Builder().environmentId(environmentId).build(); - CredentialsList response = discoveryService.listCredentials(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(LIST_CREDENTIALS_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(listCredentialsResp, response); - assertTrue(response.getCredentials().size() == 3); - } - - /** - * Update credentials is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void updateCredentialsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(credentialsResp)); - - CredentialDetails newDetails = - new CredentialDetails.Builder() - .clientId("new_client_id") - .clientSecret("new_client_secret") - .credentialType(CredentialDetails.CredentialType.USERNAME_PASSWORD) - .enterpriseId("new_enterprise_id") - .organizationUrl("new_organization_url") - .passphrase("new_passphrase") - .password("new_password") - .privateKey("new_private_key") - .publicKeyId("new_public_key_id") - .siteCollectionPath("new_site_collection_path") - .url("new_url") - .username("new_username") - .build(); - Credentials newCredentials = - new Credentials.Builder() - .sourceType(Credentials.SourceType.SALESFORCE) - .credentialDetails(newDetails) - .build(); - - UpdateCredentialsOptions options = - new UpdateCredentialsOptions.Builder() - .environmentId(environmentId) - .credentialId("new_credential_id") - .sourceType(Credentials.SourceType.SALESFORCE) - .credentials(newCredentials) - .credentialDetails(newDetails) - .build(); - Credentials response = discoveryService.updateCredentials(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(UPDATE_CREDENTIALS_PATH, request.getPath()); - assertEquals(PUT, request.getMethod()); - assertEquals(credentialsResp, response); - } - - /** - * Creates the event is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void createEventIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(createEventResp)); - - Long displayRank = 1L; - String sessionToken = "mock_session_token"; - - EventData eventData = - new EventData.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .documentId(documentId) - .displayRank(displayRank) - .sessionToken(sessionToken) - .clientTimestamp(date) - .build(); - CreateEventOptions createEventOptions = - new CreateEventOptions.Builder() - .type(CreateEventOptions.Type.CLICK) - .data(eventData) - .build(); - - CreateEventResponse response = - discoveryService.createEvent(createEventOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(CREATE_EVENT_PATH, request.getPath()); - assertEquals(POST, request.getMethod()); - assertEquals(CreateEventOptions.Type.CLICK, response.getType()); - assertEquals(environmentId, response.getData().environmentId()); - assertEquals(collectionId, response.getData().collectionId()); - assertEquals(documentId, response.getData().documentId()); - assertNotNull(response.getData().clientTimestamp()); - assertEquals(displayRank, response.getData().displayRank()); - assertEquals(queryId, response.getData().queryId()); - assertEquals(sessionToken, response.getData().sessionToken()); - } - - /** - * Gets the metrics event rate is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsEventRateIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - GetMetricsEventRateOptions options = - new GetMetricsEventRateOptions.Builder() - .startTime(date) - .endTime(date) - .resultType(GetMetricsEventRateOptions.ResultType.DOCUMENT) - .build(); - - MetricResponse response = discoveryService.getMetricsEventRate(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics event rate no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsEventRateNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - MetricResponse response = discoveryService.getMetricsEventRate().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_METRICS_EVENT_RATE_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - GetMetricsQueryOptions options = - new GetMetricsQueryOptions.Builder() - .startTime(date) - .endTime(date) - .resultType(GetMetricsQueryOptions.ResultType.DOCUMENT) - .build(); - - MetricResponse response = discoveryService.getMetricsQuery(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - MetricResponse response = discoveryService.getMetricsQuery().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_METRICS_QUERY_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query event is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryEventIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - GetMetricsQueryEventOptions options = - new GetMetricsQueryEventOptions.Builder() - .startTime(date) - .endTime(date) - .resultType(GetMetricsQueryEventOptions.ResultType.DOCUMENT) - .build(); - - MetricResponse response = discoveryService.getMetricsQueryEvent(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query event no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryEventNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - MetricResponse response = discoveryService.getMetricsQueryEvent().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_METRICS_QUERY_EVENT_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query no results is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryNoResultsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - GetMetricsQueryNoResultsOptions options = - new GetMetricsQueryNoResultsOptions.Builder() - .startTime(date) - .endTime(date) - .resultType(GetMetricsQueryEventOptions.ResultType.DOCUMENT) - .build(); - - MetricResponse response = - discoveryService.getMetricsQueryNoResults(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query no results no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryNoResultsNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricResp)); - - String interval = "1d"; - Long key = 1533513600000L; - Double eventRate = 0.0; - - MetricResponse response = discoveryService.getMetricsQueryNoResults().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_METRICS_QUERY_NO_RESULTS_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(interval, response.getAggregations().get(0).getInterval()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertNotNull(response.getAggregations().get(0).getResults().get(0).getKeyAsString()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query token event is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryTokenEventIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricTokenResp)); - - Long count = 10L; - String key = "beat"; - Long matchingResults = 117L; - Double eventRate = 0.0; - - GetMetricsQueryTokenEventOptions options = - new GetMetricsQueryTokenEventOptions.Builder().count(count).build(); - - MetricTokenResponse response = - discoveryService.getMetricsQueryTokenEvent(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertEquals( - matchingResults, - response.getAggregations().get(0).getResults().get(0).getMatchingResults()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Gets the metrics query token event no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void getMetricsQueryTokenEventNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(metricTokenResp)); - - String key = "beat"; - Long matchingResults = 117L; - Double eventRate = 0.0; - - MetricTokenResponse response = - discoveryService.getMetricsQueryTokenEvent().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET_METRICS_QUERY_TOKEN_EVENT_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertTrue(!response.getAggregations().isEmpty()); - assertEquals(CreateEventOptions.Type.CLICK, response.getAggregations().get(0).getEventType()); - assertTrue(!response.getAggregations().get(0).getResults().isEmpty()); - assertEquals(key, response.getAggregations().get(0).getResults().get(0).getKey()); - assertEquals( - matchingResults, - response.getAggregations().get(0).getResults().get(0).getMatchingResults()); - assertEquals(eventRate, response.getAggregations().get(0).getResults().get(0).getEventRate()); - } - - /** - * Query log is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryLogIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(logQueryResp)); - - List sortList = new ArrayList<>(); - sortList.add("field_a"); - String extraSort = "field_b"; - String filter = "filter"; - String naturalLanguageQuery = "Who beat Ken Jennings in Jeopardy!"; - Long count = 5L; - Long offset = 5L; - Long matchingResults = 2L; - String customerId = ""; - String sessionToken = "mock_session_token"; - String eventType = "query"; - Long resultCount = 0L; - - QueryLogOptions options = - new QueryLogOptions.Builder() - .sort(sortList) - .addSort(extraSort) - .count(count) - .filter(filter) - .offset(offset) - .query(naturalLanguageQuery) - .build(); - - LogQueryResponse response = discoveryService.queryLog(options).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertEquals(matchingResults, response.getMatchingResults()); - assertTrue(!response.getResults().isEmpty()); - assertEquals(environmentId, response.getResults().get(0).getEnvironmentId()); - assertEquals(customerId, response.getResults().get(0).getCustomerId()); - assertNotNull(response.getResults().get(0).getCreatedTimestamp()); - assertEquals(queryId, response.getResults().get(0).getQueryId()); - assertEquals(sessionToken, response.getResults().get(0).getSessionToken()); - assertEquals(eventType, response.getResults().get(0).getEventType()); - assertNotNull(response.getResults().get(0).getDocumentResults().getResults()); - assertEquals(resultCount, response.getResults().get(0).getDocumentResults().getCount()); - } - - /** - * Query log no args is successful. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void queryLogNoArgsIsSuccessful() throws InterruptedException { - server.enqueue(jsonResponse(logQueryResp)); - - List sortList = new ArrayList<>(); - sortList.add("field_a"); - Long matchingResults = 2L; - String customerId = ""; - String sessionToken = "mock_session_token"; - String eventType = "query"; - Long resultCount = 0L; - - LogQueryResponse response = discoveryService.queryLog().execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(QUERY_LOG_PATH, request.getPath()); - assertEquals(GET, request.getMethod()); - assertEquals(matchingResults, response.getMatchingResults()); - assertTrue(!response.getResults().isEmpty()); - assertEquals(environmentId, response.getResults().get(0).getEnvironmentId()); - assertEquals(customerId, response.getResults().get(0).getCustomerId()); - assertNotNull(response.getResults().get(0).getCreatedTimestamp()); - assertEquals(queryId, response.getResults().get(0).getQueryId()); - assertEquals(sessionToken, response.getResults().get(0).getSessionToken()); - assertEquals(eventType, response.getResults().get(0).getEventType()); - assertNotNull(response.getResults().get(0).getDocumentResults().getResults()); - assertEquals(resultCount, response.getResults().get(0).getDocumentResults().getCount()); - } - - /** Test token dict rule. */ - @Test - public void testTokenDictRule() { - String text = "text"; - String partOfSpeech = "noun"; - List readings = Arrays.asList("reading 1", "reading 2"); - List tokens = Arrays.asList("token 1", "token 2"); - - TokenDictRule tokenDictRule = - new TokenDictRule.Builder() - .text(text) - .partOfSpeech(partOfSpeech) - .readings(readings) - .tokens(tokens) - .build(); - - assertEquals(text, tokenDictRule.text()); - assertEquals(partOfSpeech, tokenDictRule.partOfSpeech()); - assertEquals(readings, tokenDictRule.readings()); - assertEquals(tokens, tokenDictRule.tokens()); - } - - /** Test create tokenization dictionary options. */ - @Test - public void testCreateTokenizationDictionaryOptions() { - String text = "text"; - String partOfSpeech = "noun"; - List tokens = Arrays.asList("token 1", "token 2"); - - TokenDictRule firstTokenDictRule = - new TokenDictRule.Builder().text(text).partOfSpeech(partOfSpeech).tokens(tokens).build(); - TokenDictRule secondTokenDictRule = - new TokenDictRule.Builder().text(text).partOfSpeech(partOfSpeech).tokens(tokens).build(); - List tokenDictRuleList = new ArrayList<>(); - tokenDictRuleList.add(firstTokenDictRule); - - CreateTokenizationDictionaryOptions createOptions = - new CreateTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .tokenizationRules(tokenDictRuleList) - .addTokenizationRules(secondTokenDictRule) - .build(); - - tokenDictRuleList.add(secondTokenDictRule); - - assertEquals(environmentId, createOptions.environmentId()); - assertEquals(collectionId, createOptions.collectionId()); - assertEquals(tokenDictRuleList, createOptions.tokenizationRules()); - } - - /** Test get tokenization dictionary status options. */ - @Test - public void testGetTokenizationDictionaryStatusOptions() { - GetTokenizationDictionaryStatusOptions getOptions = - new GetTokenizationDictionaryStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - - assertEquals(environmentId, getOptions.environmentId()); - assertEquals(collectionId, getOptions.collectionId()); - } - - /** Test delete tokenization dictionary options. */ - @Test - public void testDeleteTokenizationDictionaryOptions() { - DeleteTokenizationDictionaryOptions deleteOptions = - new DeleteTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - - assertEquals(environmentId, deleteOptions.environmentId()); - assertEquals(collectionId, deleteOptions.collectionId()); - } - - /** - * Test create tokenization dictionary. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testCreateTokenizationDictionary() throws InterruptedException { - server.enqueue(jsonResponse(tokenDictStatusResponse)); - - String text = "text"; - String partOfSpeech = "noun"; - List tokens = Arrays.asList("token 1", "token 2"); - TokenDictRule tokenDictRule = - new TokenDictRule.Builder().text(text).tokens(tokens).partOfSpeech(partOfSpeech).build(); - CreateTokenizationDictionaryOptions createOptions = - new CreateTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .tokenizationRules(Collections.singletonList(tokenDictRule)) - .build(); - TokenDictStatusResponse response = - discoveryService.createTokenizationDictionary(createOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(POST, request.getMethod()); - assertEquals(tokenDictStatusResponse, response); - } - - /** - * Test get tokenization dictionary status. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testGetTokenizationDictionaryStatus() throws InterruptedException { - server.enqueue(jsonResponse(tokenDictStatusResponse)); - - GetTokenizationDictionaryStatusOptions getOptions = - new GetTokenizationDictionaryStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - TokenDictStatusResponse response = - discoveryService.getTokenizationDictionaryStatus(getOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertEquals(tokenDictStatusResponse, response); - } - - /** - * Test delete tokenization dictionary. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testDeleteTokenizationDictionary() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(200); - server.enqueue(desiredResponse); - - DeleteTokenizationDictionaryOptions deleteOptions = - new DeleteTokenizationDictionaryOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - discoveryService.deleteTokenizationDictionary(deleteOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DELETE, request.getMethod()); - } - - /** Test create stopword list options. */ - @Test - public void testCreateStopwordListOptions() { - String testFilename = "test_filename"; - - CreateStopwordListOptions createStopwordListOptions = - new CreateStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .stopwordFile(testStream) - .stopwordFilename(testFilename) - .build(); - - assertEquals(environmentId, createStopwordListOptions.environmentId()); - assertEquals(collectionId, createStopwordListOptions.collectionId()); - assertEquals(testStream, createStopwordListOptions.stopwordFile()); - assertEquals(testFilename, createStopwordListOptions.stopwordFilename()); - } - - /** - * Test create stopword list. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testCreateStopwordList() throws InterruptedException { - server.enqueue(jsonResponse(tokenDictStatusResponse)); - - String testFilename = "test_filename"; - - CreateStopwordListOptions createStopwordListOptions = - new CreateStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .stopwordFile(testStream) - .stopwordFilename(testFilename) - .build(); - TokenDictStatusResponse response = - discoveryService.createStopwordList(createStopwordListOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(POST, request.getMethod()); - assertEquals(tokenDictStatusResponse, response); - } - - /** Test delete stopword list options. */ - @Test - public void testDeleteStopwordListOptions() { - DeleteStopwordListOptions deleteStopwordListOptions = - new DeleteStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - - assertEquals(environmentId, deleteStopwordListOptions.environmentId()); - assertEquals(collectionId, deleteStopwordListOptions.collectionId()); - } - - /** - * Test delete stopword list. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testDeleteStopwordList() throws InterruptedException { - MockResponse desiredResponse = new MockResponse().setResponseCode(200); - server.enqueue(desiredResponse); - - DeleteStopwordListOptions deleteStopwordListOptions = - new DeleteStopwordListOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - discoveryService.deleteStopwordList(deleteStopwordListOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DELETE, request.getMethod()); - } - - /** Test get stopword list status options. */ - @Test - public void testGetStopwordListStatusOptions() { - GetStopwordListStatusOptions getStopwordListStatusOptions = - new GetStopwordListStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - - assertEquals(environmentId, getStopwordListStatusOptions.environmentId()); - assertEquals(collectionId, getStopwordListStatusOptions.collectionId()); - } - - /** - * Test get stopword list status. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testGetStopwordListStatus() throws InterruptedException { - server.enqueue(jsonResponse(tokenDictStatusResponseStopwords)); - - String type = "stopwords"; - - GetStopwordListStatusOptions getStopwordListStatusOptions = - new GetStopwordListStatusOptions.Builder() - .environmentId(environmentId) - .collectionId(collectionId) - .build(); - TokenDictStatusResponse response = - discoveryService.getStopwordListStatus(getStopwordListStatusOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertEquals(TokenDictStatusResponse.Status.ACTIVE, response.getStatus()); - assertEquals(type, response.getType()); - } - - /** Test create gateway options. */ - @Test - public void testCreateGatewayOptions() { - String name = "name"; - - CreateGatewayOptions createGatewayOptions = - new CreateGatewayOptions.Builder().environmentId(environmentId).name(name).build(); - - assertEquals(environmentId, createGatewayOptions.environmentId()); - assertEquals(name, createGatewayOptions.name()); - } - - /** - * Test create gateway. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testCreateGateway() throws InterruptedException { - server.enqueue(jsonResponse(gatewayResponse)); - - String name = "name"; - - CreateGatewayOptions createGatewayOptions = - new CreateGatewayOptions.Builder().environmentId(environmentId).name(name).build(); - Gateway response = discoveryService.createGateway(createGatewayOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(POST, request.getMethod()); - assertEquals(gatewayResponse, response); - } - - /** Test delete gateway options. */ - @Test - public void testDeleteGatewayOptions() { - String gatewayId = "gateway_id"; - - DeleteGatewayOptions deleteGatewayOptions = - new DeleteGatewayOptions.Builder() - .environmentId(environmentId) - .gatewayId(gatewayId) - .build(); - - assertEquals(environmentId, deleteGatewayOptions.environmentId()); - assertEquals(gatewayId, deleteGatewayOptions.gatewayId()); - } - - /** - * Test delete gateway. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testDeleteGateway() throws InterruptedException { - server.enqueue(jsonResponse(deleteGatewayResponse)); - - String gatewayId = "gateway_id"; - - DeleteGatewayOptions deleteGatewayOptions = - new DeleteGatewayOptions.Builder() - .environmentId(environmentId) - .gatewayId(gatewayId) - .build(); - GatewayDelete response = - discoveryService.deleteGateway(deleteGatewayOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(DELETE, request.getMethod()); - assertEquals(deleteGatewayResponse.getGatewayId(), response.getGatewayId()); - assertEquals(deleteGatewayResponse.getStatus(), response.getStatus()); - } - - /** Test get gateway options. */ - @Test - public void testGetGatewayOptions() { - String gatewayId = "gateway_id"; - - GetGatewayOptions getGatewayOptions = - new GetGatewayOptions.Builder().environmentId(environmentId).gatewayId(gatewayId).build(); - - assertEquals(environmentId, getGatewayOptions.environmentId()); - assertEquals(gatewayId, getGatewayOptions.gatewayId()); - } - - /** - * Test get gateway. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testGetGateway() throws InterruptedException { - server.enqueue(jsonResponse(gatewayResponse)); - - String gatewayId = "gateway_id"; - - GetGatewayOptions getGatewayOptions = - new GetGatewayOptions.Builder().environmentId(environmentId).gatewayId(gatewayId).build(); - Gateway response = discoveryService.getGateway(getGatewayOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertEquals(gatewayResponse, response); - } - - /** Test list gateways options. */ - @Test - public void testListGatewaysOptions() { - ListGatewaysOptions listGatewaysOptions = - new ListGatewaysOptions.Builder().environmentId(environmentId).build(); - - assertEquals(environmentId, listGatewaysOptions.environmentId()); - } - - /** - * Test list gateways. - * - * @throws InterruptedException the interrupted exception - */ - @Test - public void testListGateways() throws InterruptedException { - server.enqueue(jsonResponse(listGatewaysResponse)); - - ListGatewaysOptions listGatewaysOptions = - new ListGatewaysOptions.Builder().environmentId(environmentId).build(); - GatewayList response = discoveryService.listGateways(listGatewaysOptions).execute().getResult(); - RecordedRequest request = server.takeRequest(); - - assertEquals(GET, request.getMethod()); - assertEquals(listGatewaysResponse, response); - } - - /** Test source options web crawl. */ - @Test - public void testSourceOptionsWebCrawl() { - String url = "url"; - String crawlSpeed = "crawl_speed"; - Long maximumHops = 1L; - Long requestTimeout = 2000L; - - SourceOptionsWebCrawl sourceOptionsWebCrawl = - new SourceOptionsWebCrawl.Builder() - .url(url) - .limitToStartingHosts(true) - .crawlSpeed(crawlSpeed) - .allowUntrustedCertificate(true) - .maximumHops(maximumHops) - .requestTimeout(requestTimeout) - .overrideRobotsTxt(true) - .build(); - - assertEquals(url, sourceOptionsWebCrawl.url()); - assertTrue(sourceOptionsWebCrawl.limitToStartingHosts()); - assertEquals(crawlSpeed, sourceOptionsWebCrawl.crawlSpeed()); - assertTrue(sourceOptionsWebCrawl.allowUntrustedCertificate()); - assertEquals(maximumHops, sourceOptionsWebCrawl.maximumHops()); - assertEquals(requestTimeout, sourceOptionsWebCrawl.requestTimeout()); - assertTrue(sourceOptionsWebCrawl.overrideRobotsTxt()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryTest.java deleted file mode 100644 index 9bea27d47d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryTest.java +++ /dev/null @@ -1,4391 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.http.Response; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.cloud.sdk.core.util.RequestUtils; -import com.ibm.watson.discovery.v1.model.AddDocumentOptions; -import com.ibm.watson.discovery.v1.model.AddTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.Collection; -import com.ibm.watson.discovery.v1.model.Completions; -import com.ibm.watson.discovery.v1.model.Configuration; -import com.ibm.watson.discovery.v1.model.Conversions; -import com.ibm.watson.discovery.v1.model.CreateCollectionOptions; -import com.ibm.watson.discovery.v1.model.CreateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.CreateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.CreateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.CreateEventOptions; -import com.ibm.watson.discovery.v1.model.CreateEventResponse; -import com.ibm.watson.discovery.v1.model.CreateExpansionsOptions; -import com.ibm.watson.discovery.v1.model.CreateGatewayOptions; -import com.ibm.watson.discovery.v1.model.CreateStopwordListOptions; -import com.ibm.watson.discovery.v1.model.CreateTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.CreateTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.CredentialDetails; -import com.ibm.watson.discovery.v1.model.Credentials; -import com.ibm.watson.discovery.v1.model.CredentialsList; -import com.ibm.watson.discovery.v1.model.DeleteAllTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionOptions; -import com.ibm.watson.discovery.v1.model.DeleteCollectionResponse; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationOptions; -import com.ibm.watson.discovery.v1.model.DeleteConfigurationResponse; -import com.ibm.watson.discovery.v1.model.DeleteCredentials; -import com.ibm.watson.discovery.v1.model.DeleteCredentialsOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentOptions; -import com.ibm.watson.discovery.v1.model.DeleteDocumentResponse; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.DeleteEnvironmentResponse; -import com.ibm.watson.discovery.v1.model.DeleteExpansionsOptions; -import com.ibm.watson.discovery.v1.model.DeleteGatewayOptions; -import com.ibm.watson.discovery.v1.model.DeleteStopwordListOptions; -import com.ibm.watson.discovery.v1.model.DeleteTokenizationDictionaryOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.DeleteTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.DeleteUserDataOptions; -import com.ibm.watson.discovery.v1.model.DocumentAccepted; -import com.ibm.watson.discovery.v1.model.DocumentStatus; -import com.ibm.watson.discovery.v1.model.Enrichment; -import com.ibm.watson.discovery.v1.model.EnrichmentOptions; -import com.ibm.watson.discovery.v1.model.Environment; -import com.ibm.watson.discovery.v1.model.EventData; -import com.ibm.watson.discovery.v1.model.Expansion; -import com.ibm.watson.discovery.v1.model.Expansions; -import com.ibm.watson.discovery.v1.model.FederatedQueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.FederatedQueryOptions; -import com.ibm.watson.discovery.v1.model.FontSetting; -import com.ibm.watson.discovery.v1.model.Gateway; -import com.ibm.watson.discovery.v1.model.GatewayDelete; -import com.ibm.watson.discovery.v1.model.GatewayList; -import com.ibm.watson.discovery.v1.model.GetAutocompletionOptions; -import com.ibm.watson.discovery.v1.model.GetCollectionOptions; -import com.ibm.watson.discovery.v1.model.GetConfigurationOptions; -import com.ibm.watson.discovery.v1.model.GetCredentialsOptions; -import com.ibm.watson.discovery.v1.model.GetDocumentStatusOptions; -import com.ibm.watson.discovery.v1.model.GetEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.GetGatewayOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsEventRateOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryEventOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryNoResultsOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryOptions; -import com.ibm.watson.discovery.v1.model.GetMetricsQueryTokenEventOptions; -import com.ibm.watson.discovery.v1.model.GetStopwordListStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTokenizationDictionaryStatusOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.GetTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.HtmlSettings; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionFieldsResponse; -import com.ibm.watson.discovery.v1.model.ListCollectionsOptions; -import com.ibm.watson.discovery.v1.model.ListCollectionsResponse; -import com.ibm.watson.discovery.v1.model.ListConfigurationsOptions; -import com.ibm.watson.discovery.v1.model.ListConfigurationsResponse; -import com.ibm.watson.discovery.v1.model.ListCredentialsOptions; -import com.ibm.watson.discovery.v1.model.ListEnvironmentsOptions; -import com.ibm.watson.discovery.v1.model.ListEnvironmentsResponse; -import com.ibm.watson.discovery.v1.model.ListExpansionsOptions; -import com.ibm.watson.discovery.v1.model.ListFieldsOptions; -import com.ibm.watson.discovery.v1.model.ListGatewaysOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingDataOptions; -import com.ibm.watson.discovery.v1.model.ListTrainingExamplesOptions; -import com.ibm.watson.discovery.v1.model.LogQueryResponse; -import com.ibm.watson.discovery.v1.model.MetricResponse; -import com.ibm.watson.discovery.v1.model.MetricTokenResponse; -import com.ibm.watson.discovery.v1.model.NluEnrichmentConcepts; -import com.ibm.watson.discovery.v1.model.NluEnrichmentEmotion; -import com.ibm.watson.discovery.v1.model.NluEnrichmentEntities; -import com.ibm.watson.discovery.v1.model.NluEnrichmentFeatures; -import com.ibm.watson.discovery.v1.model.NluEnrichmentKeywords; -import com.ibm.watson.discovery.v1.model.NluEnrichmentRelations; -import com.ibm.watson.discovery.v1.model.NluEnrichmentSemanticRoles; -import com.ibm.watson.discovery.v1.model.NluEnrichmentSentiment; -import com.ibm.watson.discovery.v1.model.NormalizationOperation; -import com.ibm.watson.discovery.v1.model.PdfHeadingDetection; -import com.ibm.watson.discovery.v1.model.PdfSettings; -import com.ibm.watson.discovery.v1.model.QueryLogOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesOptions; -import com.ibm.watson.discovery.v1.model.QueryNoticesResponse; -import com.ibm.watson.discovery.v1.model.QueryOptions; -import com.ibm.watson.discovery.v1.model.QueryResponse; -import com.ibm.watson.discovery.v1.model.SegmentSettings; -import com.ibm.watson.discovery.v1.model.Source; -import com.ibm.watson.discovery.v1.model.SourceOptions; -import com.ibm.watson.discovery.v1.model.SourceOptionsBuckets; -import com.ibm.watson.discovery.v1.model.SourceOptionsFolder; -import com.ibm.watson.discovery.v1.model.SourceOptionsObject; -import com.ibm.watson.discovery.v1.model.SourceOptionsSiteColl; -import com.ibm.watson.discovery.v1.model.SourceOptionsWebCrawl; -import com.ibm.watson.discovery.v1.model.SourceSchedule; -import com.ibm.watson.discovery.v1.model.StatusDetails; -import com.ibm.watson.discovery.v1.model.TokenDictRule; -import com.ibm.watson.discovery.v1.model.TokenDictStatusResponse; -import com.ibm.watson.discovery.v1.model.TrainingDataSet; -import com.ibm.watson.discovery.v1.model.TrainingExample; -import com.ibm.watson.discovery.v1.model.TrainingExampleList; -import com.ibm.watson.discovery.v1.model.TrainingQuery; -import com.ibm.watson.discovery.v1.model.UpdateCollectionOptions; -import com.ibm.watson.discovery.v1.model.UpdateConfigurationOptions; -import com.ibm.watson.discovery.v1.model.UpdateCredentialsOptions; -import com.ibm.watson.discovery.v1.model.UpdateDocumentOptions; -import com.ibm.watson.discovery.v1.model.UpdateEnvironmentOptions; -import com.ibm.watson.discovery.v1.model.UpdateTrainingExampleOptions; -import com.ibm.watson.discovery.v1.model.WordHeadingDetection; -import com.ibm.watson.discovery.v1.model.WordSettings; -import com.ibm.watson.discovery.v1.model.WordStyle; -import com.ibm.watson.discovery.v1.model.XPathPatterns; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.MockWebServer; -import okhttp3.mockwebserver.RecordedRequest; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -/** Unit test class for the Discovery service. */ -public class DiscoveryTest { - - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - protected MockWebServer server; - protected Discovery discoveryService; - - // Construct the service with a null authenticator (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testConstructorWithNullAuthenticator() throws Throwable { - final String serviceName = "testService"; - // Set mock values for global params - String version = "testString"; - new Discovery(version, serviceName, null); - } - - // Test the getter for the version global parameter - @Test - public void testGetVersion() throws Throwable { - assertEquals(discoveryService.getVersion(), "testString"); - } - - // Test the createEnvironment operation with a valid options model parameter - @Test - public void testCreateEnvironmentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"environment_id\": \"environmentId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"read_only\": true, \"size\": \"LT\", \"requested_size\": \"requestedSize\", \"index_capacity\": {\"documents\": {\"available\": 9, \"maximum_allowed\": 14}, \"disk_usage\": {\"used_bytes\": 9, \"maximum_allowed_bytes\": 19}, \"collections\": {\"available\": 9, \"maximum_allowed\": 14}}, \"search_status\": {\"scope\": \"scope\", \"status\": \"NO_DATA\", \"status_description\": \"statusDescription\", \"last_trained\": \"2019-01-01\"}}"; - String createEnvironmentPath = "/v1/environments"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateEnvironmentOptions model - CreateEnvironmentOptions createEnvironmentOptionsModel = - new CreateEnvironmentOptions.Builder() - .name("testString") - .description("testString") - .size("LT") - .build(); - - // Invoke createEnvironment() with a valid options model and verify the result - Response response = - discoveryService.createEnvironment(createEnvironmentOptionsModel).execute(); - assertNotNull(response); - Environment responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createEnvironmentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createEnvironment operation with and without retries enabled - @Test - public void testCreateEnvironmentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateEnvironmentWOptions(); - - discoveryService.disableRetries(); - testCreateEnvironmentWOptions(); - } - - // Test the createEnvironment operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateEnvironmentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createEnvironment(null).execute(); - } - - // Test the listEnvironments operation with a valid options model parameter - @Test - public void testListEnvironmentsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"environments\": [{\"environment_id\": \"environmentId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"read_only\": true, \"size\": \"LT\", \"requested_size\": \"requestedSize\", \"index_capacity\": {\"documents\": {\"available\": 9, \"maximum_allowed\": 14}, \"disk_usage\": {\"used_bytes\": 9, \"maximum_allowed_bytes\": 19}, \"collections\": {\"available\": 9, \"maximum_allowed\": 14}}, \"search_status\": {\"scope\": \"scope\", \"status\": \"NO_DATA\", \"status_description\": \"statusDescription\", \"last_trained\": \"2019-01-01\"}}]}"; - String listEnvironmentsPath = "/v1/environments"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListEnvironmentsOptions model - ListEnvironmentsOptions listEnvironmentsOptionsModel = - new ListEnvironmentsOptions.Builder().name("testString").build(); - - // Invoke listEnvironments() with a valid options model and verify the result - Response response = - discoveryService.listEnvironments(listEnvironmentsOptionsModel).execute(); - assertNotNull(response); - ListEnvironmentsResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listEnvironmentsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("name"), "testString"); - } - - // Test the listEnvironments operation with and without retries enabled - @Test - public void testListEnvironmentsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListEnvironmentsWOptions(); - - discoveryService.disableRetries(); - testListEnvironmentsWOptions(); - } - - // Test the getEnvironment operation with a valid options model parameter - @Test - public void testGetEnvironmentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"environment_id\": \"environmentId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"read_only\": true, \"size\": \"LT\", \"requested_size\": \"requestedSize\", \"index_capacity\": {\"documents\": {\"available\": 9, \"maximum_allowed\": 14}, \"disk_usage\": {\"used_bytes\": 9, \"maximum_allowed_bytes\": 19}, \"collections\": {\"available\": 9, \"maximum_allowed\": 14}}, \"search_status\": {\"scope\": \"scope\", \"status\": \"NO_DATA\", \"status_description\": \"statusDescription\", \"last_trained\": \"2019-01-01\"}}"; - String getEnvironmentPath = "/v1/environments/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetEnvironmentOptions model - GetEnvironmentOptions getEnvironmentOptionsModel = - new GetEnvironmentOptions.Builder().environmentId("testString").build(); - - // Invoke getEnvironment() with a valid options model and verify the result - Response response = - discoveryService.getEnvironment(getEnvironmentOptionsModel).execute(); - assertNotNull(response); - Environment responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getEnvironmentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getEnvironment operation with and without retries enabled - @Test - public void testGetEnvironmentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetEnvironmentWOptions(); - - discoveryService.disableRetries(); - testGetEnvironmentWOptions(); - } - - // Test the getEnvironment operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetEnvironmentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getEnvironment(null).execute(); - } - - // Test the updateEnvironment operation with a valid options model parameter - @Test - public void testUpdateEnvironmentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"environment_id\": \"environmentId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"read_only\": true, \"size\": \"LT\", \"requested_size\": \"requestedSize\", \"index_capacity\": {\"documents\": {\"available\": 9, \"maximum_allowed\": 14}, \"disk_usage\": {\"used_bytes\": 9, \"maximum_allowed_bytes\": 19}, \"collections\": {\"available\": 9, \"maximum_allowed\": 14}}, \"search_status\": {\"scope\": \"scope\", \"status\": \"NO_DATA\", \"status_description\": \"statusDescription\", \"last_trained\": \"2019-01-01\"}}"; - String updateEnvironmentPath = "/v1/environments/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the UpdateEnvironmentOptions model - UpdateEnvironmentOptions updateEnvironmentOptionsModel = - new UpdateEnvironmentOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .size("S") - .build(); - - // Invoke updateEnvironment() with a valid options model and verify the result - Response response = - discoveryService.updateEnvironment(updateEnvironmentOptionsModel).execute(); - assertNotNull(response); - Environment responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateEnvironmentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateEnvironment operation with and without retries enabled - @Test - public void testUpdateEnvironmentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateEnvironmentWOptions(); - - discoveryService.disableRetries(); - testUpdateEnvironmentWOptions(); - } - - // Test the updateEnvironment operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateEnvironmentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateEnvironment(null).execute(); - } - - // Test the deleteEnvironment operation with a valid options model parameter - @Test - public void testDeleteEnvironmentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"environment_id\": \"environmentId\", \"status\": \"deleted\"}"; - String deleteEnvironmentPath = "/v1/environments/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteEnvironmentOptions model - DeleteEnvironmentOptions deleteEnvironmentOptionsModel = - new DeleteEnvironmentOptions.Builder().environmentId("testString").build(); - - // Invoke deleteEnvironment() with a valid options model and verify the result - Response response = - discoveryService.deleteEnvironment(deleteEnvironmentOptionsModel).execute(); - assertNotNull(response); - DeleteEnvironmentResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteEnvironmentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteEnvironment operation with and without retries enabled - @Test - public void testDeleteEnvironmentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteEnvironmentWOptions(); - - discoveryService.disableRetries(); - testDeleteEnvironmentWOptions(); - } - - // Test the deleteEnvironment operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteEnvironmentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteEnvironment(null).execute(); - } - - // Test the listFields operation with a valid options model parameter - @Test - public void testListFieldsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"fields\": [{\"field\": \"field\", \"type\": \"nested\"}]}"; - String listFieldsPath = "/v1/environments/testString/fields"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListFieldsOptions model - ListFieldsOptions listFieldsOptionsModel = - new ListFieldsOptions.Builder() - .environmentId("testString") - .collectionIds(java.util.Arrays.asList("testString")) - .build(); - - // Invoke listFields() with a valid options model and verify the result - Response response = - discoveryService.listFields(listFieldsOptionsModel).execute(); - assertNotNull(response); - ListCollectionFieldsResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listFieldsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals( - query.get("collection_ids"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - } - - // Test the listFields operation with and without retries enabled - @Test - public void testListFieldsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListFieldsWOptions(); - - discoveryService.disableRetries(); - testListFieldsWOptions(); - } - - // Test the listFields operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListFieldsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listFields(null).execute(); - } - - // Test the createConfiguration operation with a valid options model parameter - @Test - public void testCreateConfigurationWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"configuration_id\": \"configurationId\", \"name\": \"name\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"description\": \"description\", \"conversions\": {\"pdf\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}]}}, \"word\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}], \"styles\": [{\"level\": 5, \"names\": [\"names\"]}]}}, \"html\": {\"exclude_tags_completely\": [\"excludeTagsCompletely\"], \"exclude_tags_keep_content\": [\"excludeTagsKeepContent\"], \"keep_content\": {\"xpaths\": [\"xpaths\"]}, \"exclude_content\": {\"xpaths\": [\"xpaths\"]}, \"keep_tag_attributes\": [\"keepTagAttributes\"], \"exclude_tag_attributes\": [\"excludeTagAttributes\"]}, \"segment\": {\"enabled\": false, \"selector_tags\": [\"selectorTags\"], \"annotated_fields\": [\"annotatedFields\"]}, \"json_normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"image_text_recognition\": true}, \"enrichments\": [{\"description\": \"description\", \"destination_field\": \"destinationField\", \"source_field\": \"sourceField\", \"overwrite\": false, \"enrichment\": \"enrichment\", \"ignore_downstream_errors\": false, \"options\": {\"features\": {\"keywords\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5}, \"entities\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5, \"mentions\": true, \"mention_types\": true, \"sentence_locations\": false, \"model\": \"model\"}, \"sentiment\": {\"document\": true, \"targets\": [\"target\"]}, \"emotion\": {\"document\": true, \"targets\": [\"target\"]}, \"categories\": {\"anyKey\": \"anyValue\"}, \"semantic_roles\": {\"entities\": true, \"keywords\": true, \"limit\": 5}, \"relations\": {\"model\": \"model\"}, \"concepts\": {\"limit\": 5}}, \"language\": \"ar\", \"model\": \"model\"}}], \"normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"source\": {\"type\": \"box\", \"credential_id\": \"credentialId\", \"schedule\": {\"enabled\": true, \"time_zone\": \"America/New_York\", \"frequency\": \"daily\"}, \"options\": {\"folders\": [{\"owner_user_id\": \"ownerUserId\", \"folder_id\": \"folderId\", \"limit\": 5}], \"objects\": [{\"name\": \"name\", \"limit\": 5}], \"site_collections\": [{\"site_collection_path\": \"siteCollectionPath\", \"limit\": 5}], \"urls\": [{\"url\": \"url\", \"limit_to_starting_hosts\": true, \"crawl_speed\": \"normal\", \"allow_untrusted_certificate\": false, \"maximum_hops\": 2, \"request_timeout\": 30000, \"override_robots_txt\": false, \"blacklist\": [\"blacklist\"]}], \"buckets\": [{\"name\": \"name\", \"limit\": 5}], \"crawl_all_buckets\": false}}}"; - String createConfigurationPath = "/v1/environments/testString/configurations"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the FontSetting model - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - - // Construct an instance of the PdfHeadingDetection model - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - - // Construct an instance of the PdfSettings model - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - - // Construct an instance of the WordStyle model - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the WordHeadingDetection model - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - - // Construct an instance of the WordSettings model - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - - // Construct an instance of the XPathPatterns model - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - - // Construct an instance of the HtmlSettings model - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the SegmentSettings model - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NormalizationOperation model - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - - // Construct an instance of the Conversions model - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - - // Construct an instance of the NluEnrichmentKeywords model - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the NluEnrichmentEntities model - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - - // Construct an instance of the NluEnrichmentSentiment model - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NluEnrichmentEmotion model - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NluEnrichmentSemanticRoles model - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the NluEnrichmentRelations model - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - - // Construct an instance of the NluEnrichmentConcepts model - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - - // Construct an instance of the NluEnrichmentFeatures model - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - - // Construct an instance of the EnrichmentOptions model - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - - // Construct an instance of the Enrichment model - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("testString") - .sourceField("testString") - .overwrite(false) - .enrichment("testString") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - - // Construct an instance of the SourceSchedule model - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - - // Construct an instance of the SourceOptionsFolder model - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the SourceOptionsObject model - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - - // Construct an instance of the SourceOptionsSiteColl model - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the SourceOptionsWebCrawl model - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the SourceOptionsBuckets model - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - - // Construct an instance of the SourceOptions model - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - - // Construct an instance of the Source model - Source sourceModel = - new Source.Builder() - .type("box") - .credentialId("testString") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - - // Construct an instance of the CreateConfigurationOptions model - CreateConfigurationOptions createConfigurationOptionsModel = - new CreateConfigurationOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .conversions(conversionsModel) - .enrichments(java.util.Arrays.asList(enrichmentModel)) - .normalizations(java.util.Arrays.asList(normalizationOperationModel)) - .source(sourceModel) - .build(); - - // Invoke createConfiguration() with a valid options model and verify the result - Response response = - discoveryService.createConfiguration(createConfigurationOptionsModel).execute(); - assertNotNull(response); - Configuration responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createConfigurationPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createConfiguration operation with and without retries enabled - @Test - public void testCreateConfigurationWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateConfigurationWOptions(); - - discoveryService.disableRetries(); - testCreateConfigurationWOptions(); - } - - // Test the createConfiguration operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateConfigurationNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createConfiguration(null).execute(); - } - - // Test the listConfigurations operation with a valid options model parameter - @Test - public void testListConfigurationsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"configurations\": [{\"configuration_id\": \"configurationId\", \"name\": \"name\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"description\": \"description\", \"conversions\": {\"pdf\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}]}}, \"word\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}], \"styles\": [{\"level\": 5, \"names\": [\"names\"]}]}}, \"html\": {\"exclude_tags_completely\": [\"excludeTagsCompletely\"], \"exclude_tags_keep_content\": [\"excludeTagsKeepContent\"], \"keep_content\": {\"xpaths\": [\"xpaths\"]}, \"exclude_content\": {\"xpaths\": [\"xpaths\"]}, \"keep_tag_attributes\": [\"keepTagAttributes\"], \"exclude_tag_attributes\": [\"excludeTagAttributes\"]}, \"segment\": {\"enabled\": false, \"selector_tags\": [\"selectorTags\"], \"annotated_fields\": [\"annotatedFields\"]}, \"json_normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"image_text_recognition\": true}, \"enrichments\": [{\"description\": \"description\", \"destination_field\": \"destinationField\", \"source_field\": \"sourceField\", \"overwrite\": false, \"enrichment\": \"enrichment\", \"ignore_downstream_errors\": false, \"options\": {\"features\": {\"keywords\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5}, \"entities\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5, \"mentions\": true, \"mention_types\": true, \"sentence_locations\": false, \"model\": \"model\"}, \"sentiment\": {\"document\": true, \"targets\": [\"target\"]}, \"emotion\": {\"document\": true, \"targets\": [\"target\"]}, \"categories\": {\"anyKey\": \"anyValue\"}, \"semantic_roles\": {\"entities\": true, \"keywords\": true, \"limit\": 5}, \"relations\": {\"model\": \"model\"}, \"concepts\": {\"limit\": 5}}, \"language\": \"ar\", \"model\": \"model\"}}], \"normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"source\": {\"type\": \"box\", \"credential_id\": \"credentialId\", \"schedule\": {\"enabled\": true, \"time_zone\": \"America/New_York\", \"frequency\": \"daily\"}, \"options\": {\"folders\": [{\"owner_user_id\": \"ownerUserId\", \"folder_id\": \"folderId\", \"limit\": 5}], \"objects\": [{\"name\": \"name\", \"limit\": 5}], \"site_collections\": [{\"site_collection_path\": \"siteCollectionPath\", \"limit\": 5}], \"urls\": [{\"url\": \"url\", \"limit_to_starting_hosts\": true, \"crawl_speed\": \"normal\", \"allow_untrusted_certificate\": false, \"maximum_hops\": 2, \"request_timeout\": 30000, \"override_robots_txt\": false, \"blacklist\": [\"blacklist\"]}], \"buckets\": [{\"name\": \"name\", \"limit\": 5}], \"crawl_all_buckets\": false}}}]}"; - String listConfigurationsPath = "/v1/environments/testString/configurations"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListConfigurationsOptions model - ListConfigurationsOptions listConfigurationsOptionsModel = - new ListConfigurationsOptions.Builder() - .environmentId("testString") - .name("testString") - .build(); - - // Invoke listConfigurations() with a valid options model and verify the result - Response response = - discoveryService.listConfigurations(listConfigurationsOptionsModel).execute(); - assertNotNull(response); - ListConfigurationsResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listConfigurationsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("name"), "testString"); - } - - // Test the listConfigurations operation with and without retries enabled - @Test - public void testListConfigurationsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListConfigurationsWOptions(); - - discoveryService.disableRetries(); - testListConfigurationsWOptions(); - } - - // Test the listConfigurations operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListConfigurationsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listConfigurations(null).execute(); - } - - // Test the getConfiguration operation with a valid options model parameter - @Test - public void testGetConfigurationWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"configuration_id\": \"configurationId\", \"name\": \"name\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"description\": \"description\", \"conversions\": {\"pdf\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}]}}, \"word\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}], \"styles\": [{\"level\": 5, \"names\": [\"names\"]}]}}, \"html\": {\"exclude_tags_completely\": [\"excludeTagsCompletely\"], \"exclude_tags_keep_content\": [\"excludeTagsKeepContent\"], \"keep_content\": {\"xpaths\": [\"xpaths\"]}, \"exclude_content\": {\"xpaths\": [\"xpaths\"]}, \"keep_tag_attributes\": [\"keepTagAttributes\"], \"exclude_tag_attributes\": [\"excludeTagAttributes\"]}, \"segment\": {\"enabled\": false, \"selector_tags\": [\"selectorTags\"], \"annotated_fields\": [\"annotatedFields\"]}, \"json_normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"image_text_recognition\": true}, \"enrichments\": [{\"description\": \"description\", \"destination_field\": \"destinationField\", \"source_field\": \"sourceField\", \"overwrite\": false, \"enrichment\": \"enrichment\", \"ignore_downstream_errors\": false, \"options\": {\"features\": {\"keywords\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5}, \"entities\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5, \"mentions\": true, \"mention_types\": true, \"sentence_locations\": false, \"model\": \"model\"}, \"sentiment\": {\"document\": true, \"targets\": [\"target\"]}, \"emotion\": {\"document\": true, \"targets\": [\"target\"]}, \"categories\": {\"anyKey\": \"anyValue\"}, \"semantic_roles\": {\"entities\": true, \"keywords\": true, \"limit\": 5}, \"relations\": {\"model\": \"model\"}, \"concepts\": {\"limit\": 5}}, \"language\": \"ar\", \"model\": \"model\"}}], \"normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"source\": {\"type\": \"box\", \"credential_id\": \"credentialId\", \"schedule\": {\"enabled\": true, \"time_zone\": \"America/New_York\", \"frequency\": \"daily\"}, \"options\": {\"folders\": [{\"owner_user_id\": \"ownerUserId\", \"folder_id\": \"folderId\", \"limit\": 5}], \"objects\": [{\"name\": \"name\", \"limit\": 5}], \"site_collections\": [{\"site_collection_path\": \"siteCollectionPath\", \"limit\": 5}], \"urls\": [{\"url\": \"url\", \"limit_to_starting_hosts\": true, \"crawl_speed\": \"normal\", \"allow_untrusted_certificate\": false, \"maximum_hops\": 2, \"request_timeout\": 30000, \"override_robots_txt\": false, \"blacklist\": [\"blacklist\"]}], \"buckets\": [{\"name\": \"name\", \"limit\": 5}], \"crawl_all_buckets\": false}}}"; - String getConfigurationPath = "/v1/environments/testString/configurations/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetConfigurationOptions model - GetConfigurationOptions getConfigurationOptionsModel = - new GetConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .build(); - - // Invoke getConfiguration() with a valid options model and verify the result - Response response = - discoveryService.getConfiguration(getConfigurationOptionsModel).execute(); - assertNotNull(response); - Configuration responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getConfigurationPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getConfiguration operation with and without retries enabled - @Test - public void testGetConfigurationWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetConfigurationWOptions(); - - discoveryService.disableRetries(); - testGetConfigurationWOptions(); - } - - // Test the getConfiguration operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetConfigurationNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getConfiguration(null).execute(); - } - - // Test the updateConfiguration operation with a valid options model parameter - @Test - public void testUpdateConfigurationWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"configuration_id\": \"configurationId\", \"name\": \"name\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"description\": \"description\", \"conversions\": {\"pdf\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}]}}, \"word\": {\"heading\": {\"fonts\": [{\"level\": 5, \"min_size\": 7, \"max_size\": 7, \"bold\": true, \"italic\": true, \"name\": \"name\"}], \"styles\": [{\"level\": 5, \"names\": [\"names\"]}]}}, \"html\": {\"exclude_tags_completely\": [\"excludeTagsCompletely\"], \"exclude_tags_keep_content\": [\"excludeTagsKeepContent\"], \"keep_content\": {\"xpaths\": [\"xpaths\"]}, \"exclude_content\": {\"xpaths\": [\"xpaths\"]}, \"keep_tag_attributes\": [\"keepTagAttributes\"], \"exclude_tag_attributes\": [\"excludeTagAttributes\"]}, \"segment\": {\"enabled\": false, \"selector_tags\": [\"selectorTags\"], \"annotated_fields\": [\"annotatedFields\"]}, \"json_normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"image_text_recognition\": true}, \"enrichments\": [{\"description\": \"description\", \"destination_field\": \"destinationField\", \"source_field\": \"sourceField\", \"overwrite\": false, \"enrichment\": \"enrichment\", \"ignore_downstream_errors\": false, \"options\": {\"features\": {\"keywords\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5}, \"entities\": {\"sentiment\": false, \"emotion\": false, \"limit\": 5, \"mentions\": true, \"mention_types\": true, \"sentence_locations\": false, \"model\": \"model\"}, \"sentiment\": {\"document\": true, \"targets\": [\"target\"]}, \"emotion\": {\"document\": true, \"targets\": [\"target\"]}, \"categories\": {\"anyKey\": \"anyValue\"}, \"semantic_roles\": {\"entities\": true, \"keywords\": true, \"limit\": 5}, \"relations\": {\"model\": \"model\"}, \"concepts\": {\"limit\": 5}}, \"language\": \"ar\", \"model\": \"model\"}}], \"normalizations\": [{\"operation\": \"copy\", \"source_field\": \"sourceField\", \"destination_field\": \"destinationField\"}], \"source\": {\"type\": \"box\", \"credential_id\": \"credentialId\", \"schedule\": {\"enabled\": true, \"time_zone\": \"America/New_York\", \"frequency\": \"daily\"}, \"options\": {\"folders\": [{\"owner_user_id\": \"ownerUserId\", \"folder_id\": \"folderId\", \"limit\": 5}], \"objects\": [{\"name\": \"name\", \"limit\": 5}], \"site_collections\": [{\"site_collection_path\": \"siteCollectionPath\", \"limit\": 5}], \"urls\": [{\"url\": \"url\", \"limit_to_starting_hosts\": true, \"crawl_speed\": \"normal\", \"allow_untrusted_certificate\": false, \"maximum_hops\": 2, \"request_timeout\": 30000, \"override_robots_txt\": false, \"blacklist\": [\"blacklist\"]}], \"buckets\": [{\"name\": \"name\", \"limit\": 5}], \"crawl_all_buckets\": false}}}"; - String updateConfigurationPath = "/v1/environments/testString/configurations/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the FontSetting model - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - - // Construct an instance of the PdfHeadingDetection model - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - - // Construct an instance of the PdfSettings model - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - - // Construct an instance of the WordStyle model - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the WordHeadingDetection model - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - - // Construct an instance of the WordSettings model - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - - // Construct an instance of the XPathPatterns model - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - - // Construct an instance of the HtmlSettings model - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the SegmentSettings model - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NormalizationOperation model - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - - // Construct an instance of the Conversions model - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - - // Construct an instance of the NluEnrichmentKeywords model - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the NluEnrichmentEntities model - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - - // Construct an instance of the NluEnrichmentSentiment model - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NluEnrichmentEmotion model - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the NluEnrichmentSemanticRoles model - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the NluEnrichmentRelations model - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - - // Construct an instance of the NluEnrichmentConcepts model - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - - // Construct an instance of the NluEnrichmentFeatures model - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - - // Construct an instance of the EnrichmentOptions model - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - - // Construct an instance of the Enrichment model - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("testString") - .sourceField("testString") - .overwrite(false) - .enrichment("testString") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - - // Construct an instance of the SourceSchedule model - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - - // Construct an instance of the SourceOptionsFolder model - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the SourceOptionsObject model - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - - // Construct an instance of the SourceOptionsSiteColl model - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - - // Construct an instance of the SourceOptionsWebCrawl model - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the SourceOptionsBuckets model - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - - // Construct an instance of the SourceOptions model - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - - // Construct an instance of the Source model - Source sourceModel = - new Source.Builder() - .type("box") - .credentialId("testString") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - - // Construct an instance of the UpdateConfigurationOptions model - UpdateConfigurationOptions updateConfigurationOptionsModel = - new UpdateConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .name("testString") - .description("testString") - .conversions(conversionsModel) - .enrichments(java.util.Arrays.asList(enrichmentModel)) - .normalizations(java.util.Arrays.asList(normalizationOperationModel)) - .source(sourceModel) - .build(); - - // Invoke updateConfiguration() with a valid options model and verify the result - Response response = - discoveryService.updateConfiguration(updateConfigurationOptionsModel).execute(); - assertNotNull(response); - Configuration responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateConfigurationPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateConfiguration operation with and without retries enabled - @Test - public void testUpdateConfigurationWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateConfigurationWOptions(); - - discoveryService.disableRetries(); - testUpdateConfigurationWOptions(); - } - - // Test the updateConfiguration operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateConfigurationNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateConfiguration(null).execute(); - } - - // Test the deleteConfiguration operation with a valid options model parameter - @Test - public void testDeleteConfigurationWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"configuration_id\": \"configurationId\", \"status\": \"deleted\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}"; - String deleteConfigurationPath = "/v1/environments/testString/configurations/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteConfigurationOptions model - DeleteConfigurationOptions deleteConfigurationOptionsModel = - new DeleteConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .build(); - - // Invoke deleteConfiguration() with a valid options model and verify the result - Response response = - discoveryService.deleteConfiguration(deleteConfigurationOptionsModel).execute(); - assertNotNull(response); - DeleteConfigurationResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteConfigurationPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteConfiguration operation with and without retries enabled - @Test - public void testDeleteConfigurationWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteConfigurationWOptions(); - - discoveryService.disableRetries(); - testDeleteConfigurationWOptions(); - } - - // Test the deleteConfiguration operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteConfigurationNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteConfiguration(null).execute(); - } - - // Test the createCollection operation with a valid options model parameter - @Test - public void testCreateCollectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"collection_id\": \"collectionId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"configuration_id\": \"configurationId\", \"language\": \"language\", \"document_counts\": {\"available\": 9, \"processing\": 10, \"failed\": 6, \"pending\": 7}, \"disk_usage\": {\"used_bytes\": 9}, \"training_status\": {\"total_examples\": 13, \"available\": false, \"processing\": true, \"minimum_queries_added\": false, \"minimum_examples_added\": true, \"sufficient_label_diversity\": true, \"notices\": 7, \"successfully_trained\": \"2019-01-01T12:00:00.000Z\", \"data_updated\": \"2019-01-01T12:00:00.000Z\"}, \"crawl_status\": {\"source_crawl\": {\"status\": \"running\", \"next_crawl\": \"2019-01-01T12:00:00.000Z\"}}, \"smart_document_understanding\": {\"enabled\": true, \"total_annotated_pages\": 19, \"total_pages\": 10, \"total_documents\": 14, \"custom_fields\": {\"defined\": 7, \"maximum_allowed\": 14}}}"; - String createCollectionPath = "/v1/environments/testString/collections"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateCollectionOptions model - CreateCollectionOptions createCollectionOptionsModel = - new CreateCollectionOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .configurationId("testString") - .language("en") - .build(); - - // Invoke createCollection() with a valid options model and verify the result - Response response = - discoveryService.createCollection(createCollectionOptionsModel).execute(); - assertNotNull(response); - Collection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createCollectionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createCollection operation with and without retries enabled - @Test - public void testCreateCollectionWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateCollectionWOptions(); - - discoveryService.disableRetries(); - testCreateCollectionWOptions(); - } - - // Test the createCollection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateCollectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createCollection(null).execute(); - } - - // Test the listCollections operation with a valid options model parameter - @Test - public void testListCollectionsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"collections\": [{\"collection_id\": \"collectionId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"configuration_id\": \"configurationId\", \"language\": \"language\", \"document_counts\": {\"available\": 9, \"processing\": 10, \"failed\": 6, \"pending\": 7}, \"disk_usage\": {\"used_bytes\": 9}, \"training_status\": {\"total_examples\": 13, \"available\": false, \"processing\": true, \"minimum_queries_added\": false, \"minimum_examples_added\": true, \"sufficient_label_diversity\": true, \"notices\": 7, \"successfully_trained\": \"2019-01-01T12:00:00.000Z\", \"data_updated\": \"2019-01-01T12:00:00.000Z\"}, \"crawl_status\": {\"source_crawl\": {\"status\": \"running\", \"next_crawl\": \"2019-01-01T12:00:00.000Z\"}}, \"smart_document_understanding\": {\"enabled\": true, \"total_annotated_pages\": 19, \"total_pages\": 10, \"total_documents\": 14, \"custom_fields\": {\"defined\": 7, \"maximum_allowed\": 14}}}]}"; - String listCollectionsPath = "/v1/environments/testString/collections"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListCollectionsOptions model - ListCollectionsOptions listCollectionsOptionsModel = - new ListCollectionsOptions.Builder().environmentId("testString").name("testString").build(); - - // Invoke listCollections() with a valid options model and verify the result - Response response = - discoveryService.listCollections(listCollectionsOptionsModel).execute(); - assertNotNull(response); - ListCollectionsResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listCollectionsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("name"), "testString"); - } - - // Test the listCollections operation with and without retries enabled - @Test - public void testListCollectionsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListCollectionsWOptions(); - - discoveryService.disableRetries(); - testListCollectionsWOptions(); - } - - // Test the listCollections operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCollectionsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listCollections(null).execute(); - } - - // Test the getCollection operation with a valid options model parameter - @Test - public void testGetCollectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"collection_id\": \"collectionId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"configuration_id\": \"configurationId\", \"language\": \"language\", \"document_counts\": {\"available\": 9, \"processing\": 10, \"failed\": 6, \"pending\": 7}, \"disk_usage\": {\"used_bytes\": 9}, \"training_status\": {\"total_examples\": 13, \"available\": false, \"processing\": true, \"minimum_queries_added\": false, \"minimum_examples_added\": true, \"sufficient_label_diversity\": true, \"notices\": 7, \"successfully_trained\": \"2019-01-01T12:00:00.000Z\", \"data_updated\": \"2019-01-01T12:00:00.000Z\"}, \"crawl_status\": {\"source_crawl\": {\"status\": \"running\", \"next_crawl\": \"2019-01-01T12:00:00.000Z\"}}, \"smart_document_understanding\": {\"enabled\": true, \"total_annotated_pages\": 19, \"total_pages\": 10, \"total_documents\": 14, \"custom_fields\": {\"defined\": 7, \"maximum_allowed\": 14}}}"; - String getCollectionPath = "/v1/environments/testString/collections/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetCollectionOptions model - GetCollectionOptions getCollectionOptionsModel = - new GetCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke getCollection() with a valid options model and verify the result - Response response = - discoveryService.getCollection(getCollectionOptionsModel).execute(); - assertNotNull(response); - Collection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getCollectionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getCollection operation with and without retries enabled - @Test - public void testGetCollectionWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetCollectionWOptions(); - - discoveryService.disableRetries(); - testGetCollectionWOptions(); - } - - // Test the getCollection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetCollectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getCollection(null).execute(); - } - - // Test the updateCollection operation with a valid options model parameter - @Test - public void testUpdateCollectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"collection_id\": \"collectionId\", \"name\": \"name\", \"description\": \"description\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status\": \"active\", \"configuration_id\": \"configurationId\", \"language\": \"language\", \"document_counts\": {\"available\": 9, \"processing\": 10, \"failed\": 6, \"pending\": 7}, \"disk_usage\": {\"used_bytes\": 9}, \"training_status\": {\"total_examples\": 13, \"available\": false, \"processing\": true, \"minimum_queries_added\": false, \"minimum_examples_added\": true, \"sufficient_label_diversity\": true, \"notices\": 7, \"successfully_trained\": \"2019-01-01T12:00:00.000Z\", \"data_updated\": \"2019-01-01T12:00:00.000Z\"}, \"crawl_status\": {\"source_crawl\": {\"status\": \"running\", \"next_crawl\": \"2019-01-01T12:00:00.000Z\"}}, \"smart_document_understanding\": {\"enabled\": true, \"total_annotated_pages\": 19, \"total_pages\": 10, \"total_documents\": 14, \"custom_fields\": {\"defined\": 7, \"maximum_allowed\": 14}}}"; - String updateCollectionPath = "/v1/environments/testString/collections/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the UpdateCollectionOptions model - UpdateCollectionOptions updateCollectionOptionsModel = - new UpdateCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .name("testString") - .description("testString") - .configurationId("testString") - .build(); - - // Invoke updateCollection() with a valid options model and verify the result - Response response = - discoveryService.updateCollection(updateCollectionOptionsModel).execute(); - assertNotNull(response); - Collection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateCollectionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateCollection operation with and without retries enabled - @Test - public void testUpdateCollectionWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateCollectionWOptions(); - - discoveryService.disableRetries(); - testUpdateCollectionWOptions(); - } - - // Test the updateCollection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateCollectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateCollection(null).execute(); - } - - // Test the deleteCollection operation with a valid options model parameter - @Test - public void testDeleteCollectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"collection_id\": \"collectionId\", \"status\": \"deleted\"}"; - String deleteCollectionPath = "/v1/environments/testString/collections/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteCollectionOptions model - DeleteCollectionOptions deleteCollectionOptionsModel = - new DeleteCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke deleteCollection() with a valid options model and verify the result - Response response = - discoveryService.deleteCollection(deleteCollectionOptionsModel).execute(); - assertNotNull(response); - DeleteCollectionResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteCollectionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteCollection operation with and without retries enabled - @Test - public void testDeleteCollectionWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteCollectionWOptions(); - - discoveryService.disableRetries(); - testDeleteCollectionWOptions(); - } - - // Test the deleteCollection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteCollectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteCollection(null).execute(); - } - - // Test the listCollectionFields operation with a valid options model parameter - @Test - public void testListCollectionFieldsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"fields\": [{\"field\": \"field\", \"type\": \"nested\"}]}"; - String listCollectionFieldsPath = "/v1/environments/testString/collections/testString/fields"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListCollectionFieldsOptions model - ListCollectionFieldsOptions listCollectionFieldsOptionsModel = - new ListCollectionFieldsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke listCollectionFields() with a valid options model and verify the result - Response response = - discoveryService.listCollectionFields(listCollectionFieldsOptionsModel).execute(); - assertNotNull(response); - ListCollectionFieldsResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listCollectionFieldsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listCollectionFields operation with and without retries enabled - @Test - public void testListCollectionFieldsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListCollectionFieldsWOptions(); - - discoveryService.disableRetries(); - testListCollectionFieldsWOptions(); - } - - // Test the listCollectionFields operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCollectionFieldsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listCollectionFields(null).execute(); - } - - // Test the listExpansions operation with a valid options model parameter - @Test - public void testListExpansionsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"expansions\": [{\"input_terms\": [\"inputTerms\"], \"expanded_terms\": [\"expandedTerms\"]}]}"; - String listExpansionsPath = "/v1/environments/testString/collections/testString/expansions"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListExpansionsOptions model - ListExpansionsOptions listExpansionsOptionsModel = - new ListExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke listExpansions() with a valid options model and verify the result - Response response = - discoveryService.listExpansions(listExpansionsOptionsModel).execute(); - assertNotNull(response); - Expansions responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listExpansionsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listExpansions operation with and without retries enabled - @Test - public void testListExpansionsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListExpansionsWOptions(); - - discoveryService.disableRetries(); - testListExpansionsWOptions(); - } - - // Test the listExpansions operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListExpansionsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listExpansions(null).execute(); - } - - // Test the createExpansions operation with a valid options model parameter - @Test - public void testCreateExpansionsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"expansions\": [{\"input_terms\": [\"inputTerms\"], \"expanded_terms\": [\"expandedTerms\"]}]}"; - String createExpansionsPath = "/v1/environments/testString/collections/testString/expansions"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the Expansion model - Expansion expansionModel = - new Expansion.Builder() - .inputTerms(java.util.Arrays.asList("testString")) - .expandedTerms(java.util.Arrays.asList("testString")) - .build(); - - // Construct an instance of the CreateExpansionsOptions model - CreateExpansionsOptions createExpansionsOptionsModel = - new CreateExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .expansions(java.util.Arrays.asList(expansionModel)) - .build(); - - // Invoke createExpansions() with a valid options model and verify the result - Response response = - discoveryService.createExpansions(createExpansionsOptionsModel).execute(); - assertNotNull(response); - Expansions responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createExpansionsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createExpansions operation with and without retries enabled - @Test - public void testCreateExpansionsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateExpansionsWOptions(); - - discoveryService.disableRetries(); - testCreateExpansionsWOptions(); - } - - // Test the createExpansions operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateExpansionsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createExpansions(null).execute(); - } - - // Test the deleteExpansions operation with a valid options model parameter - @Test - public void testDeleteExpansionsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteExpansionsPath = "/v1/environments/testString/collections/testString/expansions"; - server.enqueue(new MockResponse().setResponseCode(204).setBody(mockResponseBody)); - - // Construct an instance of the DeleteExpansionsOptions model - DeleteExpansionsOptions deleteExpansionsOptionsModel = - new DeleteExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke deleteExpansions() with a valid options model and verify the result - Response response = - discoveryService.deleteExpansions(deleteExpansionsOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteExpansionsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteExpansions operation with and without retries enabled - @Test - public void testDeleteExpansionsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteExpansionsWOptions(); - - discoveryService.disableRetries(); - testDeleteExpansionsWOptions(); - } - - // Test the deleteExpansions operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteExpansionsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteExpansions(null).execute(); - } - - // Test the getTokenizationDictionaryStatus operation with a valid options model parameter - @Test - public void testGetTokenizationDictionaryStatusWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"status\": \"active\", \"type\": \"type\"}"; - String getTokenizationDictionaryStatusPath = - "/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetTokenizationDictionaryStatusOptions model - GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptionsModel = - new GetTokenizationDictionaryStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke getTokenizationDictionaryStatus() with a valid options model and verify the result - Response response = - discoveryService - .getTokenizationDictionaryStatus(getTokenizationDictionaryStatusOptionsModel) - .execute(); - assertNotNull(response); - TokenDictStatusResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getTokenizationDictionaryStatusPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getTokenizationDictionaryStatus operation with and without retries enabled - @Test - public void testGetTokenizationDictionaryStatusWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetTokenizationDictionaryStatusWOptions(); - - discoveryService.disableRetries(); - testGetTokenizationDictionaryStatusWOptions(); - } - - // Test the getTokenizationDictionaryStatus operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTokenizationDictionaryStatusNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getTokenizationDictionaryStatus(null).execute(); - } - - // Test the createTokenizationDictionary operation with a valid options model parameter - @Test - public void testCreateTokenizationDictionaryWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"status\": \"active\", \"type\": \"type\"}"; - String createTokenizationDictionaryPath = - "/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); - - // Construct an instance of the TokenDictRule model - TokenDictRule tokenDictRuleModel = - new TokenDictRule.Builder() - .text("testString") - .tokens(java.util.Arrays.asList("testString")) - .readings(java.util.Arrays.asList("testString")) - .partOfSpeech("testString") - .build(); - - // Construct an instance of the CreateTokenizationDictionaryOptions model - CreateTokenizationDictionaryOptions createTokenizationDictionaryOptionsModel = - new CreateTokenizationDictionaryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .tokenizationRules(java.util.Arrays.asList(tokenDictRuleModel)) - .build(); - - // Invoke createTokenizationDictionary() with a valid options model and verify the result - Response response = - discoveryService - .createTokenizationDictionary(createTokenizationDictionaryOptionsModel) - .execute(); - assertNotNull(response); - TokenDictStatusResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createTokenizationDictionaryPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createTokenizationDictionary operation with and without retries enabled - @Test - public void testCreateTokenizationDictionaryWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateTokenizationDictionaryWOptions(); - - discoveryService.disableRetries(); - testCreateTokenizationDictionaryWOptions(); - } - - // Test the createTokenizationDictionary operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateTokenizationDictionaryNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createTokenizationDictionary(null).execute(); - } - - // Test the deleteTokenizationDictionary operation with a valid options model parameter - @Test - public void testDeleteTokenizationDictionaryWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteTokenizationDictionaryPath = - "/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary"; - server.enqueue(new MockResponse().setResponseCode(200).setBody(mockResponseBody)); - - // Construct an instance of the DeleteTokenizationDictionaryOptions model - DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptionsModel = - new DeleteTokenizationDictionaryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke deleteTokenizationDictionary() with a valid options model and verify the result - Response response = - discoveryService - .deleteTokenizationDictionary(deleteTokenizationDictionaryOptionsModel) - .execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteTokenizationDictionaryPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteTokenizationDictionary operation with and without retries enabled - @Test - public void testDeleteTokenizationDictionaryWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteTokenizationDictionaryWOptions(); - - discoveryService.disableRetries(); - testDeleteTokenizationDictionaryWOptions(); - } - - // Test the deleteTokenizationDictionary operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTokenizationDictionaryNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteTokenizationDictionary(null).execute(); - } - - // Test the getStopwordListStatus operation with a valid options model parameter - @Test - public void testGetStopwordListStatusWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"status\": \"active\", \"type\": \"type\"}"; - String getStopwordListStatusPath = - "/v1/environments/testString/collections/testString/word_lists/stopwords"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetStopwordListStatusOptions model - GetStopwordListStatusOptions getStopwordListStatusOptionsModel = - new GetStopwordListStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke getStopwordListStatus() with a valid options model and verify the result - Response response = - discoveryService.getStopwordListStatus(getStopwordListStatusOptionsModel).execute(); - assertNotNull(response); - TokenDictStatusResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getStopwordListStatusPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getStopwordListStatus operation with and without retries enabled - @Test - public void testGetStopwordListStatusWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetStopwordListStatusWOptions(); - - discoveryService.disableRetries(); - testGetStopwordListStatusWOptions(); - } - - // Test the getStopwordListStatus operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetStopwordListStatusNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getStopwordListStatus(null).execute(); - } - - // Test the createStopwordList operation with a valid options model parameter - @Test - public void testCreateStopwordListWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"status\": \"active\", \"type\": \"type\"}"; - String createStopwordListPath = - "/v1/environments/testString/collections/testString/word_lists/stopwords"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateStopwordListOptions model - CreateStopwordListOptions createStopwordListOptionsModel = - new CreateStopwordListOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .stopwordFile(TestUtilities.createMockStream("This is a mock file.")) - .stopwordFilename("testString") - .build(); - - // Invoke createStopwordList() with a valid options model and verify the result - Response response = - discoveryService.createStopwordList(createStopwordListOptionsModel).execute(); - assertNotNull(response); - TokenDictStatusResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createStopwordListPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createStopwordList operation with and without retries enabled - @Test - public void testCreateStopwordListWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateStopwordListWOptions(); - - discoveryService.disableRetries(); - testCreateStopwordListWOptions(); - } - - // Test the createStopwordList operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateStopwordListNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createStopwordList(null).execute(); - } - - // Test the deleteStopwordList operation with a valid options model parameter - @Test - public void testDeleteStopwordListWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteStopwordListPath = - "/v1/environments/testString/collections/testString/word_lists/stopwords"; - server.enqueue(new MockResponse().setResponseCode(200).setBody(mockResponseBody)); - - // Construct an instance of the DeleteStopwordListOptions model - DeleteStopwordListOptions deleteStopwordListOptionsModel = - new DeleteStopwordListOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke deleteStopwordList() with a valid options model and verify the result - Response response = - discoveryService.deleteStopwordList(deleteStopwordListOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteStopwordListPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteStopwordList operation with and without retries enabled - @Test - public void testDeleteStopwordListWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteStopwordListWOptions(); - - discoveryService.disableRetries(); - testDeleteStopwordListWOptions(); - } - - // Test the deleteStopwordList operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteStopwordListNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteStopwordList(null).execute(); - } - - // Test the addDocument operation with a valid options model parameter - @Test - public void testAddDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"status\": \"processing\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}"; - String addDocumentPath = "/v1/environments/testString/collections/testString/documents"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); - - // Construct an instance of the AddDocumentOptions model - AddDocumentOptions addDocumentOptionsModel = - new AddDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/json") - .metadata("testString") - .build(); - - // Invoke addDocument() with a valid options model and verify the result - Response response = - discoveryService.addDocument(addDocumentOptionsModel).execute(); - assertNotNull(response); - DocumentAccepted responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the addDocument operation with and without retries enabled - @Test - public void testAddDocumentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testAddDocumentWOptions(); - - discoveryService.disableRetries(); - testAddDocumentWOptions(); - } - - // Test the addDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.addDocument(null).execute(); - } - - // Test the getDocumentStatus operation with a valid options model parameter - @Test - public void testGetDocumentStatusWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"configuration_id\": \"configurationId\", \"status\": \"available\", \"status_description\": \"statusDescription\", \"filename\": \"filename\", \"file_type\": \"pdf\", \"sha1\": \"sha1\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}"; - String getDocumentStatusPath = - "/v1/environments/testString/collections/testString/documents/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetDocumentStatusOptions model - GetDocumentStatusOptions getDocumentStatusOptionsModel = - new GetDocumentStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .build(); - - // Invoke getDocumentStatus() with a valid options model and verify the result - Response response = - discoveryService.getDocumentStatus(getDocumentStatusOptionsModel).execute(); - assertNotNull(response); - DocumentStatus responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDocumentStatusPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getDocumentStatus operation with and without retries enabled - @Test - public void testGetDocumentStatusWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetDocumentStatusWOptions(); - - discoveryService.disableRetries(); - testGetDocumentStatusWOptions(); - } - - // Test the getDocumentStatus operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDocumentStatusNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getDocumentStatus(null).execute(); - } - - // Test the updateDocument operation with a valid options model parameter - @Test - public void testUpdateDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"status\": \"processing\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}"; - String updateDocumentPath = - "/v1/environments/testString/collections/testString/documents/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); - - // Construct an instance of the UpdateDocumentOptions model - UpdateDocumentOptions updateDocumentOptionsModel = - new UpdateDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/json") - .metadata("testString") - .build(); - - // Invoke updateDocument() with a valid options model and verify the result - Response response = - discoveryService.updateDocument(updateDocumentOptionsModel).execute(); - assertNotNull(response); - DocumentAccepted responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateDocument operation with and without retries enabled - @Test - public void testUpdateDocumentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateDocumentWOptions(); - - discoveryService.disableRetries(); - testUpdateDocumentWOptions(); - } - - // Test the updateDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateDocument(null).execute(); - } - - // Test the deleteDocument operation with a valid options model parameter - @Test - public void testDeleteDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"document_id\": \"documentId\", \"status\": \"deleted\"}"; - String deleteDocumentPath = - "/v1/environments/testString/collections/testString/documents/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteDocumentOptions model - DeleteDocumentOptions deleteDocumentOptionsModel = - new DeleteDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .build(); - - // Invoke deleteDocument() with a valid options model and verify the result - Response response = - discoveryService.deleteDocument(deleteDocumentOptionsModel).execute(); - assertNotNull(response); - DeleteDocumentResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteDocument operation with and without retries enabled - @Test - public void testDeleteDocumentWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteDocumentWOptions(); - - discoveryService.disableRetries(); - testDeleteDocumentWOptions(); - } - - // Test the deleteDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteDocument(null).execute(); - } - - // Test the query operation with a valid options model parameter - @Test - public void testQueryWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"matching_results\": 15, \"results\": [{\"id\": \"id\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"collection_id\": \"collectionId\", \"result_metadata\": {\"score\": 5, \"confidence\": 10}}], \"aggregations\": [{\"type\": \"filter\", \"match\": \"match\", \"matching_results\": 15}], \"passages\": [{\"document_id\": \"documentId\", \"passage_score\": 12, \"passage_text\": \"passageText\", \"start_offset\": 11, \"end_offset\": 9, \"field\": \"field\"}], \"duplicates_removed\": 17, \"session_token\": \"sessionToken\", \"retrieval_details\": {\"document_retrieval_strategy\": \"untrained\"}, \"suggested_query\": \"suggestedQuery\"}"; - String queryPath = "/v1/environments/testString/collections/testString/query"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the QueryOptions model - QueryOptions queryOptionsModel = - new QueryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn("testString") - .offset(Long.valueOf("26")) - .sort("testString") - .highlight(false) - .passagesFields("testString") - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicate(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds("testString") - .similarFields("testString") - .bias("testString") - .spellingSuggestions(false) - .xWatsonLoggingOptOut(false) - .build(); - - // Invoke query() with a valid options model and verify the result - Response response = discoveryService.query(queryOptionsModel).execute(); - assertNotNull(response); - QueryResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, queryPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the query operation with and without retries enabled - @Test - public void testQueryWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testQueryWOptions(); - - discoveryService.disableRetries(); - testQueryWOptions(); - } - - // Test the query operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testQueryNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.query(null).execute(); - } - - // Test the queryNotices operation with a valid options model parameter - @Test - public void testQueryNoticesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"matching_results\": 15, \"results\": [{\"id\": \"id\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"collection_id\": \"collectionId\", \"result_metadata\": {\"score\": 5, \"confidence\": 10}, \"code\": 4, \"filename\": \"filename\", \"file_type\": \"pdf\", \"sha1\": \"sha1\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}], \"aggregations\": [{\"type\": \"filter\", \"match\": \"match\", \"matching_results\": 15}], \"passages\": [{\"document_id\": \"documentId\", \"passage_score\": 12, \"passage_text\": \"passageText\", \"start_offset\": 11, \"end_offset\": 9, \"field\": \"field\"}], \"duplicates_removed\": 17}"; - String queryNoticesPath = "/v1/environments/testString/collections/testString/notices"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the QueryNoticesOptions model - QueryNoticesOptions queryNoticesOptionsModel = - new QueryNoticesOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn(java.util.Arrays.asList("testString")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .highlight(false) - .passagesFields(java.util.Arrays.asList("testString")) - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds(java.util.Arrays.asList("testString")) - .similarFields(java.util.Arrays.asList("testString")) - .build(); - - // Invoke queryNotices() with a valid options model and verify the result - Response response = - discoveryService.queryNotices(queryNoticesOptionsModel).execute(); - assertNotNull(response); - QueryNoticesResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, queryNoticesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("filter"), "testString"); - assertEquals(query.get("query"), "testString"); - assertEquals(query.get("natural_language_query"), "testString"); - assertEquals(Boolean.valueOf(query.get("passages")), Boolean.valueOf(true)); - assertEquals(query.get("aggregation"), "testString"); - assertEquals(Long.valueOf(query.get("count")), Long.valueOf("10")); - assertEquals( - query.get("return"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(Long.valueOf(query.get("offset")), Long.valueOf("26")); - assertEquals(query.get("sort"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(Boolean.valueOf(query.get("highlight")), Boolean.valueOf(false)); - assertEquals( - query.get("passages.fields"), - RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(Long.valueOf(query.get("passages.count")), Long.valueOf("10")); - assertEquals(Long.valueOf(query.get("passages.characters")), Long.valueOf("400")); - assertEquals(query.get("deduplicate.field"), "testString"); - assertEquals(Boolean.valueOf(query.get("similar")), Boolean.valueOf(false)); - assertEquals( - query.get("similar.document_ids"), - RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals( - query.get("similar.fields"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - } - - // Test the queryNotices operation with and without retries enabled - @Test - public void testQueryNoticesWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testQueryNoticesWOptions(); - - discoveryService.disableRetries(); - testQueryNoticesWOptions(); - } - - // Test the queryNotices operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testQueryNoticesNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.queryNotices(null).execute(); - } - - // Test the federatedQuery operation with a valid options model parameter - @Test - public void testFederatedQueryWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"matching_results\": 15, \"results\": [{\"id\": \"id\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"collection_id\": \"collectionId\", \"result_metadata\": {\"score\": 5, \"confidence\": 10}}], \"aggregations\": [{\"type\": \"filter\", \"match\": \"match\", \"matching_results\": 15}], \"passages\": [{\"document_id\": \"documentId\", \"passage_score\": 12, \"passage_text\": \"passageText\", \"start_offset\": 11, \"end_offset\": 9, \"field\": \"field\"}], \"duplicates_removed\": 17, \"session_token\": \"sessionToken\", \"retrieval_details\": {\"document_retrieval_strategy\": \"untrained\"}, \"suggested_query\": \"suggestedQuery\"}"; - String federatedQueryPath = "/v1/environments/testString/query"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the FederatedQueryOptions model - FederatedQueryOptions federatedQueryOptionsModel = - new FederatedQueryOptions.Builder() - .environmentId("testString") - .collectionIds("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn("testString") - .offset(Long.valueOf("26")) - .sort("testString") - .highlight(false) - .passagesFields("testString") - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicate(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds("testString") - .similarFields("testString") - .bias("testString") - .xWatsonLoggingOptOut(false) - .build(); - - // Invoke federatedQuery() with a valid options model and verify the result - Response response = - discoveryService.federatedQuery(federatedQueryOptionsModel).execute(); - assertNotNull(response); - QueryResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, federatedQueryPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the federatedQuery operation with and without retries enabled - @Test - public void testFederatedQueryWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testFederatedQueryWOptions(); - - discoveryService.disableRetries(); - testFederatedQueryWOptions(); - } - - // Test the federatedQuery operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFederatedQueryNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.federatedQuery(null).execute(); - } - - // Test the federatedQueryNotices operation with a valid options model parameter - @Test - public void testFederatedQueryNoticesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"matching_results\": 15, \"results\": [{\"id\": \"id\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"collection_id\": \"collectionId\", \"result_metadata\": {\"score\": 5, \"confidence\": 10}, \"code\": 4, \"filename\": \"filename\", \"file_type\": \"pdf\", \"sha1\": \"sha1\", \"notices\": [{\"notice_id\": \"noticeId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"document_id\": \"documentId\", \"query_id\": \"queryId\", \"severity\": \"warning\", \"step\": \"step\", \"description\": \"description\"}]}], \"aggregations\": [{\"type\": \"filter\", \"match\": \"match\", \"matching_results\": 15}], \"passages\": [{\"document_id\": \"documentId\", \"passage_score\": 12, \"passage_text\": \"passageText\", \"start_offset\": 11, \"end_offset\": 9, \"field\": \"field\"}], \"duplicates_removed\": 17}"; - String federatedQueryNoticesPath = "/v1/environments/testString/notices"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the FederatedQueryNoticesOptions model - FederatedQueryNoticesOptions federatedQueryNoticesOptionsModel = - new FederatedQueryNoticesOptions.Builder() - .environmentId("testString") - .collectionIds(java.util.Arrays.asList("testString")) - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn(java.util.Arrays.asList("testString")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .highlight(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds(java.util.Arrays.asList("testString")) - .similarFields(java.util.Arrays.asList("testString")) - .build(); - - // Invoke federatedQueryNotices() with a valid options model and verify the result - Response response = - discoveryService.federatedQueryNotices(federatedQueryNoticesOptionsModel).execute(); - assertNotNull(response); - QueryNoticesResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, federatedQueryNoticesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals( - query.get("collection_ids"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(query.get("filter"), "testString"); - assertEquals(query.get("query"), "testString"); - assertEquals(query.get("natural_language_query"), "testString"); - assertEquals(query.get("aggregation"), "testString"); - assertEquals(Long.valueOf(query.get("count")), Long.valueOf("10")); - assertEquals( - query.get("return"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(Long.valueOf(query.get("offset")), Long.valueOf("26")); - assertEquals(query.get("sort"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals(Boolean.valueOf(query.get("highlight")), Boolean.valueOf(false)); - assertEquals(query.get("deduplicate.field"), "testString"); - assertEquals(Boolean.valueOf(query.get("similar")), Boolean.valueOf(false)); - assertEquals( - query.get("similar.document_ids"), - RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - assertEquals( - query.get("similar.fields"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - } - - // Test the federatedQueryNotices operation with and without retries enabled - @Test - public void testFederatedQueryNoticesWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testFederatedQueryNoticesWOptions(); - - discoveryService.disableRetries(); - testFederatedQueryNoticesWOptions(); - } - - // Test the federatedQueryNotices operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFederatedQueryNoticesNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.federatedQueryNotices(null).execute(); - } - - // Test the getAutocompletion operation with a valid options model parameter - @Test - public void testGetAutocompletionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"completions\": [\"completions\"]}"; - String getAutocompletionPath = - "/v1/environments/testString/collections/testString/autocompletion"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetAutocompletionOptions model - GetAutocompletionOptions getAutocompletionOptionsModel = - new GetAutocompletionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .prefix("testString") - .field("testString") - .count(Long.valueOf("5")) - .build(); - - // Invoke getAutocompletion() with a valid options model and verify the result - Response response = - discoveryService.getAutocompletion(getAutocompletionOptionsModel).execute(); - assertNotNull(response); - Completions responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getAutocompletionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("prefix"), "testString"); - assertEquals(query.get("field"), "testString"); - assertEquals(Long.valueOf(query.get("count")), Long.valueOf("5")); - } - - // Test the getAutocompletion operation with and without retries enabled - @Test - public void testGetAutocompletionWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetAutocompletionWOptions(); - - discoveryService.disableRetries(); - testGetAutocompletionWOptions(); - } - - // Test the getAutocompletion operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetAutocompletionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getAutocompletion(null).execute(); - } - - // Test the listTrainingData operation with a valid options model parameter - @Test - public void testListTrainingDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"environment_id\": \"environmentId\", \"collection_id\": \"collectionId\", \"queries\": [{\"query_id\": \"queryId\", \"natural_language_query\": \"naturalLanguageQuery\", \"filter\": \"filter\", \"examples\": [{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}]}]}"; - String listTrainingDataPath = - "/v1/environments/testString/collections/testString/training_data"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListTrainingDataOptions model - ListTrainingDataOptions listTrainingDataOptionsModel = - new ListTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke listTrainingData() with a valid options model and verify the result - Response response = - discoveryService.listTrainingData(listTrainingDataOptionsModel).execute(); - assertNotNull(response); - TrainingDataSet responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listTrainingDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listTrainingData operation with and without retries enabled - @Test - public void testListTrainingDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListTrainingDataWOptions(); - - discoveryService.disableRetries(); - testListTrainingDataWOptions(); - } - - // Test the listTrainingData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListTrainingDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listTrainingData(null).execute(); - } - - // Test the addTrainingData operation with a valid options model parameter - @Test - public void testAddTrainingDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"query_id\": \"queryId\", \"natural_language_query\": \"naturalLanguageQuery\", \"filter\": \"filter\", \"examples\": [{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}]}"; - String addTrainingDataPath = "/v1/environments/testString/collections/testString/training_data"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the TrainingExample model - TrainingExample trainingExampleModel = - new TrainingExample.Builder() - .documentId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - - // Construct an instance of the AddTrainingDataOptions model - AddTrainingDataOptions addTrainingDataOptionsModel = - new AddTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .naturalLanguageQuery("testString") - .filter("testString") - .examples(java.util.Arrays.asList(trainingExampleModel)) - .build(); - - // Invoke addTrainingData() with a valid options model and verify the result - Response response = - discoveryService.addTrainingData(addTrainingDataOptionsModel).execute(); - assertNotNull(response); - TrainingQuery responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addTrainingDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the addTrainingData operation with and without retries enabled - @Test - public void testAddTrainingDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testAddTrainingDataWOptions(); - - discoveryService.disableRetries(); - testAddTrainingDataWOptions(); - } - - // Test the addTrainingData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddTrainingDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.addTrainingData(null).execute(); - } - - // Test the deleteAllTrainingData operation with a valid options model parameter - @Test - public void testDeleteAllTrainingDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteAllTrainingDataPath = - "/v1/environments/testString/collections/testString/training_data"; - server.enqueue(new MockResponse().setResponseCode(204).setBody(mockResponseBody)); - - // Construct an instance of the DeleteAllTrainingDataOptions model - DeleteAllTrainingDataOptions deleteAllTrainingDataOptionsModel = - new DeleteAllTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - - // Invoke deleteAllTrainingData() with a valid options model and verify the result - Response response = - discoveryService.deleteAllTrainingData(deleteAllTrainingDataOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteAllTrainingDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteAllTrainingData operation with and without retries enabled - @Test - public void testDeleteAllTrainingDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteAllTrainingDataWOptions(); - - discoveryService.disableRetries(); - testDeleteAllTrainingDataWOptions(); - } - - // Test the deleteAllTrainingData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteAllTrainingDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteAllTrainingData(null).execute(); - } - - // Test the getTrainingData operation with a valid options model parameter - @Test - public void testGetTrainingDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"query_id\": \"queryId\", \"natural_language_query\": \"naturalLanguageQuery\", \"filter\": \"filter\", \"examples\": [{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}]}"; - String getTrainingDataPath = - "/v1/environments/testString/collections/testString/training_data/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetTrainingDataOptions model - GetTrainingDataOptions getTrainingDataOptionsModel = - new GetTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - - // Invoke getTrainingData() with a valid options model and verify the result - Response response = - discoveryService.getTrainingData(getTrainingDataOptionsModel).execute(); - assertNotNull(response); - TrainingQuery responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getTrainingDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getTrainingData operation with and without retries enabled - @Test - public void testGetTrainingDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetTrainingDataWOptions(); - - discoveryService.disableRetries(); - testGetTrainingDataWOptions(); - } - - // Test the getTrainingData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTrainingDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getTrainingData(null).execute(); - } - - // Test the deleteTrainingData operation with a valid options model parameter - @Test - public void testDeleteTrainingDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteTrainingDataPath = - "/v1/environments/testString/collections/testString/training_data/testString"; - server.enqueue(new MockResponse().setResponseCode(204).setBody(mockResponseBody)); - - // Construct an instance of the DeleteTrainingDataOptions model - DeleteTrainingDataOptions deleteTrainingDataOptionsModel = - new DeleteTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - - // Invoke deleteTrainingData() with a valid options model and verify the result - Response response = - discoveryService.deleteTrainingData(deleteTrainingDataOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteTrainingDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteTrainingData operation with and without retries enabled - @Test - public void testDeleteTrainingDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteTrainingDataWOptions(); - - discoveryService.disableRetries(); - testDeleteTrainingDataWOptions(); - } - - // Test the deleteTrainingData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTrainingDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteTrainingData(null).execute(); - } - - // Test the listTrainingExamples operation with a valid options model parameter - @Test - public void testListTrainingExamplesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"examples\": [{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}]}"; - String listTrainingExamplesPath = - "/v1/environments/testString/collections/testString/training_data/testString/examples"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListTrainingExamplesOptions model - ListTrainingExamplesOptions listTrainingExamplesOptionsModel = - new ListTrainingExamplesOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - - // Invoke listTrainingExamples() with a valid options model and verify the result - Response response = - discoveryService.listTrainingExamples(listTrainingExamplesOptionsModel).execute(); - assertNotNull(response); - TrainingExampleList responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listTrainingExamplesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listTrainingExamples operation with and without retries enabled - @Test - public void testListTrainingExamplesWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListTrainingExamplesWOptions(); - - discoveryService.disableRetries(); - testListTrainingExamplesWOptions(); - } - - // Test the listTrainingExamples operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListTrainingExamplesNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listTrainingExamples(null).execute(); - } - - // Test the createTrainingExample operation with a valid options model parameter - @Test - public void testCreateTrainingExampleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}"; - String createTrainingExamplePath = - "/v1/environments/testString/collections/testString/training_data/testString/examples"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateTrainingExampleOptions model - CreateTrainingExampleOptions createTrainingExampleOptionsModel = - new CreateTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .documentId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - - // Invoke createTrainingExample() with a valid options model and verify the result - Response response = - discoveryService.createTrainingExample(createTrainingExampleOptionsModel).execute(); - assertNotNull(response); - TrainingExample responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createTrainingExamplePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createTrainingExample operation with and without retries enabled - @Test - public void testCreateTrainingExampleWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateTrainingExampleWOptions(); - - discoveryService.disableRetries(); - testCreateTrainingExampleWOptions(); - } - - // Test the createTrainingExample operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateTrainingExampleNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createTrainingExample(null).execute(); - } - - // Test the deleteTrainingExample operation with a valid options model parameter - @Test - public void testDeleteTrainingExampleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteTrainingExamplePath = - "/v1/environments/testString/collections/testString/training_data/testString/examples/testString"; - server.enqueue(new MockResponse().setResponseCode(204).setBody(mockResponseBody)); - - // Construct an instance of the DeleteTrainingExampleOptions model - DeleteTrainingExampleOptions deleteTrainingExampleOptionsModel = - new DeleteTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .build(); - - // Invoke deleteTrainingExample() with a valid options model and verify the result - Response response = - discoveryService.deleteTrainingExample(deleteTrainingExampleOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteTrainingExamplePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteTrainingExample operation with and without retries enabled - @Test - public void testDeleteTrainingExampleWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteTrainingExampleWOptions(); - - discoveryService.disableRetries(); - testDeleteTrainingExampleWOptions(); - } - - // Test the deleteTrainingExample operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTrainingExampleNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteTrainingExample(null).execute(); - } - - // Test the updateTrainingExample operation with a valid options model parameter - @Test - public void testUpdateTrainingExampleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}"; - String updateTrainingExamplePath = - "/v1/environments/testString/collections/testString/training_data/testString/examples/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the UpdateTrainingExampleOptions model - UpdateTrainingExampleOptions updateTrainingExampleOptionsModel = - new UpdateTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - - // Invoke updateTrainingExample() with a valid options model and verify the result - Response response = - discoveryService.updateTrainingExample(updateTrainingExampleOptionsModel).execute(); - assertNotNull(response); - TrainingExample responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateTrainingExamplePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateTrainingExample operation with and without retries enabled - @Test - public void testUpdateTrainingExampleWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateTrainingExampleWOptions(); - - discoveryService.disableRetries(); - testUpdateTrainingExampleWOptions(); - } - - // Test the updateTrainingExample operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateTrainingExampleNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateTrainingExample(null).execute(); - } - - // Test the getTrainingExample operation with a valid options model parameter - @Test - public void testGetTrainingExampleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"cross_reference\": \"crossReference\", \"relevance\": 9}"; - String getTrainingExamplePath = - "/v1/environments/testString/collections/testString/training_data/testString/examples/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetTrainingExampleOptions model - GetTrainingExampleOptions getTrainingExampleOptionsModel = - new GetTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .build(); - - // Invoke getTrainingExample() with a valid options model and verify the result - Response response = - discoveryService.getTrainingExample(getTrainingExampleOptionsModel).execute(); - assertNotNull(response); - TrainingExample responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getTrainingExamplePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getTrainingExample operation with and without retries enabled - @Test - public void testGetTrainingExampleWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetTrainingExampleWOptions(); - - discoveryService.disableRetries(); - testGetTrainingExampleWOptions(); - } - - // Test the getTrainingExample operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTrainingExampleNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getTrainingExample(null).execute(); - } - - // Test the deleteUserData operation with a valid options model parameter - @Test - public void testDeleteUserDataWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteUserDataPath = "/v1/user_data"; - server.enqueue(new MockResponse().setResponseCode(200).setBody(mockResponseBody)); - - // Construct an instance of the DeleteUserDataOptions model - DeleteUserDataOptions deleteUserDataOptionsModel = - new DeleteUserDataOptions.Builder().customerId("testString").build(); - - // Invoke deleteUserData() with a valid options model and verify the result - Response response = discoveryService.deleteUserData(deleteUserDataOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteUserDataPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("customer_id"), "testString"); - } - - // Test the deleteUserData operation with and without retries enabled - @Test - public void testDeleteUserDataWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteUserDataWOptions(); - - discoveryService.disableRetries(); - testDeleteUserDataWOptions(); - } - - // Test the deleteUserData operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteUserDataNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteUserData(null).execute(); - } - - // Test the createEvent operation with a valid options model parameter - @Test - public void testCreateEventWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"type\": \"click\", \"data\": {\"environment_id\": \"environmentId\", \"session_token\": \"sessionToken\", \"client_timestamp\": \"2019-01-01T12:00:00.000Z\", \"display_rank\": 11, \"collection_id\": \"collectionId\", \"document_id\": \"documentId\", \"query_id\": \"queryId\"}}"; - String createEventPath = "/v1/events"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the EventData model - EventData eventDataModel = - new EventData.Builder() - .environmentId("testString") - .sessionToken("testString") - .clientTimestamp(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .displayRank(Long.valueOf("26")) - .collectionId("testString") - .documentId("testString") - .build(); - - // Construct an instance of the CreateEventOptions model - CreateEventOptions createEventOptionsModel = - new CreateEventOptions.Builder().type("click").data(eventDataModel).build(); - - // Invoke createEvent() with a valid options model and verify the result - Response response = - discoveryService.createEvent(createEventOptionsModel).execute(); - assertNotNull(response); - CreateEventResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createEventPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createEvent operation with and without retries enabled - @Test - public void testCreateEventWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateEventWOptions(); - - discoveryService.disableRetries(); - testCreateEventWOptions(); - } - - // Test the createEvent operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateEventNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createEvent(null).execute(); - } - - // Test the queryLog operation with a valid options model parameter - @Test - public void testQueryLogWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"matching_results\": 15, \"results\": [{\"environment_id\": \"environmentId\", \"customer_id\": \"customerId\", \"document_type\": \"query\", \"natural_language_query\": \"naturalLanguageQuery\", \"document_results\": {\"results\": [{\"position\": 8, \"document_id\": \"documentId\", \"score\": 5, \"confidence\": 10, \"collection_id\": \"collectionId\"}], \"count\": 5}, \"created_timestamp\": \"2019-01-01T12:00:00.000Z\", \"client_timestamp\": \"2019-01-01T12:00:00.000Z\", \"query_id\": \"queryId\", \"session_token\": \"sessionToken\", \"collection_id\": \"collectionId\", \"display_rank\": 11, \"document_id\": \"documentId\", \"event_type\": \"click\", \"result_type\": \"document\"}]}"; - String queryLogPath = "/v1/logs"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the QueryLogOptions model - QueryLogOptions queryLogOptionsModel = - new QueryLogOptions.Builder() - .filter("testString") - .query("testString") - .count(Long.valueOf("10")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .build(); - - // Invoke queryLog() with a valid options model and verify the result - Response response = discoveryService.queryLog(queryLogOptionsModel).execute(); - assertNotNull(response); - LogQueryResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, queryLogPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("filter"), "testString"); - assertEquals(query.get("query"), "testString"); - assertEquals(Long.valueOf(query.get("count")), Long.valueOf("10")); - assertEquals(Long.valueOf(query.get("offset")), Long.valueOf("26")); - assertEquals(query.get("sort"), RequestUtils.join(java.util.Arrays.asList("testString"), ",")); - } - - // Test the queryLog operation with and without retries enabled - @Test - public void testQueryLogWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testQueryLogWOptions(); - - discoveryService.disableRetries(); - testQueryLogWOptions(); - } - - // Test the getMetricsQuery operation with a valid options model parameter - @Test - public void testGetMetricsQueryWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"aggregations\": [{\"interval\": \"interval\", \"event_type\": \"eventType\", \"results\": [{\"key_as_string\": \"2019-01-01T12:00:00.000Z\", \"key\": 3, \"matching_results\": 15, \"event_rate\": 9}]}]}"; - String getMetricsQueryPath = "/v1/metrics/number_of_queries"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetMetricsQueryOptions model - GetMetricsQueryOptions getMetricsQueryOptionsModel = - new GetMetricsQueryOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - - // Invoke getMetricsQuery() with a valid options model and verify the result - Response response = - discoveryService.getMetricsQuery(getMetricsQueryOptionsModel).execute(); - assertNotNull(response); - MetricResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getMetricsQueryPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("result_type"), "document"); - } - - // Test the getMetricsQuery operation with and without retries enabled - @Test - public void testGetMetricsQueryWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetMetricsQueryWOptions(); - - discoveryService.disableRetries(); - testGetMetricsQueryWOptions(); - } - - // Test the getMetricsQueryEvent operation with a valid options model parameter - @Test - public void testGetMetricsQueryEventWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"aggregations\": [{\"interval\": \"interval\", \"event_type\": \"eventType\", \"results\": [{\"key_as_string\": \"2019-01-01T12:00:00.000Z\", \"key\": 3, \"matching_results\": 15, \"event_rate\": 9}]}]}"; - String getMetricsQueryEventPath = "/v1/metrics/number_of_queries_with_event"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetMetricsQueryEventOptions model - GetMetricsQueryEventOptions getMetricsQueryEventOptionsModel = - new GetMetricsQueryEventOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - - // Invoke getMetricsQueryEvent() with a valid options model and verify the result - Response response = - discoveryService.getMetricsQueryEvent(getMetricsQueryEventOptionsModel).execute(); - assertNotNull(response); - MetricResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getMetricsQueryEventPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("result_type"), "document"); - } - - // Test the getMetricsQueryEvent operation with and without retries enabled - @Test - public void testGetMetricsQueryEventWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetMetricsQueryEventWOptions(); - - discoveryService.disableRetries(); - testGetMetricsQueryEventWOptions(); - } - - // Test the getMetricsQueryNoResults operation with a valid options model parameter - @Test - public void testGetMetricsQueryNoResultsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"aggregations\": [{\"interval\": \"interval\", \"event_type\": \"eventType\", \"results\": [{\"key_as_string\": \"2019-01-01T12:00:00.000Z\", \"key\": 3, \"matching_results\": 15, \"event_rate\": 9}]}]}"; - String getMetricsQueryNoResultsPath = "/v1/metrics/number_of_queries_with_no_search_results"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetMetricsQueryNoResultsOptions model - GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptionsModel = - new GetMetricsQueryNoResultsOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - - // Invoke getMetricsQueryNoResults() with a valid options model and verify the result - Response response = - discoveryService.getMetricsQueryNoResults(getMetricsQueryNoResultsOptionsModel).execute(); - assertNotNull(response); - MetricResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getMetricsQueryNoResultsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("result_type"), "document"); - } - - // Test the getMetricsQueryNoResults operation with and without retries enabled - @Test - public void testGetMetricsQueryNoResultsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetMetricsQueryNoResultsWOptions(); - - discoveryService.disableRetries(); - testGetMetricsQueryNoResultsWOptions(); - } - - // Test the getMetricsEventRate operation with a valid options model parameter - @Test - public void testGetMetricsEventRateWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"aggregations\": [{\"interval\": \"interval\", \"event_type\": \"eventType\", \"results\": [{\"key_as_string\": \"2019-01-01T12:00:00.000Z\", \"key\": 3, \"matching_results\": 15, \"event_rate\": 9}]}]}"; - String getMetricsEventRatePath = "/v1/metrics/event_rate"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetMetricsEventRateOptions model - GetMetricsEventRateOptions getMetricsEventRateOptionsModel = - new GetMetricsEventRateOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - - // Invoke getMetricsEventRate() with a valid options model and verify the result - Response response = - discoveryService.getMetricsEventRate(getMetricsEventRateOptionsModel).execute(); - assertNotNull(response); - MetricResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getMetricsEventRatePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(query.get("result_type"), "document"); - } - - // Test the getMetricsEventRate operation with and without retries enabled - @Test - public void testGetMetricsEventRateWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetMetricsEventRateWOptions(); - - discoveryService.disableRetries(); - testGetMetricsEventRateWOptions(); - } - - // Test the getMetricsQueryTokenEvent operation with a valid options model parameter - @Test - public void testGetMetricsQueryTokenEventWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"aggregations\": [{\"event_type\": \"eventType\", \"results\": [{\"key\": \"key\", \"matching_results\": 15, \"event_rate\": 9}]}]}"; - String getMetricsQueryTokenEventPath = "/v1/metrics/top_query_tokens_with_event_rate"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetMetricsQueryTokenEventOptions model - GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptionsModel = - new GetMetricsQueryTokenEventOptions.Builder().count(Long.valueOf("10")).build(); - - // Invoke getMetricsQueryTokenEvent() with a valid options model and verify the result - Response response = - discoveryService.getMetricsQueryTokenEvent(getMetricsQueryTokenEventOptionsModel).execute(); - assertNotNull(response); - MetricTokenResponse responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getMetricsQueryTokenEventPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - assertEquals(Long.valueOf(query.get("count")), Long.valueOf("10")); - } - - // Test the getMetricsQueryTokenEvent operation with and without retries enabled - @Test - public void testGetMetricsQueryTokenEventWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetMetricsQueryTokenEventWOptions(); - - discoveryService.disableRetries(); - testGetMetricsQueryTokenEventWOptions(); - } - - // Test the listCredentials operation with a valid options model parameter - @Test - public void testListCredentialsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"credentials\": [{\"credential_id\": \"credentialId\", \"source_type\": \"box\", \"credential_details\": {\"credential_type\": \"oauth2\", \"client_id\": \"clientId\", \"enterprise_id\": \"enterpriseId\", \"url\": \"url\", \"username\": \"username\", \"organization_url\": \"organizationUrl\", \"site_collection.path\": \"siteCollectionPath\", \"client_secret\": \"clientSecret\", \"public_key_id\": \"publicKeyId\", \"private_key\": \"privateKey\", \"passphrase\": \"passphrase\", \"password\": \"password\", \"gateway_id\": \"gatewayId\", \"source_version\": \"online\", \"web_application_url\": \"webApplicationUrl\", \"domain\": \"domain\", \"endpoint\": \"endpoint\", \"access_key_id\": \"accessKeyId\", \"secret_access_key\": \"secretAccessKey\"}, \"status\": {\"authenticated\": false, \"error_message\": \"errorMessage\"}}]}"; - String listCredentialsPath = "/v1/environments/testString/credentials"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListCredentialsOptions model - ListCredentialsOptions listCredentialsOptionsModel = - new ListCredentialsOptions.Builder().environmentId("testString").build(); - - // Invoke listCredentials() with a valid options model and verify the result - Response response = - discoveryService.listCredentials(listCredentialsOptionsModel).execute(); - assertNotNull(response); - CredentialsList responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listCredentialsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listCredentials operation with and without retries enabled - @Test - public void testListCredentialsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListCredentialsWOptions(); - - discoveryService.disableRetries(); - testListCredentialsWOptions(); - } - - // Test the listCredentials operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCredentialsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listCredentials(null).execute(); - } - - // Test the createCredentials operation with a valid options model parameter - @Test - public void testCreateCredentialsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"credential_id\": \"credentialId\", \"source_type\": \"box\", \"credential_details\": {\"credential_type\": \"oauth2\", \"client_id\": \"clientId\", \"enterprise_id\": \"enterpriseId\", \"url\": \"url\", \"username\": \"username\", \"organization_url\": \"organizationUrl\", \"site_collection.path\": \"siteCollectionPath\", \"client_secret\": \"clientSecret\", \"public_key_id\": \"publicKeyId\", \"private_key\": \"privateKey\", \"passphrase\": \"passphrase\", \"password\": \"password\", \"gateway_id\": \"gatewayId\", \"source_version\": \"online\", \"web_application_url\": \"webApplicationUrl\", \"domain\": \"domain\", \"endpoint\": \"endpoint\", \"access_key_id\": \"accessKeyId\", \"secret_access_key\": \"secretAccessKey\"}, \"status\": {\"authenticated\": false, \"error_message\": \"errorMessage\"}}"; - String createCredentialsPath = "/v1/environments/testString/credentials"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the CredentialDetails model - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("oauth2") - .clientId("testString") - .enterpriseId("testString") - .url("testString") - .username("testString") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - - // Construct an instance of the StatusDetails model - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - - // Construct an instance of the CreateCredentialsOptions model - CreateCredentialsOptions createCredentialsOptionsModel = - new CreateCredentialsOptions.Builder() - .environmentId("testString") - .sourceType("box") - .credentialDetails(credentialDetailsModel) - .status(statusDetailsModel) - .build(); - - // Invoke createCredentials() with a valid options model and verify the result - Response response = - discoveryService.createCredentials(createCredentialsOptionsModel).execute(); - assertNotNull(response); - Credentials responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createCredentialsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createCredentials operation with and without retries enabled - @Test - public void testCreateCredentialsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateCredentialsWOptions(); - - discoveryService.disableRetries(); - testCreateCredentialsWOptions(); - } - - // Test the createCredentials operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateCredentialsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createCredentials(null).execute(); - } - - // Test the getCredentials operation with a valid options model parameter - @Test - public void testGetCredentialsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"credential_id\": \"credentialId\", \"source_type\": \"box\", \"credential_details\": {\"credential_type\": \"oauth2\", \"client_id\": \"clientId\", \"enterprise_id\": \"enterpriseId\", \"url\": \"url\", \"username\": \"username\", \"organization_url\": \"organizationUrl\", \"site_collection.path\": \"siteCollectionPath\", \"client_secret\": \"clientSecret\", \"public_key_id\": \"publicKeyId\", \"private_key\": \"privateKey\", \"passphrase\": \"passphrase\", \"password\": \"password\", \"gateway_id\": \"gatewayId\", \"source_version\": \"online\", \"web_application_url\": \"webApplicationUrl\", \"domain\": \"domain\", \"endpoint\": \"endpoint\", \"access_key_id\": \"accessKeyId\", \"secret_access_key\": \"secretAccessKey\"}, \"status\": {\"authenticated\": false, \"error_message\": \"errorMessage\"}}"; - String getCredentialsPath = "/v1/environments/testString/credentials/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetCredentialsOptions model - GetCredentialsOptions getCredentialsOptionsModel = - new GetCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .build(); - - // Invoke getCredentials() with a valid options model and verify the result - Response response = - discoveryService.getCredentials(getCredentialsOptionsModel).execute(); - assertNotNull(response); - Credentials responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getCredentialsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getCredentials operation with and without retries enabled - @Test - public void testGetCredentialsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetCredentialsWOptions(); - - discoveryService.disableRetries(); - testGetCredentialsWOptions(); - } - - // Test the getCredentials operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetCredentialsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getCredentials(null).execute(); - } - - // Test the updateCredentials operation with a valid options model parameter - @Test - public void testUpdateCredentialsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"credential_id\": \"credentialId\", \"source_type\": \"box\", \"credential_details\": {\"credential_type\": \"oauth2\", \"client_id\": \"clientId\", \"enterprise_id\": \"enterpriseId\", \"url\": \"url\", \"username\": \"username\", \"organization_url\": \"organizationUrl\", \"site_collection.path\": \"siteCollectionPath\", \"client_secret\": \"clientSecret\", \"public_key_id\": \"publicKeyId\", \"private_key\": \"privateKey\", \"passphrase\": \"passphrase\", \"password\": \"password\", \"gateway_id\": \"gatewayId\", \"source_version\": \"online\", \"web_application_url\": \"webApplicationUrl\", \"domain\": \"domain\", \"endpoint\": \"endpoint\", \"access_key_id\": \"accessKeyId\", \"secret_access_key\": \"secretAccessKey\"}, \"status\": {\"authenticated\": false, \"error_message\": \"errorMessage\"}}"; - String updateCredentialsPath = "/v1/environments/testString/credentials/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the CredentialDetails model - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("oauth2") - .clientId("testString") - .enterpriseId("testString") - .url("testString") - .username("testString") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - - // Construct an instance of the StatusDetails model - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - - // Construct an instance of the UpdateCredentialsOptions model - UpdateCredentialsOptions updateCredentialsOptionsModel = - new UpdateCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .sourceType("box") - .credentialDetails(credentialDetailsModel) - .status(statusDetailsModel) - .build(); - - // Invoke updateCredentials() with a valid options model and verify the result - Response response = - discoveryService.updateCredentials(updateCredentialsOptionsModel).execute(); - assertNotNull(response); - Credentials responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateCredentialsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the updateCredentials operation with and without retries enabled - @Test - public void testUpdateCredentialsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testUpdateCredentialsWOptions(); - - discoveryService.disableRetries(); - testUpdateCredentialsWOptions(); - } - - // Test the updateCredentials operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateCredentialsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.updateCredentials(null).execute(); - } - - // Test the deleteCredentials operation with a valid options model parameter - @Test - public void testDeleteCredentialsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"credential_id\": \"credentialId\", \"status\": \"deleted\"}"; - String deleteCredentialsPath = "/v1/environments/testString/credentials/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteCredentialsOptions model - DeleteCredentialsOptions deleteCredentialsOptionsModel = - new DeleteCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .build(); - - // Invoke deleteCredentials() with a valid options model and verify the result - Response response = - discoveryService.deleteCredentials(deleteCredentialsOptionsModel).execute(); - assertNotNull(response); - DeleteCredentials responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteCredentialsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteCredentials operation with and without retries enabled - @Test - public void testDeleteCredentialsWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteCredentialsWOptions(); - - discoveryService.disableRetries(); - testDeleteCredentialsWOptions(); - } - - // Test the deleteCredentials operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteCredentialsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteCredentials(null).execute(); - } - - // Test the listGateways operation with a valid options model parameter - @Test - public void testListGatewaysWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"gateways\": [{\"gateway_id\": \"gatewayId\", \"name\": \"name\", \"status\": \"connected\", \"token\": \"token\", \"token_id\": \"tokenId\"}]}"; - String listGatewaysPath = "/v1/environments/testString/gateways"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListGatewaysOptions model - ListGatewaysOptions listGatewaysOptionsModel = - new ListGatewaysOptions.Builder().environmentId("testString").build(); - - // Invoke listGateways() with a valid options model and verify the result - Response response = - discoveryService.listGateways(listGatewaysOptionsModel).execute(); - assertNotNull(response); - GatewayList responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listGatewaysPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the listGateways operation with and without retries enabled - @Test - public void testListGatewaysWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testListGatewaysWOptions(); - - discoveryService.disableRetries(); - testListGatewaysWOptions(); - } - - // Test the listGateways operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListGatewaysNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.listGateways(null).execute(); - } - - // Test the createGateway operation with a valid options model parameter - @Test - public void testCreateGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"gateway_id\": \"gatewayId\", \"name\": \"name\", \"status\": \"connected\", \"token\": \"token\", \"token_id\": \"tokenId\"}"; - String createGatewayPath = "/v1/environments/testString/gateways"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateGatewayOptions model - CreateGatewayOptions createGatewayOptionsModel = - new CreateGatewayOptions.Builder().environmentId("testString").name("testString").build(); - - // Invoke createGateway() with a valid options model and verify the result - Response response = - discoveryService.createGateway(createGatewayOptionsModel).execute(); - assertNotNull(response); - Gateway responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the createGateway operation with and without retries enabled - @Test - public void testCreateGatewayWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testCreateGatewayWOptions(); - - discoveryService.disableRetries(); - testCreateGatewayWOptions(); - } - - // Test the createGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.createGateway(null).execute(); - } - - // Test the getGateway operation with a valid options model parameter - @Test - public void testGetGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"gateway_id\": \"gatewayId\", \"name\": \"name\", \"status\": \"connected\", \"token\": \"token\", \"token_id\": \"tokenId\"}"; - String getGatewayPath = "/v1/environments/testString/gateways/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetGatewayOptions model - GetGatewayOptions getGatewayOptionsModel = - new GetGatewayOptions.Builder().environmentId("testString").gatewayId("testString").build(); - - // Invoke getGateway() with a valid options model and verify the result - Response response = discoveryService.getGateway(getGatewayOptionsModel).execute(); - assertNotNull(response); - Gateway responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the getGateway operation with and without retries enabled - @Test - public void testGetGatewayWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testGetGatewayWOptions(); - - discoveryService.disableRetries(); - testGetGatewayWOptions(); - } - - // Test the getGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.getGateway(null).execute(); - } - - // Test the deleteGateway operation with a valid options model parameter - @Test - public void testDeleteGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"gateway_id\": \"gatewayId\", \"status\": \"status\"}"; - String deleteGatewayPath = "/v1/environments/testString/gateways/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteGatewayOptions model - DeleteGatewayOptions deleteGatewayOptionsModel = - new DeleteGatewayOptions.Builder() - .environmentId("testString") - .gatewayId("testString") - .build(); - - // Invoke deleteGateway() with a valid options model and verify the result - Response response = - discoveryService.deleteGateway(deleteGatewayOptionsModel).execute(); - assertNotNull(response); - GatewayDelete responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "testString"); - } - - // Test the deleteGateway operation with and without retries enabled - @Test - public void testDeleteGatewayWRetries() throws Throwable { - discoveryService.enableRetries(4, 30); - testDeleteGatewayWOptions(); - - discoveryService.disableRetries(); - testDeleteGatewayWOptions(); - } - - // Test the deleteGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - discoveryService.deleteGateway(null).execute(); - } - - // Perform setup needed before each test method - @BeforeMethod - public void beforeEachTest() { - // Start the mock server. - try { - server = new MockWebServer(); - server.start(); - } catch (IOException err) { - fail("Failed to instantiate mock web server"); - } - - // Construct an instance of the service - constructClientService(); - } - - // Perform tear down after each test method - @AfterMethod - public void afterEachTest() throws IOException { - server.shutdown(); - discoveryService = null; - } - - // Constructs an instance of the service to be used by the tests - public void constructClientService() { - final String serviceName = "testService"; - // set mock values for global params - String version = "testString"; - - final Authenticator authenticator = new NoAuthAuthenticator(); - discoveryService = new Discovery(version, serviceName, authenticator); - String url = server.url("/").toString(); - discoveryService.setServiceUrl(url); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddDocumentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddDocumentOptionsTest.java deleted file mode 100644 index 88437423d4..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddDocumentOptionsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -/** Unit test class for the AddDocumentOptions model. */ -public class AddDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testAddDocumentOptions() throws Throwable { - AddDocumentOptions addDocumentOptionsModel = - new AddDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/json") - .metadata("testString") - .build(); - assertEquals(addDocumentOptionsModel.environmentId(), "testString"); - assertEquals(addDocumentOptionsModel.collectionId(), "testString"); - assertEquals( - IOUtils.toString(addDocumentOptionsModel.file()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(addDocumentOptionsModel.filename(), "testString"); - assertEquals(addDocumentOptionsModel.fileContentType(), "application/json"); - assertEquals(addDocumentOptionsModel.metadata(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddDocumentOptionsError() throws Throwable { - new AddDocumentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptionsTest.java deleted file mode 100644 index 5ffd89ac50..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AddTrainingDataOptionsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the AddTrainingDataOptions model. */ -public class AddTrainingDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testAddTrainingDataOptions() throws Throwable { - TrainingExample trainingExampleModel = - new TrainingExample.Builder() - .documentId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - assertEquals(trainingExampleModel.documentId(), "testString"); - assertEquals(trainingExampleModel.crossReference(), "testString"); - assertEquals(trainingExampleModel.relevance(), Long.valueOf("26")); - - AddTrainingDataOptions addTrainingDataOptionsModel = - new AddTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .naturalLanguageQuery("testString") - .filter("testString") - .examples(java.util.Arrays.asList(trainingExampleModel)) - .build(); - assertEquals(addTrainingDataOptionsModel.environmentId(), "testString"); - assertEquals(addTrainingDataOptionsModel.collectionId(), "testString"); - assertEquals(addTrainingDataOptionsModel.naturalLanguageQuery(), "testString"); - assertEquals(addTrainingDataOptionsModel.filter(), "testString"); - assertEquals( - addTrainingDataOptionsModel.examples(), java.util.Arrays.asList(trainingExampleModel)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddTrainingDataOptionsError() throws Throwable { - new AddTrainingDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AggregationResultTest.java deleted file mode 100644 index efdc950afa..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/AggregationResultTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the AggregationResult model. */ -public class AggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testAggregationResult() throws Throwable { - AggregationResult aggregationResultModel = new AggregationResult(); - assertNull(aggregationResultModel.getKey()); - assertNull(aggregationResultModel.getMatchingResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatusTest.java deleted file mode 100644 index ae741e6669..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionCrawlStatusTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CollectionCrawlStatus model. */ -public class CollectionCrawlStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCollectionCrawlStatus() throws Throwable { - CollectionCrawlStatus collectionCrawlStatusModel = new CollectionCrawlStatus(); - assertNull(collectionCrawlStatusModel.getSourceCrawl()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsageTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsageTest.java deleted file mode 100644 index a19af35a19..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionDiskUsageTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CollectionDiskUsage model. */ -public class CollectionDiskUsageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCollectionDiskUsage() throws Throwable { - CollectionDiskUsage collectionDiskUsageModel = new CollectionDiskUsage(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionTest.java deleted file mode 100644 index 7d36e3dc9d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Collection model. */ -public class CollectionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCollection() throws Throwable { - Collection collectionModel = new Collection(); - assertNull(collectionModel.getName()); - assertNull(collectionModel.getDescription()); - assertNull(collectionModel.getConfigurationId()); - assertNull(collectionModel.getLanguage()); - assertNull(collectionModel.getDocumentCounts()); - assertNull(collectionModel.getDiskUsage()); - assertNull(collectionModel.getTrainingStatus()); - assertNull(collectionModel.getCrawlStatus()); - assertNull(collectionModel.getSmartDocumentUnderstanding()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionUsageTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionUsageTest.java deleted file mode 100644 index 1e774a26a3..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CollectionUsageTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CollectionUsage model. */ -public class CollectionUsageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCollectionUsage() throws Throwable { - CollectionUsage collectionUsageModel = new CollectionUsage(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CompletionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CompletionsTest.java deleted file mode 100644 index 99b2749bbd..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CompletionsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Completions model. */ -public class CompletionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCompletions() throws Throwable { - Completions completionsModel = new Completions(); - assertNull(completionsModel.getCompletions()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConfigurationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConfigurationTest.java deleted file mode 100644 index 2d424d54a3..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConfigurationTest.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Configuration model. */ -public class ConfigurationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testConfiguration() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - assertEquals(pdfSettingsModel.heading(), pdfHeadingDetectionModel); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - assertEquals(wordSettingsModel.heading(), wordHeadingDetectionModel); - - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("span")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - assertEquals(htmlSettingsModel.excludeTagsCompletely(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagsKeepContent(), java.util.Arrays.asList("span")); - assertEquals(htmlSettingsModel.keepContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.excludeContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.keepTagAttributes(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagAttributes(), java.util.Arrays.asList("testString")); - - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(true) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("custom-field-1", "custom-field-2")) - .build(); - assertEquals(segmentSettingsModel.enabled(), Boolean.valueOf(true)); - assertEquals(segmentSettingsModel.selectorTags(), java.util.Arrays.asList("h1", "h2")); - assertEquals( - segmentSettingsModel.annotatedFields(), - java.util.Arrays.asList("custom-field-1", "custom-field-2")); - - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("move") - .sourceField("extracted_metadata.title") - .destinationField("metadata.title") - .build(); - assertEquals(normalizationOperationModel.operation(), "move"); - assertEquals(normalizationOperationModel.sourceField(), "extracted_metadata.title"); - assertEquals(normalizationOperationModel.destinationField(), "metadata.title"); - - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - assertEquals(conversionsModel.pdf(), pdfSettingsModel); - assertEquals(conversionsModel.word(), wordSettingsModel); - assertEquals(conversionsModel.html(), htmlSettingsModel); - assertEquals(conversionsModel.segment(), segmentSettingsModel); - assertEquals( - conversionsModel.jsonNormalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(conversionsModel.imageTextRecognition(), Boolean.valueOf(true)); - - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(false) - .limit(Long.valueOf("50")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(false)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("50")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(false) - .limit(Long.valueOf("50")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("WKS-model-id") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(false)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("50")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "WKS-model-id"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("IBM", "Watson")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("IBM", "Watson")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("IBM", "Watson")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("IBM", "Watson")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("50")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("50")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("WKS-model-id").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "WKS-model-id"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("8")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("8")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - assertEquals(enrichmentOptionsModel.features(), nluEnrichmentFeaturesModel); - assertEquals(enrichmentOptionsModel.language(), "ar"); - assertEquals(enrichmentOptionsModel.model(), "testString"); - - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("enriched_title") - .sourceField("title") - .overwrite(false) - .enrichment("natural_language_understanding") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - assertEquals(enrichmentModel.description(), "testString"); - assertEquals(enrichmentModel.destinationField(), "enriched_title"); - assertEquals(enrichmentModel.sourceField(), "title"); - assertEquals(enrichmentModel.overwrite(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.enrichment(), "natural_language_understanding"); - assertEquals(enrichmentModel.ignoreDownstreamErrors(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.options(), enrichmentOptionsModel); - - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("weekly") - .build(); - assertEquals(sourceScheduleModel.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModel.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModel.frequency(), "weekly"); - - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("/sites/TestSiteA") - .limit(Long.valueOf("10")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "/sites/TestSiteA"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("10")); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - assertEquals(sourceOptionsModel.folders(), java.util.Arrays.asList(sourceOptionsFolderModel)); - assertEquals(sourceOptionsModel.objects(), java.util.Arrays.asList(sourceOptionsObjectModel)); - assertEquals( - sourceOptionsModel.siteCollections(), java.util.Arrays.asList(sourceOptionsSiteCollModel)); - assertEquals(sourceOptionsModel.urls(), java.util.Arrays.asList(sourceOptionsWebCrawlModel)); - assertEquals(sourceOptionsModel.buckets(), java.util.Arrays.asList(sourceOptionsBucketsModel)); - assertEquals(sourceOptionsModel.crawlAllBuckets(), Boolean.valueOf(true)); - - Source sourceModel = - new Source.Builder() - .type("salesforce") - .credentialId("00ad0000-0000-11e8-ba89-0ed5f00f718b") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - assertEquals(sourceModel.type(), "salesforce"); - assertEquals(sourceModel.credentialId(), "00ad0000-0000-11e8-ba89-0ed5f00f718b"); - assertEquals(sourceModel.schedule(), sourceScheduleModel); - assertEquals(sourceModel.options(), sourceOptionsModel); - - Configuration configurationModel = - new Configuration.Builder() - .name("testString") - .description("testString") - .conversions(conversionsModel) - .enrichments(java.util.Arrays.asList(enrichmentModel)) - .normalizations(java.util.Arrays.asList(normalizationOperationModel)) - .source(sourceModel) - .build(); - assertEquals(configurationModel.name(), "testString"); - assertEquals(configurationModel.description(), "testString"); - assertEquals(configurationModel.conversions(), conversionsModel); - assertEquals(configurationModel.enrichments(), java.util.Arrays.asList(enrichmentModel)); - assertEquals( - configurationModel.normalizations(), java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(configurationModel.source(), sourceModel); - - String json = TestUtilities.serialize(configurationModel); - - Configuration configurationModelNew = TestUtilities.deserialize(json, Configuration.class); - assertTrue(configurationModelNew instanceof Configuration); - assertEquals(configurationModelNew.name(), "testString"); - assertEquals(configurationModelNew.description(), "testString"); - assertEquals(configurationModelNew.conversions().toString(), conversionsModel.toString()); - assertEquals(configurationModelNew.source().toString(), sourceModel.toString()); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testConfigurationError() throws Throwable { - new Configuration.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConversionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConversionsTest.java deleted file mode 100644 index ff38dbd35a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ConversionsTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Conversions model. */ -public class ConversionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testConversions() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - assertEquals(pdfSettingsModel.heading(), pdfHeadingDetectionModel); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - assertEquals(wordSettingsModel.heading(), wordHeadingDetectionModel); - - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - assertEquals(htmlSettingsModel.excludeTagsCompletely(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagsKeepContent(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.keepContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.excludeContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.keepTagAttributes(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagAttributes(), java.util.Arrays.asList("testString")); - - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(segmentSettingsModel.enabled(), Boolean.valueOf(false)); - assertEquals(segmentSettingsModel.selectorTags(), java.util.Arrays.asList("h1", "h2")); - assertEquals(segmentSettingsModel.annotatedFields(), java.util.Arrays.asList("testString")); - - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - assertEquals(normalizationOperationModel.operation(), "copy"); - assertEquals(normalizationOperationModel.sourceField(), "testString"); - assertEquals(normalizationOperationModel.destinationField(), "testString"); - - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - assertEquals(conversionsModel.pdf(), pdfSettingsModel); - assertEquals(conversionsModel.word(), wordSettingsModel); - assertEquals(conversionsModel.html(), htmlSettingsModel); - assertEquals(conversionsModel.segment(), segmentSettingsModel); - assertEquals( - conversionsModel.jsonNormalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(conversionsModel.imageTextRecognition(), Boolean.valueOf(true)); - - String json = TestUtilities.serialize(conversionsModel); - - Conversions conversionsModelNew = TestUtilities.deserialize(json, Conversions.class); - assertTrue(conversionsModelNew instanceof Conversions); - assertEquals(conversionsModelNew.pdf().toString(), pdfSettingsModel.toString()); - assertEquals(conversionsModelNew.word().toString(), wordSettingsModel.toString()); - assertEquals(conversionsModelNew.html().toString(), htmlSettingsModel.toString()); - assertEquals(conversionsModelNew.segment().toString(), segmentSettingsModel.toString()); - assertEquals(conversionsModelNew.imageTextRecognition(), Boolean.valueOf(true)); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptionsTest.java deleted file mode 100644 index d5a6dc30a8..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCollectionOptionsTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateCollectionOptions model. */ -public class CreateCollectionOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateCollectionOptions() throws Throwable { - CreateCollectionOptions createCollectionOptionsModel = - new CreateCollectionOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .configurationId("testString") - .language("en") - .build(); - assertEquals(createCollectionOptionsModel.environmentId(), "testString"); - assertEquals(createCollectionOptionsModel.name(), "testString"); - assertEquals(createCollectionOptionsModel.description(), "testString"); - assertEquals(createCollectionOptionsModel.configurationId(), "testString"); - assertEquals(createCollectionOptionsModel.language(), "en"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateCollectionOptionsError() throws Throwable { - new CreateCollectionOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptionsTest.java deleted file mode 100644 index 190e6fafd3..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateConfigurationOptionsTest.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateConfigurationOptions model. */ -public class CreateConfigurationOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateConfigurationOptions() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - assertEquals(pdfSettingsModel.heading(), pdfHeadingDetectionModel); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - assertEquals(wordSettingsModel.heading(), wordHeadingDetectionModel); - - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - assertEquals(htmlSettingsModel.excludeTagsCompletely(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagsKeepContent(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.keepContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.excludeContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.keepTagAttributes(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagAttributes(), java.util.Arrays.asList("testString")); - - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(segmentSettingsModel.enabled(), Boolean.valueOf(false)); - assertEquals(segmentSettingsModel.selectorTags(), java.util.Arrays.asList("h1", "h2")); - assertEquals(segmentSettingsModel.annotatedFields(), java.util.Arrays.asList("testString")); - - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - assertEquals(normalizationOperationModel.operation(), "copy"); - assertEquals(normalizationOperationModel.sourceField(), "testString"); - assertEquals(normalizationOperationModel.destinationField(), "testString"); - - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - assertEquals(conversionsModel.pdf(), pdfSettingsModel); - assertEquals(conversionsModel.word(), wordSettingsModel); - assertEquals(conversionsModel.html(), htmlSettingsModel); - assertEquals(conversionsModel.segment(), segmentSettingsModel); - assertEquals( - conversionsModel.jsonNormalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(conversionsModel.imageTextRecognition(), Boolean.valueOf(true)); - - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - assertEquals(enrichmentOptionsModel.features(), nluEnrichmentFeaturesModel); - assertEquals(enrichmentOptionsModel.language(), "ar"); - assertEquals(enrichmentOptionsModel.model(), "testString"); - - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("testString") - .sourceField("testString") - .overwrite(false) - .enrichment("testString") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - assertEquals(enrichmentModel.description(), "testString"); - assertEquals(enrichmentModel.destinationField(), "testString"); - assertEquals(enrichmentModel.sourceField(), "testString"); - assertEquals(enrichmentModel.overwrite(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.enrichment(), "testString"); - assertEquals(enrichmentModel.ignoreDownstreamErrors(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.options(), enrichmentOptionsModel); - - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - assertEquals(sourceScheduleModel.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModel.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModel.frequency(), "daily"); - - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("26")); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - assertEquals(sourceOptionsModel.folders(), java.util.Arrays.asList(sourceOptionsFolderModel)); - assertEquals(sourceOptionsModel.objects(), java.util.Arrays.asList(sourceOptionsObjectModel)); - assertEquals( - sourceOptionsModel.siteCollections(), java.util.Arrays.asList(sourceOptionsSiteCollModel)); - assertEquals(sourceOptionsModel.urls(), java.util.Arrays.asList(sourceOptionsWebCrawlModel)); - assertEquals(sourceOptionsModel.buckets(), java.util.Arrays.asList(sourceOptionsBucketsModel)); - assertEquals(sourceOptionsModel.crawlAllBuckets(), Boolean.valueOf(true)); - - Source sourceModel = - new Source.Builder() - .type("box") - .credentialId("testString") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - assertEquals(sourceModel.type(), "box"); - assertEquals(sourceModel.credentialId(), "testString"); - assertEquals(sourceModel.schedule(), sourceScheduleModel); - assertEquals(sourceModel.options(), sourceOptionsModel); - - CreateConfigurationOptions createConfigurationOptionsModel = - new CreateConfigurationOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .conversions(conversionsModel) - .enrichments(java.util.Arrays.asList(enrichmentModel)) - .normalizations(java.util.Arrays.asList(normalizationOperationModel)) - .source(sourceModel) - .build(); - assertEquals(createConfigurationOptionsModel.environmentId(), "testString"); - assertEquals(createConfigurationOptionsModel.name(), "testString"); - assertEquals(createConfigurationOptionsModel.description(), "testString"); - assertEquals(createConfigurationOptionsModel.conversions(), conversionsModel); - assertEquals( - createConfigurationOptionsModel.enrichments(), java.util.Arrays.asList(enrichmentModel)); - assertEquals( - createConfigurationOptionsModel.normalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(createConfigurationOptionsModel.source(), sourceModel); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateConfigurationOptionsError() throws Throwable { - new CreateConfigurationOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptionsTest.java deleted file mode 100644 index d2a3d9ebe0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateCredentialsOptionsTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateCredentialsOptions model. */ -public class CreateCredentialsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateCredentialsOptions() throws Throwable { - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("oauth2") - .clientId("testString") - .enterpriseId("testString") - .url("testString") - .username("testString") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - assertEquals(credentialDetailsModel.credentialType(), "oauth2"); - assertEquals(credentialDetailsModel.clientId(), "testString"); - assertEquals(credentialDetailsModel.enterpriseId(), "testString"); - assertEquals(credentialDetailsModel.url(), "testString"); - assertEquals(credentialDetailsModel.username(), "testString"); - assertEquals(credentialDetailsModel.organizationUrl(), "testString"); - assertEquals(credentialDetailsModel.siteCollectionPath(), "testString"); - assertEquals(credentialDetailsModel.clientSecret(), "testString"); - assertEquals(credentialDetailsModel.publicKeyId(), "testString"); - assertEquals(credentialDetailsModel.privateKey(), "testString"); - assertEquals(credentialDetailsModel.passphrase(), "testString"); - assertEquals(credentialDetailsModel.password(), "testString"); - assertEquals(credentialDetailsModel.gatewayId(), "testString"); - assertEquals(credentialDetailsModel.sourceVersion(), "online"); - assertEquals(credentialDetailsModel.webApplicationUrl(), "testString"); - assertEquals(credentialDetailsModel.domain(), "testString"); - assertEquals(credentialDetailsModel.endpoint(), "testString"); - assertEquals(credentialDetailsModel.accessKeyId(), "testString"); - assertEquals(credentialDetailsModel.secretAccessKey(), "testString"); - - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - assertEquals(statusDetailsModel.authenticated(), Boolean.valueOf(true)); - assertEquals(statusDetailsModel.errorMessage(), "testString"); - - CreateCredentialsOptions createCredentialsOptionsModel = - new CreateCredentialsOptions.Builder() - .environmentId("testString") - .sourceType("box") - .credentialDetails(credentialDetailsModel) - .status(statusDetailsModel) - .build(); - assertEquals(createCredentialsOptionsModel.environmentId(), "testString"); - assertEquals(createCredentialsOptionsModel.sourceType(), "box"); - assertEquals(createCredentialsOptionsModel.credentialDetails(), credentialDetailsModel); - assertEquals(createCredentialsOptionsModel.status(), statusDetailsModel); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateCredentialsOptionsError() throws Throwable { - new CreateCredentialsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptionsTest.java deleted file mode 100644 index 4283c9a6d4..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEnvironmentOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateEnvironmentOptions model. */ -public class CreateEnvironmentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateEnvironmentOptions() throws Throwable { - CreateEnvironmentOptions createEnvironmentOptionsModel = - new CreateEnvironmentOptions.Builder() - .name("testString") - .description("testString") - .size("LT") - .build(); - assertEquals(createEnvironmentOptionsModel.name(), "testString"); - assertEquals(createEnvironmentOptionsModel.description(), "testString"); - assertEquals(createEnvironmentOptionsModel.size(), "LT"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateEnvironmentOptionsError() throws Throwable { - new CreateEnvironmentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventOptionsTest.java deleted file mode 100644 index eecba4bb8a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventOptionsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateEventOptions model. */ -public class CreateEventOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateEventOptions() throws Throwable { - EventData eventDataModel = - new EventData.Builder() - .environmentId("testString") - .sessionToken("testString") - .clientTimestamp(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .displayRank(Long.valueOf("26")) - .collectionId("testString") - .documentId("testString") - .build(); - assertEquals(eventDataModel.environmentId(), "testString"); - assertEquals(eventDataModel.sessionToken(), "testString"); - assertEquals( - eventDataModel.clientTimestamp(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(eventDataModel.displayRank(), Long.valueOf("26")); - assertEquals(eventDataModel.collectionId(), "testString"); - assertEquals(eventDataModel.documentId(), "testString"); - - CreateEventOptions createEventOptionsModel = - new CreateEventOptions.Builder().type("click").data(eventDataModel).build(); - assertEquals(createEventOptionsModel.type(), "click"); - assertEquals(createEventOptionsModel.data(), eventDataModel); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateEventOptionsError() throws Throwable { - new CreateEventOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventResponseTest.java deleted file mode 100644 index c71eb32399..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateEventResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateEventResponse model. */ -public class CreateEventResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateEventResponse() throws Throwable { - CreateEventResponse createEventResponseModel = new CreateEventResponse(); - assertNull(createEventResponseModel.getType()); - assertNull(createEventResponseModel.getData()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptionsTest.java deleted file mode 100644 index 41ed04b130..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateExpansionsOptionsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateExpansionsOptions model. */ -public class CreateExpansionsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateExpansionsOptions() throws Throwable { - Expansion expansionModel = - new Expansion.Builder() - .inputTerms(java.util.Arrays.asList("testString")) - .expandedTerms(java.util.Arrays.asList("testString")) - .build(); - assertEquals(expansionModel.inputTerms(), java.util.Arrays.asList("testString")); - assertEquals(expansionModel.expandedTerms(), java.util.Arrays.asList("testString")); - - CreateExpansionsOptions createExpansionsOptionsModel = - new CreateExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .expansions(java.util.Arrays.asList(expansionModel)) - .build(); - assertEquals(createExpansionsOptionsModel.environmentId(), "testString"); - assertEquals(createExpansionsOptionsModel.collectionId(), "testString"); - assertEquals( - createExpansionsOptionsModel.expansions(), java.util.Arrays.asList(expansionModel)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateExpansionsOptionsError() throws Throwable { - new CreateExpansionsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptionsTest.java deleted file mode 100644 index 9f237623fa..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateGatewayOptionsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateGatewayOptions model. */ -public class CreateGatewayOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateGatewayOptions() throws Throwable { - CreateGatewayOptions createGatewayOptionsModel = - new CreateGatewayOptions.Builder().environmentId("testString").name("testString").build(); - assertEquals(createGatewayOptionsModel.environmentId(), "testString"); - assertEquals(createGatewayOptionsModel.name(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateGatewayOptionsError() throws Throwable { - new CreateGatewayOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptionsTest.java deleted file mode 100644 index cbf7784072..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateStopwordListOptionsTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -/** Unit test class for the CreateStopwordListOptions model. */ -public class CreateStopwordListOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateStopwordListOptions() throws Throwable { - CreateStopwordListOptions createStopwordListOptionsModel = - new CreateStopwordListOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .stopwordFile(TestUtilities.createMockStream("This is a mock file.")) - .stopwordFilename("testString") - .build(); - assertEquals(createStopwordListOptionsModel.environmentId(), "testString"); - assertEquals(createStopwordListOptionsModel.collectionId(), "testString"); - assertEquals( - IOUtils.toString(createStopwordListOptionsModel.stopwordFile()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(createStopwordListOptionsModel.stopwordFilename(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateStopwordListOptionsError() throws Throwable { - new CreateStopwordListOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptionsTest.java deleted file mode 100644 index 18544e05fc..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTokenizationDictionaryOptionsTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateTokenizationDictionaryOptions model. */ -public class CreateTokenizationDictionaryOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateTokenizationDictionaryOptions() throws Throwable { - TokenDictRule tokenDictRuleModel = - new TokenDictRule.Builder() - .text("testString") - .tokens(java.util.Arrays.asList("testString")) - .readings(java.util.Arrays.asList("testString")) - .partOfSpeech("testString") - .build(); - assertEquals(tokenDictRuleModel.text(), "testString"); - assertEquals(tokenDictRuleModel.tokens(), java.util.Arrays.asList("testString")); - assertEquals(tokenDictRuleModel.readings(), java.util.Arrays.asList("testString")); - assertEquals(tokenDictRuleModel.partOfSpeech(), "testString"); - - CreateTokenizationDictionaryOptions createTokenizationDictionaryOptionsModel = - new CreateTokenizationDictionaryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .tokenizationRules(java.util.Arrays.asList(tokenDictRuleModel)) - .build(); - assertEquals(createTokenizationDictionaryOptionsModel.environmentId(), "testString"); - assertEquals(createTokenizationDictionaryOptionsModel.collectionId(), "testString"); - assertEquals( - createTokenizationDictionaryOptionsModel.tokenizationRules(), - java.util.Arrays.asList(tokenDictRuleModel)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateTokenizationDictionaryOptionsError() throws Throwable { - new CreateTokenizationDictionaryOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptionsTest.java deleted file mode 100644 index e9083adcaf..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CreateTrainingExampleOptionsTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CreateTrainingExampleOptions model. */ -public class CreateTrainingExampleOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateTrainingExampleOptions() throws Throwable { - CreateTrainingExampleOptions createTrainingExampleOptionsModel = - new CreateTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .documentId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - assertEquals(createTrainingExampleOptionsModel.environmentId(), "testString"); - assertEquals(createTrainingExampleOptionsModel.collectionId(), "testString"); - assertEquals(createTrainingExampleOptionsModel.queryId(), "testString"); - assertEquals(createTrainingExampleOptionsModel.documentId(), "testString"); - assertEquals(createTrainingExampleOptionsModel.crossReference(), "testString"); - assertEquals(createTrainingExampleOptionsModel.relevance(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateTrainingExampleOptionsError() throws Throwable { - new CreateTrainingExampleOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialDetailsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialDetailsTest.java deleted file mode 100644 index 22fc188c13..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialDetailsTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CredentialDetails model. */ -public class CredentialDetailsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCredentialDetails() throws Throwable { - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("oauth2") - .clientId("testString") - .enterpriseId("testString") - .url("testString") - .username("testString") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - assertEquals(credentialDetailsModel.credentialType(), "oauth2"); - assertEquals(credentialDetailsModel.clientId(), "testString"); - assertEquals(credentialDetailsModel.enterpriseId(), "testString"); - assertEquals(credentialDetailsModel.url(), "testString"); - assertEquals(credentialDetailsModel.username(), "testString"); - assertEquals(credentialDetailsModel.organizationUrl(), "testString"); - assertEquals(credentialDetailsModel.siteCollectionPath(), "testString"); - assertEquals(credentialDetailsModel.clientSecret(), "testString"); - assertEquals(credentialDetailsModel.publicKeyId(), "testString"); - assertEquals(credentialDetailsModel.privateKey(), "testString"); - assertEquals(credentialDetailsModel.passphrase(), "testString"); - assertEquals(credentialDetailsModel.password(), "testString"); - assertEquals(credentialDetailsModel.gatewayId(), "testString"); - assertEquals(credentialDetailsModel.sourceVersion(), "online"); - assertEquals(credentialDetailsModel.webApplicationUrl(), "testString"); - assertEquals(credentialDetailsModel.domain(), "testString"); - assertEquals(credentialDetailsModel.endpoint(), "testString"); - assertEquals(credentialDetailsModel.accessKeyId(), "testString"); - assertEquals(credentialDetailsModel.secretAccessKey(), "testString"); - - String json = TestUtilities.serialize(credentialDetailsModel); - - CredentialDetails credentialDetailsModelNew = - TestUtilities.deserialize(json, CredentialDetails.class); - assertTrue(credentialDetailsModelNew instanceof CredentialDetails); - assertEquals(credentialDetailsModelNew.credentialType(), "oauth2"); - assertEquals(credentialDetailsModelNew.clientId(), "testString"); - assertEquals(credentialDetailsModelNew.enterpriseId(), "testString"); - assertEquals(credentialDetailsModelNew.url(), "testString"); - assertEquals(credentialDetailsModelNew.username(), "testString"); - assertEquals(credentialDetailsModelNew.organizationUrl(), "testString"); - assertEquals(credentialDetailsModelNew.siteCollectionPath(), "testString"); - assertEquals(credentialDetailsModelNew.clientSecret(), "testString"); - assertEquals(credentialDetailsModelNew.publicKeyId(), "testString"); - assertEquals(credentialDetailsModelNew.privateKey(), "testString"); - assertEquals(credentialDetailsModelNew.passphrase(), "testString"); - assertEquals(credentialDetailsModelNew.password(), "testString"); - assertEquals(credentialDetailsModelNew.gatewayId(), "testString"); - assertEquals(credentialDetailsModelNew.sourceVersion(), "online"); - assertEquals(credentialDetailsModelNew.webApplicationUrl(), "testString"); - assertEquals(credentialDetailsModelNew.domain(), "testString"); - assertEquals(credentialDetailsModelNew.endpoint(), "testString"); - assertEquals(credentialDetailsModelNew.accessKeyId(), "testString"); - assertEquals(credentialDetailsModelNew.secretAccessKey(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsListTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsListTest.java deleted file mode 100644 index 454c7734f2..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsListTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the CredentialsList model. */ -public class CredentialsListTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCredentialsList() throws Throwable { - CredentialsList credentialsListModel = new CredentialsList(); - assertNull(credentialsListModel.getCredentials()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsTest.java deleted file mode 100644 index bfe9f7fb60..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/CredentialsTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Credentials model. */ -public class CredentialsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCredentials() throws Throwable { - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("username_password") - .clientId("testString") - .enterpriseId("testString") - .url("login.salesforce.com") - .username("user@email.address") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - assertEquals(credentialDetailsModel.credentialType(), "username_password"); - assertEquals(credentialDetailsModel.clientId(), "testString"); - assertEquals(credentialDetailsModel.enterpriseId(), "testString"); - assertEquals(credentialDetailsModel.url(), "login.salesforce.com"); - assertEquals(credentialDetailsModel.username(), "user@email.address"); - assertEquals(credentialDetailsModel.organizationUrl(), "testString"); - assertEquals(credentialDetailsModel.siteCollectionPath(), "testString"); - assertEquals(credentialDetailsModel.clientSecret(), "testString"); - assertEquals(credentialDetailsModel.publicKeyId(), "testString"); - assertEquals(credentialDetailsModel.privateKey(), "testString"); - assertEquals(credentialDetailsModel.passphrase(), "testString"); - assertEquals(credentialDetailsModel.password(), "testString"); - assertEquals(credentialDetailsModel.gatewayId(), "testString"); - assertEquals(credentialDetailsModel.sourceVersion(), "online"); - assertEquals(credentialDetailsModel.webApplicationUrl(), "testString"); - assertEquals(credentialDetailsModel.domain(), "testString"); - assertEquals(credentialDetailsModel.endpoint(), "testString"); - assertEquals(credentialDetailsModel.accessKeyId(), "testString"); - assertEquals(credentialDetailsModel.secretAccessKey(), "testString"); - - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - assertEquals(statusDetailsModel.authenticated(), Boolean.valueOf(true)); - assertEquals(statusDetailsModel.errorMessage(), "testString"); - - Credentials credentialsModel = - new Credentials.Builder() - .sourceType("box") - .credentialDetails(credentialDetailsModel) - .status(statusDetailsModel) - .build(); - assertEquals(credentialsModel.sourceType(), "box"); - assertEquals(credentialsModel.credentialDetails(), credentialDetailsModel); - assertEquals(credentialsModel.status(), statusDetailsModel); - - String json = TestUtilities.serialize(credentialsModel); - - Credentials credentialsModelNew = TestUtilities.deserialize(json, Credentials.class); - assertTrue(credentialsModelNew instanceof Credentials); - assertEquals(credentialsModelNew.sourceType(), "box"); - assertEquals( - credentialsModelNew.credentialDetails().toString(), credentialDetailsModel.toString()); - assertEquals(credentialsModelNew.status().toString(), statusDetailsModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptionsTest.java deleted file mode 100644 index 39e24cfd3d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteAllTrainingDataOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteAllTrainingDataOptions model. */ -public class DeleteAllTrainingDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteAllTrainingDataOptions() throws Throwable { - DeleteAllTrainingDataOptions deleteAllTrainingDataOptionsModel = - new DeleteAllTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(deleteAllTrainingDataOptionsModel.environmentId(), "testString"); - assertEquals(deleteAllTrainingDataOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteAllTrainingDataOptionsError() throws Throwable { - new DeleteAllTrainingDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptionsTest.java deleted file mode 100644 index 0cd82847ae..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteCollectionOptions model. */ -public class DeleteCollectionOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteCollectionOptions() throws Throwable { - DeleteCollectionOptions deleteCollectionOptionsModel = - new DeleteCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(deleteCollectionOptionsModel.environmentId(), "testString"); - assertEquals(deleteCollectionOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteCollectionOptionsError() throws Throwable { - new DeleteCollectionOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponseTest.java deleted file mode 100644 index eeb2269bfb..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCollectionResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteCollectionResponse model. */ -public class DeleteCollectionResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteCollectionResponse() throws Throwable { - DeleteCollectionResponse deleteCollectionResponseModel = new DeleteCollectionResponse(); - assertNull(deleteCollectionResponseModel.getCollectionId()); - assertNull(deleteCollectionResponseModel.getStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptionsTest.java deleted file mode 100644 index 0b1b1d146b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteConfigurationOptions model. */ -public class DeleteConfigurationOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteConfigurationOptions() throws Throwable { - DeleteConfigurationOptions deleteConfigurationOptionsModel = - new DeleteConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .build(); - assertEquals(deleteConfigurationOptionsModel.environmentId(), "testString"); - assertEquals(deleteConfigurationOptionsModel.configurationId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteConfigurationOptionsError() throws Throwable { - new DeleteConfigurationOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponseTest.java deleted file mode 100644 index b714bca5b4..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteConfigurationResponseTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteConfigurationResponse model. */ -public class DeleteConfigurationResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteConfigurationResponse() throws Throwable { - DeleteConfigurationResponse deleteConfigurationResponseModel = - new DeleteConfigurationResponse(); - assertNull(deleteConfigurationResponseModel.getConfigurationId()); - assertNull(deleteConfigurationResponseModel.getStatus()); - assertNull(deleteConfigurationResponseModel.getNotices()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptionsTest.java deleted file mode 100644 index 3b3a6d1c89..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteCredentialsOptions model. */ -public class DeleteCredentialsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteCredentialsOptions() throws Throwable { - DeleteCredentialsOptions deleteCredentialsOptionsModel = - new DeleteCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .build(); - assertEquals(deleteCredentialsOptionsModel.environmentId(), "testString"); - assertEquals(deleteCredentialsOptionsModel.credentialId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteCredentialsOptionsError() throws Throwable { - new DeleteCredentialsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsTest.java deleted file mode 100644 index 3a8742589b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteCredentialsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteCredentials model. */ -public class DeleteCredentialsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteCredentials() throws Throwable { - DeleteCredentials deleteCredentialsModel = new DeleteCredentials(); - assertNull(deleteCredentialsModel.getCredentialId()); - assertNull(deleteCredentialsModel.getStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptionsTest.java deleted file mode 100644 index 2e4b5e0220..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteDocumentOptions model. */ -public class DeleteDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteDocumentOptions() throws Throwable { - DeleteDocumentOptions deleteDocumentOptionsModel = - new DeleteDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .build(); - assertEquals(deleteDocumentOptionsModel.environmentId(), "testString"); - assertEquals(deleteDocumentOptionsModel.collectionId(), "testString"); - assertEquals(deleteDocumentOptionsModel.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDocumentOptionsError() throws Throwable { - new DeleteDocumentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponseTest.java deleted file mode 100644 index 0845324279..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteDocumentResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteDocumentResponse model. */ -public class DeleteDocumentResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteDocumentResponse() throws Throwable { - DeleteDocumentResponse deleteDocumentResponseModel = new DeleteDocumentResponse(); - assertNull(deleteDocumentResponseModel.getDocumentId()); - assertNull(deleteDocumentResponseModel.getStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptionsTest.java deleted file mode 100644 index eb8c5784d9..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteEnvironmentOptions model. */ -public class DeleteEnvironmentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteEnvironmentOptions() throws Throwable { - DeleteEnvironmentOptions deleteEnvironmentOptionsModel = - new DeleteEnvironmentOptions.Builder().environmentId("testString").build(); - assertEquals(deleteEnvironmentOptionsModel.environmentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteEnvironmentOptionsError() throws Throwable { - new DeleteEnvironmentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponseTest.java deleted file mode 100644 index 05f7324d4b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteEnvironmentResponse model. */ -public class DeleteEnvironmentResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteEnvironmentResponse() throws Throwable { - DeleteEnvironmentResponse deleteEnvironmentResponseModel = new DeleteEnvironmentResponse(); - assertNull(deleteEnvironmentResponseModel.getEnvironmentId()); - assertNull(deleteEnvironmentResponseModel.getStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptionsTest.java deleted file mode 100644 index db2475920e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteExpansionsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteExpansionsOptions model. */ -public class DeleteExpansionsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteExpansionsOptions() throws Throwable { - DeleteExpansionsOptions deleteExpansionsOptionsModel = - new DeleteExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(deleteExpansionsOptionsModel.environmentId(), "testString"); - assertEquals(deleteExpansionsOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteExpansionsOptionsError() throws Throwable { - new DeleteExpansionsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptionsTest.java deleted file mode 100644 index dc9bba850d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteGatewayOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteGatewayOptions model. */ -public class DeleteGatewayOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteGatewayOptions() throws Throwable { - DeleteGatewayOptions deleteGatewayOptionsModel = - new DeleteGatewayOptions.Builder() - .environmentId("testString") - .gatewayId("testString") - .build(); - assertEquals(deleteGatewayOptionsModel.environmentId(), "testString"); - assertEquals(deleteGatewayOptionsModel.gatewayId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteGatewayOptionsError() throws Throwable { - new DeleteGatewayOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptionsTest.java deleted file mode 100644 index aa5cfce960..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteStopwordListOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteStopwordListOptions model. */ -public class DeleteStopwordListOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteStopwordListOptions() throws Throwable { - DeleteStopwordListOptions deleteStopwordListOptionsModel = - new DeleteStopwordListOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(deleteStopwordListOptionsModel.environmentId(), "testString"); - assertEquals(deleteStopwordListOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteStopwordListOptionsError() throws Throwable { - new DeleteStopwordListOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptionsTest.java deleted file mode 100644 index fdead2c11f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTokenizationDictionaryOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteTokenizationDictionaryOptions model. */ -public class DeleteTokenizationDictionaryOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteTokenizationDictionaryOptions() throws Throwable { - DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptionsModel = - new DeleteTokenizationDictionaryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(deleteTokenizationDictionaryOptionsModel.environmentId(), "testString"); - assertEquals(deleteTokenizationDictionaryOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTokenizationDictionaryOptionsError() throws Throwable { - new DeleteTokenizationDictionaryOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptionsTest.java deleted file mode 100644 index 41345051a1..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingDataOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteTrainingDataOptions model. */ -public class DeleteTrainingDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteTrainingDataOptions() throws Throwable { - DeleteTrainingDataOptions deleteTrainingDataOptionsModel = - new DeleteTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - assertEquals(deleteTrainingDataOptionsModel.environmentId(), "testString"); - assertEquals(deleteTrainingDataOptionsModel.collectionId(), "testString"); - assertEquals(deleteTrainingDataOptionsModel.queryId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTrainingDataOptionsError() throws Throwable { - new DeleteTrainingDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptionsTest.java deleted file mode 100644 index a9221301a5..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteTrainingExampleOptionsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteTrainingExampleOptions model. */ -public class DeleteTrainingExampleOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteTrainingExampleOptions() throws Throwable { - DeleteTrainingExampleOptions deleteTrainingExampleOptionsModel = - new DeleteTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .build(); - assertEquals(deleteTrainingExampleOptionsModel.environmentId(), "testString"); - assertEquals(deleteTrainingExampleOptionsModel.collectionId(), "testString"); - assertEquals(deleteTrainingExampleOptionsModel.queryId(), "testString"); - assertEquals(deleteTrainingExampleOptionsModel.exampleId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteTrainingExampleOptionsError() throws Throwable { - new DeleteTrainingExampleOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptionsTest.java deleted file mode 100644 index 491fa5f484..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DeleteUserDataOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteUserDataOptions model. */ -public class DeleteUserDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteUserDataOptions() throws Throwable { - DeleteUserDataOptions deleteUserDataOptionsModel = - new DeleteUserDataOptions.Builder().customerId("testString").build(); - assertEquals(deleteUserDataOptionsModel.customerId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteUserDataOptionsError() throws Throwable { - new DeleteUserDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DiskUsageTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DiskUsageTest.java deleted file mode 100644 index 8e4a65aa2c..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DiskUsageTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DiskUsage model. */ -public class DiskUsageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDiskUsage() throws Throwable { - DiskUsage diskUsageModel = new DiskUsage(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentAcceptedTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentAcceptedTest.java deleted file mode 100644 index bb9399e28f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentAcceptedTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DocumentAccepted model. */ -public class DocumentAcceptedTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDocumentAccepted() throws Throwable { - DocumentAccepted documentAcceptedModel = new DocumentAccepted(); - assertNull(documentAcceptedModel.getDocumentId()); - assertNull(documentAcceptedModel.getStatus()); - assertNull(documentAcceptedModel.getNotices()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentCountsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentCountsTest.java deleted file mode 100644 index 605524516a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentCountsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DocumentCounts model. */ -public class DocumentCountsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDocumentCounts() throws Throwable { - DocumentCounts documentCountsModel = new DocumentCounts(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentStatusTest.java deleted file mode 100644 index 21009a2fe1..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/DocumentStatusTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DocumentStatus model. */ -public class DocumentStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDocumentStatus() throws Throwable { - DocumentStatus documentStatusModel = new DocumentStatus(); - assertNull(documentStatusModel.getFilename()); - assertNull(documentStatusModel.getFileType()); - assertNull(documentStatusModel.getSha1()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentOptionsTest.java deleted file mode 100644 index e1047e1e05..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentOptionsTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the EnrichmentOptions model. */ -public class EnrichmentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testEnrichmentOptions() throws Throwable { - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - assertEquals(enrichmentOptionsModel.features(), nluEnrichmentFeaturesModel); - assertEquals(enrichmentOptionsModel.language(), "ar"); - assertEquals(enrichmentOptionsModel.model(), "testString"); - - String json = TestUtilities.serialize(enrichmentOptionsModel); - - EnrichmentOptions enrichmentOptionsModelNew = - TestUtilities.deserialize(json, EnrichmentOptions.class); - assertTrue(enrichmentOptionsModelNew instanceof EnrichmentOptions); - assertEquals( - enrichmentOptionsModelNew.features().toString(), nluEnrichmentFeaturesModel.toString()); - assertEquals(enrichmentOptionsModelNew.language(), "ar"); - assertEquals(enrichmentOptionsModelNew.model(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentTest.java deleted file mode 100644 index 7ade966ef9..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnrichmentTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Enrichment model. */ -public class EnrichmentTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testEnrichment() throws Throwable { - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - assertEquals(enrichmentOptionsModel.features(), nluEnrichmentFeaturesModel); - assertEquals(enrichmentOptionsModel.language(), "ar"); - assertEquals(enrichmentOptionsModel.model(), "testString"); - - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("testString") - .sourceField("testString") - .overwrite(false) - .enrichment("testString") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - assertEquals(enrichmentModel.description(), "testString"); - assertEquals(enrichmentModel.destinationField(), "testString"); - assertEquals(enrichmentModel.sourceField(), "testString"); - assertEquals(enrichmentModel.overwrite(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.enrichment(), "testString"); - assertEquals(enrichmentModel.ignoreDownstreamErrors(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.options(), enrichmentOptionsModel); - - String json = TestUtilities.serialize(enrichmentModel); - - Enrichment enrichmentModelNew = TestUtilities.deserialize(json, Enrichment.class); - assertTrue(enrichmentModelNew instanceof Enrichment); - assertEquals(enrichmentModelNew.description(), "testString"); - assertEquals(enrichmentModelNew.destinationField(), "testString"); - assertEquals(enrichmentModelNew.sourceField(), "testString"); - assertEquals(enrichmentModelNew.overwrite(), Boolean.valueOf(false)); - assertEquals(enrichmentModelNew.enrichment(), "testString"); - assertEquals(enrichmentModelNew.ignoreDownstreamErrors(), Boolean.valueOf(false)); - assertEquals(enrichmentModelNew.options().toString(), enrichmentOptionsModel.toString()); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testEnrichmentError() throws Throwable { - new Enrichment.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentDocumentsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentDocumentsTest.java deleted file mode 100644 index e7222fc407..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentDocumentsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the EnvironmentDocuments model. */ -public class EnvironmentDocumentsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testEnvironmentDocuments() throws Throwable { - EnvironmentDocuments environmentDocumentsModel = new EnvironmentDocuments(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentTest.java deleted file mode 100644 index fee64f22d0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EnvironmentTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Environment model. */ -public class EnvironmentTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testEnvironment() throws Throwable { - Environment environmentModel = new Environment(); - assertNull(environmentModel.getName()); - assertNull(environmentModel.getDescription()); - assertNull(environmentModel.getSize()); - assertNull(environmentModel.getRequestedSize()); - assertNull(environmentModel.getIndexCapacity()); - assertNull(environmentModel.getSearchStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EventDataTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EventDataTest.java deleted file mode 100644 index 41ad4c76fa..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/EventDataTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the EventData model. */ -public class EventDataTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testEventData() throws Throwable { - EventData eventDataModel = - new EventData.Builder() - .environmentId("testString") - .sessionToken("testString") - .clientTimestamp(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .displayRank(Long.valueOf("26")) - .collectionId("testString") - .documentId("testString") - .build(); - assertEquals(eventDataModel.environmentId(), "testString"); - assertEquals(eventDataModel.sessionToken(), "testString"); - assertEquals( - eventDataModel.clientTimestamp(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(eventDataModel.displayRank(), Long.valueOf("26")); - assertEquals(eventDataModel.collectionId(), "testString"); - assertEquals(eventDataModel.documentId(), "testString"); - - String json = TestUtilities.serialize(eventDataModel); - - EventData eventDataModelNew = TestUtilities.deserialize(json, EventData.class); - assertTrue(eventDataModelNew instanceof EventData); - assertEquals(eventDataModelNew.environmentId(), "testString"); - assertEquals(eventDataModelNew.sessionToken(), "testString"); - assertEquals( - eventDataModelNew.clientTimestamp(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(eventDataModelNew.displayRank(), Long.valueOf("26")); - assertEquals(eventDataModelNew.collectionId(), "testString"); - assertEquals(eventDataModelNew.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testEventDataError() throws Throwable { - new EventData.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionTest.java deleted file mode 100644 index c958e47701..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Expansion model. */ -public class ExpansionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testExpansion() throws Throwable { - Expansion expansionModel = - new Expansion.Builder() - .inputTerms(java.util.Arrays.asList("testString")) - .expandedTerms(java.util.Arrays.asList("testString")) - .build(); - assertEquals(expansionModel.inputTerms(), java.util.Arrays.asList("testString")); - assertEquals(expansionModel.expandedTerms(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(expansionModel); - - Expansion expansionModelNew = TestUtilities.deserialize(json, Expansion.class); - assertTrue(expansionModelNew instanceof Expansion); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testExpansionError() throws Throwable { - new Expansion.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionsTest.java deleted file mode 100644 index 19b2fda37e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ExpansionsTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Expansions model. */ -public class ExpansionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testExpansions() throws Throwable { - Expansion expansionModel = - new Expansion.Builder() - .inputTerms(java.util.Arrays.asList("testString")) - .expandedTerms(java.util.Arrays.asList("testString")) - .build(); - assertEquals(expansionModel.inputTerms(), java.util.Arrays.asList("testString")); - assertEquals(expansionModel.expandedTerms(), java.util.Arrays.asList("testString")); - - Expansions expansionsModel = - new Expansions.Builder().expansions(java.util.Arrays.asList(expansionModel)).build(); - assertEquals(expansionsModel.expansions(), java.util.Arrays.asList(expansionModel)); - - String json = TestUtilities.serialize(expansionsModel); - - Expansions expansionsModelNew = TestUtilities.deserialize(json, Expansions.class); - assertTrue(expansionsModelNew instanceof Expansions); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testExpansionsError() throws Throwable { - new Expansions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptionsTest.java deleted file mode 100644 index 96542fce44..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptionsTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the FederatedQueryNoticesOptions model. */ -public class FederatedQueryNoticesOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testFederatedQueryNoticesOptions() throws Throwable { - FederatedQueryNoticesOptions federatedQueryNoticesOptionsModel = - new FederatedQueryNoticesOptions.Builder() - .environmentId("testString") - .collectionIds(java.util.Arrays.asList("testString")) - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn(java.util.Arrays.asList("testString")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .highlight(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds(java.util.Arrays.asList("testString")) - .similarFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(federatedQueryNoticesOptionsModel.environmentId(), "testString"); - assertEquals( - federatedQueryNoticesOptionsModel.collectionIds(), java.util.Arrays.asList("testString")); - assertEquals(federatedQueryNoticesOptionsModel.filter(), "testString"); - assertEquals(federatedQueryNoticesOptionsModel.query(), "testString"); - assertEquals(federatedQueryNoticesOptionsModel.naturalLanguageQuery(), "testString"); - assertEquals(federatedQueryNoticesOptionsModel.aggregation(), "testString"); - assertEquals(federatedQueryNoticesOptionsModel.count(), Long.valueOf("10")); - assertEquals( - federatedQueryNoticesOptionsModel.xReturn(), java.util.Arrays.asList("testString")); - assertEquals(federatedQueryNoticesOptionsModel.offset(), Long.valueOf("26")); - assertEquals(federatedQueryNoticesOptionsModel.sort(), java.util.Arrays.asList("testString")); - assertEquals(federatedQueryNoticesOptionsModel.highlight(), Boolean.valueOf(false)); - assertEquals(federatedQueryNoticesOptionsModel.deduplicateField(), "testString"); - assertEquals(federatedQueryNoticesOptionsModel.similar(), Boolean.valueOf(false)); - assertEquals( - federatedQueryNoticesOptionsModel.similarDocumentIds(), - java.util.Arrays.asList("testString")); - assertEquals( - federatedQueryNoticesOptionsModel.similarFields(), java.util.Arrays.asList("testString")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFederatedQueryNoticesOptionsError() throws Throwable { - new FederatedQueryNoticesOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptionsTest.java deleted file mode 100644 index f5f2d93ffa..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptionsTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the FederatedQueryOptions model. */ -public class FederatedQueryOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testFederatedQueryOptions() throws Throwable { - FederatedQueryOptions federatedQueryOptionsModel = - new FederatedQueryOptions.Builder() - .environmentId("testString") - .collectionIds("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn("testString") - .offset(Long.valueOf("26")) - .sort("testString") - .highlight(false) - .passagesFields("testString") - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicate(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds("testString") - .similarFields("testString") - .bias("testString") - .xWatsonLoggingOptOut(false) - .build(); - assertEquals(federatedQueryOptionsModel.environmentId(), "testString"); - assertEquals(federatedQueryOptionsModel.collectionIds(), "testString"); - assertEquals(federatedQueryOptionsModel.filter(), "testString"); - assertEquals(federatedQueryOptionsModel.query(), "testString"); - assertEquals(federatedQueryOptionsModel.naturalLanguageQuery(), "testString"); - assertEquals(federatedQueryOptionsModel.passages(), Boolean.valueOf(true)); - assertEquals(federatedQueryOptionsModel.aggregation(), "testString"); - assertEquals(federatedQueryOptionsModel.count(), Long.valueOf("10")); - assertEquals(federatedQueryOptionsModel.xReturn(), "testString"); - assertEquals(federatedQueryOptionsModel.offset(), Long.valueOf("26")); - assertEquals(federatedQueryOptionsModel.sort(), "testString"); - assertEquals(federatedQueryOptionsModel.highlight(), Boolean.valueOf(false)); - assertEquals(federatedQueryOptionsModel.passagesFields(), "testString"); - assertEquals(federatedQueryOptionsModel.passagesCount(), Long.valueOf("10")); - assertEquals(federatedQueryOptionsModel.passagesCharacters(), Long.valueOf("400")); - assertEquals(federatedQueryOptionsModel.deduplicate(), Boolean.valueOf(false)); - assertEquals(federatedQueryOptionsModel.deduplicateField(), "testString"); - assertEquals(federatedQueryOptionsModel.similar(), Boolean.valueOf(false)); - assertEquals(federatedQueryOptionsModel.similarDocumentIds(), "testString"); - assertEquals(federatedQueryOptionsModel.similarFields(), "testString"); - assertEquals(federatedQueryOptionsModel.bias(), "testString"); - assertEquals(federatedQueryOptionsModel.xWatsonLoggingOptOut(), Boolean.valueOf(false)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFederatedQueryOptionsError() throws Throwable { - new FederatedQueryOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FieldTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FieldTest.java deleted file mode 100644 index c0e96eb45c..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FieldTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Field model. */ -public class FieldTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testField() throws Throwable { - Field fieldModel = new Field(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FontSettingTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FontSettingTest.java deleted file mode 100644 index 42a095938e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/FontSettingTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the FontSetting model. */ -public class FontSettingTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testFontSetting() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - String json = TestUtilities.serialize(fontSettingModel); - - FontSetting fontSettingModelNew = TestUtilities.deserialize(json, FontSetting.class); - assertTrue(fontSettingModelNew instanceof FontSetting); - assertEquals(fontSettingModelNew.level(), Long.valueOf("26")); - assertEquals(fontSettingModelNew.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModelNew.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModelNew.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModelNew.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModelNew.name(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayDeleteTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayDeleteTest.java deleted file mode 100644 index 4e2442edf2..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayDeleteTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GatewayDelete model. */ -public class GatewayDeleteTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGatewayDelete() throws Throwable { - GatewayDelete gatewayDeleteModel = new GatewayDelete(); - assertNull(gatewayDeleteModel.getGatewayId()); - assertNull(gatewayDeleteModel.getStatus()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayListTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayListTest.java deleted file mode 100644 index cceccd8dc4..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayListTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GatewayList model. */ -public class GatewayListTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGatewayList() throws Throwable { - GatewayList gatewayListModel = new GatewayList(); - assertNull(gatewayListModel.getGateways()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayTest.java deleted file mode 100644 index 4d35166ea7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GatewayTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Gateway model. */ -public class GatewayTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGateway() throws Throwable { - Gateway gatewayModel = new Gateway(); - assertNull(gatewayModel.getGatewayId()); - assertNull(gatewayModel.getName()); - assertNull(gatewayModel.getStatus()); - assertNull(gatewayModel.getToken()); - assertNull(gatewayModel.getTokenId()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptionsTest.java deleted file mode 100644 index efff2c0af0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetAutocompletionOptionsTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetAutocompletionOptions model. */ -public class GetAutocompletionOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetAutocompletionOptions() throws Throwable { - GetAutocompletionOptions getAutocompletionOptionsModel = - new GetAutocompletionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .prefix("testString") - .field("testString") - .count(Long.valueOf("5")) - .build(); - assertEquals(getAutocompletionOptionsModel.environmentId(), "testString"); - assertEquals(getAutocompletionOptionsModel.collectionId(), "testString"); - assertEquals(getAutocompletionOptionsModel.prefix(), "testString"); - assertEquals(getAutocompletionOptionsModel.field(), "testString"); - assertEquals(getAutocompletionOptionsModel.count(), Long.valueOf("5")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetAutocompletionOptionsError() throws Throwable { - new GetAutocompletionOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCollectionOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCollectionOptionsTest.java deleted file mode 100644 index 690a5ca70f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCollectionOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetCollectionOptions model. */ -public class GetCollectionOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetCollectionOptions() throws Throwable { - GetCollectionOptions getCollectionOptionsModel = - new GetCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(getCollectionOptionsModel.environmentId(), "testString"); - assertEquals(getCollectionOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetCollectionOptionsError() throws Throwable { - new GetCollectionOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptionsTest.java deleted file mode 100644 index b9bc7c7af7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetConfigurationOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetConfigurationOptions model. */ -public class GetConfigurationOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetConfigurationOptions() throws Throwable { - GetConfigurationOptions getConfigurationOptionsModel = - new GetConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .build(); - assertEquals(getConfigurationOptionsModel.environmentId(), "testString"); - assertEquals(getConfigurationOptionsModel.configurationId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetConfigurationOptionsError() throws Throwable { - new GetConfigurationOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptionsTest.java deleted file mode 100644 index 4c7a4cf31e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetCredentialsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetCredentialsOptions model. */ -public class GetCredentialsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetCredentialsOptions() throws Throwable { - GetCredentialsOptions getCredentialsOptionsModel = - new GetCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .build(); - assertEquals(getCredentialsOptionsModel.environmentId(), "testString"); - assertEquals(getCredentialsOptionsModel.credentialId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetCredentialsOptionsError() throws Throwable { - new GetCredentialsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptionsTest.java deleted file mode 100644 index e8ada11a6f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetDocumentStatusOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetDocumentStatusOptions model. */ -public class GetDocumentStatusOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetDocumentStatusOptions() throws Throwable { - GetDocumentStatusOptions getDocumentStatusOptionsModel = - new GetDocumentStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .build(); - assertEquals(getDocumentStatusOptionsModel.environmentId(), "testString"); - assertEquals(getDocumentStatusOptionsModel.collectionId(), "testString"); - assertEquals(getDocumentStatusOptionsModel.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDocumentStatusOptionsError() throws Throwable { - new GetDocumentStatusOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptionsTest.java deleted file mode 100644 index 08fa7ca9d9..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetEnvironmentOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetEnvironmentOptions model. */ -public class GetEnvironmentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetEnvironmentOptions() throws Throwable { - GetEnvironmentOptions getEnvironmentOptionsModel = - new GetEnvironmentOptions.Builder().environmentId("testString").build(); - assertEquals(getEnvironmentOptionsModel.environmentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetEnvironmentOptionsError() throws Throwable { - new GetEnvironmentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetGatewayOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetGatewayOptionsTest.java deleted file mode 100644 index 9214b446c7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetGatewayOptionsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetGatewayOptions model. */ -public class GetGatewayOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetGatewayOptions() throws Throwable { - GetGatewayOptions getGatewayOptionsModel = - new GetGatewayOptions.Builder().environmentId("testString").gatewayId("testString").build(); - assertEquals(getGatewayOptionsModel.environmentId(), "testString"); - assertEquals(getGatewayOptionsModel.gatewayId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetGatewayOptionsError() throws Throwable { - new GetGatewayOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptionsTest.java deleted file mode 100644 index 87317eb480..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsEventRateOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetMetricsEventRateOptions model. */ -public class GetMetricsEventRateOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetMetricsEventRateOptions() throws Throwable { - GetMetricsEventRateOptions getMetricsEventRateOptionsModel = - new GetMetricsEventRateOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - assertEquals( - getMetricsEventRateOptionsModel.startTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals( - getMetricsEventRateOptionsModel.endTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(getMetricsEventRateOptionsModel.resultType(), "document"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptionsTest.java deleted file mode 100644 index d1400c24c7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryEventOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetMetricsQueryEventOptions model. */ -public class GetMetricsQueryEventOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetMetricsQueryEventOptions() throws Throwable { - GetMetricsQueryEventOptions getMetricsQueryEventOptionsModel = - new GetMetricsQueryEventOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - assertEquals( - getMetricsQueryEventOptionsModel.startTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals( - getMetricsQueryEventOptionsModel.endTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(getMetricsQueryEventOptionsModel.resultType(), "document"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptionsTest.java deleted file mode 100644 index 9de882c132..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryNoResultsOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetMetricsQueryNoResultsOptions model. */ -public class GetMetricsQueryNoResultsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetMetricsQueryNoResultsOptions() throws Throwable { - GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptionsModel = - new GetMetricsQueryNoResultsOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - assertEquals( - getMetricsQueryNoResultsOptionsModel.startTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals( - getMetricsQueryNoResultsOptionsModel.endTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(getMetricsQueryNoResultsOptionsModel.resultType(), "document"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptionsTest.java deleted file mode 100644 index 586d558832..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetMetricsQueryOptions model. */ -public class GetMetricsQueryOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetMetricsQueryOptions() throws Throwable { - GetMetricsQueryOptions getMetricsQueryOptionsModel = - new GetMetricsQueryOptions.Builder() - .startTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .endTime(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resultType("document") - .build(); - assertEquals( - getMetricsQueryOptionsModel.startTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals( - getMetricsQueryOptionsModel.endTime(), - DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); - assertEquals(getMetricsQueryOptionsModel.resultType(), "document"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptionsTest.java deleted file mode 100644 index a907da416e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetMetricsQueryTokenEventOptionsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetMetricsQueryTokenEventOptions model. */ -public class GetMetricsQueryTokenEventOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetMetricsQueryTokenEventOptions() throws Throwable { - GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptionsModel = - new GetMetricsQueryTokenEventOptions.Builder().count(Long.valueOf("10")).build(); - assertEquals(getMetricsQueryTokenEventOptionsModel.count(), Long.valueOf("10")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptionsTest.java deleted file mode 100644 index e3f9455c1e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetStopwordListStatusOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetStopwordListStatusOptions model. */ -public class GetStopwordListStatusOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetStopwordListStatusOptions() throws Throwable { - GetStopwordListStatusOptions getStopwordListStatusOptionsModel = - new GetStopwordListStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(getStopwordListStatusOptionsModel.environmentId(), "testString"); - assertEquals(getStopwordListStatusOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetStopwordListStatusOptionsError() throws Throwable { - new GetStopwordListStatusOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptionsTest.java deleted file mode 100644 index 72ca1cff4a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTokenizationDictionaryStatusOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetTokenizationDictionaryStatusOptions model. */ -public class GetTokenizationDictionaryStatusOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetTokenizationDictionaryStatusOptions() throws Throwable { - GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptionsModel = - new GetTokenizationDictionaryStatusOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(getTokenizationDictionaryStatusOptionsModel.environmentId(), "testString"); - assertEquals(getTokenizationDictionaryStatusOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTokenizationDictionaryStatusOptionsError() throws Throwable { - new GetTokenizationDictionaryStatusOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptionsTest.java deleted file mode 100644 index 21a4fa68a0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingDataOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetTrainingDataOptions model. */ -public class GetTrainingDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetTrainingDataOptions() throws Throwable { - GetTrainingDataOptions getTrainingDataOptionsModel = - new GetTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - assertEquals(getTrainingDataOptionsModel.environmentId(), "testString"); - assertEquals(getTrainingDataOptionsModel.collectionId(), "testString"); - assertEquals(getTrainingDataOptionsModel.queryId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTrainingDataOptionsError() throws Throwable { - new GetTrainingDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptionsTest.java deleted file mode 100644 index 1b984d66ca..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/GetTrainingExampleOptionsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetTrainingExampleOptions model. */ -public class GetTrainingExampleOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetTrainingExampleOptions() throws Throwable { - GetTrainingExampleOptions getTrainingExampleOptionsModel = - new GetTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .build(); - assertEquals(getTrainingExampleOptionsModel.environmentId(), "testString"); - assertEquals(getTrainingExampleOptionsModel.collectionId(), "testString"); - assertEquals(getTrainingExampleOptionsModel.queryId(), "testString"); - assertEquals(getTrainingExampleOptionsModel.exampleId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTrainingExampleOptionsError() throws Throwable { - new GetTrainingExampleOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/HtmlSettingsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/HtmlSettingsTest.java deleted file mode 100644 index e88be8750b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/HtmlSettingsTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the HtmlSettings model. */ -public class HtmlSettingsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testHtmlSettings() throws Throwable { - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - assertEquals(htmlSettingsModel.excludeTagsCompletely(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagsKeepContent(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.keepContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.excludeContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.keepTagAttributes(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagAttributes(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(htmlSettingsModel); - - HtmlSettings htmlSettingsModelNew = TestUtilities.deserialize(json, HtmlSettings.class); - assertTrue(htmlSettingsModelNew instanceof HtmlSettings); - assertEquals(htmlSettingsModelNew.keepContent().toString(), xPathPatternsModel.toString()); - assertEquals(htmlSettingsModelNew.excludeContent().toString(), xPathPatternsModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/IndexCapacityTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/IndexCapacityTest.java deleted file mode 100644 index 582875bf60..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/IndexCapacityTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IndexCapacity model. */ -public class IndexCapacityTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIndexCapacity() throws Throwable { - IndexCapacity indexCapacityModel = new IndexCapacity(); - assertNull(indexCapacityModel.getDocuments()); - assertNull(indexCapacityModel.getDiskUsage()); - assertNull(indexCapacityModel.getCollections()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptionsTest.java deleted file mode 100644 index 80194e357a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListCollectionFieldsOptions model. */ -public class ListCollectionFieldsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListCollectionFieldsOptions() throws Throwable { - ListCollectionFieldsOptions listCollectionFieldsOptionsModel = - new ListCollectionFieldsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(listCollectionFieldsOptionsModel.environmentId(), "testString"); - assertEquals(listCollectionFieldsOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCollectionFieldsOptionsError() throws Throwable { - new ListCollectionFieldsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponseTest.java deleted file mode 100644 index e2f68335ce..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionFieldsResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListCollectionFieldsResponse model. */ -public class ListCollectionFieldsResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListCollectionFieldsResponse() throws Throwable { - ListCollectionFieldsResponse listCollectionFieldsResponseModel = - new ListCollectionFieldsResponse(); - assertNull(listCollectionFieldsResponseModel.getFields()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptionsTest.java deleted file mode 100644 index dfd2bd7cf6..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsOptionsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListCollectionsOptions model. */ -public class ListCollectionsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListCollectionsOptions() throws Throwable { - ListCollectionsOptions listCollectionsOptionsModel = - new ListCollectionsOptions.Builder().environmentId("testString").name("testString").build(); - assertEquals(listCollectionsOptionsModel.environmentId(), "testString"); - assertEquals(listCollectionsOptionsModel.name(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCollectionsOptionsError() throws Throwable { - new ListCollectionsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponseTest.java deleted file mode 100644 index 87a68a9ed8..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCollectionsResponseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListCollectionsResponse model. */ -public class ListCollectionsResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListCollectionsResponse() throws Throwable { - ListCollectionsResponse listCollectionsResponseModel = new ListCollectionsResponse(); - assertNull(listCollectionsResponseModel.getCollections()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptionsTest.java deleted file mode 100644 index cfc6d5a42f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListConfigurationsOptions model. */ -public class ListConfigurationsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListConfigurationsOptions() throws Throwable { - ListConfigurationsOptions listConfigurationsOptionsModel = - new ListConfigurationsOptions.Builder() - .environmentId("testString") - .name("testString") - .build(); - assertEquals(listConfigurationsOptionsModel.environmentId(), "testString"); - assertEquals(listConfigurationsOptionsModel.name(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListConfigurationsOptionsError() throws Throwable { - new ListConfigurationsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponseTest.java deleted file mode 100644 index ebd8ad4d4f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListConfigurationsResponseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListConfigurationsResponse model. */ -public class ListConfigurationsResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListConfigurationsResponse() throws Throwable { - ListConfigurationsResponse listConfigurationsResponseModel = new ListConfigurationsResponse(); - assertNull(listConfigurationsResponseModel.getConfigurations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptionsTest.java deleted file mode 100644 index d3fbbd9358..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListCredentialsOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListCredentialsOptions model. */ -public class ListCredentialsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListCredentialsOptions() throws Throwable { - ListCredentialsOptions listCredentialsOptionsModel = - new ListCredentialsOptions.Builder().environmentId("testString").build(); - assertEquals(listCredentialsOptionsModel.environmentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListCredentialsOptionsError() throws Throwable { - new ListCredentialsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptionsTest.java deleted file mode 100644 index 951d62f729..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsOptionsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListEnvironmentsOptions model. */ -public class ListEnvironmentsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListEnvironmentsOptions() throws Throwable { - ListEnvironmentsOptions listEnvironmentsOptionsModel = - new ListEnvironmentsOptions.Builder().name("testString").build(); - assertEquals(listEnvironmentsOptionsModel.name(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponseTest.java deleted file mode 100644 index 9f21d05ab5..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListEnvironmentsResponseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListEnvironmentsResponse model. */ -public class ListEnvironmentsResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListEnvironmentsResponse() throws Throwable { - ListEnvironmentsResponse listEnvironmentsResponseModel = new ListEnvironmentsResponse(); - assertNull(listEnvironmentsResponseModel.getEnvironments()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptionsTest.java deleted file mode 100644 index 127a09598f..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListExpansionsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListExpansionsOptions model. */ -public class ListExpansionsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListExpansionsOptions() throws Throwable { - ListExpansionsOptions listExpansionsOptionsModel = - new ListExpansionsOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(listExpansionsOptionsModel.environmentId(), "testString"); - assertEquals(listExpansionsOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListExpansionsOptionsError() throws Throwable { - new ListExpansionsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListFieldsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListFieldsOptionsTest.java deleted file mode 100644 index 2ebb3e8302..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListFieldsOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListFieldsOptions model. */ -public class ListFieldsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListFieldsOptions() throws Throwable { - ListFieldsOptions listFieldsOptionsModel = - new ListFieldsOptions.Builder() - .environmentId("testString") - .collectionIds(java.util.Arrays.asList("testString")) - .build(); - assertEquals(listFieldsOptionsModel.environmentId(), "testString"); - assertEquals(listFieldsOptionsModel.collectionIds(), java.util.Arrays.asList("testString")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListFieldsOptionsError() throws Throwable { - new ListFieldsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptionsTest.java deleted file mode 100644 index 69ea738200..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListGatewaysOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListGatewaysOptions model. */ -public class ListGatewaysOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListGatewaysOptions() throws Throwable { - ListGatewaysOptions listGatewaysOptionsModel = - new ListGatewaysOptions.Builder().environmentId("testString").build(); - assertEquals(listGatewaysOptionsModel.environmentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListGatewaysOptionsError() throws Throwable { - new ListGatewaysOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptionsTest.java deleted file mode 100644 index 2e13dcffdc..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingDataOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListTrainingDataOptions model. */ -public class ListTrainingDataOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListTrainingDataOptions() throws Throwable { - ListTrainingDataOptions listTrainingDataOptionsModel = - new ListTrainingDataOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .build(); - assertEquals(listTrainingDataOptionsModel.environmentId(), "testString"); - assertEquals(listTrainingDataOptionsModel.collectionId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListTrainingDataOptionsError() throws Throwable { - new ListTrainingDataOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptionsTest.java deleted file mode 100644 index c4160649b1..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/ListTrainingExamplesOptionsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListTrainingExamplesOptions model. */ -public class ListTrainingExamplesOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListTrainingExamplesOptions() throws Throwable { - ListTrainingExamplesOptions listTrainingExamplesOptionsModel = - new ListTrainingExamplesOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .build(); - assertEquals(listTrainingExamplesOptionsModel.environmentId(), "testString"); - assertEquals(listTrainingExamplesOptionsModel.collectionId(), "testString"); - assertEquals(listTrainingExamplesOptionsModel.queryId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListTrainingExamplesOptionsError() throws Throwable { - new ListTrainingExamplesOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResultTest.java deleted file mode 100644 index b771dc71ba..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsResultTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the LogQueryResponseResultDocumentsResult model. */ -public class LogQueryResponseResultDocumentsResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLogQueryResponseResultDocumentsResult() throws Throwable { - LogQueryResponseResultDocumentsResult logQueryResponseResultDocumentsResultModel = - new LogQueryResponseResultDocumentsResult(); - assertNull(logQueryResponseResultDocumentsResultModel.getPosition()); - assertNull(logQueryResponseResultDocumentsResultModel.getDocumentId()); - assertNull(logQueryResponseResultDocumentsResultModel.getScore()); - assertNull(logQueryResponseResultDocumentsResultModel.getConfidence()); - assertNull(logQueryResponseResultDocumentsResultModel.getCollectionId()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsTest.java deleted file mode 100644 index eecaec4069..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultDocumentsTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the LogQueryResponseResultDocuments model. */ -public class LogQueryResponseResultDocumentsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLogQueryResponseResultDocuments() throws Throwable { - LogQueryResponseResultDocuments logQueryResponseResultDocumentsModel = - new LogQueryResponseResultDocuments(); - assertNull(logQueryResponseResultDocumentsModel.getResults()); - assertNull(logQueryResponseResultDocumentsModel.getCount()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultTest.java deleted file mode 100644 index f9a47ecd4d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseResultTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the LogQueryResponseResult model. */ -public class LogQueryResponseResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLogQueryResponseResult() throws Throwable { - LogQueryResponseResult logQueryResponseResultModel = new LogQueryResponseResult(); - assertNull(logQueryResponseResultModel.getEnvironmentId()); - assertNull(logQueryResponseResultModel.getCustomerId()); - assertNull(logQueryResponseResultModel.getDocumentType()); - assertNull(logQueryResponseResultModel.getNaturalLanguageQuery()); - assertNull(logQueryResponseResultModel.getDocumentResults()); - assertNull(logQueryResponseResultModel.getCreatedTimestamp()); - assertNull(logQueryResponseResultModel.getClientTimestamp()); - assertNull(logQueryResponseResultModel.getQueryId()); - assertNull(logQueryResponseResultModel.getSessionToken()); - assertNull(logQueryResponseResultModel.getCollectionId()); - assertNull(logQueryResponseResultModel.getDisplayRank()); - assertNull(logQueryResponseResultModel.getDocumentId()); - assertNull(logQueryResponseResultModel.getEventType()); - assertNull(logQueryResponseResultModel.getResultType()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseTest.java deleted file mode 100644 index 609abffe15..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/LogQueryResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the LogQueryResponse model. */ -public class LogQueryResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLogQueryResponse() throws Throwable { - LogQueryResponse logQueryResponseModel = new LogQueryResponse(); - assertNull(logQueryResponseModel.getMatchingResults()); - assertNull(logQueryResponseModel.getResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationResultTest.java deleted file mode 100644 index c776ce9e68..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationResultTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricAggregationResult model. */ -public class MetricAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricAggregationResult() throws Throwable { - MetricAggregationResult metricAggregationResultModel = new MetricAggregationResult(); - assertNull(metricAggregationResultModel.getKeyAsString()); - assertNull(metricAggregationResultModel.getKey()); - assertNull(metricAggregationResultModel.getMatchingResults()); - assertNull(metricAggregationResultModel.getEventRate()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationTest.java deleted file mode 100644 index c57836b3ab..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricAggregationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricAggregation model. */ -public class MetricAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricAggregation() throws Throwable { - MetricAggregation metricAggregationModel = new MetricAggregation(); - assertNull(metricAggregationModel.getInterval()); - assertNull(metricAggregationModel.getEventType()); - assertNull(metricAggregationModel.getResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricResponseTest.java deleted file mode 100644 index 6040800f5a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricResponseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricResponse model. */ -public class MetricResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricResponse() throws Throwable { - MetricResponse metricResponseModel = new MetricResponse(); - assertNull(metricResponseModel.getAggregations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResultTest.java deleted file mode 100644 index e06d469376..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationResultTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricTokenAggregationResult model. */ -public class MetricTokenAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricTokenAggregationResult() throws Throwable { - MetricTokenAggregationResult metricTokenAggregationResultModel = - new MetricTokenAggregationResult(); - assertNull(metricTokenAggregationResultModel.getKey()); - assertNull(metricTokenAggregationResultModel.getMatchingResults()); - assertNull(metricTokenAggregationResultModel.getEventRate()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationTest.java deleted file mode 100644 index 0944f3f501..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenAggregationTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricTokenAggregation model. */ -public class MetricTokenAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricTokenAggregation() throws Throwable { - MetricTokenAggregation metricTokenAggregationModel = new MetricTokenAggregation(); - assertNull(metricTokenAggregationModel.getEventType()); - assertNull(metricTokenAggregationModel.getResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenResponseTest.java deleted file mode 100644 index d7e6acf554..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/MetricTokenResponseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MetricTokenResponse model. */ -public class MetricTokenResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMetricTokenResponse() throws Throwable { - MetricTokenResponse metricTokenResponseModel = new MetricTokenResponse(); - assertNull(metricTokenResponseModel.getAggregations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConceptsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConceptsTest.java deleted file mode 100644 index 8a3a337ab4..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentConceptsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentConcepts model. */ -public class NluEnrichmentConceptsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentConcepts() throws Throwable { - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(nluEnrichmentConceptsModel); - - NluEnrichmentConcepts nluEnrichmentConceptsModelNew = - TestUtilities.deserialize(json, NluEnrichmentConcepts.class); - assertTrue(nluEnrichmentConceptsModelNew instanceof NluEnrichmentConcepts); - assertEquals(nluEnrichmentConceptsModelNew.limit(), Long.valueOf("26")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotionTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotionTest.java deleted file mode 100644 index e725c11c93..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEmotionTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentEmotion model. */ -public class NluEnrichmentEmotionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentEmotion() throws Throwable { - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(nluEnrichmentEmotionModel); - - NluEnrichmentEmotion nluEnrichmentEmotionModelNew = - TestUtilities.deserialize(json, NluEnrichmentEmotion.class); - assertTrue(nluEnrichmentEmotionModelNew instanceof NluEnrichmentEmotion); - assertEquals(nluEnrichmentEmotionModelNew.document(), Boolean.valueOf(true)); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntitiesTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntitiesTest.java deleted file mode 100644 index d05172a0a6..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentEntitiesTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentEntities model. */ -public class NluEnrichmentEntitiesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentEntities() throws Throwable { - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - String json = TestUtilities.serialize(nluEnrichmentEntitiesModel); - - NluEnrichmentEntities nluEnrichmentEntitiesModelNew = - TestUtilities.deserialize(json, NluEnrichmentEntities.class); - assertTrue(nluEnrichmentEntitiesModelNew instanceof NluEnrichmentEntities); - assertEquals(nluEnrichmentEntitiesModelNew.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModelNew.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModelNew.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModelNew.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModelNew.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModelNew.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModelNew.model(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeaturesTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeaturesTest.java deleted file mode 100644 index 93c77ae1e0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentFeaturesTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentFeatures model. */ -public class NluEnrichmentFeaturesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentFeatures() throws Throwable { - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - String json = TestUtilities.serialize(nluEnrichmentFeaturesModel); - - NluEnrichmentFeatures nluEnrichmentFeaturesModelNew = - TestUtilities.deserialize(json, NluEnrichmentFeatures.class); - assertTrue(nluEnrichmentFeaturesModelNew instanceof NluEnrichmentFeatures); - assertEquals( - nluEnrichmentFeaturesModelNew.keywords().toString(), nluEnrichmentKeywordsModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.entities().toString(), nluEnrichmentEntitiesModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.sentiment().toString(), - nluEnrichmentSentimentModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.emotion().toString(), nluEnrichmentEmotionModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.categories().toString(), - java.util.Collections.singletonMap("anyKey", "anyValue").toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.semanticRoles().toString(), - nluEnrichmentSemanticRolesModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.relations().toString(), - nluEnrichmentRelationsModel.toString()); - assertEquals( - nluEnrichmentFeaturesModelNew.concepts().toString(), nluEnrichmentConceptsModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywordsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywordsTest.java deleted file mode 100644 index cea1b8cf10..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentKeywordsTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentKeywords model. */ -public class NluEnrichmentKeywordsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentKeywords() throws Throwable { - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(nluEnrichmentKeywordsModel); - - NluEnrichmentKeywords nluEnrichmentKeywordsModelNew = - TestUtilities.deserialize(json, NluEnrichmentKeywords.class); - assertTrue(nluEnrichmentKeywordsModelNew instanceof NluEnrichmentKeywords); - assertEquals(nluEnrichmentKeywordsModelNew.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModelNew.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModelNew.limit(), Long.valueOf("26")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelationsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelationsTest.java deleted file mode 100644 index 777e296b32..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentRelationsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentRelations model. */ -public class NluEnrichmentRelationsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentRelations() throws Throwable { - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - String json = TestUtilities.serialize(nluEnrichmentRelationsModel); - - NluEnrichmentRelations nluEnrichmentRelationsModelNew = - TestUtilities.deserialize(json, NluEnrichmentRelations.class); - assertTrue(nluEnrichmentRelationsModelNew instanceof NluEnrichmentRelations); - assertEquals(nluEnrichmentRelationsModelNew.model(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRolesTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRolesTest.java deleted file mode 100644 index 1df2e7c290..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSemanticRolesTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentSemanticRoles model. */ -public class NluEnrichmentSemanticRolesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentSemanticRoles() throws Throwable { - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(nluEnrichmentSemanticRolesModel); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModelNew = - TestUtilities.deserialize(json, NluEnrichmentSemanticRoles.class); - assertTrue(nluEnrichmentSemanticRolesModelNew instanceof NluEnrichmentSemanticRoles); - assertEquals(nluEnrichmentSemanticRolesModelNew.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModelNew.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModelNew.limit(), Long.valueOf("26")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentimentTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentimentTest.java deleted file mode 100644 index 6a30965c25..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NluEnrichmentSentimentTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NluEnrichmentSentiment model. */ -public class NluEnrichmentSentimentTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNluEnrichmentSentiment() throws Throwable { - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(nluEnrichmentSentimentModel); - - NluEnrichmentSentiment nluEnrichmentSentimentModelNew = - TestUtilities.deserialize(json, NluEnrichmentSentiment.class); - assertTrue(nluEnrichmentSentimentModelNew instanceof NluEnrichmentSentiment); - assertEquals(nluEnrichmentSentimentModelNew.document(), Boolean.valueOf(true)); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NormalizationOperationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NormalizationOperationTest.java deleted file mode 100644 index 1000f68fa0..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NormalizationOperationTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the NormalizationOperation model. */ -public class NormalizationOperationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNormalizationOperation() throws Throwable { - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - assertEquals(normalizationOperationModel.operation(), "copy"); - assertEquals(normalizationOperationModel.sourceField(), "testString"); - assertEquals(normalizationOperationModel.destinationField(), "testString"); - - String json = TestUtilities.serialize(normalizationOperationModel); - - NormalizationOperation normalizationOperationModelNew = - TestUtilities.deserialize(json, NormalizationOperation.class); - assertTrue(normalizationOperationModelNew instanceof NormalizationOperation); - assertEquals(normalizationOperationModelNew.operation(), "copy"); - assertEquals(normalizationOperationModelNew.sourceField(), "testString"); - assertEquals(normalizationOperationModelNew.destinationField(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NoticeTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NoticeTest.java deleted file mode 100644 index 5f4d6a4032..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/NoticeTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Notice model. */ -public class NoticeTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testNotice() throws Throwable { - Notice noticeModel = new Notice(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetectionTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetectionTest.java deleted file mode 100644 index 6b603409cf..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfHeadingDetectionTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the PdfHeadingDetection model. */ -public class PdfHeadingDetectionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testPdfHeadingDetection() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - String json = TestUtilities.serialize(pdfHeadingDetectionModel); - - PdfHeadingDetection pdfHeadingDetectionModelNew = - TestUtilities.deserialize(json, PdfHeadingDetection.class); - assertTrue(pdfHeadingDetectionModelNew instanceof PdfHeadingDetection); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfSettingsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfSettingsTest.java deleted file mode 100644 index bc83bd6dfd..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/PdfSettingsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the PdfSettings model. */ -public class PdfSettingsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testPdfSettings() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - assertEquals(pdfSettingsModel.heading(), pdfHeadingDetectionModel); - - String json = TestUtilities.serialize(pdfSettingsModel); - - PdfSettings pdfSettingsModelNew = TestUtilities.deserialize(json, PdfSettings.class); - assertTrue(pdfSettingsModelNew instanceof PdfSettings); - assertEquals(pdfSettingsModelNew.heading().toString(), pdfHeadingDetectionModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryAggregationTest.java deleted file mode 100644 index 1618a0e836..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryAggregationTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryAggregation model. */ -public class QueryAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - // TODO: Add tests for models that are abstract - @Test - public void testQueryAggregation() throws Throwable { - QueryAggregation queryAggregationModel = new QueryAggregation(); - assertNotNull(queryAggregationModel); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregationTest.java deleted file mode 100644 index 137b667004..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryCalculationAggregationTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryCalculationAggregation model. */ -public class QueryCalculationAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryCalculationAggregation() throws Throwable { - QueryCalculationAggregation queryCalculationAggregationModel = - new QueryCalculationAggregation(); - assertNull(queryCalculationAggregationModel.getType()); - assertNull(queryCalculationAggregationModel.getField()); - assertNull(queryCalculationAggregationModel.getValue()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregationTest.java deleted file mode 100644 index 883b65ffb2..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryFilterAggregationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryFilterAggregation model. */ -public class QueryFilterAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryFilterAggregation() throws Throwable { - QueryFilterAggregation queryFilterAggregationModel = new QueryFilterAggregation(); - assertNull(queryFilterAggregationModel.getType()); - assertNull(queryFilterAggregationModel.getMatch()); - assertNull(queryFilterAggregationModel.getMatchingResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResultTest.java deleted file mode 100644 index a13e100863..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationResultTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryHistogramAggregationResult model. */ -public class QueryHistogramAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryHistogramAggregationResult() throws Throwable { - QueryHistogramAggregationResult queryHistogramAggregationResultModel = - new QueryHistogramAggregationResult(); - assertNull(queryHistogramAggregationResultModel.getKey()); - assertNull(queryHistogramAggregationResultModel.getMatchingResults()); - assertNull(queryHistogramAggregationResultModel.getAggregations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationTest.java deleted file mode 100644 index a54a716082..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryHistogramAggregationTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryHistogramAggregation model. */ -public class QueryHistogramAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryHistogramAggregation() throws Throwable { - QueryHistogramAggregation queryHistogramAggregationModel = new QueryHistogramAggregation(); - assertNull(queryHistogramAggregationModel.getType()); - assertNull(queryHistogramAggregationModel.getField()); - assertNull(queryHistogramAggregationModel.getInterval()); - assertNull(queryHistogramAggregationModel.getName()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryLogOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryLogOptionsTest.java deleted file mode 100644 index 2bdbea22ea..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryLogOptionsTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryLogOptions model. */ -public class QueryLogOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryLogOptions() throws Throwable { - QueryLogOptions queryLogOptionsModel = - new QueryLogOptions.Builder() - .filter("testString") - .query("testString") - .count(Long.valueOf("10")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .build(); - assertEquals(queryLogOptionsModel.filter(), "testString"); - assertEquals(queryLogOptionsModel.query(), "testString"); - assertEquals(queryLogOptionsModel.count(), Long.valueOf("10")); - assertEquals(queryLogOptionsModel.offset(), Long.valueOf("26")); - assertEquals(queryLogOptionsModel.sort(), java.util.Arrays.asList("testString")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregationTest.java deleted file mode 100644 index 7fa78163ad..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNestedAggregationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryNestedAggregation model. */ -public class QueryNestedAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryNestedAggregation() throws Throwable { - QueryNestedAggregation queryNestedAggregationModel = new QueryNestedAggregation(); - assertNull(queryNestedAggregationModel.getType()); - assertNull(queryNestedAggregationModel.getPath()); - assertNull(queryNestedAggregationModel.getMatchingResults()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptionsTest.java deleted file mode 100644 index e436850156..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptionsTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryNoticesOptions model. */ -public class QueryNoticesOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryNoticesOptions() throws Throwable { - QueryNoticesOptions queryNoticesOptionsModel = - new QueryNoticesOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn(java.util.Arrays.asList("testString")) - .offset(Long.valueOf("26")) - .sort(java.util.Arrays.asList("testString")) - .highlight(false) - .passagesFields(java.util.Arrays.asList("testString")) - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds(java.util.Arrays.asList("testString")) - .similarFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(queryNoticesOptionsModel.environmentId(), "testString"); - assertEquals(queryNoticesOptionsModel.collectionId(), "testString"); - assertEquals(queryNoticesOptionsModel.filter(), "testString"); - assertEquals(queryNoticesOptionsModel.query(), "testString"); - assertEquals(queryNoticesOptionsModel.naturalLanguageQuery(), "testString"); - assertEquals(queryNoticesOptionsModel.passages(), Boolean.valueOf(true)); - assertEquals(queryNoticesOptionsModel.aggregation(), "testString"); - assertEquals(queryNoticesOptionsModel.count(), Long.valueOf("10")); - assertEquals(queryNoticesOptionsModel.xReturn(), java.util.Arrays.asList("testString")); - assertEquals(queryNoticesOptionsModel.offset(), Long.valueOf("26")); - assertEquals(queryNoticesOptionsModel.sort(), java.util.Arrays.asList("testString")); - assertEquals(queryNoticesOptionsModel.highlight(), Boolean.valueOf(false)); - assertEquals(queryNoticesOptionsModel.passagesFields(), java.util.Arrays.asList("testString")); - assertEquals(queryNoticesOptionsModel.passagesCount(), Long.valueOf("10")); - assertEquals(queryNoticesOptionsModel.passagesCharacters(), Long.valueOf("400")); - assertEquals(queryNoticesOptionsModel.deduplicateField(), "testString"); - assertEquals(queryNoticesOptionsModel.similar(), Boolean.valueOf(false)); - assertEquals( - queryNoticesOptionsModel.similarDocumentIds(), java.util.Arrays.asList("testString")); - assertEquals(queryNoticesOptionsModel.similarFields(), java.util.Arrays.asList("testString")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testQueryNoticesOptionsError() throws Throwable { - new QueryNoticesOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponseTest.java deleted file mode 100644 index f22556ec0e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResponseTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryNoticesResponse model. */ -public class QueryNoticesResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryNoticesResponse() throws Throwable { - QueryNoticesResponse queryNoticesResponseModel = new QueryNoticesResponse(); - assertNull(queryNoticesResponseModel.getMatchingResults()); - assertNull(queryNoticesResponseModel.getResults()); - assertNull(queryNoticesResponseModel.getAggregations()); - assertNull(queryNoticesResponseModel.getPassages()); - assertNull(queryNoticesResponseModel.getDuplicatesRemoved()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResultTest.java deleted file mode 100644 index 8d3d190edd..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryNoticesResultTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryNoticesResult model. */ -public class QueryNoticesResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryNoticesResult() throws Throwable { - QueryNoticesResult queryNoticesResultModel = new QueryNoticesResult(); - assertNull(queryNoticesResultModel.getId()); - assertNull(queryNoticesResultModel.getMetadata()); - assertNull(queryNoticesResultModel.getCollectionId()); - assertNull(queryNoticesResultModel.getResultMetadata()); - assertNull(queryNoticesResultModel.getCode()); - assertNull(queryNoticesResultModel.getFilename()); - assertNull(queryNoticesResultModel.getFileType()); - assertNull(queryNoticesResultModel.getSha1()); - assertNull(queryNoticesResultModel.getNotices()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryOptionsTest.java deleted file mode 100644 index bf2a3d9314..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryOptionsTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryOptions model. */ -public class QueryOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryOptions() throws Throwable { - QueryOptions queryOptionsModel = - new QueryOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .filter("testString") - .query("testString") - .naturalLanguageQuery("testString") - .passages(true) - .aggregation("testString") - .count(Long.valueOf("10")) - .xReturn("testString") - .offset(Long.valueOf("26")) - .sort("testString") - .highlight(false) - .passagesFields("testString") - .passagesCount(Long.valueOf("10")) - .passagesCharacters(Long.valueOf("400")) - .deduplicate(false) - .deduplicateField("testString") - .similar(false) - .similarDocumentIds("testString") - .similarFields("testString") - .bias("testString") - .spellingSuggestions(false) - .xWatsonLoggingOptOut(false) - .build(); - assertEquals(queryOptionsModel.environmentId(), "testString"); - assertEquals(queryOptionsModel.collectionId(), "testString"); - assertEquals(queryOptionsModel.filter(), "testString"); - assertEquals(queryOptionsModel.query(), "testString"); - assertEquals(queryOptionsModel.naturalLanguageQuery(), "testString"); - assertEquals(queryOptionsModel.passages(), Boolean.valueOf(true)); - assertEquals(queryOptionsModel.aggregation(), "testString"); - assertEquals(queryOptionsModel.count(), Long.valueOf("10")); - assertEquals(queryOptionsModel.xReturn(), "testString"); - assertEquals(queryOptionsModel.offset(), Long.valueOf("26")); - assertEquals(queryOptionsModel.sort(), "testString"); - assertEquals(queryOptionsModel.highlight(), Boolean.valueOf(false)); - assertEquals(queryOptionsModel.passagesFields(), "testString"); - assertEquals(queryOptionsModel.passagesCount(), Long.valueOf("10")); - assertEquals(queryOptionsModel.passagesCharacters(), Long.valueOf("400")); - assertEquals(queryOptionsModel.deduplicate(), Boolean.valueOf(false)); - assertEquals(queryOptionsModel.deduplicateField(), "testString"); - assertEquals(queryOptionsModel.similar(), Boolean.valueOf(false)); - assertEquals(queryOptionsModel.similarDocumentIds(), "testString"); - assertEquals(queryOptionsModel.similarFields(), "testString"); - assertEquals(queryOptionsModel.bias(), "testString"); - assertEquals(queryOptionsModel.spellingSuggestions(), Boolean.valueOf(false)); - assertEquals(queryOptionsModel.xWatsonLoggingOptOut(), Boolean.valueOf(false)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testQueryOptionsError() throws Throwable { - new QueryOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryPassagesTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryPassagesTest.java deleted file mode 100644 index 62ba7f801e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryPassagesTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryPassages model. */ -public class QueryPassagesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryPassages() throws Throwable { - QueryPassages queryPassagesModel = new QueryPassages(); - assertNull(queryPassagesModel.getDocumentId()); - assertNull(queryPassagesModel.getPassageScore()); - assertNull(queryPassagesModel.getPassageText()); - assertNull(queryPassagesModel.getStartOffset()); - assertNull(queryPassagesModel.getEndOffset()); - assertNull(queryPassagesModel.getField()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResponseTest.java deleted file mode 100644 index 07ca90ddda..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResponseTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryResponse model. */ -public class QueryResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryResponse() throws Throwable { - QueryResponse queryResponseModel = new QueryResponse(); - assertNull(queryResponseModel.getMatchingResults()); - assertNull(queryResponseModel.getResults()); - assertNull(queryResponseModel.getAggregations()); - assertNull(queryResponseModel.getPassages()); - assertNull(queryResponseModel.getDuplicatesRemoved()); - assertNull(queryResponseModel.getSessionToken()); - assertNull(queryResponseModel.getRetrievalDetails()); - assertNull(queryResponseModel.getSuggestedQuery()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultMetadataTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultMetadataTest.java deleted file mode 100644 index fd9230b528..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultMetadataTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryResultMetadata model. */ -public class QueryResultMetadataTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryResultMetadata() throws Throwable { - QueryResultMetadata queryResultMetadataModel = new QueryResultMetadata(); - assertNull(queryResultMetadataModel.getScore()); - assertNull(queryResultMetadataModel.getConfidence()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultTest.java deleted file mode 100644 index 11b72ce56b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryResultTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryResult model. */ -public class QueryResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryResult() throws Throwable { - QueryResult queryResultModel = new QueryResult(); - assertNull(queryResultModel.getId()); - assertNull(queryResultModel.getMetadata()); - assertNull(queryResultModel.getCollectionId()); - assertNull(queryResultModel.getResultMetadata()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResultTest.java deleted file mode 100644 index d0e9c3f5d8..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResultTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTermAggregationResult model. */ -public class QueryTermAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTermAggregationResult() throws Throwable { - QueryTermAggregationResult queryTermAggregationResultModel = new QueryTermAggregationResult(); - assertNull(queryTermAggregationResultModel.getKey()); - assertNull(queryTermAggregationResultModel.getMatchingResults()); - assertNull(queryTermAggregationResultModel.getRelevancy()); - assertNull(queryTermAggregationResultModel.getTotalMatchingDocuments()); - assertNull(queryTermAggregationResultModel.getEstimatedMatchingDocuments()); - assertNull(queryTermAggregationResultModel.getAggregations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationTest.java deleted file mode 100644 index ecb524ff51..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTermAggregation model. */ -public class QueryTermAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTermAggregation() throws Throwable { - QueryTermAggregation queryTermAggregationModel = new QueryTermAggregation(); - assertNull(queryTermAggregationModel.getType()); - assertNull(queryTermAggregationModel.getField()); - assertNull(queryTermAggregationModel.getCount()); - assertNull(queryTermAggregationModel.getName()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResultTest.java deleted file mode 100644 index ee0b0a778d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationResultTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTimesliceAggregationResult model. */ -public class QueryTimesliceAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTimesliceAggregationResult() throws Throwable { - QueryTimesliceAggregationResult queryTimesliceAggregationResultModel = - new QueryTimesliceAggregationResult(); - assertNull(queryTimesliceAggregationResultModel.getKeyAsString()); - assertNull(queryTimesliceAggregationResultModel.getKey()); - assertNull(queryTimesliceAggregationResultModel.getMatchingResults()); - assertNull(queryTimesliceAggregationResultModel.getAggregations()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationTest.java deleted file mode 100644 index f485db48ef..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTimesliceAggregationTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTimesliceAggregation model. */ -public class QueryTimesliceAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTimesliceAggregation() throws Throwable { - QueryTimesliceAggregation queryTimesliceAggregationModel = new QueryTimesliceAggregation(); - assertNull(queryTimesliceAggregationModel.getType()); - assertNull(queryTimesliceAggregationModel.getField()); - assertNull(queryTimesliceAggregationModel.getInterval()); - assertNull(queryTimesliceAggregationModel.getName()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResultTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResultTest.java deleted file mode 100644 index 7d9ba8d624..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationResultTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTopHitsAggregationResult model. */ -public class QueryTopHitsAggregationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTopHitsAggregationResult() throws Throwable { - QueryTopHitsAggregationResult queryTopHitsAggregationResultModel = - new QueryTopHitsAggregationResult(); - assertNull(queryTopHitsAggregationResultModel.getMatchingResults()); - assertNull(queryTopHitsAggregationResultModel.getHits()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationTest.java deleted file mode 100644 index 4917969d86..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTopHitsAggregationTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the QueryTopHitsAggregation model. */ -public class QueryTopHitsAggregationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testQueryTopHitsAggregation() throws Throwable { - QueryTopHitsAggregation queryTopHitsAggregationModel = new QueryTopHitsAggregation(); - assertNull(queryTopHitsAggregationModel.getType()); - assertNull(queryTopHitsAggregationModel.getSize()); - assertNull(queryTopHitsAggregationModel.getName()); - assertNull(queryTopHitsAggregationModel.getHits()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/RetrievalDetailsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/RetrievalDetailsTest.java deleted file mode 100644 index b330baa87b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/RetrievalDetailsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the RetrievalDetails model. */ -public class RetrievalDetailsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testRetrievalDetails() throws Throwable { - RetrievalDetails retrievalDetailsModel = new RetrievalDetails(); - assertNull(retrievalDetailsModel.getDocumentRetrievalStrategy()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFieldsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFieldsTest.java deleted file mode 100644 index 449ad4b31b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusCustomFieldsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SduStatusCustomFields model. */ -public class SduStatusCustomFieldsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSduStatusCustomFields() throws Throwable { - SduStatusCustomFields sduStatusCustomFieldsModel = new SduStatusCustomFields(); - assertNull(sduStatusCustomFieldsModel.getDefined()); - assertNull(sduStatusCustomFieldsModel.getMaximumAllowed()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusTest.java deleted file mode 100644 index 2dc022fa53..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SduStatusTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SduStatus model. */ -public class SduStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSduStatus() throws Throwable { - SduStatus sduStatusModel = new SduStatus(); - assertNull(sduStatusModel.isEnabled()); - assertNull(sduStatusModel.getTotalAnnotatedPages()); - assertNull(sduStatusModel.getTotalPages()); - assertNull(sduStatusModel.getTotalDocuments()); - assertNull(sduStatusModel.getCustomFields()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SearchStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SearchStatusTest.java deleted file mode 100644 index 557c077f5e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SearchStatusTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SearchStatus model. */ -public class SearchStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSearchStatus() throws Throwable { - SearchStatus searchStatusModel = new SearchStatus(); - assertNull(searchStatusModel.getScope()); - assertNull(searchStatusModel.getStatus()); - assertNull(searchStatusModel.getStatusDescription()); - assertNull(searchStatusModel.getLastTrained()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SegmentSettingsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SegmentSettingsTest.java deleted file mode 100644 index ac444654aa..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SegmentSettingsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SegmentSettings model. */ -public class SegmentSettingsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSegmentSettings() throws Throwable { - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(segmentSettingsModel.enabled(), Boolean.valueOf(false)); - assertEquals(segmentSettingsModel.selectorTags(), java.util.Arrays.asList("h1", "h2")); - assertEquals(segmentSettingsModel.annotatedFields(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(segmentSettingsModel); - - SegmentSettings segmentSettingsModelNew = - TestUtilities.deserialize(json, SegmentSettings.class); - assertTrue(segmentSettingsModelNew instanceof SegmentSettings); - assertEquals(segmentSettingsModelNew.enabled(), Boolean.valueOf(false)); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsBucketsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsBucketsTest.java deleted file mode 100644 index bcd8445aa7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsBucketsTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptionsBuckets model. */ -public class SourceOptionsBucketsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptionsBuckets() throws Throwable { - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(sourceOptionsBucketsModel); - - SourceOptionsBuckets sourceOptionsBucketsModelNew = - TestUtilities.deserialize(json, SourceOptionsBuckets.class); - assertTrue(sourceOptionsBucketsModelNew instanceof SourceOptionsBuckets); - assertEquals(sourceOptionsBucketsModelNew.name(), "testString"); - assertEquals(sourceOptionsBucketsModelNew.limit(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSourceOptionsBucketsError() throws Throwable { - new SourceOptionsBuckets.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolderTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolderTest.java deleted file mode 100644 index c8a7b2aa59..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsFolderTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptionsFolder model. */ -public class SourceOptionsFolderTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptionsFolder() throws Throwable { - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(sourceOptionsFolderModel); - - SourceOptionsFolder sourceOptionsFolderModelNew = - TestUtilities.deserialize(json, SourceOptionsFolder.class); - assertTrue(sourceOptionsFolderModelNew instanceof SourceOptionsFolder); - assertEquals(sourceOptionsFolderModelNew.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModelNew.folderId(), "testString"); - assertEquals(sourceOptionsFolderModelNew.limit(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSourceOptionsFolderError() throws Throwable { - new SourceOptionsFolder.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsObjectTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsObjectTest.java deleted file mode 100644 index b3c12a7d9a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsObjectTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptionsObject model. */ -public class SourceOptionsObjectTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptionsObject() throws Throwable { - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(sourceOptionsObjectModel); - - SourceOptionsObject sourceOptionsObjectModelNew = - TestUtilities.deserialize(json, SourceOptionsObject.class); - assertTrue(sourceOptionsObjectModelNew instanceof SourceOptionsObject); - assertEquals(sourceOptionsObjectModelNew.name(), "testString"); - assertEquals(sourceOptionsObjectModelNew.limit(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSourceOptionsObjectError() throws Throwable { - new SourceOptionsObject.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteCollTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteCollTest.java deleted file mode 100644 index 1316e7b537..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsSiteCollTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptionsSiteColl model. */ -public class SourceOptionsSiteCollTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptionsSiteColl() throws Throwable { - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("26")); - - String json = TestUtilities.serialize(sourceOptionsSiteCollModel); - - SourceOptionsSiteColl sourceOptionsSiteCollModelNew = - TestUtilities.deserialize(json, SourceOptionsSiteColl.class); - assertTrue(sourceOptionsSiteCollModelNew instanceof SourceOptionsSiteColl); - assertEquals(sourceOptionsSiteCollModelNew.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModelNew.limit(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSourceOptionsSiteCollError() throws Throwable { - new SourceOptionsSiteColl.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsTest.java deleted file mode 100644 index 9a19a30431..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptions model. */ -public class SourceOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptions() throws Throwable { - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("26")); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - assertEquals(sourceOptionsModel.folders(), java.util.Arrays.asList(sourceOptionsFolderModel)); - assertEquals(sourceOptionsModel.objects(), java.util.Arrays.asList(sourceOptionsObjectModel)); - assertEquals( - sourceOptionsModel.siteCollections(), java.util.Arrays.asList(sourceOptionsSiteCollModel)); - assertEquals(sourceOptionsModel.urls(), java.util.Arrays.asList(sourceOptionsWebCrawlModel)); - assertEquals(sourceOptionsModel.buckets(), java.util.Arrays.asList(sourceOptionsBucketsModel)); - assertEquals(sourceOptionsModel.crawlAllBuckets(), Boolean.valueOf(true)); - - String json = TestUtilities.serialize(sourceOptionsModel); - - SourceOptions sourceOptionsModelNew = TestUtilities.deserialize(json, SourceOptions.class); - assertTrue(sourceOptionsModelNew instanceof SourceOptions); - assertEquals(sourceOptionsModelNew.crawlAllBuckets(), Boolean.valueOf(true)); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawlTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawlTest.java deleted file mode 100644 index 8c094565eb..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceOptionsWebCrawlTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceOptionsWebCrawl model. */ -public class SourceOptionsWebCrawlTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceOptionsWebCrawl() throws Throwable { - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(sourceOptionsWebCrawlModel); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModelNew = - TestUtilities.deserialize(json, SourceOptionsWebCrawl.class); - assertTrue(sourceOptionsWebCrawlModelNew instanceof SourceOptionsWebCrawl); - assertEquals(sourceOptionsWebCrawlModelNew.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModelNew.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModelNew.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModelNew.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModelNew.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModelNew.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModelNew.overrideRobotsTxt(), Boolean.valueOf(false)); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSourceOptionsWebCrawlError() throws Throwable { - new SourceOptionsWebCrawl.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceScheduleTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceScheduleTest.java deleted file mode 100644 index 889bde8bb8..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceScheduleTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceSchedule model. */ -public class SourceScheduleTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceSchedule() throws Throwable { - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - assertEquals(sourceScheduleModel.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModel.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModel.frequency(), "daily"); - - String json = TestUtilities.serialize(sourceScheduleModel); - - SourceSchedule sourceScheduleModelNew = TestUtilities.deserialize(json, SourceSchedule.class); - assertTrue(sourceScheduleModelNew instanceof SourceSchedule); - assertEquals(sourceScheduleModelNew.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModelNew.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModelNew.frequency(), "daily"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceStatusTest.java deleted file mode 100644 index 307714a701..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceStatusTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the SourceStatus model. */ -public class SourceStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSourceStatus() throws Throwable { - SourceStatus sourceStatusModel = new SourceStatus(); - assertNull(sourceStatusModel.getStatus()); - assertNull(sourceStatusModel.getNextCrawl()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceTest.java deleted file mode 100644 index 082e1f2df6..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/SourceTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Source model. */ -public class SourceTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testSource() throws Throwable { - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - assertEquals(sourceScheduleModel.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModel.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModel.frequency(), "daily"); - - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("26")); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - assertEquals(sourceOptionsModel.folders(), java.util.Arrays.asList(sourceOptionsFolderModel)); - assertEquals(sourceOptionsModel.objects(), java.util.Arrays.asList(sourceOptionsObjectModel)); - assertEquals( - sourceOptionsModel.siteCollections(), java.util.Arrays.asList(sourceOptionsSiteCollModel)); - assertEquals(sourceOptionsModel.urls(), java.util.Arrays.asList(sourceOptionsWebCrawlModel)); - assertEquals(sourceOptionsModel.buckets(), java.util.Arrays.asList(sourceOptionsBucketsModel)); - assertEquals(sourceOptionsModel.crawlAllBuckets(), Boolean.valueOf(true)); - - Source sourceModel = - new Source.Builder() - .type("box") - .credentialId("testString") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - assertEquals(sourceModel.type(), "box"); - assertEquals(sourceModel.credentialId(), "testString"); - assertEquals(sourceModel.schedule(), sourceScheduleModel); - assertEquals(sourceModel.options(), sourceOptionsModel); - - String json = TestUtilities.serialize(sourceModel); - - Source sourceModelNew = TestUtilities.deserialize(json, Source.class); - assertTrue(sourceModelNew instanceof Source); - assertEquals(sourceModelNew.type(), "box"); - assertEquals(sourceModelNew.credentialId(), "testString"); - assertEquals(sourceModelNew.schedule().toString(), sourceScheduleModel.toString()); - assertEquals(sourceModelNew.options().toString(), sourceOptionsModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/StatusDetailsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/StatusDetailsTest.java deleted file mode 100644 index 8f811af355..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/StatusDetailsTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the StatusDetails model. */ -public class StatusDetailsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testStatusDetails() throws Throwable { - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - assertEquals(statusDetailsModel.authenticated(), Boolean.valueOf(true)); - assertEquals(statusDetailsModel.errorMessage(), "testString"); - - String json = TestUtilities.serialize(statusDetailsModel); - - StatusDetails statusDetailsModelNew = TestUtilities.deserialize(json, StatusDetails.class); - assertTrue(statusDetailsModelNew instanceof StatusDetails); - assertEquals(statusDetailsModelNew.authenticated(), Boolean.valueOf(true)); - assertEquals(statusDetailsModelNew.errorMessage(), "testString"); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictRuleTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictRuleTest.java deleted file mode 100644 index 882706f193..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictRuleTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TokenDictRule model. */ -public class TokenDictRuleTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTokenDictRule() throws Throwable { - TokenDictRule tokenDictRuleModel = - new TokenDictRule.Builder() - .text("testString") - .tokens(java.util.Arrays.asList("testString")) - .readings(java.util.Arrays.asList("testString")) - .partOfSpeech("testString") - .build(); - assertEquals(tokenDictRuleModel.text(), "testString"); - assertEquals(tokenDictRuleModel.tokens(), java.util.Arrays.asList("testString")); - assertEquals(tokenDictRuleModel.readings(), java.util.Arrays.asList("testString")); - assertEquals(tokenDictRuleModel.partOfSpeech(), "testString"); - - String json = TestUtilities.serialize(tokenDictRuleModel); - - TokenDictRule tokenDictRuleModelNew = TestUtilities.deserialize(json, TokenDictRule.class); - assertTrue(tokenDictRuleModelNew instanceof TokenDictRule); - assertEquals(tokenDictRuleModelNew.text(), "testString"); - assertEquals(tokenDictRuleModelNew.partOfSpeech(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTokenDictRuleError() throws Throwable { - new TokenDictRule.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponseTest.java deleted file mode 100644 index 7243225b39..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TokenDictStatusResponseTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TokenDictStatusResponse model. */ -public class TokenDictStatusResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTokenDictStatusResponse() throws Throwable { - TokenDictStatusResponse tokenDictStatusResponseModel = new TokenDictStatusResponse(); - assertNull(tokenDictStatusResponseModel.getStatus()); - assertNull(tokenDictStatusResponseModel.getType()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TopHitsResultsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TopHitsResultsTest.java deleted file mode 100644 index 7495172a3a..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TopHitsResultsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TopHitsResults model. */ -public class TopHitsResultsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTopHitsResults() throws Throwable { - TopHitsResults topHitsResultsModel = new TopHitsResults(); - assertNull(topHitsResultsModel.getMatchingResults()); - assertNull(topHitsResultsModel.getHits()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingDataSetTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingDataSetTest.java deleted file mode 100644 index e21cbe3bff..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingDataSetTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TrainingDataSet model. */ -public class TrainingDataSetTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTrainingDataSet() throws Throwable { - TrainingDataSet trainingDataSetModel = new TrainingDataSet(); - assertNull(trainingDataSetModel.getEnvironmentId()); - assertNull(trainingDataSetModel.getCollectionId()); - assertNull(trainingDataSetModel.getQueries()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleListTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleListTest.java deleted file mode 100644 index 6ac589a45d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleListTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TrainingExampleList model. */ -public class TrainingExampleListTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTrainingExampleList() throws Throwable { - TrainingExampleList trainingExampleListModel = new TrainingExampleList(); - assertNull(trainingExampleListModel.getExamples()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleTest.java deleted file mode 100644 index bf6456ad7d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingExampleTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TrainingExample model. */ -public class TrainingExampleTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTrainingExample() throws Throwable { - TrainingExample trainingExampleModel = - new TrainingExample.Builder() - .documentId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - assertEquals(trainingExampleModel.documentId(), "testString"); - assertEquals(trainingExampleModel.crossReference(), "testString"); - assertEquals(trainingExampleModel.relevance(), Long.valueOf("26")); - - String json = TestUtilities.serialize(trainingExampleModel); - - TrainingExample trainingExampleModelNew = - TestUtilities.deserialize(json, TrainingExample.class); - assertTrue(trainingExampleModelNew instanceof TrainingExample); - assertEquals(trainingExampleModelNew.documentId(), "testString"); - assertEquals(trainingExampleModelNew.crossReference(), "testString"); - assertEquals(trainingExampleModelNew.relevance(), Long.valueOf("26")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingQueryTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingQueryTest.java deleted file mode 100644 index 231000a0d3..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingQueryTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TrainingQuery model. */ -public class TrainingQueryTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTrainingQuery() throws Throwable { - TrainingQuery trainingQueryModel = new TrainingQuery(); - assertNull(trainingQueryModel.getQueryId()); - assertNull(trainingQueryModel.getNaturalLanguageQuery()); - assertNull(trainingQueryModel.getFilter()); - assertNull(trainingQueryModel.getExamples()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingStatusTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingStatusTest.java deleted file mode 100644 index e21cb3199b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/TrainingStatusTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TrainingStatus model. */ -public class TrainingStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTrainingStatus() throws Throwable { - TrainingStatus trainingStatusModel = new TrainingStatus(); - assertNull(trainingStatusModel.getTotalExamples()); - assertNull(trainingStatusModel.isAvailable()); - assertNull(trainingStatusModel.isProcessing()); - assertNull(trainingStatusModel.isMinimumQueriesAdded()); - assertNull(trainingStatusModel.isMinimumExamplesAdded()); - assertNull(trainingStatusModel.isSufficientLabelDiversity()); - assertNull(trainingStatusModel.getNotices()); - assertNull(trainingStatusModel.getSuccessfullyTrained()); - assertNull(trainingStatusModel.getDataUpdated()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptionsTest.java deleted file mode 100644 index 8c3e814df6..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCollectionOptionsTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateCollectionOptions model. */ -public class UpdateCollectionOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateCollectionOptions() throws Throwable { - UpdateCollectionOptions updateCollectionOptionsModel = - new UpdateCollectionOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .name("testString") - .description("testString") - .configurationId("testString") - .build(); - assertEquals(updateCollectionOptionsModel.environmentId(), "testString"); - assertEquals(updateCollectionOptionsModel.collectionId(), "testString"); - assertEquals(updateCollectionOptionsModel.name(), "testString"); - assertEquals(updateCollectionOptionsModel.description(), "testString"); - assertEquals(updateCollectionOptionsModel.configurationId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateCollectionOptionsError() throws Throwable { - new UpdateCollectionOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptionsTest.java deleted file mode 100644 index e9b78a414b..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateConfigurationOptionsTest.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateConfigurationOptions model. */ -public class UpdateConfigurationOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateConfigurationOptions() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - PdfHeadingDetection pdfHeadingDetectionModel = - new PdfHeadingDetection.Builder().fonts(java.util.Arrays.asList(fontSettingModel)).build(); - assertEquals(pdfHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - - PdfSettings pdfSettingsModel = - new PdfSettings.Builder().heading(pdfHeadingDetectionModel).build(); - assertEquals(pdfSettingsModel.heading(), pdfHeadingDetectionModel); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - assertEquals(wordSettingsModel.heading(), wordHeadingDetectionModel); - - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - HtmlSettings htmlSettingsModel = - new HtmlSettings.Builder() - .excludeTagsCompletely(java.util.Arrays.asList("testString")) - .excludeTagsKeepContent(java.util.Arrays.asList("testString")) - .keepContent(xPathPatternsModel) - .excludeContent(xPathPatternsModel) - .keepTagAttributes(java.util.Arrays.asList("testString")) - .excludeTagAttributes(java.util.Arrays.asList("testString")) - .build(); - assertEquals(htmlSettingsModel.excludeTagsCompletely(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagsKeepContent(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.keepContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.excludeContent(), xPathPatternsModel); - assertEquals(htmlSettingsModel.keepTagAttributes(), java.util.Arrays.asList("testString")); - assertEquals(htmlSettingsModel.excludeTagAttributes(), java.util.Arrays.asList("testString")); - - SegmentSettings segmentSettingsModel = - new SegmentSettings.Builder() - .enabled(false) - .selectorTags(java.util.Arrays.asList("h1", "h2")) - .annotatedFields(java.util.Arrays.asList("testString")) - .build(); - assertEquals(segmentSettingsModel.enabled(), Boolean.valueOf(false)); - assertEquals(segmentSettingsModel.selectorTags(), java.util.Arrays.asList("h1", "h2")); - assertEquals(segmentSettingsModel.annotatedFields(), java.util.Arrays.asList("testString")); - - NormalizationOperation normalizationOperationModel = - new NormalizationOperation.Builder() - .operation("copy") - .sourceField("testString") - .destinationField("testString") - .build(); - assertEquals(normalizationOperationModel.operation(), "copy"); - assertEquals(normalizationOperationModel.sourceField(), "testString"); - assertEquals(normalizationOperationModel.destinationField(), "testString"); - - Conversions conversionsModel = - new Conversions.Builder() - .pdf(pdfSettingsModel) - .word(wordSettingsModel) - .html(htmlSettingsModel) - .segment(segmentSettingsModel) - .jsonNormalizations(java.util.Arrays.asList(normalizationOperationModel)) - .imageTextRecognition(true) - .build(); - assertEquals(conversionsModel.pdf(), pdfSettingsModel); - assertEquals(conversionsModel.word(), wordSettingsModel); - assertEquals(conversionsModel.html(), htmlSettingsModel); - assertEquals(conversionsModel.segment(), segmentSettingsModel); - assertEquals( - conversionsModel.jsonNormalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(conversionsModel.imageTextRecognition(), Boolean.valueOf(true)); - - NluEnrichmentKeywords nluEnrichmentKeywordsModel = - new NluEnrichmentKeywords.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentKeywordsModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentKeywordsModel.limit(), Long.valueOf("26")); - - NluEnrichmentEntities nluEnrichmentEntitiesModel = - new NluEnrichmentEntities.Builder() - .sentiment(true) - .emotion(true) - .limit(Long.valueOf("26")) - .mentions(true) - .mentionTypes(true) - .sentenceLocations(true) - .model("testString") - .build(); - assertEquals(nluEnrichmentEntitiesModel.sentiment(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.emotion(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.limit(), Long.valueOf("26")); - assertEquals(nluEnrichmentEntitiesModel.mentions(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.mentionTypes(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.sentenceLocations(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEntitiesModel.model(), "testString"); - - NluEnrichmentSentiment nluEnrichmentSentimentModel = - new NluEnrichmentSentiment.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentSentimentModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSentimentModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentEmotion nluEnrichmentEmotionModel = - new NluEnrichmentEmotion.Builder() - .document(true) - .targets(java.util.Arrays.asList("testString")) - .build(); - assertEquals(nluEnrichmentEmotionModel.document(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentEmotionModel.targets(), java.util.Arrays.asList("testString")); - - NluEnrichmentSemanticRoles nluEnrichmentSemanticRolesModel = - new NluEnrichmentSemanticRoles.Builder() - .entities(true) - .keywords(true) - .limit(Long.valueOf("26")) - .build(); - assertEquals(nluEnrichmentSemanticRolesModel.entities(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.keywords(), Boolean.valueOf(true)); - assertEquals(nluEnrichmentSemanticRolesModel.limit(), Long.valueOf("26")); - - NluEnrichmentRelations nluEnrichmentRelationsModel = - new NluEnrichmentRelations.Builder().model("testString").build(); - assertEquals(nluEnrichmentRelationsModel.model(), "testString"); - - NluEnrichmentConcepts nluEnrichmentConceptsModel = - new NluEnrichmentConcepts.Builder().limit(Long.valueOf("26")).build(); - assertEquals(nluEnrichmentConceptsModel.limit(), Long.valueOf("26")); - - NluEnrichmentFeatures nluEnrichmentFeaturesModel = - new NluEnrichmentFeatures.Builder() - .keywords(nluEnrichmentKeywordsModel) - .entities(nluEnrichmentEntitiesModel) - .sentiment(nluEnrichmentSentimentModel) - .emotion(nluEnrichmentEmotionModel) - .categories(java.util.Collections.singletonMap("anyKey", "anyValue")) - .semanticRoles(nluEnrichmentSemanticRolesModel) - .relations(nluEnrichmentRelationsModel) - .concepts(nluEnrichmentConceptsModel) - .build(); - assertEquals(nluEnrichmentFeaturesModel.keywords(), nluEnrichmentKeywordsModel); - assertEquals(nluEnrichmentFeaturesModel.entities(), nluEnrichmentEntitiesModel); - assertEquals(nluEnrichmentFeaturesModel.sentiment(), nluEnrichmentSentimentModel); - assertEquals(nluEnrichmentFeaturesModel.emotion(), nluEnrichmentEmotionModel); - assertEquals( - nluEnrichmentFeaturesModel.categories(), - java.util.Collections.singletonMap("anyKey", "anyValue")); - assertEquals(nluEnrichmentFeaturesModel.semanticRoles(), nluEnrichmentSemanticRolesModel); - assertEquals(nluEnrichmentFeaturesModel.relations(), nluEnrichmentRelationsModel); - assertEquals(nluEnrichmentFeaturesModel.concepts(), nluEnrichmentConceptsModel); - - EnrichmentOptions enrichmentOptionsModel = - new EnrichmentOptions.Builder() - .features(nluEnrichmentFeaturesModel) - .language("ar") - .model("testString") - .build(); - assertEquals(enrichmentOptionsModel.features(), nluEnrichmentFeaturesModel); - assertEquals(enrichmentOptionsModel.language(), "ar"); - assertEquals(enrichmentOptionsModel.model(), "testString"); - - Enrichment enrichmentModel = - new Enrichment.Builder() - .description("testString") - .destinationField("testString") - .sourceField("testString") - .overwrite(false) - .enrichment("testString") - .ignoreDownstreamErrors(false) - .options(enrichmentOptionsModel) - .build(); - assertEquals(enrichmentModel.description(), "testString"); - assertEquals(enrichmentModel.destinationField(), "testString"); - assertEquals(enrichmentModel.sourceField(), "testString"); - assertEquals(enrichmentModel.overwrite(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.enrichment(), "testString"); - assertEquals(enrichmentModel.ignoreDownstreamErrors(), Boolean.valueOf(false)); - assertEquals(enrichmentModel.options(), enrichmentOptionsModel); - - SourceSchedule sourceScheduleModel = - new SourceSchedule.Builder() - .enabled(true) - .timeZone("America/New_York") - .frequency("daily") - .build(); - assertEquals(sourceScheduleModel.enabled(), Boolean.valueOf(true)); - assertEquals(sourceScheduleModel.timeZone(), "America/New_York"); - assertEquals(sourceScheduleModel.frequency(), "daily"); - - SourceOptionsFolder sourceOptionsFolderModel = - new SourceOptionsFolder.Builder() - .ownerUserId("testString") - .folderId("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsFolderModel.ownerUserId(), "testString"); - assertEquals(sourceOptionsFolderModel.folderId(), "testString"); - assertEquals(sourceOptionsFolderModel.limit(), Long.valueOf("26")); - - SourceOptionsObject sourceOptionsObjectModel = - new SourceOptionsObject.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsObjectModel.name(), "testString"); - assertEquals(sourceOptionsObjectModel.limit(), Long.valueOf("26")); - - SourceOptionsSiteColl sourceOptionsSiteCollModel = - new SourceOptionsSiteColl.Builder() - .siteCollectionPath("testString") - .limit(Long.valueOf("26")) - .build(); - assertEquals(sourceOptionsSiteCollModel.siteCollectionPath(), "testString"); - assertEquals(sourceOptionsSiteCollModel.limit(), Long.valueOf("26")); - - SourceOptionsWebCrawl sourceOptionsWebCrawlModel = - new SourceOptionsWebCrawl.Builder() - .url("testString") - .limitToStartingHosts(true) - .crawlSpeed("normal") - .allowUntrustedCertificate(false) - .maximumHops(Long.valueOf("2")) - .requestTimeout(Long.valueOf("30000")) - .overrideRobotsTxt(false) - .blacklist(java.util.Arrays.asList("testString")) - .build(); - assertEquals(sourceOptionsWebCrawlModel.url(), "testString"); - assertEquals(sourceOptionsWebCrawlModel.limitToStartingHosts(), Boolean.valueOf(true)); - assertEquals(sourceOptionsWebCrawlModel.crawlSpeed(), "normal"); - assertEquals(sourceOptionsWebCrawlModel.allowUntrustedCertificate(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.maximumHops(), Long.valueOf("2")); - assertEquals(sourceOptionsWebCrawlModel.requestTimeout(), Long.valueOf("30000")); - assertEquals(sourceOptionsWebCrawlModel.overrideRobotsTxt(), Boolean.valueOf(false)); - assertEquals(sourceOptionsWebCrawlModel.blacklist(), java.util.Arrays.asList("testString")); - - SourceOptionsBuckets sourceOptionsBucketsModel = - new SourceOptionsBuckets.Builder().name("testString").limit(Long.valueOf("26")).build(); - assertEquals(sourceOptionsBucketsModel.name(), "testString"); - assertEquals(sourceOptionsBucketsModel.limit(), Long.valueOf("26")); - - SourceOptions sourceOptionsModel = - new SourceOptions.Builder() - .folders(java.util.Arrays.asList(sourceOptionsFolderModel)) - .objects(java.util.Arrays.asList(sourceOptionsObjectModel)) - .siteCollections(java.util.Arrays.asList(sourceOptionsSiteCollModel)) - .urls(java.util.Arrays.asList(sourceOptionsWebCrawlModel)) - .buckets(java.util.Arrays.asList(sourceOptionsBucketsModel)) - .crawlAllBuckets(true) - .build(); - assertEquals(sourceOptionsModel.folders(), java.util.Arrays.asList(sourceOptionsFolderModel)); - assertEquals(sourceOptionsModel.objects(), java.util.Arrays.asList(sourceOptionsObjectModel)); - assertEquals( - sourceOptionsModel.siteCollections(), java.util.Arrays.asList(sourceOptionsSiteCollModel)); - assertEquals(sourceOptionsModel.urls(), java.util.Arrays.asList(sourceOptionsWebCrawlModel)); - assertEquals(sourceOptionsModel.buckets(), java.util.Arrays.asList(sourceOptionsBucketsModel)); - assertEquals(sourceOptionsModel.crawlAllBuckets(), Boolean.valueOf(true)); - - Source sourceModel = - new Source.Builder() - .type("box") - .credentialId("testString") - .schedule(sourceScheduleModel) - .options(sourceOptionsModel) - .build(); - assertEquals(sourceModel.type(), "box"); - assertEquals(sourceModel.credentialId(), "testString"); - assertEquals(sourceModel.schedule(), sourceScheduleModel); - assertEquals(sourceModel.options(), sourceOptionsModel); - - UpdateConfigurationOptions updateConfigurationOptionsModel = - new UpdateConfigurationOptions.Builder() - .environmentId("testString") - .configurationId("testString") - .name("testString") - .description("testString") - .conversions(conversionsModel) - .enrichments(java.util.Arrays.asList(enrichmentModel)) - .normalizations(java.util.Arrays.asList(normalizationOperationModel)) - .source(sourceModel) - .build(); - assertEquals(updateConfigurationOptionsModel.environmentId(), "testString"); - assertEquals(updateConfigurationOptionsModel.configurationId(), "testString"); - assertEquals(updateConfigurationOptionsModel.name(), "testString"); - assertEquals(updateConfigurationOptionsModel.description(), "testString"); - assertEquals(updateConfigurationOptionsModel.conversions(), conversionsModel); - assertEquals( - updateConfigurationOptionsModel.enrichments(), java.util.Arrays.asList(enrichmentModel)); - assertEquals( - updateConfigurationOptionsModel.normalizations(), - java.util.Arrays.asList(normalizationOperationModel)); - assertEquals(updateConfigurationOptionsModel.source(), sourceModel); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateConfigurationOptionsError() throws Throwable { - new UpdateConfigurationOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptionsTest.java deleted file mode 100644 index ec223048a9..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateCredentialsOptionsTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateCredentialsOptions model. */ -public class UpdateCredentialsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateCredentialsOptions() throws Throwable { - CredentialDetails credentialDetailsModel = - new CredentialDetails.Builder() - .credentialType("oauth2") - .clientId("testString") - .enterpriseId("testString") - .url("testString") - .username("testString") - .organizationUrl("testString") - .siteCollectionPath("testString") - .clientSecret("testString") - .publicKeyId("testString") - .privateKey("testString") - .passphrase("testString") - .password("testString") - .gatewayId("testString") - .sourceVersion("online") - .webApplicationUrl("testString") - .domain("testString") - .endpoint("testString") - .accessKeyId("testString") - .secretAccessKey("testString") - .build(); - assertEquals(credentialDetailsModel.credentialType(), "oauth2"); - assertEquals(credentialDetailsModel.clientId(), "testString"); - assertEquals(credentialDetailsModel.enterpriseId(), "testString"); - assertEquals(credentialDetailsModel.url(), "testString"); - assertEquals(credentialDetailsModel.username(), "testString"); - assertEquals(credentialDetailsModel.organizationUrl(), "testString"); - assertEquals(credentialDetailsModel.siteCollectionPath(), "testString"); - assertEquals(credentialDetailsModel.clientSecret(), "testString"); - assertEquals(credentialDetailsModel.publicKeyId(), "testString"); - assertEquals(credentialDetailsModel.privateKey(), "testString"); - assertEquals(credentialDetailsModel.passphrase(), "testString"); - assertEquals(credentialDetailsModel.password(), "testString"); - assertEquals(credentialDetailsModel.gatewayId(), "testString"); - assertEquals(credentialDetailsModel.sourceVersion(), "online"); - assertEquals(credentialDetailsModel.webApplicationUrl(), "testString"); - assertEquals(credentialDetailsModel.domain(), "testString"); - assertEquals(credentialDetailsModel.endpoint(), "testString"); - assertEquals(credentialDetailsModel.accessKeyId(), "testString"); - assertEquals(credentialDetailsModel.secretAccessKey(), "testString"); - - StatusDetails statusDetailsModel = - new StatusDetails.Builder().authenticated(true).errorMessage("testString").build(); - assertEquals(statusDetailsModel.authenticated(), Boolean.valueOf(true)); - assertEquals(statusDetailsModel.errorMessage(), "testString"); - - UpdateCredentialsOptions updateCredentialsOptionsModel = - new UpdateCredentialsOptions.Builder() - .environmentId("testString") - .credentialId("testString") - .sourceType("box") - .credentialDetails(credentialDetailsModel) - .status(statusDetailsModel) - .build(); - assertEquals(updateCredentialsOptionsModel.environmentId(), "testString"); - assertEquals(updateCredentialsOptionsModel.credentialId(), "testString"); - assertEquals(updateCredentialsOptionsModel.sourceType(), "box"); - assertEquals(updateCredentialsOptionsModel.credentialDetails(), credentialDetailsModel); - assertEquals(updateCredentialsOptionsModel.status(), statusDetailsModel); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateCredentialsOptionsError() throws Throwable { - new UpdateCredentialsOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptionsTest.java deleted file mode 100644 index 0f5bcbbc4e..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateDocumentOptionsTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateDocumentOptions model. */ -public class UpdateDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateDocumentOptions() throws Throwable { - UpdateDocumentOptions updateDocumentOptionsModel = - new UpdateDocumentOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .documentId("testString") - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/json") - .metadata("testString") - .build(); - assertEquals(updateDocumentOptionsModel.environmentId(), "testString"); - assertEquals(updateDocumentOptionsModel.collectionId(), "testString"); - assertEquals(updateDocumentOptionsModel.documentId(), "testString"); - assertEquals( - IOUtils.toString(updateDocumentOptionsModel.file()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(updateDocumentOptionsModel.filename(), "testString"); - assertEquals(updateDocumentOptionsModel.fileContentType(), "application/json"); - assertEquals(updateDocumentOptionsModel.metadata(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateDocumentOptionsError() throws Throwable { - new UpdateDocumentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptionsTest.java deleted file mode 100644 index b13b98c389..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateEnvironmentOptionsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateEnvironmentOptions model. */ -public class UpdateEnvironmentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateEnvironmentOptions() throws Throwable { - UpdateEnvironmentOptions updateEnvironmentOptionsModel = - new UpdateEnvironmentOptions.Builder() - .environmentId("testString") - .name("testString") - .description("testString") - .size("S") - .build(); - assertEquals(updateEnvironmentOptionsModel.environmentId(), "testString"); - assertEquals(updateEnvironmentOptionsModel.name(), "testString"); - assertEquals(updateEnvironmentOptionsModel.description(), "testString"); - assertEquals(updateEnvironmentOptionsModel.size(), "S"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateEnvironmentOptionsError() throws Throwable { - new UpdateEnvironmentOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptionsTest.java deleted file mode 100644 index 9b847e2bc8..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/UpdateTrainingExampleOptionsTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the UpdateTrainingExampleOptions model. */ -public class UpdateTrainingExampleOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testUpdateTrainingExampleOptions() throws Throwable { - UpdateTrainingExampleOptions updateTrainingExampleOptionsModel = - new UpdateTrainingExampleOptions.Builder() - .environmentId("testString") - .collectionId("testString") - .queryId("testString") - .exampleId("testString") - .crossReference("testString") - .relevance(Long.valueOf("26")) - .build(); - assertEquals(updateTrainingExampleOptionsModel.environmentId(), "testString"); - assertEquals(updateTrainingExampleOptionsModel.collectionId(), "testString"); - assertEquals(updateTrainingExampleOptionsModel.queryId(), "testString"); - assertEquals(updateTrainingExampleOptionsModel.exampleId(), "testString"); - assertEquals(updateTrainingExampleOptionsModel.crossReference(), "testString"); - assertEquals(updateTrainingExampleOptionsModel.relevance(), Long.valueOf("26")); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateTrainingExampleOptionsError() throws Throwable { - new UpdateTrainingExampleOptions.Builder().build(); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordHeadingDetectionTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordHeadingDetectionTest.java deleted file mode 100644 index aa22536e85..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordHeadingDetectionTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the WordHeadingDetection model. */ -public class WordHeadingDetectionTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testWordHeadingDetection() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - String json = TestUtilities.serialize(wordHeadingDetectionModel); - - WordHeadingDetection wordHeadingDetectionModelNew = - TestUtilities.deserialize(json, WordHeadingDetection.class); - assertTrue(wordHeadingDetectionModelNew instanceof WordHeadingDetection); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordSettingsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordSettingsTest.java deleted file mode 100644 index 6a247ada83..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordSettingsTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the WordSettings model. */ -public class WordSettingsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testWordSettings() throws Throwable { - FontSetting fontSettingModel = - new FontSetting.Builder() - .level(Long.valueOf("26")) - .minSize(Long.valueOf("26")) - .maxSize(Long.valueOf("26")) - .bold(true) - .italic(true) - .name("testString") - .build(); - assertEquals(fontSettingModel.level(), Long.valueOf("26")); - assertEquals(fontSettingModel.minSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.maxSize(), Long.valueOf("26")); - assertEquals(fontSettingModel.bold(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.italic(), Boolean.valueOf(true)); - assertEquals(fontSettingModel.name(), "testString"); - - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - WordHeadingDetection wordHeadingDetectionModel = - new WordHeadingDetection.Builder() - .fonts(java.util.Arrays.asList(fontSettingModel)) - .styles(java.util.Arrays.asList(wordStyleModel)) - .build(); - assertEquals(wordHeadingDetectionModel.fonts(), java.util.Arrays.asList(fontSettingModel)); - assertEquals(wordHeadingDetectionModel.styles(), java.util.Arrays.asList(wordStyleModel)); - - WordSettings wordSettingsModel = - new WordSettings.Builder().heading(wordHeadingDetectionModel).build(); - assertEquals(wordSettingsModel.heading(), wordHeadingDetectionModel); - - String json = TestUtilities.serialize(wordSettingsModel); - - WordSettings wordSettingsModelNew = TestUtilities.deserialize(json, WordSettings.class); - assertTrue(wordSettingsModelNew instanceof WordSettings); - assertEquals(wordSettingsModelNew.heading().toString(), wordHeadingDetectionModel.toString()); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordStyleTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordStyleTest.java deleted file mode 100644 index f46738e9f7..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/WordStyleTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the WordStyle model. */ -public class WordStyleTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testWordStyle() throws Throwable { - WordStyle wordStyleModel = - new WordStyle.Builder() - .level(Long.valueOf("26")) - .names(java.util.Arrays.asList("testString")) - .build(); - assertEquals(wordStyleModel.level(), Long.valueOf("26")); - assertEquals(wordStyleModel.names(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(wordStyleModel); - - WordStyle wordStyleModelNew = TestUtilities.deserialize(json, WordStyle.class); - assertTrue(wordStyleModelNew instanceof WordStyle); - assertEquals(wordStyleModelNew.level(), Long.valueOf("26")); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/XPathPatternsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/model/XPathPatternsTest.java deleted file mode 100644 index d852fc2014..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/model/XPathPatternsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.discovery.v1.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.discovery.v1.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the XPathPatterns model. */ -public class XPathPatternsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testXPathPatterns() throws Throwable { - XPathPatterns xPathPatternsModel = - new XPathPatterns.Builder().xpaths(java.util.Arrays.asList("testString")).build(); - assertEquals(xPathPatternsModel.xpaths(), java.util.Arrays.asList("testString")); - - String json = TestUtilities.serialize(xPathPatternsModel); - - XPathPatterns xPathPatternsModelNew = TestUtilities.deserialize(json, XPathPatterns.class); - assertTrue(xPathPatternsModelNew instanceof XPathPatterns); - } -} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/testng.xml b/discovery/src/test/java/com/ibm/watson/discovery/v1/testng.xml deleted file mode 100644 index 59beff0162..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/testng.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/utils/TestUtilities.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/utils/TestUtilities.java deleted file mode 100644 index a944fd256d..0000000000 --- a/discovery/src/test/java/com/ibm/watson/discovery/v1/utils/TestUtilities.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v1.utils; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.cloud.sdk.core.util.GsonSingleton; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import okhttp3.HttpUrl; -import okhttp3.mockwebserver.RecordedRequest; - -/** A class used by the unit tests containing utility functions. */ -public class TestUtilities { - public static Map createMockMap() { - Map mockMap = new HashMap<>(); - mockMap.put("foo", "bar"); - return mockMap; - } - - public static HashMap createMockStreamMap() { - return new HashMap() { - { - put("key1", createMockStream("This is a mock file.")); - } - }; - } - - public static Map parseQueryString(RecordedRequest req) { - Map queryMap = new HashMap<>(); - - try { - HttpUrl requestUrl = req.getRequestUrl(); - - if (requestUrl != null) { - Set queryParamsNames = requestUrl.queryParameterNames(); - // map the parameter name to its corresponding value - for (String p : queryParamsNames) { - // get the corresponding value for the parameter (p) - List val = requestUrl.queryParameterValues(p); - if (val != null && !val.isEmpty()) { - String joinedQuery = String.join(",", val); - queryMap.put(p, joinedQuery); - } - } - } - if (queryMap.isEmpty()) { - return null; - } - } catch (Exception e) { - return null; - } - - return queryMap; - } - - public static String parseReqPath(RecordedRequest req) { - String parsedPath = null; - - try { - String fullPath = req.getPath(); - if (fullPath != null && !fullPath.isEmpty()) { - // retrieve the path segment before the query parameter - parsedPath = fullPath.split("\\?", 2)[0]; - } - if (parsedPath.isEmpty() || parsedPath == null) { - return null; - } - - } catch (Exception e) { - return null; - } - - return parsedPath; - } - - public static String serialize(Object obj) { - return GsonSingleton.getGson().toJson(obj); - } - - public static T deserialize(String json, Class clazz) { - return GsonSingleton.getGson().fromJson(json, clazz); - } - - public static InputStream createMockStream(String s) { - return new ByteArrayInputStream(s.getBytes()); - } - - public static List creatMockListFileWithMetadata() { - List list = new ArrayList(); - byte[] fileBytes = {(byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef}; - InputStream inputStream = new ByteArrayInputStream(fileBytes); - FileWithMetadata.Builder builder = new FileWithMetadata.Builder(); - builder.data(inputStream); - FileWithMetadata fileWithMetadata = builder.build(); - list.add(fileWithMetadata); - - return list; - } - - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); - } - - public static Date createMockDate(String date) throws Exception { - return DateUtils.parseAsDate(date); - } - - public static Date createMockDateTime(String date) throws Exception { - return DateUtils.parseAsDateTime(date); - } -} diff --git a/discovery/src/test/resources/discovery/v1/add_training_example_resp.json b/discovery/src/test/resources/discovery/v1/add_training_example_resp.json deleted file mode 100644 index bc3d3cd680..0000000000 --- a/discovery/src/test/resources/discovery/v1/add_training_example_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "mock_docid", - "relevance": 0 -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/add_training_query_resp.json b/discovery/src/test/resources/discovery/v1/add_training_query_resp.json deleted file mode 100644 index cf268ea13c..0000000000 --- a/discovery/src/test/resources/discovery/v1/add_training_query_resp.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "query_id": "mock_queryid", - "natural_language_query": "Example query", - "examples": [ - { - "document_id": "mock_docid", - "relevance": 0 - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/create_coll_resp.json b/discovery/src/test/resources/discovery/v1/create_coll_resp.json deleted file mode 100644 index 6d811a6ea5..0000000000 --- a/discovery/src/test/resources/discovery/v1/create_coll_resp.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test_collection", - "description": "My test collection for doc", - "created": "2016-12-14T03:20:28.739Z", - "updated": "2016-12-14T03:20:28.739Z", - "status": "available", - "configuration_id": "c84c21d0-ac94-42bf-b619-7d277f325fdc" -} diff --git a/discovery/src/test/resources/discovery/v1/create_conf_resp.json b/discovery/src/test/resources/discovery/v1/create_conf_resp.json deleted file mode 100644 index e5067c7176..0000000000 --- a/discovery/src/test/resources/discovery/v1/create_conf_resp.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "configuration_id": "2e079259-7dd2-40a9-998f-3e716f5a7b88", - "name": "doc-config", - "description": "this is a demo configuration", - "created": "2016-12-14T02:33:34.396Z", - "updated": "2016-12-14T02:33:34.396Z", - "conversions": { - "word": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 23, - "bold": true, - "italic": false - }, - { - "level": 3, - "min_size": 14, - "max_size": 17, - "bold": false, - "italic": false - }, - { - "level": 4, - "min_size": 13, - "max_size": 13, - "bold": true, - "italic": false - } - ], - "styles": [ - { - "level": 1, - "names": [ - "pullout heading", - "pulloutheading", - "header" - ] - }, - { - "level": 2, - "names": [ - "subtitle" - ] - } - ] - } - }, - "pdf": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "max_size": 80 - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": true - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": false, - "italic": false - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": true - }, - { - "level": 4, - "min_size": 11, - "max_size": 13, - "bold": false, - "italic": false - } - ] - } - }, - "html": { - "exclude_tags_completely": [ - "script", - "sup" - ], - "exclude_tags_keep_content": [ - "font", - "em", - "span" - ], - "exclude_content": { - "xpaths": [] - }, - "keep_content": { - "xpaths": [] - }, - "exclude_tag_attributes": [ - "EVENT_ACTIONS" - ] - }, - "json_normalizations": [] - }, - "enrichments": [ - { - "destination_field": "enriched_text", - "source_field": "text", - "enrichment": "alchemy_language", - "options": { - "extract": [ - "keyword", - "entity", - "doc-sentiment", - "taxonomy", - "concept", - "relation" - ], - "sentiment": true, - "quotations": true - } - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/create_doc_resp.json b/discovery/src/test/resources/discovery/v1/create_doc_resp.json deleted file mode 100644 index f89b8a2040..0000000000 --- a/discovery/src/test/resources/discovery/v1/create_doc_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "8691f0dd-7181-45b7-81de-5cb16206b3a1", - "status": "pending" -} diff --git a/discovery/src/test/resources/discovery/v1/create_env_resp.json b/discovery/src/test/resources/discovery/v1/create_env_resp.json deleted file mode 100644 index 5b0109a68d..0000000000 --- a/discovery/src/test/resources/discovery/v1/create_env_resp.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "environment_id": "9e21069a-8bc1-475e-a1d3-2121c49ef060", - "name": "my_environment", - "description": "My Discovery environment", - "created": "2016-12-14T17:32:41.593Z", - "updated": "2016-12-14T17:32:41.593Z", - "status": "pending", - "read_only": false, - "index_capacity": { - "disk_usage": { - "used_bytes": 0, - "total_bytes": 1073741824, - "used": "0 KB", - "total": "1024 MB", - "percent_used": 0 - }, - "memory_usage": { - "used_bytes": 0, - "total_bytes": 0, - "used": "0 KB", - "total": "0 KB", - "percent_used": 0 - } - } -} diff --git a/discovery/src/test/resources/discovery/v1/create_event_resp.json b/discovery/src/test/resources/discovery/v1/create_event_resp.json deleted file mode 100644 index 7d5a3ef391..0000000000 --- a/discovery/src/test/resources/discovery/v1/create_event_resp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "click", - "data": { - "environment_id": "mock_envid", - "session_token": "mock_session_token", - "client_timestamp": "2016-12-14T17:32:41.593Z", - "display_rank": 1, - "collection_id": "mock_collid", - "document_id": "mock_docid", - "query_id": "mock_queryid" - } -} diff --git a/discovery/src/test/resources/discovery/v1/credentials_resp.json b/discovery/src/test/resources/discovery/v1/credentials_resp.json deleted file mode 100644 index 358c4bbd58..0000000000 --- a/discovery/src/test/resources/discovery/v1/credentials_resp.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "credential_id" : "00000d8c-0000-00e8-ba89-0ed5f89f718b", - "source_type" : "salesforce", - "credential_details" : { - "credential_type" : "username_password", - "url" : "login.salesforce.com", - "username" : "user@email.address" - } -} diff --git a/discovery/src/test/resources/discovery/v1/delete_coll_resp.json b/discovery/src/test/resources/discovery/v1/delete_coll_resp.json deleted file mode 100644 index 5a5203844b..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_coll_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "collection_id": "44e29a9a-47e3-4acd-874b-c7cbe04043f1", - "status": "deleted" -} diff --git a/discovery/src/test/resources/discovery/v1/delete_conf_resp.json b/discovery/src/test/resources/discovery/v1/delete_conf_resp.json deleted file mode 100644 index 81d69519c5..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_conf_resp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "configuration_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "status": "deleted", - "notices": [ - { - "notice_id": "configuration_in_use", - "created": "2016-09-28T12:34:00.000Z", - "severity": "warning", - "description": "The configuration was deleted, but it is referenced by one or more collections." - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/delete_credentials_resp.json b/discovery/src/test/resources/discovery/v1/delete_credentials_resp.json deleted file mode 100644 index a585f793f9..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_credentials_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "credential_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "status": "deleted" -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/delete_doc_resp.json b/discovery/src/test/resources/discovery/v1/delete_doc_resp.json deleted file mode 100644 index 6aeba34b3a..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_doc_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "8691f0dd-7181-45b7-81de-5cb16206b3a1", - "status": "deleted" -} diff --git a/discovery/src/test/resources/discovery/v1/delete_env_resp.json b/discovery/src/test/resources/discovery/v1/delete_env_resp.json deleted file mode 100644 index 53df6cea61..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_env_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "environment_id": "{environment_id}", - "status": "deleted" -} diff --git a/discovery/src/test/resources/discovery/v1/delete_gateway_resp.json b/discovery/src/test/resources/discovery/v1/delete_gateway_resp.json deleted file mode 100644 index 05565564d5..0000000000 --- a/discovery/src/test/resources/discovery/v1/delete_gateway_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "gateway_id": "8691f0dd-7181-45b7-81de-5cb16206b3a1", - "status": "deleted" -} diff --git a/discovery/src/test/resources/discovery/v1/expansions_resp.json b/discovery/src/test/resources/discovery/v1/expansions_resp.json deleted file mode 100644 index 3456f883d6..0000000000 --- a/discovery/src/test/resources/discovery/v1/expansions_resp.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "expansions": [ - { - "input_terms": [ - "weekday", - "week day" - ], - "expanded_terms": [ - "monday", - "tuesday", - "wednesday", - "thursday", - "friday" - ] - }, - { - "input_terms": [ - "weekend", - "week end" - ], - "expanded_terms": [ - "saturday", - "sunday" - ] - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/gateway_resp.json b/discovery/src/test/resources/discovery/v1/gateway_resp.json deleted file mode 100644 index 59a8c30844..0000000000 --- a/discovery/src/test/resources/discovery/v1/gateway_resp.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "gateway_id": "gateway_id", - "name": "name", - "status": "connected", - "token": "token", - "token_id": "token_id" -} diff --git a/discovery/src/test/resources/discovery/v1/get_coll1_resp.json b/discovery/src/test/resources/discovery/v1/get_coll1_resp.json deleted file mode 100644 index aa9b74f432..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_coll1_resp.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "collection_id": "44e29a9a-47e3-4acd-874b-c7cbe04043f1", - "name": "test_collection", - "created": "2016-12-14T18:42:25.324Z", - "updated": "2016-12-14T18:42:25.324Z", - "status": "available", - "configuration_id": "e8b9d793-b163-452a-9373-bce07efb510b", - "language": "en_us", - "document_counts": { - "available": 1000, - "processing": 20, - "failed": 180 - } -} diff --git a/discovery/src/test/resources/discovery/v1/get_coll_resp.json b/discovery/src/test/resources/discovery/v1/get_coll_resp.json deleted file mode 100644 index 3428eddeba..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_coll_resp.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "collections": [ - { - "collection_id": "44e29a9a-47e3-4acd-874b-c7cbe04043f1", - "name": "test_collection", - "created": "2016-12-14T18:42:25.324Z", - "updated": "2016-12-14T18:42:25.324Z", - "status": "available", - "configuration_id": "e8b9d793-b163-452a-9373-bce07efb510b", - "language": "en_us" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/get_conf_resp.json b/discovery/src/test/resources/discovery/v1/get_conf_resp.json deleted file mode 100644 index 1c38c4bca7..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_conf_resp.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "configuration_id": "2e079259-7dd2-40a9-998f-3e716f5a7b88", - "name": "doc-config", - "description": "this is a demo configuration", - "created": "2016-11-03T02:33:34.396Z", - "updated": "2016-11-03T02:33:34.396Z", - "conversions": { - "word": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 23, - "bold": true, - "italic": false - }, - { - "level": 3, - "min_size": 14, - "max_size": 17, - "bold": false, - "italic": false - }, - { - "level": 4, - "min_size": 13, - "max_size": 13, - "bold": true, - "italic": false - } - ], - "styles": [ - { - "level": 1, - "names": [ - "pullout heading", - "pulloutheading", - "header" - ] - }, - { - "level": 2, - "names": [ - "subtitle" - ] - } - ] - } - }, - "pdf": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "max_size": 80 - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": true - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": false, - "italic": false - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": true - }, - { - "level": 4, - "min_size": 11, - "max_size": 13, - "bold": false, - "italic": false - } - ] - } - }, - "html": { - "exclude_tags_completely": [ - "script", - "sup" - ], - "exclude_tags_keep_content": [ - "font", - "em", - "span" - ], - "exclude_content": { - "xpaths": [] - }, - "keep_content": { - "xpaths": [] - }, - "exclude_tag_attributes": [ - "EVENT_ACTIONS" - ] - }, - "json_normalizations": [] - }, - "enrichments": [ - { - "destination_field": "enriched_text", - "source_field": "text", - "enrichment": "alchemy_language", - "options": { - "extract": [ - "keyword", - "entity", - "doc-sentiment", - "taxonomy", - "concept", - "relation" - ], - "sentiment": true, - "quotations": true - } - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/get_confs_resp.json b/discovery/src/test/resources/discovery/v1/get_confs_resp.json deleted file mode 100644 index 50083f93f8..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_confs_resp.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "configurations": [ - { - "configuration_id": "210081cb-796f-463d-ab88-a07595f452a9", - "name": "default-config", - "description": "This is a test configuration.", - "created": "2016-11-01T17:47:30.678Z", - "updated": "2016-11-01T17:47:30.678Z" - }, - { - "configuration_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "name": "democonfig", - "description": "this is a demo configuration", - "created": "2016-12-14T18:42:25.324Z", - "updated": "2016-12-14T18:42:25.324Z" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/get_doc_resp.json b/discovery/src/test/resources/discovery/v1/get_doc_resp.json deleted file mode 100644 index 36626fafa3..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_doc_resp.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "document_id": "8691f0dd-7181-45b7-81de-5cb16206b3a1", - "configuration_id": "e8b9d793-b163-452a-9373-bce07efb510b", - "created": "2016-11-02T18:42:25.324Z", - "updated": "2016-11-03T09:02:41.585Z", - "status": "pending", - "notices": [ - { - "notice_id": "index_342", - "severity": "warning", - "step": "indexing", - "description": "DANGER, WILL ROBINSON!" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/get_env_resp.json b/discovery/src/test/resources/discovery/v1/get_env_resp.json deleted file mode 100644 index 65afb76591..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_env_resp.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "environment_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "name": "my_environment", - "description": "My environment", - "created": "2016-12-14T17:32:41.593Z", - "updated": "2016-12-14T17:32:41.593Z", - "status": "resizing", - "index_capacity": { - "disk_usage": { - "used_bytes": 0, - "total_bytes": 1073741824, - "used": "0 KB", - "total": "1024 MB", - "percent_used": 0 - }, - "memory_usage": { - "used_bytes": 140266264, - "total_bytes": 518979584, - "used": "133.77 MB", - "total": "494.94 MB", - "percent_used": 27.03 - } - }, - "requested_size": "LT", - "search_status": { - "scope": "environment", - "status": "TRAINING", - "status_description": "The environment is training.", - "last_trained": "2016-12-14T17:32:41.593Z" - } -} diff --git a/discovery/src/test/resources/discovery/v1/get_envs_resp.json b/discovery/src/test/resources/discovery/v1/get_envs_resp.json deleted file mode 100644 index bd3076b111..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_envs_resp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "environments": [ - { - "environment_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "name": "my_environment", - "description": "My environment", - "created": "2016-12-14T17:32:41.593Z", - "updated": "2016-12-14T17:32:41.593Z", - "status": "available", - "index_capacity": { - "disk_usage": { - "used_bytes": 0, - "total_bytes": 1073741824, - "used": "0 KB", - "total": "1024 MB", - "percent_used": 0 - }, - "memory_usage": { - "used_bytes": 137456520, - "total_bytes": 518979584, - "used": "131.09 MB", - "total": "494.94 MB", - "percent_used": 26.49 - } - } - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/get_training_data_resp.json b/discovery/src/test/resources/discovery/v1/get_training_data_resp.json deleted file mode 100644 index cf268ea13c..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_training_data_resp.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "query_id": "mock_queryid", - "natural_language_query": "Example query", - "examples": [ - { - "document_id": "mock_docid", - "relevance": 0 - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/get_training_example_resp.json b/discovery/src/test/resources/discovery/v1/get_training_example_resp.json deleted file mode 100644 index bc3d3cd680..0000000000 --- a/discovery/src/test/resources/discovery/v1/get_training_example_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "mock_docid", - "relevance": 0 -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/issue517.json b/discovery/src/test/resources/discovery/v1/issue517.json deleted file mode 100644 index 5c4ee81a99..0000000000 --- a/discovery/src/test/resources/discovery/v1/issue517.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "my_config", - "conversions": { - "json_normalizations": [ - { - "operation": "copy", - "source_field": "some_field", - "destination_field": "other_field" - } - ] - } -} diff --git a/discovery/src/test/resources/discovery/v1/issue518.json b/discovery/src/test/resources/discovery/v1/issue518.json deleted file mode 100644 index 2e32c2ac4f..0000000000 --- a/discovery/src/test/resources/discovery/v1/issue518.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "configuration_id": "448e3545-51ca-4530-a03b-6ff282ceac2e", - "name": "IBM News", - "created": "2015-08-24T18:42:25.324Z", - "updated": "2015-08-24T18:42:25.324Z", - "description": "A configuration useful for ingesting IBM press releases.", - "conversions": { - "html": { - "exclude_tags_keep_content": [ - "span" - ], - "exclude_content": { - "xpaths": [ - "/home" - ] - } - }, - "json_normalizations": [ - { - "operation": "move", - "source_field": "extracted_metadata.title", - "destination_field": "metadata.title" - }, - { - "operation": "move", - "source_field": "extracted_metadata.author", - "destination_field": "metadata.author" - }, - { - "operation": "remove", - "source_field": "extracted_metadata" - } - ] - }, - "enrichments": [ - { - "source_field": "text", - "destination_field": "alchemy_enriched_text", - "enrichment": "alchemy_language", - "options": { - "extract": [ - "keyword" - ], - "showSourceText": true - } - }, - { - "source_field": "alchemy_enriched_text.text", - "destination_field": "sire_enriched_text", - "enrichment": "alchemy_language", - "options": { - "extract": [ - "typed-rels" - ], - "model": "ie-en-news" - } - } - ], - "normalizations": [ - { - "operation": "move", - "source_field": "metadata.title", - "destination_field": "title" - }, - { - "operation": "copy", - "source_field": "metadata.author", - "destination_field": "author" - }, - { - "operation": "merge", - "source_field": "alchemy_enriched_text.language", - "destination_field": "language" - }, - { - "operation": "remove", - "source_field": "html" - }, - { - "operation": "remove_nulls" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/list_credentials_resp.json b/discovery/src/test/resources/discovery/v1/list_credentials_resp.json deleted file mode 100644 index 50af9a3800..0000000000 --- a/discovery/src/test/resources/discovery/v1/list_credentials_resp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "credentials" : [ { - "credential_id" : "00000d8c-0000-00e8-ba89-0ed5f89f718b", - "source_type" : "salesforce", - "credential_details" : { - "credential_type" : "username_password", - "url" : "login.salesforce.com", - "username" : "user@email.address" - } - }, { - "credential_id" : "00000d8c-0000-00e8-ba89-0ed5f89f111c", - "source_type" : "box", - "credential_details" : { - "credential_type" : "oauth2", - "client_id" : "1234567899bz7micz6x6p5zfnycw98e3", - "enterprise_id" : "000000001" - } - }, { - "credential_id" : "00000d8c-0000-00e8-ba22-0ed5f89f999d", - "source_type" : "sharepoint", - "credential_details" : { - "credential_type" : "saml", - "organization_url" : "https://site001.sharepointonline.com", - "site_collection_path" : "/sites/TestSite1", - "username" : "userA@sharepointonline.com" - } - } ] -} diff --git a/discovery/src/test/resources/discovery/v1/list_fields_resp.json b/discovery/src/test/resources/discovery/v1/list_fields_resp.json deleted file mode 100644 index 2a34d013a7..0000000000 --- a/discovery/src/test/resources/discovery/v1/list_fields_resp.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fields": [ - { - "field": "field", - "type": "string" - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/list_gateways_resp.json b/discovery/src/test/resources/discovery/v1/list_gateways_resp.json deleted file mode 100644 index 58f2a9a384..0000000000 --- a/discovery/src/test/resources/discovery/v1/list_gateways_resp.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "gateways": [ - { - "gateway_id": "gateway_id_1", - "name": "name", - "status": "connected", - "token": "token", - "token_id": "token_id" - }, - { - "gateway_id": "gateway_id_2", - "name": "name", - "status": "connected", - "token": "token", - "token_id": "token_id" - }, - ] -} diff --git a/discovery/src/test/resources/discovery/v1/list_training_data_resp.json b/discovery/src/test/resources/discovery/v1/list_training_data_resp.json deleted file mode 100644 index 503353e69b..0000000000 --- a/discovery/src/test/resources/discovery/v1/list_training_data_resp.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "environment_id": "mock_envid", - "collection_id": "mock_confid", - "queries": [ - { - "query_id": "mock_queryid", - "natural_language_query": "Example query", - "examples": [ - { - "document_id": "mock_docid", - "relevance": 0 - } - ] - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/list_training_examples_resp.json b/discovery/src/test/resources/discovery/v1/list_training_examples_resp.json deleted file mode 100644 index cdfd587bf6..0000000000 --- a/discovery/src/test/resources/discovery/v1/list_training_examples_resp.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "examples": [ - { - "document_id": "mock_docid", - "relevance": 0, - "cross_reference": "cross_reference" - } - ] -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/listfields_coll_resp.json b/discovery/src/test/resources/discovery/v1/listfields_coll_resp.json deleted file mode 100644 index dc45c39a1b..0000000000 --- a/discovery/src/test/resources/discovery/v1/listfields_coll_resp.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "fields": [ - { - "field": "warnings", - "type": "nested" - }, - { - "field": "warnings.properties.description", - "type": "string" - }, - { - "field": "warnings.properties.phase", - "type": "string" - }, - { - "field": "warnings.properties.warning_id", - "type": "string" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/log_query_resp.json b/discovery/src/test/resources/discovery/v1/log_query_resp.json deleted file mode 100644 index 8d7eb2d5f0..0000000000 --- a/discovery/src/test/resources/discovery/v1/log_query_resp.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "matching_results": 2, - "results": [ - { - "environment_id": "mock_envid", - "customer_id": "", - "natural_language_query": "Who beat Ken Jennings in Jeopardy!", - "document_results": { - "results": [], - "count": 0 - }, - "created_timestamp": "2018-07-16T18:27:26.433", - "query_id": "mock_queryid", - "session_token": "mock_session_token", - "event_type": "query" - }, - { - "environment_id": "mock_envid", - "customer_id": "", - "document_results": { - "results": [ - { - "position": 1, - "document_id": "mock_docid", - "score": 1.0, - "collection_id": "mock_collid" - }, - { - "position": 2, - "document_id": "mock_docid", - "score": 1.0, - "collection_id": "mock_collid" - } - ], - "count": 2 - }, - "created_timestamp": "2018-07-19T11:10:32.243", - "query_id": "mock_queryid", - "session_token": "mock_session_token", - "event_type": "query" - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/metric_resp.json b/discovery/src/test/resources/discovery/v1/metric_resp.json deleted file mode 100644 index 012289e7a4..0000000000 --- a/discovery/src/test/resources/discovery/v1/metric_resp.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "aggregations": [ - { - "interval": "1d", - "event_type": "click", - "results": [ - { - "key_as_string": "2018-08-05T20:00:00.000", - "key": 1533513600000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-06T20:00:00.000", - "key": 1533600000000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-07T20:00:00.000", - "key": 1533686400000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-08T20:00:00.000", - "key": 1533772800000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-09T20:00:00.000", - "key": 1533859200000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-10T20:00:00.000", - "key": 1533945600000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-11T20:00:00.000", - "key": 1534032000000, - "event_rate": 0.0 - }, - { - "key_as_string": "2018-08-12T20:00:00.000", - "key": 1534118400000, - "event_rate": 0.09090909090909091 - } - ] - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/metric_token_resp.json b/discovery/src/test/resources/discovery/v1/metric_token_resp.json deleted file mode 100644 index 19f33e21d8..0000000000 --- a/discovery/src/test/resources/discovery/v1/metric_token_resp.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "aggregations": [ - { - "event_type": "click", - "results": [ - { - "key": "beat", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "in", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "jennings", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "jeopardy", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "ken", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "who", - "matching_results": 117, - "event_rate": 0.0 - }, - { - "key": "watson", - "matching_results": 3, - "event_rate": 0.0 - }, - { - "key": "1", - "matching_results": 2, - "event_rate": 0.5 - }, - { - "key": "field", - "matching_results": 2, - "event_rate": 0.5 - }, - { - "key": "number", - "matching_results": 2, - "event_rate": 0.5 - } - ] - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/passages_test_doc_1.json b/discovery/src/test/resources/discovery/v1/passages_test_doc_1.json deleted file mode 100644 index c065af80ae..0000000000 --- a/discovery/src/test/resources/discovery/v1/passages_test_doc_1.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "text": "Celgene and IBM Watson Health Forge Collaboration Designed to Transform Patient Safety Monitoring\nCelgene Corporation and IBM Watson Health today announced a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions. The new offering will run on the Watson Health Cloud." -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/passages_test_doc_2.json b/discovery/src/test/resources/discovery/v1/passages_test_doc_2.json deleted file mode 100644 index 3dde183fe6..0000000000 --- a/discovery/src/test/resources/discovery/v1/passages_test_doc_2.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "text": "Slack, IBM Partner to Bring Watson to Developers\nIBM and Slack are partnering to bring Watson to Slack’s global community of developers and enterprise users. Drawing on the power of Slack’s digital workplace and the cognitive computing capabilities of Watson, developers will be able to create more offerings — including bots and other conversational inferences — that will transform the platform’s user experience. Developers can easily access the range of Watson services -- such as Conversation, Sentiment Analysis or speech APIs -- and build powerful new tools for the platform with this enhanced cognitive functionality." -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/query1_resp.json b/discovery/src/test/resources/discovery/v1/query1_resp.json deleted file mode 100644 index af8303c505..0000000000 --- a/discovery/src/test/resources/discovery/v1/query1_resp.json +++ /dev/null @@ -1,536 +0,0 @@ -{ - "matching_results": 4, - "results": [ - { - "id": "4f70a05d-6ef2-4a46-be87-380724995af8", - "score": 1, - "extracted_metadata": { - "title": "Celgene and IBM Watson Health Forge Collaboration Designed to Transform Patient Safety Monitoring" - }, - "html": "\n\n Celgene and IBM Watson Health Forge Collaboration Designed to Transform Patient Safety Monitoring\n\n\n\n\n

Published: Tue, 01 Nov 2016 08:32:23 GMT

\n

Celgene Corporation and IBM Watson Health today announced a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions. The new offering will run on the Watson Health Cloud.

\n

URL: http://www.ibm.com/press/us/en/pressrelease/50927.wss

\n\n\n", - "text": "Celgene and IBM Watson Health Forge Collaboration Designed to Transform Patient Safety Monitoring\n\nPublished: Tue, 01 Nov 2016 08:32:23 GMT\n\nCelgene Corporation and IBM Watson Health today announced a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions. The new offering will run on the Watson Health Cloud.\n\nURL: http://www.ibm.com/press/us/en/pressrelease/50927.wss", - "enriched_text": { - "status": "OK", - "language": "english", - "docSentiment": { - "type": "positive", - "score": 0.349018, - "mixed": true - }, - "concepts": [ - { - "text": "Adverse drug reaction", - "relevance": 0.97198, - "knowledgeGraph": { - "typeHierarchy": "/adverse events/adverse drug reaction" - }, - "dbpedia": "http://dbpedia.org/resource/Adverse_drug_reaction", - "freebase": "http://rdf.freebase.com/ns/m.04p93k" - }, - { - "text": "Pharmacovigilance", - "relevance": 0.57362, - "knowledgeGraph": { - "typeHierarchy": "/directors/pharmacovigilance" - }, - "dbpedia": "http://dbpedia.org/resource/Pharmacovigilance", - "freebase": "http://rdf.freebase.com/ns/m.04lmfb" - }, - { - "text": "Thomas J. Watson", - "relevance": 0.507165, - "knowledgeGraph": { - "typeHierarchy": "/people/thomas j. watson" - }, - "dbpedia": "http://dbpedia.org/resource/Thomas_J._Watson", - "freebase": "http://rdf.freebase.com/ns/m.07qkt", - "yago": "http://yago-knowledge.org/resource/Thomas_J._Watson" - }, - { - "text": "Illness", - "relevance": 0.497042, - "knowledgeGraph": { - "typeHierarchy": "/issues/conditions/circumstances/illness" - }, - "dbpedia": "http://dbpedia.org/resource/Illness", - "freebase": "http://rdf.freebase.com/ns/m.01jwdy" - }, - { - "text": "Lotus Software", - "relevance": 0.482834, - "knowledgeGraph": { - "typeHierarchy": "/products/materials/software/lotus software" - }, - "website": "http://www.ibm.com/software/lotus", - "dbpedia": "http://dbpedia.org/resource/Lotus_Software", - "freebase": "http://rdf.freebase.com/ns/m.0q4jd", - "opencyc": "http://sw.opencyc.org/concept/Mx4rvViJIZwpEbGdrcN5Y29ycA", - "yago": "http://yago-knowledge.org/resource/Lotus_Software" - }, - { - "text": "Pharmacology", - "relevance": 0.441008, - "knowledgeGraph": { - "typeHierarchy": "/fields/pharmacology" - }, - "dbpedia": "http://dbpedia.org/resource/Pharmacology", - "freebase": "http://rdf.freebase.com/ns/m.062p_", - "opencyc": "http://sw.opencyc.org/concept/Mx4rwQFiYJwpEbGdrcN5Y29ycA" - }, - { - "text": "Thomas J. Watson Research Center", - "relevance": 0.4094, - "knowledgeGraph": { - "typeHierarchy": "/organizations/research centers/thomas j. watson research center" - }, - "dbpedia": "http://dbpedia.org/resource/Thomas_J._Watson_Research_Center", - "freebase": "http://rdf.freebase.com/ns/m.04zkt5", - "yago": "http://yago-knowledge.org/resource/Thomas_J._Watson_Research_Center" - } - ], - "entities": [ - { - "type": "Company", - "relevance": 0.939431, - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson health" - }, - "sentiment": { - "type": "positive", - "score": 0.394824, - "mixed": false - }, - "count": 1, - "text": "IBM Watson Health" - }, - { - "type": "Facility", - "relevance": 0.936844, - "knowledgeGraph": { - "typeHierarchy": "/people/watson health forge" - }, - "sentiment": { - "type": "positive", - "score": 0.450045, - "mixed": false - }, - "count": 1, - "text": "Watson Health Forge" - }, - { - "type": "Facility", - "relevance": 0.900379, - "knowledgeGraph": { - "typeHierarchy": "/people/watson health cloud" - }, - "sentiment": { - "type": "positive", - "score": 0.793685, - "mixed": false - }, - "count": 1, - "text": "Watson Health Cloud" - }, - { - "type": "Company", - "relevance": 0.847945, - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson" - }, - "sentiment": { - "type": "positive", - "score": 0.394824, - "mixed": false - }, - "count": 1, - "text": "IBM Watson" - }, - { - "type": "JobTitle", - "relevance": 0.688245, - "knowledgeGraph": { - "typeHierarchy": "/issues/patient safety/transform patient safety monitoring" - }, - "sentiment": { - "type": "positive", - "score": 0.450045, - "mixed": false - }, - "count": 1, - "text": "Transform Patient Safety Monitoring" - }, - { - "type": "Company", - "relevance": 0.514877, - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm" - }, - "sentiment": { - "type": "positive", - "score": 0.450045, - "mixed": false - }, - "count": 1, - "text": "IBM", - "disambiguated": { - "subType": [ - "SoftwareLicense", - "OperatingSystemDeveloper", - "ProcessorManufacturer", - "SoftwareDeveloper", - "CompanyFounder", - "ProgrammingLanguageDesigner", - "ProgrammingLanguageDeveloper" - ], - "name": "IBM", - "website": "http://www.ibm.com/", - "dbpedia": "http://dbpedia.org/resource/IBM", - "freebase": "http://rdf.freebase.com/ns/m.03sc8", - "opencyc": "http://sw.opencyc.org/concept/Mx4rvViMoJwpEbGdrcN5Y29ycA", - "yago": "http://yago-knowledge.org/resource/IBM", - "crunchbase": "http://www.crunchbase.com/company/ibm" - } - }, - { - "type": "Company", - "relevance": 0.332536, - "knowledgeGraph": { - "typeHierarchy": "/companies/organizations/celgene corporation" - }, - "sentiment": { - "type": "positive", - "score": 0.394824, - "mixed": false - }, - "count": 1, - "text": "Celgene Corporation", - "disambiguated": { - "subType": [ - "VentureFundedCompany" - ], - "name": "Celgene", - "website": "http://www.celgene.com/", - "dbpedia": "http://dbpedia.org/resource/Celgene", - "freebase": "http://rdf.freebase.com/ns/m.0898kv", - "opencyc": "http://sw.opencyc.org/concept/Mx4rvZdBy5wpEbGdrcN5Y29ycA", - "yago": "http://yago-knowledge.org/resource/Celgene" - } - }, - { - "type": "Person", - "relevance": 0.307186, - "knowledgeGraph": { - "typeHierarchy": "/companies/organizations/celgene" - }, - "sentiment": { - "type": "positive", - "score": 0.450045, - "mixed": false - }, - "count": 1, - "text": "Celgene" - } - ], - "relations": [ - { - "sentence": " Celgene Corporation and IBM Watson Health today announced a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions.", - "subject": { - "text": "Celgene Corporation and IBM Watson Health today", - "entities": [ - { - "type": "Company", - "text": "Celgene Corporation", - "knowledgeGraph": { - "typeHierarchy": "/companies/organizations/celgene corporation" - }, - "disambiguated": { - "subType": [ - "Organization", - "Company", - "VentureFundedCompany" - ], - "name": "Celgene", - "website": "http://www.celgene.com/", - "dbpedia": "http://dbpedia.org/resource/Celgene", - "freebase": "http://rdf.freebase.com/ns/m.0898kv", - "opencyc": "http://sw.opencyc.org/concept/Mx4rvZdBy5wpEbGdrcN5Y29ycA", - "yago": "http://yago-knowledge.org/resource/Celgene" - } - }, - { - "type": "Company", - "text": "IBM Watson Health", - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson health" - } - } - ], - "keywords": [ - { - "text": "IBM Watson Health", - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson health" - } - }, - { - "text": "Celgene Corporation", - "knowledgeGraph": { - "typeHierarchy": "/companies/organizations/celgene corporation" - } - } - ] - }, - "action": { - "text": "announced", - "lemmatized": "announce", - "verb": { - "text": "announce", - "tense": "past" - } - }, - "object": { - "text": "a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions", - "sentiment": { - "type": "positive", - "score": 0.576836, - "mixed": false - }, - "entities": [ - { - "type": "Company", - "text": "IBM Watson", - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson" - } - } - ], - "keywords": [ - { - "text": "adverse drug reactions", - "knowledgeGraph": { - "typeHierarchy": "/adverse events/adverse drug reactions" - } - }, - { - "text": "pharmacovigilance methods", - "knowledgeGraph": { - "typeHierarchy": "/tools/resources/materials/methods/pharmacovigilance methods" - } - }, - { - "text": "IBM Watson", - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson" - } - }, - { - "text": "Patient Safety", - "knowledgeGraph": { - "typeHierarchy": "/issues/patient safety" - } - } - ] - } - }, - { - "sentence": " Celgene Corporation and IBM Watson Health today announced a collaboration to co-develop IBM Watson for Patient Safety, a new offering that aims to enhance pharmacovigilance methods used to collect, assess, monitor, and report adverse drug reactions.", - "subject": { - "text": "a new offering", - "sentiment": { - "type": "positive", - "score": 0.639534, - "mixed": false - }, - "keywords": [ - { - "text": "new offering" - } - ] - }, - "action": { - "text": "aims", - "lemmatized": "aim", - "verb": { - "text": "aim", - "tense": "present" - } - }, - "object": { - "text": "to enhance pharmacovigilance methods used to collect", - "keywords": [ - { - "text": "pharmacovigilance methods", - "knowledgeGraph": { - "typeHierarchy": "/tools/resources/materials/methods/pharmacovigilance methods" - } - } - ] - } - }, - { - "sentence": " The new offering will run on the Watson Health Cloud.", - "subject": { - "text": "The new offering", - "sentiment": { - "type": "positive", - "score": 0.451284, - "mixed": false - }, - "keywords": [ - { - "text": "new offering" - } - ] - }, - "action": { - "text": "will run", - "lemmatized": "will run", - "verb": { - "text": "run", - "tense": "future" - } - }, - "location": { - "text": "on the Watson Health Cloud", - "entities": [ - { - "type": "Facility", - "text": "Watson Health Cloud", - "knowledgeGraph": { - "typeHierarchy": "/people/watson health cloud" - } - } - ] - } - } - ], - "taxonomy": [ - { - "label": "/health and fitness", - "score": 0.613225, - "confident": false - }, - { - "label": "/business and industrial/company/bankruptcy", - "score": 0.413686, - "confident": false - }, - { - "confident": false, - "label": "/technology and computing", - "score": 0.325571 - } - ], - "keywords": [ - { - "knowledgeGraph": { - "typeHierarchy": "/organizations/companies/ibm/ibm watson health" - }, - "relevance": 0.944488, - "sentiment": { - "score": 0.422434, - "type": "positive", - "mixed": false - }, - "text": "IBM Watson Health" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/people/watson health forge" - }, - "relevance": 0.666311, - "sentiment": { - "score": 0.450045, - "type": "positive", - "mixed": false - }, - "text": "Watson Health Forge" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/people/watson health cloud" - }, - "relevance": 0.531944, - "sentiment": { - "score": 0.793685, - "type": "positive", - "mixed": false - }, - "text": "Watson Health Cloud" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/issues/patient safety/transform patient safety" - }, - "relevance": 0.47957, - "sentiment": { - "score": 0.450045, - "type": "positive", - "mixed": false - }, - "text": "Transform Patient Safety" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/adverse events/adverse drug reactions" - }, - "relevance": 0.445181, - "sentiment": { - "type": "neutral", - "mixed": false - }, - "text": "adverse drug reactions" - }, - { - "relevance": 0.400895, - "sentiment": { - "score": 0.644874, - "type": "positive", - "mixed": false - }, - "text": "new offering" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/activities/services/applications/collaboration/collaboration designed" - }, - "relevance": 0.301433, - "sentiment": { - "score": 0.450045, - "type": "positive", - "mixed": false - }, - "text": "Collaboration Designed" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/tools/resources/materials/methods/pharmacovigilance methods" - }, - "relevance": 0.27876, - "sentiment": { - "score": 0.496064, - "type": "positive", - "mixed": false - }, - "text": "pharmacovigilance methods" - }, - { - "knowledgeGraph": { - "typeHierarchy": "/companies/organizations/celgene corporation" - }, - "relevance": 0.220786, - "sentiment": { - "score": 0.394824, - "type": "positive", - "mixed": false - }, - "text": "Celgene Corporation" - } - ] - } - } - ], - "retrieval_details": { - "document_retrieval_strategy": "relevancy_training" - } -} diff --git a/discovery/src/test/resources/discovery/v1/stopwords.txt b/discovery/src/test/resources/discovery/v1/stopwords.txt deleted file mode 100644 index 20089a6d71..0000000000 --- a/discovery/src/test/resources/discovery/v1/stopwords.txt +++ /dev/null @@ -1,35 +0,0 @@ -| US English default stopword list - -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -such -that -the -their -then -there -these -they -this -to -was -will -with diff --git a/discovery/src/test/resources/discovery/v1/test-config.json b/discovery/src/test/resources/discovery/v1/test-config.json deleted file mode 100644 index 120e8b6da2..0000000000 --- a/discovery/src/test/resources/discovery/v1/test-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "watson_developer_cloud_config" -} diff --git a/discovery/src/test/resources/discovery/v1/token_dict_status_resp.json b/discovery/src/test/resources/discovery/v1/token_dict_status_resp.json deleted file mode 100644 index d655560240..0000000000 --- a/discovery/src/test/resources/discovery/v1/token_dict_status_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "status" : "active", - "type" : "tokenization_dictionary" -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/token_dict_status_resp_stopwords.json b/discovery/src/test/resources/discovery/v1/token_dict_status_resp_stopwords.json deleted file mode 100644 index 1d08a5d760..0000000000 --- a/discovery/src/test/resources/discovery/v1/token_dict_status_resp_stopwords.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "status" : "active", - "type" : "stopwords" -} \ No newline at end of file diff --git a/discovery/src/test/resources/discovery/v1/update_conf_resp.json b/discovery/src/test/resources/discovery/v1/update_conf_resp.json deleted file mode 100644 index 97ea6fdfb5..0000000000 --- a/discovery/src/test/resources/discovery/v1/update_conf_resp.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "name": "new-config", - "description": "this is an updated configuration", - "conversions": { - "word": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 23, - "bold": true, - "italic": false - }, - { - "level": 3, - "min_size": 14, - "max_size": 17, - "bold": false, - "italic": false - }, - { - "level": 4, - "min_size": 13, - "max_size": 13, - "bold": true, - "italic": false - } - ], - "styles": [ - { - "level": 1, - "names": [ - "pullout heading", - "pulloutheading", - "header" - ] - }, - { - "level": 2, - "names": [ - "subtitle" - ] - } - ] - } - }, - "pdf": { - "heading": { - "fonts": [ - { - "level": 1, - "min_size": 24, - "max_size": 80 - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": false, - "italic": false - }, - { - "level": 2, - "min_size": 18, - "max_size": 24, - "bold": true - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": false, - "italic": false - }, - { - "level": 3, - "min_size": 13, - "max_size": 18, - "bold": true - }, - { - "level": 4, - "min_size": 11, - "max_size": 13, - "bold": false, - "italic": false - } - ] - } - }, - "html": { - "exclude_tags_completely": [ - "script", - "sup" - ], - "exclude_tags_keep_content": [ - "font", - "em", - "span" - ], - "exclude_content": { - "xpaths": [] - }, - "keep_content": { - "xpaths": [] - }, - "exclude_tag_attributes": [ - "EVENT_ACTIONS" - ] - }, - "json_normalizations": [] - }, - "enrichments": [ - { - "destination_field": "enriched_text", - "source_field": "text", - "enrichment": "alchemy_language", - "options": { - "extract": [ - "keyword", - "entity", - "doc-sentiment", - "taxonomy", - "concept", - "relation" - ], - "sentiment": true, - "quotations": true - } - } - ] -} diff --git a/discovery/src/test/resources/discovery/v1/update_doc_resp.json b/discovery/src/test/resources/discovery/v1/update_doc_resp.json deleted file mode 100644 index bd8a195c28..0000000000 --- a/discovery/src/test/resources/discovery/v1/update_doc_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "8691f0dd-7181-45b7-81de-5cb16206b3a1", - "status": "available" -} diff --git a/discovery/src/test/resources/discovery/v1/update_env_resp.json b/discovery/src/test/resources/discovery/v1/update_env_resp.json deleted file mode 100644 index 7a7f7e9c18..0000000000 --- a/discovery/src/test/resources/discovery/v1/update_env_resp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "environment_id": "9e21069a-8bc1-475e-a1d3-2121c49ef060", - "name": "Andrea_environment", - "description": "Dev environment for Andrea", - "created": "2016-12-13T17:42:23.067Z", - "updated": "2016-12-14T08:22:05.231Z", - "status": "available", - "index_capacity": { - "disk_usage": { - "used_bytes": 0, - "total_bytes": 1073741824, - "used": "0 KB", - "total": "1024 MB", - "percent_used": 0 - }, - "memory_usage": { - "used_bytes": 139035968, - "total_bytes": 518979584, - "used": "132.6 MB", - "total": "494.94 MB", - "percent_used": 26.79 - } - } -} diff --git a/discovery/src/test/resources/discovery/v1/update_training_example_resp.json b/discovery/src/test/resources/discovery/v1/update_training_example_resp.json deleted file mode 100644 index 68a65bd293..0000000000 --- a/discovery/src/test/resources/discovery/v1/update_training_example_resp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "document_id": "mock_docid", - "relevance": 100 -} \ No newline at end of file From a6a62569e4409ea76e296ddd0cf7c05548a56881 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 17 Oct 2024 13:23:47 -0500 Subject: [PATCH 06/12] feat(lt): remove lt and other deprecated resources BREAKING CHANGE: LanguageTranslator functionality has been removed --- .bumpversion.cfg | 2 - .github/workflows/integration-test.yml | 3 - RELEASE.md | 2 +- ibm-watson/pom.xml | 6 - language-translator/README.md | 40 - language-translator/pom.xml | 63 -- .../v3/LanguageTranslator.java | 722 ---------------- .../v3/model/CreateModelOptions.java | 277 ------ .../v3/model/DeleteDocumentOptions.java | 95 -- .../v3/model/DeleteModelOptions.java | 94 -- .../v3/model/DeleteModelResult.java | 34 - .../v3/model/DocumentList.java | 35 - .../v3/model/DocumentStatus.java | 198 ----- .../v3/model/GetDocumentStatusOptions.java | 95 -- .../v3/model/GetModelOptions.java | 94 -- .../model/GetTranslatedDocumentOptions.java | 131 --- .../v3/model/IdentifiableLanguage.java | 46 - .../v3/model/IdentifiableLanguages.java | 35 - .../v3/model/IdentifiedLanguage.java | 46 - .../v3/model/IdentifiedLanguages.java | 35 - .../v3/model/IdentifyOptions.java | 94 -- .../v3/model/Language.java | 149 ---- .../v3/model/Languages.java | 35 - .../v3/model/ListDocumentsOptions.java | 22 - .../ListIdentifiableLanguagesOptions.java | 22 - .../v3/model/ListLanguagesOptions.java | 22 - .../v3/model/ListModelsOptions.java | 139 --- .../v3/model/TranslateDocumentOptions.java | 292 ------- .../v3/model/TranslateOptions.java | 196 ----- .../v3/model/Translation.java | 34 - .../v3/model/TranslationModel.java | 180 ---- .../v3/model/TranslationModels.java | 35 - .../v3/model/TranslationResult.java | 94 -- .../language_translator/v3/package-info.java | 14 - .../language_translator/v3/util/Language.java | 204 ----- .../v3/LanguageTranslatorIT.java | 301 ------- .../v3/LanguageTranslatorTest.java | 813 ------------------ .../v3/model/CreateModelOptionsTest.java | 59 -- .../v3/model/DeleteDocumentOptionsTest.java | 42 - .../v3/model/DeleteModelOptionsTest.java | 42 - .../v3/model/DeleteModelResultTest.java | 36 - .../v3/model/DocumentListTest.java | 36 - .../v3/model/DocumentStatusTest.java | 47 - .../model/GetDocumentStatusOptionsTest.java | 42 - .../v3/model/GetModelOptionsTest.java | 42 - .../GetTranslatedDocumentOptionsTest.java | 46 - .../v3/model/IdentifiableLanguageTest.java | 37 - .../v3/model/IdentifiableLanguagesTest.java | 36 - .../v3/model/IdentifiedLanguageTest.java | 37 - .../v3/model/IdentifiedLanguagesTest.java | 36 - .../v3/model/IdentifyOptionsTest.java | 41 - .../v3/model/LanguageTest.java | 44 - .../v3/model/LanguagesTest.java | 36 - .../v3/model/ListDocumentsOptionsTest.java | 36 - .../ListIdentifiableLanguagesOptionsTest.java | 37 - .../v3/model/ListLanguagesOptionsTest.java | 36 - .../v3/model/ListModelsOptionsTest.java | 43 - .../model/TranslateDocumentOptionsTest.java | 59 -- .../v3/model/TranslateOptionsTest.java | 50 -- .../v3/model/TranslationModelTest.java | 45 - .../v3/model/TranslationModelsTest.java | 36 - .../v3/model/TranslationResultTest.java | 40 - .../v3/model/TranslationTest.java | 36 - .../watson/language_translator/v3/testng.xml | 10 - .../v3/utils/TestUtilities.java | 128 --- .../language_translation/document_status.json | 13 - .../document_to_translate.txt | 2 - .../language_translation/glossary.tmx | 28 - .../identifiable_languages.json | 252 ------ .../identify_response.json | 12 - .../list_documents_response.json | 28 - .../resources/language_translation/model.json | 13 - .../language_translation/models.json | 290 ------- .../multiple_translations.json | 12 - .../single_translation.json | 9 - .../translated_document.txt | 2 - pom.xml | 1 - 77 files changed, 1 insertion(+), 6575 deletions(-) delete mode 100644 language-translator/README.md delete mode 100644 language-translator/pom.xml delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/CreateModelOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelResult.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentList.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentStatus.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetModelOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguage.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguages.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguage.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguages.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifyOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Language.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Languages.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListModelsOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateOptions.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Translation.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModel.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModels.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationResult.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/package-info.java delete mode 100644 language-translator/src/main/java/com/ibm/watson/language_translator/v3/util/Language.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorIT.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/CreateModelOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelResultTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentListTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentStatusTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetModelOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguageTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguagesTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguageTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguagesTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifyOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguageTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguagesTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListModelsOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateOptionsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelsTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationResultTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationTest.java delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/testng.xml delete mode 100644 language-translator/src/test/java/com/ibm/watson/language_translator/v3/utils/TestUtilities.java delete mode 100644 language-translator/src/test/resources/language_translation/document_status.json delete mode 100644 language-translator/src/test/resources/language_translation/document_to_translate.txt delete mode 100644 language-translator/src/test/resources/language_translation/glossary.tmx delete mode 100644 language-translator/src/test/resources/language_translation/identifiable_languages.json delete mode 100644 language-translator/src/test/resources/language_translation/identify_response.json delete mode 100644 language-translator/src/test/resources/language_translation/list_documents_response.json delete mode 100644 language-translator/src/test/resources/language_translation/model.json delete mode 100644 language-translator/src/test/resources/language_translation/models.json delete mode 100644 language-translator/src/test/resources/language_translation/multiple_translations.json delete mode 100644 language-translator/src/test/resources/language_translation/single_translation.json delete mode 100644 language-translator/src/test/resources/language_translation/translated_document.txt diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a988bbb4d5..1b09bcdce3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -11,8 +11,6 @@ replace = {new_version} [bumpversion:file:discovery/README.md] -[bumpversion:file:language-translator/README.md] - [bumpversion:file:natural-language-understanding/README.md] [bumpversion:file:speech-to-text/README.md] diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 0701899640..426617a7ac 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -32,8 +32,6 @@ jobs: # continue-on-error: true env: MVN_ARGS: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' - LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }} - LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com" NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }} NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com" SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }} @@ -54,7 +52,6 @@ jobs: mvn test -Dtest=v1/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS mvn test -Dtest=v2/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS mvn test -Dtest=v2/DiscoveryIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS - mvn test -Dtest=LanguageTranslatorIT -DfailIfNoTests=false -pl language-translator,common $MVN_ARGS mvn test -Dtest=NaturalLanguageUnderstandingIT -DfailIfNoTests=false -pl natural-language-understanding,common $MVN_ARGS mvn test -Dtest=SpeechToTextIT -DfailIfNoTests=false -pl speech-to-text,common $MVN_ARGS mvn test -Dtest=TextToSpeechIT -DfailIfNoTests=false -pl text-to-speech,common $MVN_ARGS diff --git a/RELEASE.md b/RELEASE.md index 4ec7e5ad18..02e3e8a4a0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,7 +17,7 @@ If things **don't** go smoothly, you'll need to follow some other instructions t The most common reason for a release to fail is because of a Travis timeout. Builds are only allowed to run for a maximum of 1 hour, and unfortunately the syncing process between Bintray and Maven Central can be slow enough to go over this time limit sometimes. If this happens, you should do the following: - Navigate to the code on Bintray at [this URL](https://bintray.com/ibm-cloud-sdks/ibm-cloud-sdk-repo). If you're not a member of the ibm-cloud-sdks organization, ask the maintainer of this SDK repo for access. -- Navigate to the "Maven Central" tab in each of the packages that didn't sync. Here's an example: https://bintray.com/ibm-cloud-sdks/ibm-cloud-sdk-repo/com.ibm.watson%3Alanguage-translator#central. You can figure out which packages to sync manually by checking the failed Travis build log or by looking at the "Last Synced" date for the package. +- Navigate to the "Maven Central" tab in each of the packages that didn't sync. Here's an example: https://bintray.com/ibm-cloud-sdks/ibm-cloud-sdk-repo/com.ibm.watson%3Anatural-language-understanding#central. You can figure out which packages to sync manually by checking the failed Travis build log or by looking at the "Last Synced" date for the package. - Click the "Sync" button. If you need to provide Sonatype credentials, you can also ask the maintainer of this SDK repo for those. Bintray sync diff --git a/ibm-watson/pom.xml b/ibm-watson/pom.xml index 86e0a49c65..328f10acb3 100644 --- a/ibm-watson/pom.xml +++ b/ibm-watson/pom.xml @@ -35,12 +35,6 @@ ${project.version} compile - - com.ibm.watson - language-translator - ${project.version} - compile - com.ibm.watson natural-language-understanding diff --git a/language-translator/README.md b/language-translator/README.md deleted file mode 100644 index 47903f71f0..0000000000 --- a/language-translator/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Language Translator - -## Installation - -##### Maven - -```xml - - com.ibm.watson - language-translator - 13.0.0 - -``` - -##### Gradle - -```gradle -'com.ibm.watson:language-translator:13.0.0' -``` - -## Usage - -Select a domain, then identify or select the language of text, and then translate the text from one supported language to another. -Example: Translate 'hello' from English to Spanish using the [Language Translator][language_translator] service. - -```java -Authenticator authenticator = new IamAuthenticator(""); -LanguageTranslator service = new LanguageTranslator("2018-05-01", authenticator); - -TranslateOptions translateOptions = new TranslateOptions.Builder() - .addText("hello") - .source(Language.ENGLISH) - .target(Language.SPANISH) - .build(); -TranslationResult translationResult = service.translate(translateOptions).execute().getResult(); - -System.out.println(translationResult); -``` - -[language_translator]: https://cloud.ibm.com/docs/language-translator?topic=language-translator-about diff --git a/language-translator/pom.xml b/language-translator/pom.xml deleted file mode 100644 index 8a1805f658..0000000000 --- a/language-translator/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - 4.0.0 - - - ibm-watson-parent - com.ibm.watson - 99-SNAPSHOT - ../pom.xml - - - language-translator - jar - IBM Watson Java SDK - Language Translator - - - - com.ibm.cloud - sdk-core - - - ${project.groupId} - common - compile - - - ${project.groupId} - common - test-jar - tests - test - - - org.testng - testng - test - - - com.squareup.okhttp3 - mockwebserver - test - - - org.powermock - powermock-api-mockito2 - test - - - org.powermock - powermock-module-testng - test - - - - - - Watson Developer Experience - watdevex@us.ibm.com - https://www.ibm.com/ - - - diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java deleted file mode 100644 index b9acbe81d2..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java +++ /dev/null @@ -1,722 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -/* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 - */ - -package com.ibm.watson.language_translator.v3; - -import com.google.gson.JsonObject; -import com.ibm.cloud.sdk.core.http.RequestBuilder; -import com.ibm.cloud.sdk.core.http.ResponseConverter; -import com.ibm.cloud.sdk.core.http.ServiceCall; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory; -import com.ibm.cloud.sdk.core.service.BaseService; -import com.ibm.cloud.sdk.core.util.RequestUtils; -import com.ibm.cloud.sdk.core.util.ResponseConverterUtils; -import com.ibm.watson.common.SdkCommon; -import com.ibm.watson.language_translator.v3.model.CreateModelOptions; -import com.ibm.watson.language_translator.v3.model.DeleteDocumentOptions; -import com.ibm.watson.language_translator.v3.model.DeleteModelOptions; -import com.ibm.watson.language_translator.v3.model.DeleteModelResult; -import com.ibm.watson.language_translator.v3.model.DocumentList; -import com.ibm.watson.language_translator.v3.model.DocumentStatus; -import com.ibm.watson.language_translator.v3.model.GetDocumentStatusOptions; -import com.ibm.watson.language_translator.v3.model.GetModelOptions; -import com.ibm.watson.language_translator.v3.model.GetTranslatedDocumentOptions; -import com.ibm.watson.language_translator.v3.model.IdentifiableLanguages; -import com.ibm.watson.language_translator.v3.model.IdentifiedLanguages; -import com.ibm.watson.language_translator.v3.model.IdentifyOptions; -import com.ibm.watson.language_translator.v3.model.Languages; -import com.ibm.watson.language_translator.v3.model.ListDocumentsOptions; -import com.ibm.watson.language_translator.v3.model.ListIdentifiableLanguagesOptions; -import com.ibm.watson.language_translator.v3.model.ListLanguagesOptions; -import com.ibm.watson.language_translator.v3.model.ListModelsOptions; -import com.ibm.watson.language_translator.v3.model.TranslateDocumentOptions; -import com.ibm.watson.language_translator.v3.model.TranslateOptions; -import com.ibm.watson.language_translator.v3.model.TranslationModel; -import com.ibm.watson.language_translator.v3.model.TranslationModels; -import com.ibm.watson.language_translator.v3.model.TranslationResult; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import okhttp3.MultipartBody; - -/** - * IBM&reg; is announcing the deprecation of the Watson&reg; Language Translator service for - * IBM Cloud&reg; in all regions. As of 10 June 2023, the Language Translator tile will be - * removed from the IBM Cloud Platform for new customers; only existing customers will be able to - * access the product. As of 10 June 2024, the service will reach its End of Support date. As of 10 - * December 2024, the service will be withdrawn entirely and will no longer be available to any - * customers.{: deprecated} - * - *

IBM Watson&trade; Language Translator translates text from one language to another. The - * service offers multiple IBM-provided translation models that you can customize based on your - * unique terminology and language. Use Language Translator to take news from across the globe and - * present it in your language, communicate with your customers in their own language, and more. - * - *

API Version: 3.0.0 See: https://cloud.ibm.com/docs/language-translator - */ -public class LanguageTranslator extends BaseService { - - /** Default service name used when configuring the `LanguageTranslator` client. */ - public static final String DEFAULT_SERVICE_NAME = "language_translator"; - - /** Default service endpoint URL. */ - public static final String DEFAULT_SERVICE_URL = - "https://api.us-south.language-translator.watson.cloud.ibm.com"; - - private String version; - - /** - * Constructs an instance of the `LanguageTranslator` client. The default service name is used to - * configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2018-05-01`. - */ - public LanguageTranslator(String version) { - this( - version, - DEFAULT_SERVICE_NAME, - ConfigBasedAuthenticatorFactory.getAuthenticator(DEFAULT_SERVICE_NAME)); - } - - /** - * Constructs an instance of the `LanguageTranslator` client. The default service name and - * specified authenticator are used to configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2018-05-01`. - * @param authenticator the {@link Authenticator} instance to be configured for this client - */ - public LanguageTranslator(String version, Authenticator authenticator) { - this(version, DEFAULT_SERVICE_NAME, authenticator); - } - - /** - * Constructs an instance of the `LanguageTranslator` client. The specified service name is used - * to configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2018-05-01`. - * @param serviceName the service name to be used when configuring the client instance - */ - public LanguageTranslator(String version, String serviceName) { - this(version, serviceName, ConfigBasedAuthenticatorFactory.getAuthenticator(serviceName)); - } - - /** - * Constructs an instance of the `LanguageTranslator` client. The specified service name and - * authenticator are used to configure the client instance. - * - * @param version Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2018-05-01`. - * @param serviceName the service name to be used when configuring the client instance - * @param authenticator the {@link Authenticator} instance to be configured for this client - */ - public LanguageTranslator(String version, String serviceName, Authenticator authenticator) { - super(serviceName, authenticator); - setServiceUrl(DEFAULT_SERVICE_URL); - setVersion(version); - this.configureService(serviceName); - } - - /** - * Gets the version. - * - *

Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. - * The current version is `2018-05-01`. - * - * @return the version - */ - public String getVersion() { - return this.version; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(final String version) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(version, "version cannot be empty."); - this.version = version; - } - - /** - * List supported languages. - * - *

Lists all supported languages for translation. The method returns an array of supported - * languages with information about each language. Languages are listed in alphabetical order by - * language code (for example, `af`, `ar`). In addition to basic information about each language, - * the response indicates whether the language is `supported_as_source` for translation and - * `supported_as_target` for translation. It also lists whether the language is `identifiable`. - * - * @param listLanguagesOptions the {@link ListLanguagesOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link Languages} - */ - public ServiceCall listLanguages(ListLanguagesOptions listLanguagesOptions) { - RequestBuilder builder = - RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/languages")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "listLanguages"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List supported languages. - * - *

Lists all supported languages for translation. The method returns an array of supported - * languages with information about each language. Languages are listed in alphabetical order by - * language code (for example, `af`, `ar`). In addition to basic information about each language, - * the response indicates whether the language is `supported_as_source` for translation and - * `supported_as_target` for translation. It also lists whether the language is `identifiable`. - * - * @return a {@link ServiceCall} with a result of type {@link Languages} - */ - public ServiceCall listLanguages() { - return listLanguages(null); - } - - /** - * Translate. - * - *

Translates the input text from the source language to the target language. Specify a model - * ID that indicates the source and target languages, or specify the source and target languages - * individually. You can omit the source language to have the service attempt to detect the - * language from the input text. If you omit the source language, the request must contain - * sufficient input text for the service to identify the source language. - * - *

You can translate a maximum of 50 KB (51,200 bytes) of text with a single request. All input - * text must be encoded in UTF-8 format. - * - * @param translateOptions the {@link TranslateOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TranslationResult} - */ - public ServiceCall translate(TranslateOptions translateOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - translateOptions, "translateOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/translate")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "translate"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - final JsonObject contentJson = new JsonObject(); - contentJson.add( - "text", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(translateOptions.text())); - if (translateOptions.modelId() != null) { - contentJson.addProperty("model_id", translateOptions.modelId()); - } - if (translateOptions.source() != null) { - contentJson.addProperty("source", translateOptions.source()); - } - if (translateOptions.target() != null) { - contentJson.addProperty("target", translateOptions.target()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List identifiable languages. - * - *

Lists the languages that the service can identify. Returns the language code (for example, - * `en` for English or `es` for Spanish) and name of each language. - * - * @param listIdentifiableLanguagesOptions the {@link ListIdentifiableLanguagesOptions} containing - * the options for the call - * @return a {@link ServiceCall} with a result of type {@link IdentifiableLanguages} - */ - public ServiceCall listIdentifiableLanguages( - ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions) { - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/identifiable_languages")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "listIdentifiableLanguages"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List identifiable languages. - * - *

Lists the languages that the service can identify. Returns the language code (for example, - * `en` for English or `es` for Spanish) and name of each language. - * - * @return a {@link ServiceCall} with a result of type {@link IdentifiableLanguages} - */ - public ServiceCall listIdentifiableLanguages() { - return listIdentifiableLanguages(null); - } - - /** - * Identify language. - * - *

Identifies the language of the input text. - * - * @param identifyOptions the {@link IdentifyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IdentifiedLanguages} - */ - public ServiceCall identify(IdentifyOptions identifyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - identifyOptions, "identifyOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/identify")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "identify"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.bodyContent(identifyOptions.text(), "text/plain"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List models. - * - *

Lists available translation models. - * - * @param listModelsOptions the {@link ListModelsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TranslationModels} - */ - public ServiceCall listModels(ListModelsOptions listModelsOptions) { - if (listModelsOptions == null) { - listModelsOptions = new ListModelsOptions.Builder().build(); - } - RequestBuilder builder = - RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/models")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "listModels"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - if (listModelsOptions.source() != null) { - builder.query("source", String.valueOf(listModelsOptions.source())); - } - if (listModelsOptions.target() != null) { - builder.query("target", String.valueOf(listModelsOptions.target())); - } - if (listModelsOptions.xDefault() != null) { - builder.query("default", String.valueOf(listModelsOptions.xDefault())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List models. - * - *

Lists available translation models. - * - * @return a {@link ServiceCall} with a result of type {@link TranslationModels} - */ - public ServiceCall listModels() { - return listModels(null); - } - - /** - * Create model. - * - *

Uploads training files to customize a translation model. You can customize a model with a - * forced glossary or with a parallel corpus: * Use a *forced glossary* to force certain terms and - * phrases to be translated in a specific way. You can upload only a single forced glossary file - * for a model. The size of a forced glossary file for a custom model is limited to 10 MB. * Use a - * *parallel corpus* when you want your custom model to learn from general translation patterns in - * parallel sentences in your samples. What your model learns from a parallel corpus can improve - * translation results for input text that the model has not been trained on. You can upload - * multiple parallel corpora files with a request. To successfully train with parallel corpora, - * the corpora files must contain a cumulative total of at least 5000 parallel sentences. The - * cumulative size of all uploaded corpus files for a custom model is limited to 250 MB. - * - *

Depending on the type of customization and the size of the uploaded files, training time can - * range from minutes for a glossary to several hours for a large parallel corpus. To create a - * model that is customized with a parallel corpus and a forced glossary, customize the model with - * a parallel corpus first and then customize the resulting model with a forced glossary. - * - *

You can create a maximum of 10 custom models per language pair. For more information about - * customizing a translation model, including the formatting and character restrictions for data - * files, see [Customizing your - * model](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizing). - * - *

#### Supported file formats - * - *

You can provide your training data for customization in the following document formats: * - * **TMX** (`.tmx`) - Translation Memory eXchange (TMX) is an XML specification for the exchange - * of translation memories. * **XLIFF** (`.xliff`) - XML Localization Interchange File Format - * (XLIFF) is an XML specification for the exchange of translation memories. * **CSV** (`.csv`) - - * Comma-separated values (CSV) file with two columns for aligned sentences and phrases. The first - * row must have two language codes. The first column is for the source language code, and the - * second column is for the target language code. * **TSV** (`.tsv` or `.tab`) - Tab-separated - * values (TSV) file with two columns for aligned sentences and phrases. The first row must have - * two language codes. The first column is for the source language code, and the second column is - * for the target language code. * **JSON** (`.json`) - Custom JSON format for specifying aligned - * sentences and phrases. * **Microsoft Excel** (`.xls` or `.xlsx`) - Excel file with the first - * two columns for aligned sentences and phrases. The first row contains the language code. - * - *

You must encode all text data in UTF-8 format. For more information, see [Supported document - * formats for training - * data](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizing#supported-document-formats-for-training-data). - * - *

#### Specifying file formats - * - *

You can indicate the format of a file by including the file extension with the file name. - * Use the file extensions shown in **Supported file formats**. - * - *

Alternatively, you can omit the file extension and specify one of the following - * `content-type` specifications for the file: * **TMX** - `application/x-tmx+xml` * **XLIFF** - - * `application/xliff+xml` * **CSV** - `text/csv` * **TSV** - `text/tab-separated-values` * - * **JSON** - `application/json` * **Microsoft Excel** - - * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` - * - *

For example, with `curl`, use the following `content-type` specification to indicate the - * format of a CSV file named **glossary**: - * - *

`--form "forced_glossary=@glossary;type=text/csv"`. - * - * @param createModelOptions the {@link CreateModelOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TranslationModel} - */ - public ServiceCall createModel(CreateModelOptions createModelOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - createModelOptions, "createModelOptions cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.isTrue( - (createModelOptions.forcedGlossary() != null) - || (createModelOptions.parallelCorpus() != null), - "At least one of forcedGlossary or parallelCorpus must be supplied."); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/models")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "createModel"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("base_model_id", String.valueOf(createModelOptions.baseModelId())); - if (createModelOptions.name() != null) { - builder.query("name", String.valueOf(createModelOptions.name())); - } - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MultipartBody.FORM); - if (createModelOptions.forcedGlossary() != null) { - okhttp3.RequestBody forcedGlossaryBody = - RequestUtils.inputStreamBody( - createModelOptions.forcedGlossary(), createModelOptions.forcedGlossaryContentType()); - multipartBuilder.addFormDataPart("forced_glossary", "filename", forcedGlossaryBody); - } - if (createModelOptions.parallelCorpus() != null) { - okhttp3.RequestBody parallelCorpusBody = - RequestUtils.inputStreamBody( - createModelOptions.parallelCorpus(), createModelOptions.parallelCorpusContentType()); - multipartBuilder.addFormDataPart("parallel_corpus", "filename", parallelCorpusBody); - } - builder.body(multipartBuilder.build()); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete model. - * - *

Deletes a custom translation model. - * - * @param deleteModelOptions the {@link DeleteModelOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DeleteModelResult} - */ - public ServiceCall deleteModel(DeleteModelOptions deleteModelOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteModelOptions, "deleteModelOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("model_id", deleteModelOptions.modelId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v3/models/{model_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "deleteModel"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get model details. - * - *

Gets information about a translation model, including training status for custom models. Use - * this method to poll the status of your customization request. A successfully completed training - * request has a status of `available`. - * - * @param getModelOptions the {@link GetModelOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link TranslationModel} - */ - public ServiceCall getModel(GetModelOptions getModelOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getModelOptions, "getModelOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("model_id", getModelOptions.modelId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v3/models/{model_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "getModel"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List documents. - * - *

Lists documents that have been submitted for translation. - * - * @param listDocumentsOptions the {@link ListDocumentsOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a result of type {@link DocumentList} - */ - public ServiceCall listDocuments(ListDocumentsOptions listDocumentsOptions) { - RequestBuilder builder = - RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/documents")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "listDocuments"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List documents. - * - *

Lists documents that have been submitted for translation. - * - * @return a {@link ServiceCall} with a result of type {@link DocumentList} - */ - public ServiceCall listDocuments() { - return listDocuments(null); - } - - /** - * Translate document. - * - *

Submit a document for translation. You can submit the document contents in the `file` - * parameter, or you can specify a previously submitted document by document ID. The maximum file - * size for document translation is * **2 MB** for service instances on the Lite plan * **20 MB** - * for service instances on the Standard plan * **50 MB** for service instances on the Advanced - * plan * **150 MB** for service instances on the Premium plan - * - *

You can specify the format of the file to be translated in one of two ways: * By specifying - * the appropriate file extension for the format. * By specifying the content type (MIME type) of - * the format as the `type` of the `file` parameter. - * - *

In some cases, especially for subtitle file formats, you must use either the file extension - * or the content type. For more information about all supported file formats, their file - * extensions and content types, and how and when to specify the file extension or content type, - * see [Supported file - * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). - * - *

**Note:** When translating a previously submitted document, the target language must be - * different from the target language of the original request when the document was initially - * submitted. - * - * @param translateDocumentOptions the {@link TranslateDocumentOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DocumentStatus} - */ - public ServiceCall translateDocument( - TranslateDocumentOptions translateDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - translateDocumentOptions, "translateDocumentOptions cannot be null"); - RequestBuilder builder = - RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v3/documents")); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "translateDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MultipartBody.FORM); - okhttp3.RequestBody fileBody = - RequestUtils.inputStreamBody( - translateDocumentOptions.file(), translateDocumentOptions.fileContentType()); - multipartBuilder.addFormDataPart("file", translateDocumentOptions.filename(), fileBody); - if (translateDocumentOptions.modelId() != null) { - multipartBuilder.addFormDataPart("model_id", translateDocumentOptions.modelId()); - } - if (translateDocumentOptions.source() != null) { - multipartBuilder.addFormDataPart("source", translateDocumentOptions.source()); - } - if (translateDocumentOptions.target() != null) { - multipartBuilder.addFormDataPart("target", translateDocumentOptions.target()); - } - if (translateDocumentOptions.documentId() != null) { - multipartBuilder.addFormDataPart("document_id", translateDocumentOptions.documentId()); - } - builder.body(multipartBuilder.build()); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get document status. - * - *

Gets the translation status of a document. - * - * @param getDocumentStatusOptions the {@link GetDocumentStatusOptions} containing the options for - * the call - * @return a {@link ServiceCall} with a result of type {@link DocumentStatus} - */ - public ServiceCall getDocumentStatus( - GetDocumentStatusOptions getDocumentStatusOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getDocumentStatusOptions, "getDocumentStatusOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("document_id", getDocumentStatusOptions.documentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v3/documents/{document_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "getDocumentStatus"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue( - new com.google.gson.reflect.TypeToken() {}.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Delete document. - * - *

Deletes a document. - * - * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the - * call - * @return a {@link ServiceCall} with a void result - */ - public ServiceCall deleteDocument(DeleteDocumentOptions deleteDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - deleteDocumentOptions, "deleteDocumentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("document_id", deleteDocumentOptions.documentId()); - RequestBuilder builder = - RequestBuilder.delete( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v3/documents/{document_id}", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "deleteDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Get translated document. - * - *

Gets the translated document associated with the given document ID. - * - * @param getTranslatedDocumentOptions the {@link GetTranslatedDocumentOptions} containing the - * options for the call - * @return a {@link ServiceCall} with a result of type {@link InputStream} - */ - public ServiceCall getTranslatedDocument( - GetTranslatedDocumentOptions getTranslatedDocumentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - getTranslatedDocumentOptions, "getTranslatedDocumentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("document_id", getTranslatedDocumentOptions.documentId()); - RequestBuilder builder = - RequestBuilder.get( - RequestBuilder.resolveRequestUrl( - getServiceUrl(), "/v3/documents/{document_id}/translated_document", pathParamsMap)); - Map sdkHeaders = - SdkCommon.getSdkHeaders("language_translator", "v3", "getTranslatedDocument"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - if (getTranslatedDocumentOptions.accept() != null) { - builder.header("Accept", getTranslatedDocumentOptions.accept()); - } - builder.query("version", String.valueOf(this.version)); - ResponseConverter responseConverter = ResponseConverterUtils.getInputStream(); - return createServiceCall(builder.build(), responseConverter); - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/CreateModelOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/CreateModelOptions.java deleted file mode 100644 index fab1789835..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/CreateModelOptions.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2018, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** The createModel options. */ -public class CreateModelOptions extends GenericModel { - - protected String baseModelId; - protected InputStream forcedGlossary; - protected String forcedGlossaryContentType; - protected InputStream parallelCorpus; - protected String parallelCorpusContentType; - protected String name; - - /** Builder. */ - public static class Builder { - private String baseModelId; - private InputStream forcedGlossary; - private String forcedGlossaryContentType; - private InputStream parallelCorpus; - private String parallelCorpusContentType; - private String name; - - /** - * Instantiates a new Builder from an existing CreateModelOptions instance. - * - * @param createModelOptions the instance to initialize the Builder with - */ - private Builder(CreateModelOptions createModelOptions) { - this.baseModelId = createModelOptions.baseModelId; - this.forcedGlossary = createModelOptions.forcedGlossary; - this.forcedGlossaryContentType = createModelOptions.forcedGlossaryContentType; - this.parallelCorpus = createModelOptions.parallelCorpus; - this.parallelCorpusContentType = createModelOptions.parallelCorpusContentType; - this.name = createModelOptions.name; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param baseModelId the baseModelId - */ - public Builder(String baseModelId) { - this.baseModelId = baseModelId; - } - - /** - * Builds a CreateModelOptions. - * - * @return the new CreateModelOptions instance - */ - public CreateModelOptions build() { - return new CreateModelOptions(this); - } - - /** - * Set the baseModelId. - * - * @param baseModelId the baseModelId - * @return the CreateModelOptions builder - */ - public Builder baseModelId(String baseModelId) { - this.baseModelId = baseModelId; - return this; - } - - /** - * Set the forcedGlossary. - * - * @param forcedGlossary the forcedGlossary - * @return the CreateModelOptions builder - */ - public Builder forcedGlossary(InputStream forcedGlossary) { - this.forcedGlossary = forcedGlossary; - return this; - } - - /** - * Set the forcedGlossaryContentType. - * - * @param forcedGlossaryContentType the forcedGlossaryContentType - * @return the CreateModelOptions builder - */ - public Builder forcedGlossaryContentType(String forcedGlossaryContentType) { - this.forcedGlossaryContentType = forcedGlossaryContentType; - return this; - } - - /** - * Set the parallelCorpus. - * - * @param parallelCorpus the parallelCorpus - * @return the CreateModelOptions builder - */ - public Builder parallelCorpus(InputStream parallelCorpus) { - this.parallelCorpus = parallelCorpus; - return this; - } - - /** - * Set the parallelCorpusContentType. - * - * @param parallelCorpusContentType the parallelCorpusContentType - * @return the CreateModelOptions builder - */ - public Builder parallelCorpusContentType(String parallelCorpusContentType) { - this.parallelCorpusContentType = parallelCorpusContentType; - return this; - } - - /** - * Set the name. - * - * @param name the name - * @return the CreateModelOptions builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Set the forcedGlossary. - * - * @param forcedGlossary the forcedGlossary - * @return the CreateModelOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder forcedGlossary(File forcedGlossary) throws FileNotFoundException { - this.forcedGlossary = new FileInputStream(forcedGlossary); - return this; - } - - /** - * Set the parallelCorpus. - * - * @param parallelCorpus the parallelCorpus - * @return the CreateModelOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder parallelCorpus(File parallelCorpus) throws FileNotFoundException { - this.parallelCorpus = new FileInputStream(parallelCorpus); - return this; - } - } - - protected CreateModelOptions() {} - - protected CreateModelOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull( - builder.baseModelId, "baseModelId cannot be null"); - baseModelId = builder.baseModelId; - forcedGlossary = builder.forcedGlossary; - forcedGlossaryContentType = builder.forcedGlossaryContentType; - parallelCorpus = builder.parallelCorpus; - parallelCorpusContentType = builder.parallelCorpusContentType; - name = builder.name; - } - - /** - * New builder. - * - * @return a CreateModelOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the baseModelId. - * - *

The ID of the translation model to use as the base for customization. To see available - * models and IDs, use the `List models` method. Most models that are provided with the service - * are customizable. In addition, all models that you create with parallel corpora customization - * can be further customized with a forced glossary. - * - * @return the baseModelId - */ - public String baseModelId() { - return baseModelId; - } - - /** - * Gets the forcedGlossary. - * - *

A file with forced glossary terms for the source and target languages. The customizations in - * the file completely overwrite the domain translation data, including high frequency or high - * confidence phrase translations. - * - *

You can upload only one glossary file for a custom model, and the glossary can have a - * maximum size of 10 MB. A forced glossary must contain single words or short phrases. For more - * information, see **Supported file formats** in the method description. - * - *

*With `curl`, use `--form forced_glossary=@{filename}`.*. - * - * @return the forcedGlossary - */ - public InputStream forcedGlossary() { - return forcedGlossary; - } - - /** - * Gets the forcedGlossaryContentType. - * - *

The content type of forcedGlossary. Values for this parameter can be obtained from the - * HttpMediaType class. - * - * @return the forcedGlossaryContentType - */ - public String forcedGlossaryContentType() { - return forcedGlossaryContentType; - } - - /** - * Gets the parallelCorpus. - * - *

A file with parallel sentences for the source and target languages. You can upload multiple - * parallel corpus files in one request by repeating the parameter. All uploaded parallel corpus - * files combined must contain at least 5000 parallel sentences to train successfully. You can - * provide a maximum of 500,000 parallel sentences across all corpora. - * - *

A single entry in a corpus file can contain a maximum of 80 words. All corpora files for a - * custom model can have a cumulative maximum size of 250 MB. For more information, see - * **Supported file formats** in the method description. - * - *

*With `curl`, use `--form parallel_corpus=@{filename}`.*. - * - * @return the parallelCorpus - */ - public InputStream parallelCorpus() { - return parallelCorpus; - } - - /** - * Gets the parallelCorpusContentType. - * - *

The content type of parallelCorpus. Values for this parameter can be obtained from the - * HttpMediaType class. - * - * @return the parallelCorpusContentType - */ - public String parallelCorpusContentType() { - return parallelCorpusContentType; - } - - /** - * Gets the name. - * - *

An optional model name that you can use to identify the model. Valid characters are letters, - * numbers, dashes, underscores, spaces, and apostrophes. The maximum length of the name is 32 - * characters. - * - * @return the name - */ - public String name() { - return name; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptions.java deleted file mode 100644 index 735194b4b1..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteDocument options. */ -public class DeleteDocumentOptions extends GenericModel { - - protected String documentId; - - /** Builder. */ - public static class Builder { - private String documentId; - - /** - * Instantiates a new Builder from an existing DeleteDocumentOptions instance. - * - * @param deleteDocumentOptions the instance to initialize the Builder with - */ - private Builder(DeleteDocumentOptions deleteDocumentOptions) { - this.documentId = deleteDocumentOptions.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param documentId the documentId - */ - public Builder(String documentId) { - this.documentId = documentId; - } - - /** - * Builds a DeleteDocumentOptions. - * - * @return the new DeleteDocumentOptions instance - */ - public DeleteDocumentOptions build() { - return new DeleteDocumentOptions(this); - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the DeleteDocumentOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - } - - protected DeleteDocumentOptions() {} - - protected DeleteDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a DeleteDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the documentId. - * - *

Document ID of the document to delete. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptions.java deleted file mode 100644 index 33b8bd9605..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptions.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The deleteModel options. */ -public class DeleteModelOptions extends GenericModel { - - protected String modelId; - - /** Builder. */ - public static class Builder { - private String modelId; - - /** - * Instantiates a new Builder from an existing DeleteModelOptions instance. - * - * @param deleteModelOptions the instance to initialize the Builder with - */ - private Builder(DeleteModelOptions deleteModelOptions) { - this.modelId = deleteModelOptions.modelId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param modelId the modelId - */ - public Builder(String modelId) { - this.modelId = modelId; - } - - /** - * Builds a DeleteModelOptions. - * - * @return the new DeleteModelOptions instance - */ - public DeleteModelOptions build() { - return new DeleteModelOptions(this); - } - - /** - * Set the modelId. - * - * @param modelId the modelId - * @return the DeleteModelOptions builder - */ - public Builder modelId(String modelId) { - this.modelId = modelId; - return this; - } - } - - protected DeleteModelOptions() {} - - protected DeleteModelOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.modelId, "modelId cannot be empty"); - modelId = builder.modelId; - } - - /** - * New builder. - * - * @return a DeleteModelOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the modelId. - * - *

Model ID of the model to delete. - * - * @return the modelId - */ - public String modelId() { - return modelId; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelResult.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelResult.java deleted file mode 100644 index aad668d4c5..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelResult.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** DeleteModelResult. */ -public class DeleteModelResult extends GenericModel { - - protected String status; - - protected DeleteModelResult() {} - - /** - * Gets the status. - * - *

"OK" indicates that the model was successfully deleted. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentList.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentList.java deleted file mode 100644 index f1e233a618..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentList.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** DocumentList. */ -public class DocumentList extends GenericModel { - - protected List documents; - - protected DocumentList() {} - - /** - * Gets the documents. - * - *

An array of all previously submitted documents. - * - * @return the documents - */ - public List getDocuments() { - return documents; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentStatus.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentStatus.java deleted file mode 100644 index ef929366d1..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentStatus.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Date; - -/** Document information, including translation status. */ -public class DocumentStatus extends GenericModel { - - /** The status of the translation job associated with a submitted document. */ - public interface Status { - /** processing. */ - String PROCESSING = "processing"; - /** available. */ - String AVAILABLE = "available"; - /** failed. */ - String FAILED = "failed"; - } - - @SerializedName("document_id") - protected String documentId; - - protected String filename; - protected String status; - - @SerializedName("model_id") - protected String modelId; - - @SerializedName("base_model_id") - protected String baseModelId; - - protected String source; - - @SerializedName("detected_language_confidence") - protected Double detectedLanguageConfidence; - - protected String target; - protected Date created; - protected Date completed; - - @SerializedName("word_count") - protected Long wordCount; - - @SerializedName("character_count") - protected Long characterCount; - - protected DocumentStatus() {} - - /** - * Gets the documentId. - * - *

System generated ID identifying a document being translated using one specific translation - * model. - * - * @return the documentId - */ - public String getDocumentId() { - return documentId; - } - - /** - * Gets the filename. - * - *

filename from the submission (if it was missing in the multipart-form, 'noname.<ext - * matching content type>' is used. - * - * @return the filename - */ - public String getFilename() { - return filename; - } - - /** - * Gets the status. - * - *

The status of the translation job associated with a submitted document. - * - * @return the status - */ - public String getStatus() { - return status; - } - - /** - * Gets the modelId. - * - *

A globally unique string that identifies the underlying model that is used for translation. - * - * @return the modelId - */ - public String getModelId() { - return modelId; - } - - /** - * Gets the baseModelId. - * - *

Model ID of the base model that was used to customize the model. If the model is not a - * custom model, this will be absent or an empty string. - * - * @return the baseModelId - */ - public String getBaseModelId() { - return baseModelId; - } - - /** - * Gets the source. - * - *

Translation source language code. - * - * @return the source - */ - public String getSource() { - return source; - } - - /** - * Gets the detectedLanguageConfidence. - * - *

A score between 0 and 1 indicating the confidence of source language detection. A higher - * value indicates greater confidence. This is returned only when the service automatically - * detects the source language. - * - * @return the detectedLanguageConfidence - */ - public Double getDetectedLanguageConfidence() { - return detectedLanguageConfidence; - } - - /** - * Gets the target. - * - *

Translation target language code. - * - * @return the target - */ - public String getTarget() { - return target; - } - - /** - * Gets the created. - * - *

The time when the document was submitted. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Gets the completed. - * - *

The time when the translation completed. - * - * @return the completed - */ - public Date getCompleted() { - return completed; - } - - /** - * Gets the wordCount. - * - *

An estimate of the number of words in the source document. Returned only if `status` is - * `available`. - * - * @return the wordCount - */ - public Long getWordCount() { - return wordCount; - } - - /** - * Gets the characterCount. - * - *

The number of characters in the source document, present only if status=available. - * - * @return the characterCount - */ - public Long getCharacterCount() { - return characterCount; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptions.java deleted file mode 100644 index 28a18bf4bb..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getDocumentStatus options. */ -public class GetDocumentStatusOptions extends GenericModel { - - protected String documentId; - - /** Builder. */ - public static class Builder { - private String documentId; - - /** - * Instantiates a new Builder from an existing GetDocumentStatusOptions instance. - * - * @param getDocumentStatusOptions the instance to initialize the Builder with - */ - private Builder(GetDocumentStatusOptions getDocumentStatusOptions) { - this.documentId = getDocumentStatusOptions.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param documentId the documentId - */ - public Builder(String documentId) { - this.documentId = documentId; - } - - /** - * Builds a GetDocumentStatusOptions. - * - * @return the new GetDocumentStatusOptions instance - */ - public GetDocumentStatusOptions build() { - return new GetDocumentStatusOptions(this); - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the GetDocumentStatusOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - } - - protected GetDocumentStatusOptions() {} - - protected GetDocumentStatusOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a GetDocumentStatusOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the documentId. - * - *

The document ID of the document. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetModelOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetModelOptions.java deleted file mode 100644 index c29a416744..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetModelOptions.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getModel options. */ -public class GetModelOptions extends GenericModel { - - protected String modelId; - - /** Builder. */ - public static class Builder { - private String modelId; - - /** - * Instantiates a new Builder from an existing GetModelOptions instance. - * - * @param getModelOptions the instance to initialize the Builder with - */ - private Builder(GetModelOptions getModelOptions) { - this.modelId = getModelOptions.modelId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param modelId the modelId - */ - public Builder(String modelId) { - this.modelId = modelId; - } - - /** - * Builds a GetModelOptions. - * - * @return the new GetModelOptions instance - */ - public GetModelOptions build() { - return new GetModelOptions(this); - } - - /** - * Set the modelId. - * - * @param modelId the modelId - * @return the GetModelOptions builder - */ - public Builder modelId(String modelId) { - this.modelId = modelId; - return this; - } - } - - protected GetModelOptions() {} - - protected GetModelOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.modelId, "modelId cannot be empty"); - modelId = builder.modelId; - } - - /** - * New builder. - * - * @return a GetModelOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the modelId. - * - *

Model ID of the model to get. - * - * @return the modelId - */ - public String modelId() { - return modelId; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptions.java deleted file mode 100644 index 30606bcb9e..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptions.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The getTranslatedDocument options. */ -public class GetTranslatedDocumentOptions extends GenericModel { - - protected String documentId; - protected String accept; - - /** Builder. */ - public static class Builder { - private String documentId; - private String accept; - - /** - * Instantiates a new Builder from an existing GetTranslatedDocumentOptions instance. - * - * @param getTranslatedDocumentOptions the instance to initialize the Builder with - */ - private Builder(GetTranslatedDocumentOptions getTranslatedDocumentOptions) { - this.documentId = getTranslatedDocumentOptions.documentId; - this.accept = getTranslatedDocumentOptions.accept; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param documentId the documentId - */ - public Builder(String documentId) { - this.documentId = documentId; - } - - /** - * Builds a GetTranslatedDocumentOptions. - * - * @return the new GetTranslatedDocumentOptions instance - */ - public GetTranslatedDocumentOptions build() { - return new GetTranslatedDocumentOptions(this); - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the GetTranslatedDocumentOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Set the accept. - * - * @param accept the accept - * @return the GetTranslatedDocumentOptions builder - */ - public Builder accept(String accept) { - this.accept = accept; - return this; - } - } - - protected GetTranslatedDocumentOptions() {} - - protected GetTranslatedDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notEmpty( - builder.documentId, "documentId cannot be empty"); - documentId = builder.documentId; - accept = builder.accept; - } - - /** - * New builder. - * - * @return a GetTranslatedDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the documentId. - * - *

The document ID of the document that was submitted for translation. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } - - /** - * Gets the accept. - * - *

The type of the response: application/powerpoint, application/mspowerpoint, - * application/x-rtf, application/json, application/xml, application/vnd.ms-excel, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, - * application/vnd.ms-powerpoint, - * application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document, - * application/vnd.oasis.opendocument.spreadsheet, - * application/vnd.oasis.opendocument.presentation, application/vnd.oasis.opendocument.text, - * application/pdf, application/rtf, text/html, text/json, text/plain, text/richtext, text/rtf, or - * text/xml. A character encoding can be specified by including a `charset` parameter. For - * example, 'text/html;charset=utf-8'. - * - * @return the accept - */ - public String accept() { - return accept; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguage.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguage.java deleted file mode 100644 index dfc54ef184..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguage.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** IdentifiableLanguage. */ -public class IdentifiableLanguage extends GenericModel { - - protected String language; - protected String name; - - protected IdentifiableLanguage() {} - - /** - * Gets the language. - * - *

The language code for an identifiable language. - * - * @return the language - */ - public String getLanguage() { - return language; - } - - /** - * Gets the name. - * - *

The name of the identifiable language. - * - * @return the name - */ - public String getName() { - return name; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguages.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguages.java deleted file mode 100644 index 53199ac63d..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguages.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** IdentifiableLanguages. */ -public class IdentifiableLanguages extends GenericModel { - - protected List languages; - - protected IdentifiableLanguages() {} - - /** - * Gets the languages. - * - *

A list of all languages that the service can identify. - * - * @return the languages - */ - public List getLanguages() { - return languages; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguage.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguage.java deleted file mode 100644 index cdf44f13fd..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguage.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** IdentifiedLanguage. */ -public class IdentifiedLanguage extends GenericModel { - - protected String language; - protected Double confidence; - - protected IdentifiedLanguage() {} - - /** - * Gets the language. - * - *

The language code for an identified language. - * - * @return the language - */ - public String getLanguage() { - return language; - } - - /** - * Gets the confidence. - * - *

The confidence score for the identified language. - * - * @return the confidence - */ - public Double getConfidence() { - return confidence; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguages.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguages.java deleted file mode 100644 index da41f7e4a7..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguages.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** IdentifiedLanguages. */ -public class IdentifiedLanguages extends GenericModel { - - protected List languages; - - protected IdentifiedLanguages() {} - - /** - * Gets the languages. - * - *

A ranking of identified languages with confidence scores. - * - * @return the languages - */ - public List getLanguages() { - return languages; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifyOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifyOptions.java deleted file mode 100644 index a766036f9e..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/IdentifyOptions.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The identify options. */ -public class IdentifyOptions extends GenericModel { - - protected String text; - - /** Builder. */ - public static class Builder { - private String text; - - /** - * Instantiates a new Builder from an existing IdentifyOptions instance. - * - * @param identifyOptions the instance to initialize the Builder with - */ - private Builder(IdentifyOptions identifyOptions) { - this.text = identifyOptions.text; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param text the text - */ - public Builder(String text) { - this.text = text; - } - - /** - * Builds a IdentifyOptions. - * - * @return the new IdentifyOptions instance - */ - public IdentifyOptions build() { - return new IdentifyOptions(this); - } - - /** - * Set the text. - * - * @param text the text - * @return the IdentifyOptions builder - */ - public Builder text(String text) { - this.text = text; - return this; - } - } - - protected IdentifyOptions() {} - - protected IdentifyOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text, "text cannot be null"); - text = builder.text; - } - - /** - * New builder. - * - * @return a IdentifyOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the text. - * - *

Input text in UTF-8 format. - * - * @return the text - */ - public String text() { - return text; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Language.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Language.java deleted file mode 100644 index c2874d5026..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Language.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Response payload for languages. */ -public class Language extends GenericModel { - - protected String language; - - @SerializedName("language_name") - protected String languageName; - - @SerializedName("native_language_name") - protected String nativeLanguageName; - - @SerializedName("country_code") - protected String countryCode; - - @SerializedName("words_separated") - protected Boolean wordsSeparated; - - protected String direction; - - @SerializedName("supported_as_source") - protected Boolean supportedAsSource; - - @SerializedName("supported_as_target") - protected Boolean supportedAsTarget; - - protected Boolean identifiable; - - protected Language() {} - - /** - * Gets the language. - * - *

The language code for the language (for example, `af`). - * - * @return the language - */ - public String getLanguage() { - return language; - } - - /** - * Gets the languageName. - * - *

The name of the language in English (for example, `Afrikaans`). - * - * @return the languageName - */ - public String getLanguageName() { - return languageName; - } - - /** - * Gets the nativeLanguageName. - * - *

The native name of the language (for example, `Afrikaans`). - * - * @return the nativeLanguageName - */ - public String getNativeLanguageName() { - return nativeLanguageName; - } - - /** - * Gets the countryCode. - * - *

The country code for the language (for example, `ZA` for South Africa). - * - * @return the countryCode - */ - public String getCountryCode() { - return countryCode; - } - - /** - * Gets the wordsSeparated. - * - *

Indicates whether words of the language are separated by whitespace: `true` if the words are - * separated; `false` otherwise. - * - * @return the wordsSeparated - */ - public Boolean isWordsSeparated() { - return wordsSeparated; - } - - /** - * Gets the direction. - * - *

Indicates the direction of the language: `right_to_left` or `left_to_right`. - * - * @return the direction - */ - public String getDirection() { - return direction; - } - - /** - * Gets the supportedAsSource. - * - *

Indicates whether the language can be used as the source for translation: `true` if the - * language can be used as the source; `false` otherwise. - * - * @return the supportedAsSource - */ - public Boolean isSupportedAsSource() { - return supportedAsSource; - } - - /** - * Gets the supportedAsTarget. - * - *

Indicates whether the language can be used as the target for translation: `true` if the - * language can be used as the target; `false` otherwise. - * - * @return the supportedAsTarget - */ - public Boolean isSupportedAsTarget() { - return supportedAsTarget; - } - - /** - * Gets the identifiable. - * - *

Indicates whether the language supports automatic detection: `true` if the language can be - * detected automatically; `false` otherwise. - * - * @return the identifiable - */ - public Boolean isIdentifiable() { - return identifiable; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Languages.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Languages.java deleted file mode 100644 index d1c5f2746d..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Languages.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** The response type for listing supported languages. */ -public class Languages extends GenericModel { - - protected List languages; - - protected Languages() {} - - /** - * Gets the languages. - * - *

An array of supported languages with information about each language. - * - * @return the languages - */ - public List getLanguages() { - return languages; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptions.java deleted file mode 100644 index 7129f9b780..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptions.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listDocuments options. */ -public class ListDocumentsOptions extends GenericModel { - - /** Construct a new instance of ListDocumentsOptions. */ - public ListDocumentsOptions() {} -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptions.java deleted file mode 100644 index 23d7ed51d4..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptions.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listIdentifiableLanguages options. */ -public class ListIdentifiableLanguagesOptions extends GenericModel { - - /** Construct a new instance of ListIdentifiableLanguagesOptions. */ - public ListIdentifiableLanguagesOptions() {} -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptions.java deleted file mode 100644 index 80def04b53..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptions.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listLanguages options. */ -public class ListLanguagesOptions extends GenericModel { - - /** Construct a new instance of ListLanguagesOptions. */ - public ListLanguagesOptions() {} -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListModelsOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListModelsOptions.java deleted file mode 100644 index 841c643409..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/ListModelsOptions.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** The listModels options. */ -public class ListModelsOptions extends GenericModel { - - protected String source; - protected String target; - protected Boolean xDefault; - - /** Builder. */ - public static class Builder { - private String source; - private String target; - private Boolean xDefault; - - /** - * Instantiates a new Builder from an existing ListModelsOptions instance. - * - * @param listModelsOptions the instance to initialize the Builder with - */ - private Builder(ListModelsOptions listModelsOptions) { - this.source = listModelsOptions.source; - this.target = listModelsOptions.target; - this.xDefault = listModelsOptions.xDefault; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a ListModelsOptions. - * - * @return the new ListModelsOptions instance - */ - public ListModelsOptions build() { - return new ListModelsOptions(this); - } - - /** - * Set the source. - * - * @param source the source - * @return the ListModelsOptions builder - */ - public Builder source(String source) { - this.source = source; - return this; - } - - /** - * Set the target. - * - * @param target the target - * @return the ListModelsOptions builder - */ - public Builder target(String target) { - this.target = target; - return this; - } - - /** - * Set the xDefault. - * - * @param xDefault the xDefault - * @return the ListModelsOptions builder - */ - public Builder xDefault(Boolean xDefault) { - this.xDefault = xDefault; - return this; - } - } - - protected ListModelsOptions() {} - - protected ListModelsOptions(Builder builder) { - source = builder.source; - target = builder.target; - xDefault = builder.xDefault; - } - - /** - * New builder. - * - * @return a ListModelsOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the source. - * - *

Specify a language code to filter results by source language. - * - * @return the source - */ - public String source() { - return source; - } - - /** - * Gets the target. - * - *

Specify a language code to filter results by target language. - * - * @return the target - */ - public String target() { - return target; - } - - /** - * Gets the xDefault. - * - *

If the `default` parameter isn't specified, the service returns all models (default and - * non-default) for each language pair. To return only default models, set this parameter to - * `true`. To return only non-default models, set this parameter to `false`. There is exactly one - * default model, the IBM-provided base model, per language pair. - * - * @return the xDefault - */ - public Boolean xDefault() { - return xDefault; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptions.java deleted file mode 100644 index 9072adf9ca..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptions.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** The translateDocument options. */ -public class TranslateDocumentOptions extends GenericModel { - - protected InputStream file; - protected String filename; - protected String fileContentType; - protected String modelId; - protected String source; - protected String target; - protected String documentId; - - /** Builder. */ - public static class Builder { - private InputStream file; - private String filename; - private String fileContentType; - private String modelId; - private String source; - private String target; - private String documentId; - - /** - * Instantiates a new Builder from an existing TranslateDocumentOptions instance. - * - * @param translateDocumentOptions the instance to initialize the Builder with - */ - private Builder(TranslateDocumentOptions translateDocumentOptions) { - this.file = translateDocumentOptions.file; - this.filename = translateDocumentOptions.filename; - this.fileContentType = translateDocumentOptions.fileContentType; - this.modelId = translateDocumentOptions.modelId; - this.source = translateDocumentOptions.source; - this.target = translateDocumentOptions.target; - this.documentId = translateDocumentOptions.documentId; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param file the file - * @param filename the filename - */ - public Builder(InputStream file, String filename) { - this.file = file; - this.filename = filename; - } - - /** - * Builds a TranslateDocumentOptions. - * - * @return the new TranslateDocumentOptions instance - */ - public TranslateDocumentOptions build() { - return new TranslateDocumentOptions(this); - } - - /** - * Set the file. - * - * @param file the file - * @return the TranslateDocumentOptions builder - */ - public Builder file(InputStream file) { - this.file = file; - return this; - } - - /** - * Set the filename. - * - * @param filename the filename - * @return the TranslateDocumentOptions builder - */ - public Builder filename(String filename) { - this.filename = filename; - return this; - } - - /** - * Set the fileContentType. - * - * @param fileContentType the fileContentType - * @return the TranslateDocumentOptions builder - */ - public Builder fileContentType(String fileContentType) { - this.fileContentType = fileContentType; - return this; - } - - /** - * Set the modelId. - * - * @param modelId the modelId - * @return the TranslateDocumentOptions builder - */ - public Builder modelId(String modelId) { - this.modelId = modelId; - return this; - } - - /** - * Set the source. - * - * @param source the source - * @return the TranslateDocumentOptions builder - */ - public Builder source(String source) { - this.source = source; - return this; - } - - /** - * Set the target. - * - * @param target the target - * @return the TranslateDocumentOptions builder - */ - public Builder target(String target) { - this.target = target; - return this; - } - - /** - * Set the documentId. - * - * @param documentId the documentId - * @return the TranslateDocumentOptions builder - */ - public Builder documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Set the file. - * - * @param file the file - * @return the TranslateDocumentOptions builder - * @throws FileNotFoundException if the file could not be found - */ - public Builder file(File file) throws FileNotFoundException { - this.file = new FileInputStream(file); - this.filename = file.getName(); - return this; - } - } - - protected TranslateDocumentOptions() {} - - protected TranslateDocumentOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.file, "file cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.filename, "filename cannot be null"); - file = builder.file; - filename = builder.filename; - fileContentType = builder.fileContentType; - modelId = builder.modelId; - source = builder.source; - target = builder.target; - documentId = builder.documentId; - } - - /** - * New builder. - * - * @return a TranslateDocumentOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the file. - * - *

The contents of the source file to translate. The maximum file size for document translation - * is * **2 MB** for service instances on the Lite plan * **20 MB** for service instances on the - * Standard plan * **50 MB** for service instances on the Advanced plan * **150 MB** for service - * instances on the Premium plan - * - *

You can specify the format of the file to be translated in one of two ways: * By specifying - * the appropriate file extension for the format. * By specifying the content type (MIME type) of - * the format as the `type` of the `file` parameter. - * - *

In some cases, especially for subtitle file formats, you must use either the file extension - * or the content type. - * - *

For more information about all supported file formats, their file extensions and content - * types, and how and when to specify the file extension or content type, see [Supported file - * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). - * - * @return the file - */ - public InputStream file() { - return file; - } - - /** - * Gets the filename. - * - *

The filename for file. - * - * @return the filename - */ - public String filename() { - return filename; - } - - /** - * Gets the fileContentType. - * - *

The content type of file. Values for this parameter can be obtained from the HttpMediaType - * class. - * - * @return the fileContentType - */ - public String fileContentType() { - return fileContentType; - } - - /** - * Gets the modelId. - * - *

The model to use for translation. For example, `en-de` selects the IBM-provided base model - * for English-to-German translation. A model ID overrides the `source` and `target` parameters - * and is required if you use a custom model. If no model ID is specified, you must specify at - * least a target language. - * - * @return the modelId - */ - public String modelId() { - return modelId; - } - - /** - * Gets the source. - * - *

Language code that specifies the language of the source document. If omitted, the service - * derives the source language from the input text. The input must contain sufficient text for the - * service to identify the language reliably. - * - * @return the source - */ - public String source() { - return source; - } - - /** - * Gets the target. - * - *

Language code that specifies the target language for translation. Required if model ID is - * not specified. - * - * @return the target - */ - public String target() { - return target; - } - - /** - * Gets the documentId. - * - *

To use a previously submitted document as the source for a new translation, enter the - * `document_id` of the document. - * - * @return the documentId - */ - public String documentId() { - return documentId; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateOptions.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateOptions.java deleted file mode 100644 index c599d7dd73..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslateOptions.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.ArrayList; -import java.util.List; - -/** The translate options. */ -public class TranslateOptions extends GenericModel { - - protected List text; - protected String modelId; - protected String source; - protected String target; - - /** Builder. */ - public static class Builder { - private List text; - private String modelId; - private String source; - private String target; - - /** - * Instantiates a new Builder from an existing TranslateOptions instance. - * - * @param translateOptions the instance to initialize the Builder with - */ - private Builder(TranslateOptions translateOptions) { - this.text = translateOptions.text; - this.modelId = translateOptions.modelId; - this.source = translateOptions.source; - this.target = translateOptions.target; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Instantiates a new builder with required properties. - * - * @param text the text - */ - public Builder(List text) { - this.text = text; - } - - /** - * Builds a TranslateOptions. - * - * @return the new TranslateOptions instance - */ - public TranslateOptions build() { - return new TranslateOptions(this); - } - - /** - * Adds a new element to text. - * - * @param text the new element to be added - * @return the TranslateOptions builder - */ - public Builder addText(String text) { - com.ibm.cloud.sdk.core.util.Validator.notNull(text, "text cannot be null"); - if (this.text == null) { - this.text = new ArrayList(); - } - this.text.add(text); - return this; - } - - /** - * Set the text. Existing text will be replaced. - * - * @param text the text - * @return the TranslateOptions builder - */ - public Builder text(List text) { - this.text = text; - return this; - } - - /** - * Set the modelId. - * - * @param modelId the modelId - * @return the TranslateOptions builder - */ - public Builder modelId(String modelId) { - this.modelId = modelId; - return this; - } - - /** - * Set the source. - * - * @param source the source - * @return the TranslateOptions builder - */ - public Builder source(String source) { - this.source = source; - return this; - } - - /** - * Set the target. - * - * @param target the target - * @return the TranslateOptions builder - */ - public Builder target(String target) { - this.target = target; - return this; - } - } - - protected TranslateOptions() {} - - protected TranslateOptions(Builder builder) { - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text, "text cannot be null"); - text = builder.text; - modelId = builder.modelId; - source = builder.source; - target = builder.target; - } - - /** - * New builder. - * - * @return a TranslateOptions builder - */ - public Builder newBuilder() { - return new Builder(this); - } - - /** - * Gets the text. - * - *

Input text in UTF-8 encoding. Submit a maximum of 50 KB (51,200 bytes) of text with a single - * request. Multiple elements result in multiple translations in the response. - * - * @return the text - */ - public List text() { - return text; - } - - /** - * Gets the modelId. - * - *

The model to use for translation. For example, `en-de` selects the IBM-provided base model - * for English-to-German translation. A model ID overrides the `source` and `target` parameters - * and is required if you use a custom model. If no model ID is specified, you must specify at - * least a target language. - * - * @return the modelId - */ - public String modelId() { - return modelId; - } - - /** - * Gets the source. - * - *

Language code that specifies the language of the input text. If omitted, the service derives - * the source language from the input text. The input must contain sufficient text for the service - * to identify the language reliably. - * - * @return the source - */ - public String source() { - return source; - } - - /** - * Gets the target. - * - *

Language code that specifies the target language for translation. Required if model ID is - * not specified. - * - * @return the target - */ - public String target() { - return target; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Translation.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Translation.java deleted file mode 100644 index aacf250cfe..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/Translation.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Translation. */ -public class Translation extends GenericModel { - - protected String translation; - - protected Translation() {} - - /** - * Gets the translation. - * - *

Translation output in UTF-8. - * - * @return the translation - */ - public String getTranslation() { - return translation; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModel.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModel.java deleted file mode 100644 index b8f6295b18..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModel.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2016, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** Response payload for models. */ -public class TranslationModel extends GenericModel { - - /** Availability of a model. */ - public interface Status { - /** uploading. */ - String UPLOADING = "uploading"; - /** uploaded. */ - String UPLOADED = "uploaded"; - /** dispatching. */ - String DISPATCHING = "dispatching"; - /** queued. */ - String QUEUED = "queued"; - /** training. */ - String TRAINING = "training"; - /** trained. */ - String TRAINED = "trained"; - /** publishing. */ - String PUBLISHING = "publishing"; - /** available. */ - String AVAILABLE = "available"; - /** deleted. */ - String DELETED = "deleted"; - /** error. */ - String ERROR = "error"; - } - - @SerializedName("model_id") - protected String modelId; - - protected String name; - protected String source; - protected String target; - - @SerializedName("base_model_id") - protected String baseModelId; - - protected String domain; - protected Boolean customizable; - - @SerializedName("default_model") - protected Boolean defaultModel; - - protected String owner; - protected String status; - - protected TranslationModel() {} - - /** - * Gets the modelId. - * - *

A globally unique string that identifies the underlying model that is used for translation. - * - * @return the modelId - */ - public String getModelId() { - return modelId; - } - - /** - * Gets the name. - * - *

Optional name that can be specified when the model is created. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the source. - * - *

Translation source language code. - * - * @return the source - */ - public String getSource() { - return source; - } - - /** - * Gets the target. - * - *

Translation target language code. - * - * @return the target - */ - public String getTarget() { - return target; - } - - /** - * Gets the baseModelId. - * - *

Model ID of the base model that was used to customize the model. If the model is not a - * custom model, this will be an empty string. - * - * @return the baseModelId - */ - public String getBaseModelId() { - return baseModelId; - } - - /** - * Gets the domain. - * - *

The domain of the translation model. - * - * @return the domain - */ - public String getDomain() { - return domain; - } - - /** - * Gets the customizable. - * - *

Whether this model can be used as a base for customization. Customized models are not - * further customizable, and some base models are not customizable. - * - * @return the customizable - */ - public Boolean isCustomizable() { - return customizable; - } - - /** - * Gets the defaultModel. - * - *

Whether or not the model is a default model. A default model is the model for a given - * language pair that will be used when that language pair is specified in the source and target - * parameters. - * - * @return the defaultModel - */ - public Boolean isDefaultModel() { - return defaultModel; - } - - /** - * Gets the owner. - * - *

Either an empty string, indicating the model is not a custom model, or the ID of the service - * instance that created the model. - * - * @return the owner - */ - public String getOwner() { - return owner; - } - - /** - * Gets the status. - * - *

Availability of a model. - * - * @return the status - */ - public String getStatus() { - return status; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModels.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModels.java deleted file mode 100644 index f72206c049..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationModels.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** The response type for listing existing translation models. */ -public class TranslationModels extends GenericModel { - - protected List models; - - protected TranslationModels() {} - - /** - * Gets the models. - * - *

An array of available models. - * - * @return the models - */ - public List getModels() { - return models; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationResult.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationResult.java deleted file mode 100644 index e6caed531d..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/TranslationResult.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2016, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** TranslationResult. */ -public class TranslationResult extends GenericModel { - - @SerializedName("word_count") - protected Long wordCount; - - @SerializedName("character_count") - protected Long characterCount; - - @SerializedName("detected_language") - protected String detectedLanguage; - - @SerializedName("detected_language_confidence") - protected Double detectedLanguageConfidence; - - protected List translations; - - protected TranslationResult() {} - - /** - * Gets the wordCount. - * - *

An estimate of the number of words in the input text. - * - * @return the wordCount - */ - public Long getWordCount() { - return wordCount; - } - - /** - * Gets the characterCount. - * - *

Number of characters in the input text. - * - * @return the characterCount - */ - public Long getCharacterCount() { - return characterCount; - } - - /** - * Gets the detectedLanguage. - * - *

The language code of the source text if the source language was automatically detected. - * - * @return the detectedLanguage - */ - public String getDetectedLanguage() { - return detectedLanguage; - } - - /** - * Gets the detectedLanguageConfidence. - * - *

A score between 0 and 1 indicating the confidence of source language detection. A higher - * value indicates greater confidence. This is returned only when the service automatically - * detects the source language. - * - * @return the detectedLanguageConfidence - */ - public Double getDetectedLanguageConfidence() { - return detectedLanguageConfidence; - } - - /** - * Gets the translations. - * - *

List of translation output in UTF-8, corresponding to the input text entries. - * - * @return the translations - */ - public List getTranslations() { - return translations; - } -} diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/package-info.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/package-info.java deleted file mode 100644 index e7520c0f03..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -/** Language Translator v3. */ -package com.ibm.watson.language_translator.v3; diff --git a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/util/Language.java b/language-translator/src/main/java/com/ibm/watson/language_translator/v3/util/Language.java deleted file mode 100644 index 6142fa18d1..0000000000 --- a/language-translator/src/main/java/com/ibm/watson/language_translator/v3/util/Language.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2017, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.util; - -import com.ibm.watson.language_translator.v3.LanguageTranslator; - -/** The languages available in {@link LanguageTranslator}. */ -public interface Language { - /** Afrikaans. */ - String AFRIKAANS = "af"; - - /** Arabic. */ - String ARABIC = "ar"; - - /** Azerbaijani. */ - String AZERBAIJANI = "az"; - - /** Bashkir. */ - String BASHKIR = "ba"; - - /** Belarusian. */ - String BELARUSIAN = "be"; - - /** Bulgarian. */ - String BULGARIAN = "bg"; - - /** Bengali. */ - String BENGALI = "bn"; - - /** Bosnian. */ - String BOSNIAN = "bs"; - - /** Czech. */ - String CZECH = "cs"; - - /** Chuvash. */ - String CHUVASH = "cv"; - - /** Danish. */ - String DANISH = "da"; - - /** German. */ - String GERMAN = "de"; - - /** Greek. */ - String GREEK = "el"; - - /** English. */ - String ENGLISH = "en"; - - /** Esperanto. */ - String ESPERANTO = "eo"; - - /** Spanish. */ - String SPANISH = "es"; - - /** Estonian. */ - String ESTONIAN = "et"; - - /** Basque. */ - String BASQUE = "eu"; - - /** Persian. */ - String PERSIAN = "fa"; - - /** Finnish. */ - String FINNISH = "fi"; - - /** French. */ - String FRENCH = "fr"; - - /** Gujarati. */ - String GUJARATI = "gu"; - - /** Hebrew. */ - String HEBREW = "he"; - - /** Hindi. */ - String HINDI = "hi"; - - /** Haitian. */ - String HAITIAN = "ht"; - - /** Hungarian. */ - String HUNGARIAN = "hu"; - - /** Armenian. */ - String ARMENIAN = "hy"; - - /** Indonesian. */ - String INDONESIAN = "id"; - - /** Icelandic. */ - String ICELANDIC = "is"; - - /** Italian. */ - String ITALIAN = "it"; - - /** Japanese. */ - String JAPANESE = "ja"; - - /** Georgian. */ - String GEORGIAN = "ka"; - - /** Kazakh. */ - String KAZAKH = "kk"; - - /** Central Khmer. */ - String CENTRAL_KHMER = "km"; - - /** Korean. */ - String KOREAN = "ko"; - - /** Kurdish. */ - String KURDISH = "ku"; - - /** Kirghiz. */ - String KIRGHIZ = "ky"; - - /** Lithuanian. */ - String LITHUANIAN = "lt"; - - /** Latvian. */ - String LATVIAN = "lv"; - - /** Malayalam. */ - String MALAYALAM = "ml"; - - /** Mongolian. */ - String MONGOLIAN = "mn"; - - /** Norwegian Bokmal. */ - String NORWEGIAN_BOKMAL = "nb"; - - /** Dutch. */ - String DUTCH = "nl"; - - /** Norwegian Nynorsk. */ - String NORWEGIAN_NYNORSK = "nn"; - - /** Panjabi. */ - String PANJABI = "pa"; - - /** Polish. */ - String POLISH = "pl"; - - /** Pushto. */ - String PUSHTO = "ps"; - - /** Portuguese. */ - String PORTUGUESE = "pt"; - - /** Romanian. */ - String ROMANIAN = "ro"; - - /** Russian. */ - String RUSSIAN = "ru"; - - /** Slovakian. */ - String SLOVAKIAN = "sk"; - - /** Somali. */ - String SOMALI = "so"; - - /** Albanian. */ - String ALBANIAN = "sq"; - - /** Swedish. */ - String SWEDISH = "sv"; - - /** Tamil. */ - String TAMIL = "ta"; - - /** Telugu. */ - String TELUGU = "te"; - - /** Turkish. */ - String TURKISH = "tr"; - - /** Ukrainian. */ - String UKRAINIAN = "uk"; - - /** Urdu. */ - String URDU = "ur"; - - /** Vietnamese. */ - String VIETNAMESE = "vi"; - - /** Chinese. */ - String CHINESE = "zh"; - - /** Traditional Chinese. */ - String TRADITIONAL_CHINESE = "zh-TW"; -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorIT.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorIT.java deleted file mode 100644 index 8b8d32a1a0..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorIT.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.ibm.cloud.sdk.core.http.HttpMediaType; -import com.ibm.cloud.sdk.core.http.Response; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.IamAuthenticator; -import com.ibm.cloud.sdk.core.service.exception.TooManyRequestsException; -import com.ibm.watson.common.WatsonHttpHeaders; -import com.ibm.watson.common.WatsonServiceTest; -import com.ibm.watson.language_translator.v3.model.*; -import com.ibm.watson.language_translator.v3.util.Language; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -/** Language Translator integration test. */ -public class LanguageTranslatorIT extends WatsonServiceTest { - - private static final String ENGLISH_TO_SPANISH = "en-es"; - - private LanguageTranslator service; - - private final Map translations = - new HashMap() { - { - put("The IBM Watson team is awesome", "El equipo de IBM Watson es impresionante"); - put("Welcome to the cognitive era", "Bienvenido a la era cognitiva"); - } - }; - private final List texts = new ArrayList<>(translations.keySet()); - - /** - * Sets up the tests. - * - * @throws Exception the exception - */ - /* - * (non-Javadoc) - * @see com.ibm.watson.developercloud.WatsonServiceTest#setUp() - */ - @Override - @Before - public void setUp() throws Exception { - super.setUp(); - String iamApiKey = System.getenv("LANGUAGE_TRANSLATOR_APIKEY"); - String serviceUrl = System.getenv("LANGUAGE_TRANSLATOR_URL"); - - if (iamApiKey == null) { - iamApiKey = getProperty("language_translator.apikey"); - serviceUrl = getProperty("language_translator.url"); - } - - assertNotNull( - "LANGUAGE_TRANSLATOR_APIKEY is not defined and config.properties doesn't have valid credentials.", - iamApiKey); - - Authenticator authenticator = new IamAuthenticator(iamApiKey); - service = new LanguageTranslator("2018-05-01", authenticator); - service.setServiceUrl(serviceUrl); - - // issue currently where document translation fails with learning opt-out - Map headers = new HashMap<>(); - headers.put(WatsonHttpHeaders.X_WATSON_TEST, "1"); - service.setDefaultHeaders(headers); - } - - /** - * Test README. - * - * @throws InterruptedException the interrupted exception - * @throws IOException Signals that an I/O exception has occurred. - */ - @Test - public void testReadme() throws InterruptedException, IOException { - TranslateOptions translateOptions = - new TranslateOptions.Builder() - .addText("hello") - .source(Language.ENGLISH) - .target(Language.SPANISH) - .build(); - Response translationResult = service.translate(translateOptions).execute(); - - System.out.println(translationResult); - } - - /** Test Get Identifiable languages. */ - @Test - public void testGetIdentifiableLanguages() { - List languages = - service.listIdentifiableLanguages().execute().getResult().getLanguages(); - assertNotNull(languages); - assertTrue(!languages.isEmpty()); - } - - /** Test Get model by id. */ - @Test - public void testGetModel() { - GetModelOptions getOptions = new GetModelOptions.Builder(ENGLISH_TO_SPANISH).build(); - try { - final Response model = service.getModel(getOptions).execute(); - assertNotNull(model); - } catch (TooManyRequestsException e) { - // The service seems to have a very strict rate limit. Failing this way is okay. - } - } - - /** Test List Models. */ - @Test - public void testListModels() { - try { - List models = service.listModels(null).execute().getResult().getModels(); - - assertNotNull(models); - assertFalse(models.isEmpty()); - } catch (TooManyRequestsException e) { - // The service seems to have a very strict rate limit. Failing this way is okay. - } - } - - /** Test List Models with Options. */ - @Test - public void testListModelsWithOptions() { - try { - ListModelsOptions options = - new ListModelsOptions.Builder().source("en").target("es").xDefault(true).build(); - List models = service.listModels(options).execute().getResult().getModels(); - - assertNotNull(models); - assertFalse(models.isEmpty()); - assertEquals(models.get(0).getSource(), options.source()); - assertEquals(models.get(0).getTarget(), options.target()); - } catch (TooManyRequestsException e) { - // The service seems to have a very strict rate limit. Failing this way is okay. - } - } - - /** Test Identify. */ - @Test - public void testIdentify() { - - IdentifyOptions options = new IdentifyOptions.Builder(texts.get(0)).build(); - List identifiedLanguages = - service.identify(options).execute().getResult().getLanguages(); - assertNotNull(identifiedLanguages); - assertFalse(identifiedLanguages.isEmpty()); - } - - /** Test translate. */ - @Test - public void testTranslate() { - for (String text : texts) { - TranslateOptions options = - new TranslateOptions.Builder().addText(text).modelId(ENGLISH_TO_SPANISH).build(); - testTranslationResult( - text, translations.get(text), service.translate(options).execute().getResult()); - TranslateOptions options1 = - new TranslateOptions.Builder() - .addText(text) - .source(Language.ENGLISH) - .target(Language.SPANISH) - .build(); - testTranslationResult( - text, translations.get(text), service.translate(options1).execute().getResult()); - } - } - - /** Test translate multiple. */ - @Test - public void testTranslateMultiple() { - TranslateOptions options = - new TranslateOptions.Builder(texts).modelId(ENGLISH_TO_SPANISH).build(); - TranslationResult results = service.translate(options).execute().getResult(); - assertEquals(2, results.getTranslations().size()); - assertEquals(translations.get(texts.get(0)), results.getTranslations().get(0).getTranslation()); - assertEquals(translations.get(texts.get(1)), results.getTranslations().get(1).getTranslation()); - - TranslateOptions.Builder builder = new TranslateOptions.Builder(); - builder.source(Language.ENGLISH).target(Language.SPANISH); - for (String text : texts) { - builder.addText(text); - } - results = service.translate(builder.build()).execute().getResult(); - assertEquals(2, results.getTranslations().size()); - assertEquals(translations.get(texts.get(0)), results.getTranslations().get(0).getTranslation()); - assertEquals(translations.get(texts.get(1)), results.getTranslations().get(1).getTranslation()); - } - - /** Test delete all models. */ - @Test - @Ignore - public void testDeleteAllModels() { - List models = service.listModels(null).execute().getResult().getModels(); - for (TranslationModel translationModel : models) { - DeleteModelOptions options = - new DeleteModelOptions.Builder(translationModel.getModelId()).build(); - service.deleteModel(options).execute(); - } - } - - /** - * Test document translation. - * - * @throws FileNotFoundException the file not found exception - * @throws InterruptedException the interrupted exception - */ - @Test - public void testDocumentTranslation() throws FileNotFoundException, InterruptedException { - DocumentList listResponse = service.listDocuments().execute().getResult(); - int originalDocumentCount = listResponse.getDocuments().size(); - - TranslateDocumentOptions translateOptions = - new TranslateDocumentOptions.Builder() - .file(new File("src/test/resources/language_translation/document_to_translate.txt")) - .fileContentType(HttpMediaType.TEXT_PLAIN) - .source("en") - .target("es") - .build(); - DocumentStatus translateResponse = - service.translateDocument(translateOptions).execute().getResult(); - String documentId = translateResponse.getDocumentId(); - - try { - GetDocumentStatusOptions getOptions = - new GetDocumentStatusOptions.Builder().documentId(documentId).build(); - DocumentStatus getResponse = service.getDocumentStatus(getOptions).execute().getResult(); - while (!getResponse.getStatus().equals(DocumentStatus.Status.AVAILABLE)) { - Thread.sleep(3000); - getResponse = service.getDocumentStatus(getOptions).execute().getResult(); - } - - GetTranslatedDocumentOptions getTranslatedDocumentOptions = - new GetTranslatedDocumentOptions.Builder() - .documentId(documentId) - .accept(HttpMediaType.TEXT_PLAIN) - .build(); - InputStream getTranslatedDocumentResponse = - service.getTranslatedDocument(getTranslatedDocumentOptions).execute().getResult(); - assertNotNull(getTranslatedDocumentResponse); - - listResponse = service.listDocuments().execute().getResult(); - assertTrue(listResponse.getDocuments().size() > originalDocumentCount); - } finally { - DeleteDocumentOptions deleteOptions = - new DeleteDocumentOptions.Builder().documentId(documentId).build(); - service.deleteDocument(deleteOptions).execute().getResult(); - } - } - - /** - * Test translation result. - * - * @param text the text - * @param result the result - * @param translationResult the translation result - */ - private void testTranslationResult( - String text, String result, TranslationResult translationResult) { - assertNotNull(translationResult); - assertEquals(translationResult.getCharacterCount().intValue(), text.length()); - assertEquals(translationResult.getWordCount().intValue(), text.split(" ").length); - assertNotNull(translationResult.getTranslations()); - assertNotNull(translationResult.getTranslations().get(0).getTranslation()); - assertEquals(result, translationResult.getTranslations().get(0).getTranslation()); - } - - /** Test List Languages. */ - @Test - public void testListLanguages_Success() { - ListLanguagesOptions listLanguagesOptions = new ListLanguagesOptions(); - Languages response = service.listLanguages(listLanguagesOptions).execute().getResult(); - - assertNotNull(response); - assertNotNull(response.getLanguages()); - assertTrue(response.getLanguages().size() > 0); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorTest.java deleted file mode 100644 index dc954cd295..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorTest.java +++ /dev/null @@ -1,813 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.http.Response; -import com.ibm.cloud.sdk.core.security.Authenticator; -import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.model.CreateModelOptions; -import com.ibm.watson.language_translator.v3.model.DeleteDocumentOptions; -import com.ibm.watson.language_translator.v3.model.DeleteModelOptions; -import com.ibm.watson.language_translator.v3.model.DeleteModelResult; -import com.ibm.watson.language_translator.v3.model.DocumentList; -import com.ibm.watson.language_translator.v3.model.DocumentStatus; -import com.ibm.watson.language_translator.v3.model.GetDocumentStatusOptions; -import com.ibm.watson.language_translator.v3.model.GetModelOptions; -import com.ibm.watson.language_translator.v3.model.GetTranslatedDocumentOptions; -import com.ibm.watson.language_translator.v3.model.IdentifiableLanguages; -import com.ibm.watson.language_translator.v3.model.IdentifiedLanguages; -import com.ibm.watson.language_translator.v3.model.IdentifyOptions; -import com.ibm.watson.language_translator.v3.model.Languages; -import com.ibm.watson.language_translator.v3.model.ListDocumentsOptions; -import com.ibm.watson.language_translator.v3.model.ListIdentifiableLanguagesOptions; -import com.ibm.watson.language_translator.v3.model.ListLanguagesOptions; -import com.ibm.watson.language_translator.v3.model.ListModelsOptions; -import com.ibm.watson.language_translator.v3.model.TranslateDocumentOptions; -import com.ibm.watson.language_translator.v3.model.TranslateOptions; -import com.ibm.watson.language_translator.v3.model.TranslationModel; -import com.ibm.watson.language_translator.v3.model.TranslationModels; -import com.ibm.watson.language_translator.v3.model.TranslationResult; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.MockWebServer; -import okhttp3.mockwebserver.RecordedRequest; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -/** Unit test class for the LanguageTranslator service. */ -public class LanguageTranslatorTest { - - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - protected MockWebServer server; - protected LanguageTranslator languageTranslatorService; - - // Construct the service with a null authenticator (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testConstructorWithNullAuthenticator() throws Throwable { - final String serviceName = "testService"; - // Set mock values for global params - String version = "2018-05-01"; - new LanguageTranslator(version, serviceName, null); - } - - // Test the getter for the version global parameter - @Test - public void testGetVersion() throws Throwable { - assertEquals(languageTranslatorService.getVersion(), "2018-05-01"); - } - - // Test the listLanguages operation with a valid options model parameter - @Test - public void testListLanguagesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"languages\": [{\"language\": \"language\", \"language_name\": \"languageName\", \"native_language_name\": \"nativeLanguageName\", \"country_code\": \"countryCode\", \"words_separated\": true, \"direction\": \"direction\", \"supported_as_source\": false, \"supported_as_target\": false, \"identifiable\": true}]}"; - String listLanguagesPath = "/v3/languages"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListLanguagesOptions model - ListLanguagesOptions listLanguagesOptionsModel = new ListLanguagesOptions(); - - // Invoke listLanguages() with a valid options model and verify the result - Response response = - languageTranslatorService.listLanguages(listLanguagesOptionsModel).execute(); - assertNotNull(response); - Languages responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLanguagesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the listLanguages operation with and without retries enabled - @Test - public void testListLanguagesWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testListLanguagesWOptions(); - - languageTranslatorService.disableRetries(); - testListLanguagesWOptions(); - } - - // Test the translate operation with a valid options model parameter - @Test - public void testTranslateWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"word_count\": 9, \"character_count\": 14, \"detected_language\": \"detectedLanguage\", \"detected_language_confidence\": 0, \"translations\": [{\"translation\": \"translation\"}]}"; - String translatePath = "/v3/translate"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the TranslateOptions model - TranslateOptions translateOptionsModel = - new TranslateOptions.Builder() - .text(java.util.Arrays.asList("testString")) - .modelId("testString") - .source("testString") - .target("testString") - .build(); - - // Invoke translate() with a valid options model and verify the result - Response response = - languageTranslatorService.translate(translateOptionsModel).execute(); - assertNotNull(response); - TranslationResult responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, translatePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the translate operation with and without retries enabled - @Test - public void testTranslateWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testTranslateWOptions(); - - languageTranslatorService.disableRetries(); - testTranslateWOptions(); - } - - // Test the translate operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTranslateNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.translate(null).execute(); - } - - // Test the listIdentifiableLanguages operation with a valid options model parameter - @Test - public void testListIdentifiableLanguagesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"languages\": [{\"language\": \"language\", \"name\": \"name\"}]}"; - String listIdentifiableLanguagesPath = "/v3/identifiable_languages"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListIdentifiableLanguagesOptions model - ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptionsModel = - new ListIdentifiableLanguagesOptions(); - - // Invoke listIdentifiableLanguages() with a valid options model and verify the result - Response response = - languageTranslatorService - .listIdentifiableLanguages(listIdentifiableLanguagesOptionsModel) - .execute(); - assertNotNull(response); - IdentifiableLanguages responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listIdentifiableLanguagesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the listIdentifiableLanguages operation with and without retries enabled - @Test - public void testListIdentifiableLanguagesWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testListIdentifiableLanguagesWOptions(); - - languageTranslatorService.disableRetries(); - testListIdentifiableLanguagesWOptions(); - } - - // Test the identify operation with a valid options model parameter - @Test - public void testIdentifyWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"languages\": [{\"language\": \"language\", \"confidence\": 0}]}"; - String identifyPath = "/v3/identify"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the IdentifyOptions model - IdentifyOptions identifyOptionsModel = new IdentifyOptions.Builder().text("testString").build(); - - // Invoke identify() with a valid options model and verify the result - Response response = - languageTranslatorService.identify(identifyOptionsModel).execute(); - assertNotNull(response); - IdentifiedLanguages responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, identifyPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the identify operation with and without retries enabled - @Test - public void testIdentifyWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testIdentifyWOptions(); - - languageTranslatorService.disableRetries(); - testIdentifyWOptions(); - } - - // Test the identify operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testIdentifyNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.identify(null).execute(); - } - - // Test the listModels operation with a valid options model parameter - @Test - public void testListModelsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"models\": [{\"model_id\": \"modelId\", \"name\": \"name\", \"source\": \"source\", \"target\": \"target\", \"base_model_id\": \"baseModelId\", \"domain\": \"domain\", \"customizable\": true, \"default_model\": true, \"owner\": \"owner\", \"status\": \"uploading\"}]}"; - String listModelsPath = "/v3/models"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListModelsOptions model - ListModelsOptions listModelsOptionsModel = - new ListModelsOptions.Builder() - .source("testString") - .target("testString") - .xDefault(true) - .build(); - - // Invoke listModels() with a valid options model and verify the result - Response response = - languageTranslatorService.listModels(listModelsOptionsModel).execute(); - assertNotNull(response); - TranslationModels responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listModelsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - assertEquals(query.get("source"), "testString"); - assertEquals(query.get("target"), "testString"); - assertEquals(Boolean.valueOf(query.get("default")), Boolean.valueOf(true)); - } - - // Test the listModels operation with and without retries enabled - @Test - public void testListModelsWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testListModelsWOptions(); - - languageTranslatorService.disableRetries(); - testListModelsWOptions(); - } - - // Test the createModel operation with a valid options model parameter - @Test - public void testCreateModelWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"model_id\": \"modelId\", \"name\": \"name\", \"source\": \"source\", \"target\": \"target\", \"base_model_id\": \"baseModelId\", \"domain\": \"domain\", \"customizable\": true, \"default_model\": true, \"owner\": \"owner\", \"status\": \"uploading\"}"; - String createModelPath = "/v3/models"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the CreateModelOptions model - CreateModelOptions createModelOptionsModel = - new CreateModelOptions.Builder() - .baseModelId("testString") - .forcedGlossary(TestUtilities.createMockStream("This is a mock file.")) - .forcedGlossaryContentType("application/x-tmx+xml") - .parallelCorpus(TestUtilities.createMockStream("This is a mock file.")) - .parallelCorpusContentType("application/x-tmx+xml") - .name("testString") - .build(); - - // Invoke createModel() with a valid options model and verify the result - Response response = - languageTranslatorService.createModel(createModelOptionsModel).execute(); - assertNotNull(response); - TranslationModel responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createModelPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - assertEquals(query.get("base_model_id"), "testString"); - assertEquals(query.get("name"), "testString"); - } - - // Test the createModel operation with and without retries enabled - @Test - public void testCreateModelWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testCreateModelWOptions(); - - languageTranslatorService.disableRetries(); - testCreateModelWOptions(); - } - - // Test the createModel operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateModelNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.createModel(null).execute(); - } - - // Test the deleteModel operation with a valid options model parameter - @Test - public void testDeleteModelWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"status\": \"status\"}"; - String deleteModelPath = "/v3/models/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteModelOptions model - DeleteModelOptions deleteModelOptionsModel = - new DeleteModelOptions.Builder().modelId("testString").build(); - - // Invoke deleteModel() with a valid options model and verify the result - Response response = - languageTranslatorService.deleteModel(deleteModelOptionsModel).execute(); - assertNotNull(response); - DeleteModelResult responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteModelPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the deleteModel operation with and without retries enabled - @Test - public void testDeleteModelWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testDeleteModelWOptions(); - - languageTranslatorService.disableRetries(); - testDeleteModelWOptions(); - } - - // Test the deleteModel operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteModelNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.deleteModel(null).execute(); - } - - // Test the getModel operation with a valid options model parameter - @Test - public void testGetModelWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"model_id\": \"modelId\", \"name\": \"name\", \"source\": \"source\", \"target\": \"target\", \"base_model_id\": \"baseModelId\", \"domain\": \"domain\", \"customizable\": true, \"default_model\": true, \"owner\": \"owner\", \"status\": \"uploading\"}"; - String getModelPath = "/v3/models/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetModelOptions model - GetModelOptions getModelOptionsModel = - new GetModelOptions.Builder().modelId("testString").build(); - - // Invoke getModel() with a valid options model and verify the result - Response response = - languageTranslatorService.getModel(getModelOptionsModel).execute(); - assertNotNull(response); - TranslationModel responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getModelPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the getModel operation with and without retries enabled - @Test - public void testGetModelWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testGetModelWOptions(); - - languageTranslatorService.disableRetries(); - testGetModelWOptions(); - } - - // Test the getModel operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetModelNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.getModel(null).execute(); - } - - // Test the listDocuments operation with a valid options model parameter - @Test - public void testListDocumentsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"documents\": [{\"document_id\": \"documentId\", \"filename\": \"filename\", \"status\": \"processing\", \"model_id\": \"modelId\", \"base_model_id\": \"baseModelId\", \"source\": \"source\", \"detected_language_confidence\": 0, \"target\": \"target\", \"created\": \"2019-01-01T12:00:00.000Z\", \"completed\": \"2019-01-01T12:00:00.000Z\", \"word_count\": 9, \"character_count\": 14}]}"; - String listDocumentsPath = "/v3/documents"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListDocumentsOptions model - ListDocumentsOptions listDocumentsOptionsModel = new ListDocumentsOptions(); - - // Invoke listDocuments() with a valid options model and verify the result - Response response = - languageTranslatorService.listDocuments(listDocumentsOptionsModel).execute(); - assertNotNull(response); - DocumentList responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listDocumentsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the listDocuments operation with and without retries enabled - @Test - public void testListDocumentsWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testListDocumentsWOptions(); - - languageTranslatorService.disableRetries(); - testListDocumentsWOptions(); - } - - // Test the translateDocument operation with a valid options model parameter - @Test - public void testTranslateDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"filename\": \"filename\", \"status\": \"processing\", \"model_id\": \"modelId\", \"base_model_id\": \"baseModelId\", \"source\": \"source\", \"detected_language_confidence\": 0, \"target\": \"target\", \"created\": \"2019-01-01T12:00:00.000Z\", \"completed\": \"2019-01-01T12:00:00.000Z\", \"word_count\": 9, \"character_count\": 14}"; - String translateDocumentPath = "/v3/documents"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); - - // Construct an instance of the TranslateDocumentOptions model - TranslateDocumentOptions translateDocumentOptionsModel = - new TranslateDocumentOptions.Builder() - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/mspowerpoint") - .modelId("testString") - .source("testString") - .target("testString") - .documentId("testString") - .build(); - - // Invoke translateDocument() with a valid options model and verify the result - Response response = - languageTranslatorService.translateDocument(translateDocumentOptionsModel).execute(); - assertNotNull(response); - DocumentStatus responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, translateDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the translateDocument operation with and without retries enabled - @Test - public void testTranslateDocumentWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testTranslateDocumentWOptions(); - - languageTranslatorService.disableRetries(); - testTranslateDocumentWOptions(); - } - - // Test the translateDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTranslateDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.translateDocument(null).execute(); - } - - // Test the getDocumentStatus operation with a valid options model parameter - @Test - public void testGetDocumentStatusWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = - "{\"document_id\": \"documentId\", \"filename\": \"filename\", \"status\": \"processing\", \"model_id\": \"modelId\", \"base_model_id\": \"baseModelId\", \"source\": \"source\", \"detected_language_confidence\": 0, \"target\": \"target\", \"created\": \"2019-01-01T12:00:00.000Z\", \"completed\": \"2019-01-01T12:00:00.000Z\", \"word_count\": 9, \"character_count\": 14}"; - String getDocumentStatusPath = "/v3/documents/testString"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetDocumentStatusOptions model - GetDocumentStatusOptions getDocumentStatusOptionsModel = - new GetDocumentStatusOptions.Builder().documentId("testString").build(); - - // Invoke getDocumentStatus() with a valid options model and verify the result - Response response = - languageTranslatorService.getDocumentStatus(getDocumentStatusOptionsModel).execute(); - assertNotNull(response); - DocumentStatus responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDocumentStatusPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the getDocumentStatus operation with and without retries enabled - @Test - public void testGetDocumentStatusWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testGetDocumentStatusWOptions(); - - languageTranslatorService.disableRetries(); - testGetDocumentStatusWOptions(); - } - - // Test the getDocumentStatus operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDocumentStatusNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.getDocumentStatus(null).execute(); - } - - // Test the deleteDocument operation with a valid options model parameter - @Test - public void testDeleteDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteDocumentPath = "/v3/documents/testString"; - server.enqueue(new MockResponse().setResponseCode(204).setBody(mockResponseBody)); - - // Construct an instance of the DeleteDocumentOptions model - DeleteDocumentOptions deleteDocumentOptionsModel = - new DeleteDocumentOptions.Builder().documentId("testString").build(); - - // Invoke deleteDocument() with a valid options model and verify the result - Response response = - languageTranslatorService.deleteDocument(deleteDocumentOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the deleteDocument operation with and without retries enabled - @Test - public void testDeleteDocumentWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testDeleteDocumentWOptions(); - - languageTranslatorService.disableRetries(); - testDeleteDocumentWOptions(); - } - - // Test the deleteDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.deleteDocument(null).execute(); - } - - // Test the getTranslatedDocument operation with a valid options model parameter - @Test - public void testGetTranslatedDocumentWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "This is a mock binary response."; - String getTranslatedDocumentPath = "/v3/documents/testString/translated_document"; - server.enqueue( - new MockResponse() - .setHeader("Content-type", "application/powerpoint") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetTranslatedDocumentOptions model - GetTranslatedDocumentOptions getTranslatedDocumentOptionsModel = - new GetTranslatedDocumentOptions.Builder() - .documentId("testString") - .accept("application/powerpoint") - .build(); - - // Invoke getTranslatedDocument() with a valid options model and verify the result - Response response = - languageTranslatorService - .getTranslatedDocument(getTranslatedDocumentOptionsModel) - .execute(); - assertNotNull(response); - InputStream responseObj = response.getResult(); - assertNotNull(responseObj); - responseObj.close(); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getTranslatedDocumentPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2018-05-01"); - } - - // Test the getTranslatedDocument operation with and without retries enabled - @Test - public void testGetTranslatedDocumentWRetries() throws Throwable { - languageTranslatorService.enableRetries(4, 30); - testGetTranslatedDocumentWOptions(); - - languageTranslatorService.disableRetries(); - testGetTranslatedDocumentWOptions(); - } - - // Test the getTranslatedDocument operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTranslatedDocumentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - languageTranslatorService.getTranslatedDocument(null).execute(); - } - - // Perform setup needed before each test method - @BeforeMethod - public void beforeEachTest() { - // Start the mock server. - try { - server = new MockWebServer(); - server.start(); - } catch (IOException err) { - fail("Failed to instantiate mock web server"); - } - - // Construct an instance of the service - constructClientService(); - } - - // Perform tear down after each test method - @AfterMethod - public void afterEachTest() throws IOException { - server.shutdown(); - languageTranslatorService = null; - } - - // Constructs an instance of the service to be used by the tests - public void constructClientService() { - final String serviceName = "testService"; - // set mock values for global params - String version = "2018-05-01"; - - final Authenticator authenticator = new NoAuthAuthenticator(); - languageTranslatorService = new LanguageTranslator(version, serviceName, authenticator); - String url = server.url("/").toString(); - languageTranslatorService.setServiceUrl(url); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/CreateModelOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/CreateModelOptionsTest.java deleted file mode 100644 index 58b3eddb34..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/CreateModelOptionsTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -/** Unit test class for the CreateModelOptions model. */ -public class CreateModelOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testCreateModelOptions() throws Throwable { - CreateModelOptions createModelOptionsModel = - new CreateModelOptions.Builder() - .baseModelId("testString") - .forcedGlossary(TestUtilities.createMockStream("This is a mock file.")) - .forcedGlossaryContentType("application/x-tmx+xml") - .parallelCorpus(TestUtilities.createMockStream("This is a mock file.")) - .parallelCorpusContentType("application/x-tmx+xml") - .name("testString") - .build(); - assertEquals(createModelOptionsModel.baseModelId(), "testString"); - assertEquals( - IOUtils.toString(createModelOptionsModel.forcedGlossary()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(createModelOptionsModel.forcedGlossaryContentType(), "application/x-tmx+xml"); - assertEquals( - IOUtils.toString(createModelOptionsModel.parallelCorpus()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(createModelOptionsModel.parallelCorpusContentType(), "application/x-tmx+xml"); - assertEquals(createModelOptionsModel.name(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateModelOptionsError() throws Throwable { - new CreateModelOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptionsTest.java deleted file mode 100644 index c96f25e186..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteDocumentOptions model. */ -public class DeleteDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteDocumentOptions() throws Throwable { - DeleteDocumentOptions deleteDocumentOptionsModel = - new DeleteDocumentOptions.Builder().documentId("testString").build(); - assertEquals(deleteDocumentOptionsModel.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDocumentOptionsError() throws Throwable { - new DeleteDocumentOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptionsTest.java deleted file mode 100644 index 02782fd12c..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteModelOptions model. */ -public class DeleteModelOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteModelOptions() throws Throwable { - DeleteModelOptions deleteModelOptionsModel = - new DeleteModelOptions.Builder().modelId("testString").build(); - assertEquals(deleteModelOptionsModel.modelId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteModelOptionsError() throws Throwable { - new DeleteModelOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelResultTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelResultTest.java deleted file mode 100644 index 8537d3643c..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DeleteModelResultTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DeleteModelResult model. */ -public class DeleteModelResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDeleteModelResult() throws Throwable { - DeleteModelResult deleteModelResultModel = new DeleteModelResult(); - assertNull(deleteModelResultModel.getStatus()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentListTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentListTest.java deleted file mode 100644 index 1cac44e874..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentListTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DocumentList model. */ -public class DocumentListTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDocumentList() throws Throwable { - DocumentList documentListModel = new DocumentList(); - assertNull(documentListModel.getDocuments()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentStatusTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentStatusTest.java deleted file mode 100644 index a1009008c6..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/DocumentStatusTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the DocumentStatus model. */ -public class DocumentStatusTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testDocumentStatus() throws Throwable { - DocumentStatus documentStatusModel = new DocumentStatus(); - assertNull(documentStatusModel.getDocumentId()); - assertNull(documentStatusModel.getFilename()); - assertNull(documentStatusModel.getStatus()); - assertNull(documentStatusModel.getModelId()); - assertNull(documentStatusModel.getBaseModelId()); - assertNull(documentStatusModel.getSource()); - assertNull(documentStatusModel.getDetectedLanguageConfidence()); - assertNull(documentStatusModel.getTarget()); - assertNull(documentStatusModel.getCreated()); - assertNull(documentStatusModel.getCompleted()); - assertNull(documentStatusModel.getWordCount()); - assertNull(documentStatusModel.getCharacterCount()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptionsTest.java deleted file mode 100644 index 00dfee6957..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetDocumentStatusOptions model. */ -public class GetDocumentStatusOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetDocumentStatusOptions() throws Throwable { - GetDocumentStatusOptions getDocumentStatusOptionsModel = - new GetDocumentStatusOptions.Builder().documentId("testString").build(); - assertEquals(getDocumentStatusOptionsModel.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDocumentStatusOptionsError() throws Throwable { - new GetDocumentStatusOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetModelOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetModelOptionsTest.java deleted file mode 100644 index ed26f06d89..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetModelOptionsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetModelOptions model. */ -public class GetModelOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetModelOptions() throws Throwable { - GetModelOptions getModelOptionsModel = - new GetModelOptions.Builder().modelId("testString").build(); - assertEquals(getModelOptionsModel.modelId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetModelOptionsError() throws Throwable { - new GetModelOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptionsTest.java deleted file mode 100644 index ea72b80b9b..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptionsTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GetTranslatedDocumentOptions model. */ -public class GetTranslatedDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGetTranslatedDocumentOptions() throws Throwable { - GetTranslatedDocumentOptions getTranslatedDocumentOptionsModel = - new GetTranslatedDocumentOptions.Builder() - .documentId("testString") - .accept("application/powerpoint") - .build(); - assertEquals(getTranslatedDocumentOptionsModel.documentId(), "testString"); - assertEquals(getTranslatedDocumentOptionsModel.accept(), "application/powerpoint"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetTranslatedDocumentOptionsError() throws Throwable { - new GetTranslatedDocumentOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguageTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguageTest.java deleted file mode 100644 index 38d6afa381..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguageTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IdentifiableLanguage model. */ -public class IdentifiableLanguageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIdentifiableLanguage() throws Throwable { - IdentifiableLanguage identifiableLanguageModel = new IdentifiableLanguage(); - assertNull(identifiableLanguageModel.getLanguage()); - assertNull(identifiableLanguageModel.getName()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguagesTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguagesTest.java deleted file mode 100644 index 574ccb6888..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiableLanguagesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IdentifiableLanguages model. */ -public class IdentifiableLanguagesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIdentifiableLanguages() throws Throwable { - IdentifiableLanguages identifiableLanguagesModel = new IdentifiableLanguages(); - assertNull(identifiableLanguagesModel.getLanguages()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguageTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguageTest.java deleted file mode 100644 index a4d02b0c73..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguageTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IdentifiedLanguage model. */ -public class IdentifiedLanguageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIdentifiedLanguage() throws Throwable { - IdentifiedLanguage identifiedLanguageModel = new IdentifiedLanguage(); - assertNull(identifiedLanguageModel.getLanguage()); - assertNull(identifiedLanguageModel.getConfidence()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguagesTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguagesTest.java deleted file mode 100644 index 132aec4238..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifiedLanguagesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IdentifiedLanguages model. */ -public class IdentifiedLanguagesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIdentifiedLanguages() throws Throwable { - IdentifiedLanguages identifiedLanguagesModel = new IdentifiedLanguages(); - assertNull(identifiedLanguagesModel.getLanguages()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifyOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifyOptionsTest.java deleted file mode 100644 index f85f5707dd..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/IdentifyOptionsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the IdentifyOptions model. */ -public class IdentifyOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testIdentifyOptions() throws Throwable { - IdentifyOptions identifyOptionsModel = new IdentifyOptions.Builder().text("testString").build(); - assertEquals(identifyOptionsModel.text(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testIdentifyOptionsError() throws Throwable { - new IdentifyOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguageTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguageTest.java deleted file mode 100644 index 12ee1374a5..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguageTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Language model. */ -public class LanguageTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLanguage() throws Throwable { - Language languageModel = new Language(); - assertNull(languageModel.getLanguage()); - assertNull(languageModel.getLanguageName()); - assertNull(languageModel.getNativeLanguageName()); - assertNull(languageModel.getCountryCode()); - assertNull(languageModel.isWordsSeparated()); - assertNull(languageModel.getDirection()); - assertNull(languageModel.isSupportedAsSource()); - assertNull(languageModel.isSupportedAsTarget()); - assertNull(languageModel.isIdentifiable()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguagesTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguagesTest.java deleted file mode 100644 index 9b7b92c13f..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/LanguagesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Languages model. */ -public class LanguagesTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testLanguages() throws Throwable { - Languages languagesModel = new Languages(); - assertNull(languagesModel.getLanguages()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptionsTest.java deleted file mode 100644 index 70b62c22cb..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListDocumentsOptionsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListDocumentsOptions model. */ -public class ListDocumentsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListDocumentsOptions() throws Throwable { - ListDocumentsOptions listDocumentsOptionsModel = new ListDocumentsOptions(); - assertNotNull(listDocumentsOptionsModel); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptionsTest.java deleted file mode 100644 index e8c6a92985..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListIdentifiableLanguagesOptionsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListIdentifiableLanguagesOptions model. */ -public class ListIdentifiableLanguagesOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListIdentifiableLanguagesOptions() throws Throwable { - ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptionsModel = - new ListIdentifiableLanguagesOptions(); - assertNotNull(listIdentifiableLanguagesOptionsModel); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptionsTest.java deleted file mode 100644 index 9f98480186..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListLanguagesOptionsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListLanguagesOptions model. */ -public class ListLanguagesOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListLanguagesOptions() throws Throwable { - ListLanguagesOptions listLanguagesOptionsModel = new ListLanguagesOptions(); - assertNotNull(listLanguagesOptionsModel); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListModelsOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListModelsOptionsTest.java deleted file mode 100644 index df432681d2..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/ListModelsOptionsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the ListModelsOptions model. */ -public class ListModelsOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testListModelsOptions() throws Throwable { - ListModelsOptions listModelsOptionsModel = - new ListModelsOptions.Builder() - .source("testString") - .target("testString") - .xDefault(true) - .build(); - assertEquals(listModelsOptionsModel.source(), "testString"); - assertEquals(listModelsOptionsModel.target(), "testString"); - assertEquals(listModelsOptionsModel.xDefault(), Boolean.valueOf(true)); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptionsTest.java deleted file mode 100644 index cbc19722ab..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateDocumentOptionsTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2023. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -/** Unit test class for the TranslateDocumentOptions model. */ -public class TranslateDocumentOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslateDocumentOptions() throws Throwable { - TranslateDocumentOptions translateDocumentOptionsModel = - new TranslateDocumentOptions.Builder() - .file(TestUtilities.createMockStream("This is a mock file.")) - .filename("testString") - .fileContentType("application/mspowerpoint") - .modelId("testString") - .source("testString") - .target("testString") - .documentId("testString") - .build(); - assertEquals( - IOUtils.toString(translateDocumentOptionsModel.file()), - IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); - assertEquals(translateDocumentOptionsModel.filename(), "testString"); - assertEquals(translateDocumentOptionsModel.fileContentType(), "application/mspowerpoint"); - assertEquals(translateDocumentOptionsModel.modelId(), "testString"); - assertEquals(translateDocumentOptionsModel.source(), "testString"); - assertEquals(translateDocumentOptionsModel.target(), "testString"); - assertEquals(translateDocumentOptionsModel.documentId(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTranslateDocumentOptionsError() throws Throwable { - new TranslateDocumentOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateOptionsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateOptionsTest.java deleted file mode 100644 index 12945997f6..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslateOptionsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020, 2022. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TranslateOptions model. */ -public class TranslateOptionsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslateOptions() throws Throwable { - TranslateOptions translateOptionsModel = - new TranslateOptions.Builder() - .text(java.util.Arrays.asList("testString")) - .modelId("testString") - .source("testString") - .target("testString") - .build(); - assertEquals(translateOptionsModel.text(), java.util.Arrays.asList("testString")); - assertEquals(translateOptionsModel.modelId(), "testString"); - assertEquals(translateOptionsModel.source(), "testString"); - assertEquals(translateOptionsModel.target(), "testString"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testTranslateOptionsError() throws Throwable { - new TranslateOptions.Builder().build(); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelTest.java deleted file mode 100644 index 522411ac5b..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TranslationModel model. */ -public class TranslationModelTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslationModel() throws Throwable { - TranslationModel translationModelModel = new TranslationModel(); - assertNull(translationModelModel.getModelId()); - assertNull(translationModelModel.getName()); - assertNull(translationModelModel.getSource()); - assertNull(translationModelModel.getTarget()); - assertNull(translationModelModel.getBaseModelId()); - assertNull(translationModelModel.getDomain()); - assertNull(translationModelModel.isCustomizable()); - assertNull(translationModelModel.isDefaultModel()); - assertNull(translationModelModel.getOwner()); - assertNull(translationModelModel.getStatus()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelsTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelsTest.java deleted file mode 100644 index 6f45a8af8c..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationModelsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TranslationModels model. */ -public class TranslationModelsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslationModels() throws Throwable { - TranslationModels translationModelsModel = new TranslationModels(); - assertNull(translationModelsModel.getModels()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationResultTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationResultTest.java deleted file mode 100644 index 0637ea00c4..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationResultTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TranslationResult model. */ -public class TranslationResultTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslationResult() throws Throwable { - TranslationResult translationResultModel = new TranslationResult(); - assertNull(translationResultModel.getWordCount()); - assertNull(translationResultModel.getCharacterCount()); - assertNull(translationResultModel.getDetectedLanguage()); - assertNull(translationResultModel.getDetectedLanguageConfidence()); - assertNull(translationResultModel.getTranslations()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationTest.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationTest.java deleted file mode 100644 index 026918e149..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/TranslationTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.language_translator.v3.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.language_translator.v3.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the Translation model. */ -public class TranslationTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTranslation() throws Throwable { - Translation translationModel = new Translation(); - assertNull(translationModel.getTranslation()); - } -} diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/testng.xml b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/testng.xml deleted file mode 100644 index 15cdc628b3..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/testng.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/utils/TestUtilities.java b/language-translator/src/test/java/com/ibm/watson/language_translator/v3/utils/TestUtilities.java deleted file mode 100644 index 0516d727da..0000000000 --- a/language-translator/src/test/java/com/ibm/watson/language_translator/v3/utils/TestUtilities.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.language_translator.v3.utils; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.cloud.sdk.core.util.DateUtils; -import com.ibm.cloud.sdk.core.util.GsonSingleton; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import okhttp3.HttpUrl; -import okhttp3.mockwebserver.RecordedRequest; - -/** A class used by the unit tests containing utility functions. */ -public class TestUtilities { - public static Map createMockMap() { - Map mockMap = new HashMap<>(); - mockMap.put("foo", "bar"); - return mockMap; - } - - public static HashMap createMockStreamMap() { - return new HashMap() { - { - put("key1", createMockStream("This is a mock file.")); - } - }; - } - - public static Map parseQueryString(RecordedRequest req) { - Map queryMap = new HashMap<>(); - - try { - HttpUrl requestUrl = req.getRequestUrl(); - - if (requestUrl != null) { - Set queryParamsNames = requestUrl.queryParameterNames(); - // map the parameter name to its corresponding value - for (String p : queryParamsNames) { - // get the corresponding value for the parameter (p) - List val = requestUrl.queryParameterValues(p); - if (val != null && !val.isEmpty()) { - String joinedQuery = String.join(",", val); - queryMap.put(p, joinedQuery); - } - } - } - if (queryMap.isEmpty()) { - return null; - } - } catch (Exception e) { - return null; - } - - return queryMap; - } - - public static String parseReqPath(RecordedRequest req) { - String parsedPath = null; - - try { - String fullPath = req.getPath(); - if (fullPath != null && !fullPath.isEmpty()) { - // retrieve the path segment before the query parameter - parsedPath = fullPath.split("\\?", 2)[0]; - } - if (parsedPath.isEmpty() || parsedPath == null) { - return null; - } - - } catch (Exception e) { - return null; - } - - return parsedPath; - } - - public static String serialize(Object obj) { - return GsonSingleton.getGson().toJson(obj); - } - - public static T deserialize(String json, Class clazz) { - return GsonSingleton.getGson().fromJson(json, clazz); - } - - public static InputStream createMockStream(String s) { - return new ByteArrayInputStream(s.getBytes()); - } - - public static List creatMockListFileWithMetadata() { - List list = new ArrayList(); - byte[] fileBytes = {(byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef}; - InputStream inputStream = new ByteArrayInputStream(fileBytes); - FileWithMetadata.Builder builder = new FileWithMetadata.Builder(); - builder.data(inputStream); - FileWithMetadata fileWithMetadata = builder.build(); - list.add(fileWithMetadata); - - return list; - } - - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); - } - - public static Date createMockDate(String date) throws Exception { - return DateUtils.parseAsDate(date); - } - - public static Date createMockDateTime(String date) throws Exception { - return DateUtils.parseAsDateTime(date); - } -} diff --git a/language-translator/src/test/resources/language_translation/document_status.json b/language-translator/src/test/resources/language_translation/document_status.json deleted file mode 100644 index 56536bcee0..0000000000 --- a/language-translator/src/test/resources/language_translation/document_status.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "document_id": "1bdb9528-bf73-45eb-87fa-c4f519af23a0", - "filename": "en.pdf", - "model_id": "12345", - "base_model_id": "en-fr", - "source": "en", - "target": "fr", - "status": "available", - "created": "2018-08-24T08:20:30.5Z", - "completed": "2018-08-24T08:20:35.5Z", - "word_count": 12, - "character_count": 100 -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/document_to_translate.txt b/language-translator/src/test/resources/language_translation/document_to_translate.txt deleted file mode 100644 index 432334030a..0000000000 --- a/language-translator/src/test/resources/language_translation/document_to_translate.txt +++ /dev/null @@ -1,2 +0,0 @@ -Where is the library? -How are you? \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/glossary.tmx b/language-translator/src/test/resources/language_translation/glossary.tmx deleted file mode 100644 index 427dfbda47..0000000000 --- a/language-translator/src/test/resources/language_translation/glossary.tmx +++ /dev/null @@ -1,28 +0,0 @@ - - -

- - - - admittedTerm-admn-sts - entryTerm - Colloquial use term - Informal salutation - Hello - - - admittedTerm-admn-sts - entryTerm - Termino de uso coloquial - Saludo informal - Hola - - - - \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/identifiable_languages.json b/language-translator/src/test/resources/language_translation/identifiable_languages.json deleted file mode 100644 index f5e31f4fde..0000000000 --- a/language-translator/src/test/resources/language_translation/identifiable_languages.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "languages": [ - { - "language": "af", - "name": "Afrikaans" - }, - { - "language": "ar", - "name": "Arabic" - }, - { - "language": "az", - "name": "Azerbaijani" - }, - { - "language": "ba", - "name": "Bashkir" - }, - { - "language": "be", - "name": "Belarusian" - }, - { - "language": "bg", - "name": "Bulgarian" - }, - { - "language": "bn", - "name": "Bengali" - }, - { - "language": "bs", - "name": "Bosnian" - }, - { - "language": "cs", - "name": "Czech" - }, - { - "language": "cv", - "name": "Chuvash" - }, - { - "language": "da", - "name": "Danish" - }, - { - "language": "de", - "name": "German" - }, - { - "language": "el", - "name": "Greek" - }, - { - "language": "en", - "name": "English" - }, - { - "language": "eo", - "name": "Esperanto" - }, - { - "language": "es", - "name": "Spanish" - }, - { - "language": "et", - "name": "Estonian" - }, - { - "language": "eu", - "name": "Basque" - }, - { - "language": "fa", - "name": "Persian" - }, - { - "language": "fi", - "name": "Finnish" - }, - { - "language": "fr", - "name": "French" - }, - { - "language": "gu", - "name": "Gujarati" - }, - { - "language": "he", - "name": "Hebrew" - }, - { - "language": "hi", - "name": "Hindi" - }, - { - "language": "ht", - "name": "Haitian" - }, - { - "language": "hu", - "name": "Hungarian" - }, - { - "language": "hy", - "name": "Armenian" - }, - { - "language": "id", - "name": "Indonesian" - }, - { - "language": "is", - "name": "Icelandic" - }, - { - "language": "it", - "name": "Italian" - }, - { - "language": "ja", - "name": "Japanese" - }, - { - "language": "ka", - "name": "Georgian" - }, - { - "language": "kk", - "name": "Kazakh" - }, - { - "language": "km", - "name": "Central Khmer" - }, - { - "language": "ko", - "name": "Korean" - }, - { - "language": "ku", - "name": "Kurdish" - }, - { - "language": "ky", - "name": "Kirghiz" - }, - { - "language": "lt", - "name": "Lithuanian" - }, - { - "language": "lv", - "name": "Latvian" - }, - { - "language": "ml", - "name": "Malayalam" - }, - { - "language": "mn", - "name": "Mongolian" - }, - { - "language": "nb", - "name": "Norwegian Bokmal" - }, - { - "language": "nl", - "name": "Dutch" - }, - { - "language": "nn", - "name": "Norwegian Nynorsk" - }, - { - "language": "pa", - "name": "Panjabi" - }, - { - "language": "pl", - "name": "Polish" - }, - { - "language": "ps", - "name": "Pushto" - }, - { - "language": "pt", - "name": "Portuguese" - }, - { - "language": "ro", - "name": "Romanian" - }, - { - "language": "ru", - "name": "Russian" - }, - { - "language": "sk", - "name": "Slovakian" - }, - { - "language": "so", - "name": "Somali" - }, - { - "language": "sq", - "name": "Albanian" - }, - { - "language": "sv", - "name": "Swedish" - }, - { - "language": "ta", - "name": "Tamil" - }, - { - "language": "te", - "name": "Telugu" - }, - { - "language": "tr", - "name": "Turkish" - }, - { - "language": "uk", - "name": "Ukrainian" - }, - { - "language": "ur", - "name": "Urdu" - }, - { - "language": "vi", - "name": "Vietnamese" - }, - { - "language": "zh", - "name": "Chinese" - }, - { - "language": "zh-TW", - "name": "Traditional Chinese" - } - ] -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/identify_response.json b/language-translator/src/test/resources/language_translation/identify_response.json deleted file mode 100644 index d1544ca649..0000000000 --- a/language-translator/src/test/resources/language_translation/identify_response.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "languages": [ - { - "language": "en", - "confidence": 0.877159 - }, - { - "language": "af", - "confidence": 0.0752636 - } - ] -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/list_documents_response.json b/language-translator/src/test/resources/language_translation/list_documents_response.json deleted file mode 100644 index d6481d014f..0000000000 --- a/language-translator/src/test/resources/language_translation/list_documents_response.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "documents": [ - { - "document_id": "1bdb9528-bf73-45eb-87fa-c4f519af23a0", - "filename": "en.docx", - "model_id": "9ef1eda2-e4dc-460f-b51a-efeec95f239f", - "base_model_id": "en-de", - "source": "en", - "target": "de", - "status": "processing", - "created": "2018-08-24T08:20:30.5Z", - "completed": "2018-08-24T08:20:35.5Z", - "word_count": 12, - "character_count": 100 - }, - { - "document_id": "1bdb9528-bf73-45eb-87fa-c4f519af23a0", - "filename": "en.pdf", - "model_id": "9ef1eda2-e4dc-460f-b51a-efeec95f239f", - "base_model_id": "en-fr", - "source": "en", - "target": "fr", - "status": "available", - "created": "2018-08-24T08:20:30.5Z", - "completed": "2018-08-24T08:20:35.5Z" - } - ] -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/model.json b/language-translator/src/test/resources/language_translation/model.json deleted file mode 100644 index 92a200c011..0000000000 --- a/language-translator/src/test/resources/language_translation/model.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "model_id": "ar-en", - "source": "ar", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/models.json b/language-translator/src/test/resources/language_translation/models.json deleted file mode 100644 index 3cfccfabe4..0000000000 --- a/language-translator/src/test/resources/language_translation/models.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "models": [ - { - "model_id": "ar-en", - "source": "ar", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "ar-en-conversational", - "source": "ar", - "target": "en", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "arz-en", - "source": "arz", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": false, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-ar", - "source": "en", - "target": "ar", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-ar-conversational", - "source": "en", - "target": "ar", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-arz", - "source": "en", - "target": "arz", - "base_model_id": "", - "domain": "news", - "customizable": false, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-es", - "source": "en", - "target": "es", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-es-conversational", - "source": "en", - "target": "es", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-fr", - "source": "en", - "target": "fr", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-fr-conversational", - "source": "en", - "target": "fr", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-pt", - "source": "en", - "target": "pt", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "en-pt-conversational", - "source": "en", - "target": "pt", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "es-en", - "source": "es", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "es-en-conversational", - "source": "es", - "target": "en", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "es-en-patent", - "source": "es", - "target": "en", - "base_model_id": "", - "domain": "patent", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "fr-en", - "source": "fr", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "fr-en-conversational", - "source": "fr", - "target": "en", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "ko-en-patent", - "source": "ko", - "target": "en", - "base_model_id": "", - "domain": "patent", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "pt-en", - "source": "pt", - "target": "en", - "base_model_id": "", - "domain": "news", - "customizable": true, - "default_model": true, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "pt-en-conversational", - "source": "pt", - "target": "en", - "base_model_id": "", - "domain": "conversational", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "pt-en-patent", - "source": "pt", - "target": "en", - "base_model_id": "", - "domain": "patent", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - }, - { - "model_id": "zh-en-patent", - "source": "zh", - "target": "en", - "base_model_id": "", - "domain": "patent", - "customizable": false, - "default_model": false, - "owner": "", - "status": "available", - "name": "", - "train_log": null - } - ] -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/multiple_translations.json b/language-translator/src/test/resources/language_translation/multiple_translations.json deleted file mode 100644 index 1e4eb6f474..0000000000 --- a/language-translator/src/test/resources/language_translation/multiple_translations.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "translations": [ - { - "translation": "El equipo es increíble IBM Watson" - }, - { - "translation": "Bienvenido a la era cognitiva" - } - ], - "word_count": 6, - "character_count": 20 -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/single_translation.json b/language-translator/src/test/resources/language_translation/single_translation.json deleted file mode 100644 index 22a4d0488a..0000000000 --- a/language-translator/src/test/resources/language_translation/single_translation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "translations": [ - { - "translation": "El equipo es increíble IBM Watson" - } - ], - "word_count": 6, - "character_count": 20 -} \ No newline at end of file diff --git a/language-translator/src/test/resources/language_translation/translated_document.txt b/language-translator/src/test/resources/language_translation/translated_document.txt deleted file mode 100644 index b15c31adfe..0000000000 --- a/language-translator/src/test/resources/language_translation/translated_document.txt +++ /dev/null @@ -1,2 +0,0 @@ -¿Dónde está la biblioteca? -¿Cómo estás? \ No newline at end of file diff --git a/pom.xml b/pom.xml index c70d8b0c9a..b369db4def 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ /assistant /discovery - /language-translator /natural-language-understanding /speech-to-text /text-to-speech From f6ab81ba87eb013ae77f45a44ca327f77a460ca8 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Fri, 18 Oct 2024 11:50:10 -0500 Subject: [PATCH 07/12] feat(discov2): add methods for new batches api --- .../ibm/watson/discovery/v2/Discovery.java | 128 ++++++++++ .../discovery/v2/model/BatchDetails.java | 68 +++++ .../discovery/v2/model/CreateEnrichment.java | 8 +- .../v2/model/ListBatchesOptions.java | 125 ++++++++++ .../v2/model/ListBatchesResponse.java | 38 +++ .../v2/model/PullBatchesOptions.java | 155 ++++++++++++ .../v2/model/PullBatchesResponse.java | 39 +++ .../v2/model/PushBatchesOptions.java | 233 ++++++++++++++++++ .../model/QueryCollectionNoticesOptions.java | 6 +- .../discovery/v2/model/QueryOptions.java | 11 +- .../watson/discovery/v2/DiscoveryTest.java | 174 +++++++++++++ .../discovery/v2/model/BatchDetailsTest.java | 36 +++ .../v2/model/ListBatchesOptionsTest.java | 43 ++++ .../v2/model/ListBatchesResponseTest.java | 36 +++ .../v2/model/PullBatchesOptionsTest.java | 48 ++++ .../v2/model/PullBatchesResponseTest.java | 36 +++ .../v2/model/PushBatchesOptionsTest.java | 55 +++++ 17 files changed, 1228 insertions(+), 11 deletions(-) create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java create mode 100644 discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/BatchDetailsTest.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesOptionsTest.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesResponseTest.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesOptionsTest.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesResponseTest.java create mode 100644 discovery/src/test/java/com/ibm/watson/discovery/v2/model/PushBatchesOptionsTest.java diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java index e341cfe8e2..83df9f00b5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java @@ -72,6 +72,8 @@ import com.ibm.watson.discovery.v2.model.GetProjectOptions; import com.ibm.watson.discovery.v2.model.GetStopwordListOptions; import com.ibm.watson.discovery.v2.model.GetTrainingQueryOptions; +import com.ibm.watson.discovery.v2.model.ListBatchesOptions; +import com.ibm.watson.discovery.v2.model.ListBatchesResponse; import com.ibm.watson.discovery.v2.model.ListCollectionsOptions; import com.ibm.watson.discovery.v2.model.ListCollectionsResponse; import com.ibm.watson.discovery.v2.model.ListDocumentClassifierModelsOptions; @@ -86,6 +88,9 @@ import com.ibm.watson.discovery.v2.model.ListProjectsResponse; import com.ibm.watson.discovery.v2.model.ListTrainingQueriesOptions; import com.ibm.watson.discovery.v2.model.ProjectDetails; +import com.ibm.watson.discovery.v2.model.PullBatchesOptions; +import com.ibm.watson.discovery.v2.model.PullBatchesResponse; +import com.ibm.watson.discovery.v2.model.PushBatchesOptions; import com.ibm.watson.discovery.v2.model.QueryCollectionNoticesOptions; import com.ibm.watson.discovery.v2.model.QueryNoticesOptions; import com.ibm.watson.discovery.v2.model.QueryNoticesResponse; @@ -1794,6 +1799,129 @@ public ServiceCall deleteEnrichment(DeleteEnrichmentOptions deleteEnrichme return createServiceCall(builder.build(), responseConverter); } + /** + * List batches. + * + *

A batch is a set of documents that are ready for enrichment by an external application. + * After you apply a webhook enrichment to a collection, and then process or upload documents to + * the collection, Discovery creates a batch with a unique **batch_id**. + * + *

To start, you must register your external application as a **webhook** type by using the + * [Create enrichment API](/apidocs/discovery-data#createenrichment) method. + * + *

Use the List batches API to get the following: + * + *

* Notified batches that are not yet pulled by the external enrichment application. + * + *

* Batches that are pulled, but not yet pushed to Discovery by the external enrichment + * application. + * + * @param listBatchesOptions the {@link ListBatchesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ListBatchesResponse} + */ + public ServiceCall listBatches(ListBatchesOptions listBatchesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + listBatchesOptions, "listBatchesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("project_id", listBatchesOptions.projectId()); + pathParamsMap.put("collection_id", listBatchesOptions.collectionId()); + RequestBuilder builder = + RequestBuilder.get( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/projects/{project_id}/collections/{collection_id}/batches", + pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v2", "listBatches"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Pull batches. + * + *

Pull a batch of documents from Discovery for enrichment by an external application. Ensure + * to include the `Accept-Encoding: gzip` header in this method to get the file. You can also + * implement retry logic when calling this method to avoid any network errors. + * + * @param pullBatchesOptions the {@link PullBatchesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PullBatchesResponse} + */ + public ServiceCall pullBatches(PullBatchesOptions pullBatchesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + pullBatchesOptions, "pullBatchesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("project_id", pullBatchesOptions.projectId()); + pathParamsMap.put("collection_id", pullBatchesOptions.collectionId()); + pathParamsMap.put("batch_id", pullBatchesOptions.batchId()); + RequestBuilder builder = + RequestBuilder.get( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}", + pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v2", "pullBatches"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Push batches. + * + *

Push a batch of documents to Discovery after annotation by an external application. You can + * implement retry logic when calling this method to avoid any network errors. + * + * @param pushBatchesOptions the {@link PushBatchesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Boolean} + */ + public ServiceCall pushBatches(PushBatchesOptions pushBatchesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + pushBatchesOptions, "pushBatchesOptions cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.isTrue( + (pushBatchesOptions.file() != null), "At least one of or file must be supplied."); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("project_id", pushBatchesOptions.projectId()); + pathParamsMap.put("collection_id", pushBatchesOptions.collectionId()); + pathParamsMap.put("batch_id", pushBatchesOptions.batchId()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}", + pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v2", "pushBatches"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); + multipartBuilder.setType(MultipartBody.FORM); + if (pushBatchesOptions.file() != null) { + okhttp3.RequestBody fileBody = + RequestUtils.inputStreamBody(pushBatchesOptions.file(), "application/octet-stream"); + multipartBuilder.addFormDataPart("file", pushBatchesOptions.filename(), fileBody); + } + builder.body(multipartBuilder.build()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + /** * List document classifiers. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java new file mode 100644 index 0000000000..24ce42cc15 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java @@ -0,0 +1,68 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Date; + +/** + * A batch is a set of documents that are ready for enrichment by an external application. After you + * apply a webhook enrichment to a collection, and then process or upload documents to the + * collection, Discovery creates a batch with a unique **batch_id**. + */ +public class BatchDetails extends GenericModel { + + @SerializedName("batch_id") + protected String batchId; + + protected Date created; + + @SerializedName("enrichment_id") + protected String enrichmentId; + + protected BatchDetails() {} + + /** + * Gets the batchId. + * + *

The Universally Unique Identifier (UUID) for a batch of documents. + * + * @return the batchId + */ + public String getBatchId() { + return batchId; + } + + /** + * Gets the created. + * + *

The date and time (RFC3339) that the batch was created. + * + * @return the created + */ + public Date getCreated() { + return created; + } + + /** + * Gets the enrichmentId. + * + *

The Universally Unique Identifier (UUID) for the external enrichment. + * + * @return the enrichmentId + */ + public String getEnrichmentId() { + return enrichmentId; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java index 2aa0f32359..2d6b35aed5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java @@ -44,9 +44,7 @@ public class CreateEnrichment extends GenericModel { *

* `watson_knowledge_studio_model`: Creates an enrichment from a Watson Knowledge Studio * machine learning model that is defined in a ZIP file. * - *

* `webhook`: Connects to an external enrichment application by using a webhook. The feature - * is available from IBM Cloud-managed instances only. The external enrichment feature is beta - * functionality. Beta features are not supported by the SDKs. + *

* `webhook`: Connects to an external enrichment application by using a webhook. * *

* `sentence_classifier`: Use sentence classifier to classify sentences in your documents. * This feature is available in IBM Cloud-managed instances only. The sentence classifier feature @@ -221,9 +219,7 @@ public String description() { *

* `watson_knowledge_studio_model`: Creates an enrichment from a Watson Knowledge Studio * machine learning model that is defined in a ZIP file. * - *

* `webhook`: Connects to an external enrichment application by using a webhook. The feature - * is available from IBM Cloud-managed instances only. The external enrichment feature is beta - * functionality. Beta features are not supported by the SDKs. + *

* `webhook`: Connects to an external enrichment application by using a webhook. * *

* `sentence_classifier`: Use sentence classifier to classify sentences in your documents. * This feature is available in IBM Cloud-managed instances only. The sentence classifier feature diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java new file mode 100644 index 0000000000..09f9323b67 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java @@ -0,0 +1,125 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The listBatches options. */ +public class ListBatchesOptions extends GenericModel { + + protected String projectId; + protected String collectionId; + + /** Builder. */ + public static class Builder { + private String projectId; + private String collectionId; + + /** + * Instantiates a new Builder from an existing ListBatchesOptions instance. + * + * @param listBatchesOptions the instance to initialize the Builder with + */ + private Builder(ListBatchesOptions listBatchesOptions) { + this.projectId = listBatchesOptions.projectId; + this.collectionId = listBatchesOptions.collectionId; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param projectId the projectId + * @param collectionId the collectionId + */ + public Builder(String projectId, String collectionId) { + this.projectId = projectId; + this.collectionId = collectionId; + } + + /** + * Builds a ListBatchesOptions. + * + * @return the new ListBatchesOptions instance + */ + public ListBatchesOptions build() { + return new ListBatchesOptions(this); + } + + /** + * Set the projectId. + * + * @param projectId the projectId + * @return the ListBatchesOptions builder + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Set the collectionId. + * + * @param collectionId the collectionId + * @return the ListBatchesOptions builder + */ + public Builder collectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + } + + protected ListBatchesOptions() {} + + protected ListBatchesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.projectId, "projectId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.collectionId, "collectionId cannot be empty"); + projectId = builder.projectId; + collectionId = builder.collectionId; + } + + /** + * New builder. + * + * @return a ListBatchesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the projectId. + * + *

The Universally Unique Identifier (UUID) of the project. This information can be found from + * the *Integrate and Deploy* page in Discovery. + * + * @return the projectId + */ + public String projectId() { + return projectId; + } + + /** + * Gets the collectionId. + * + *

The Universally Unique Identifier (UUID) of the collection. + * + * @return the collectionId + */ + public String collectionId() { + return collectionId; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java new file mode 100644 index 0000000000..fb0ad853d1 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; + +/** + * An object that contains a list of batches that are ready for enrichment by the external + * application. + */ +public class ListBatchesResponse extends GenericModel { + + protected List batches; + + protected ListBatchesResponse() {} + + /** + * Gets the batches. + * + *

An array that lists the batches in a collection. + * + * @return the batches + */ + public List getBatches() { + return batches; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java new file mode 100644 index 0000000000..3987301fbf --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java @@ -0,0 +1,155 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The pullBatches options. */ +public class PullBatchesOptions extends GenericModel { + + protected String projectId; + protected String collectionId; + protected String batchId; + + /** Builder. */ + public static class Builder { + private String projectId; + private String collectionId; + private String batchId; + + /** + * Instantiates a new Builder from an existing PullBatchesOptions instance. + * + * @param pullBatchesOptions the instance to initialize the Builder with + */ + private Builder(PullBatchesOptions pullBatchesOptions) { + this.projectId = pullBatchesOptions.projectId; + this.collectionId = pullBatchesOptions.collectionId; + this.batchId = pullBatchesOptions.batchId; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param projectId the projectId + * @param collectionId the collectionId + * @param batchId the batchId + */ + public Builder(String projectId, String collectionId, String batchId) { + this.projectId = projectId; + this.collectionId = collectionId; + this.batchId = batchId; + } + + /** + * Builds a PullBatchesOptions. + * + * @return the new PullBatchesOptions instance + */ + public PullBatchesOptions build() { + return new PullBatchesOptions(this); + } + + /** + * Set the projectId. + * + * @param projectId the projectId + * @return the PullBatchesOptions builder + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Set the collectionId. + * + * @param collectionId the collectionId + * @return the PullBatchesOptions builder + */ + public Builder collectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + + /** + * Set the batchId. + * + * @param batchId the batchId + * @return the PullBatchesOptions builder + */ + public Builder batchId(String batchId) { + this.batchId = batchId; + return this; + } + } + + protected PullBatchesOptions() {} + + protected PullBatchesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.projectId, "projectId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.collectionId, "collectionId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.batchId, "batchId cannot be empty"); + projectId = builder.projectId; + collectionId = builder.collectionId; + batchId = builder.batchId; + } + + /** + * New builder. + * + * @return a PullBatchesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the projectId. + * + *

The Universally Unique Identifier (UUID) of the project. This information can be found from + * the *Integrate and Deploy* page in Discovery. + * + * @return the projectId + */ + public String projectId() { + return projectId; + } + + /** + * Gets the collectionId. + * + *

The Universally Unique Identifier (UUID) of the collection. + * + * @return the collectionId + */ + public String collectionId() { + return collectionId; + } + + /** + * Gets the batchId. + * + *

The Universally Unique Identifier (UUID) of the document batch that is being requested from + * Discovery. + * + * @return the batchId + */ + public String batchId() { + return batchId; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java new file mode 100644 index 0000000000..985d413dc5 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * A compressed newline delimited JSON (NDJSON) file containing the document. The NDJSON format is + * used to describe structured data. The file name format is `{batch_id}.ndjson.gz`. For more + * information, see [Binary attachment from the pull batches + * method](/docs/discovery-data?topic=discovery-data-external-enrichment#binary-attachment-pull-batches). + */ +public class PullBatchesResponse extends GenericModel { + + protected String file; + + protected PullBatchesResponse() {} + + /** + * Gets the file. + * + *

A compressed NDJSON file containing the document. + * + * @return the file + */ + public String getFile() { + return file; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java new file mode 100644 index 0000000000..97700fd5c6 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java @@ -0,0 +1,233 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; + +/** The pushBatches options. */ +public class PushBatchesOptions extends GenericModel { + + protected String projectId; + protected String collectionId; + protected String batchId; + protected InputStream file; + protected String filename; + + /** Builder. */ + public static class Builder { + private String projectId; + private String collectionId; + private String batchId; + private InputStream file; + private String filename; + + /** + * Instantiates a new Builder from an existing PushBatchesOptions instance. + * + * @param pushBatchesOptions the instance to initialize the Builder with + */ + private Builder(PushBatchesOptions pushBatchesOptions) { + this.projectId = pushBatchesOptions.projectId; + this.collectionId = pushBatchesOptions.collectionId; + this.batchId = pushBatchesOptions.batchId; + this.file = pushBatchesOptions.file; + this.filename = pushBatchesOptions.filename; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param projectId the projectId + * @param collectionId the collectionId + * @param batchId the batchId + */ + public Builder(String projectId, String collectionId, String batchId) { + this.projectId = projectId; + this.collectionId = collectionId; + this.batchId = batchId; + } + + /** + * Builds a PushBatchesOptions. + * + * @return the new PushBatchesOptions instance + */ + public PushBatchesOptions build() { + return new PushBatchesOptions(this); + } + + /** + * Set the projectId. + * + * @param projectId the projectId + * @return the PushBatchesOptions builder + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Set the collectionId. + * + * @param collectionId the collectionId + * @return the PushBatchesOptions builder + */ + public Builder collectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + + /** + * Set the batchId. + * + * @param batchId the batchId + * @return the PushBatchesOptions builder + */ + public Builder batchId(String batchId) { + this.batchId = batchId; + return this; + } + + /** + * Set the file. + * + * @param file the file + * @return the PushBatchesOptions builder + */ + public Builder file(InputStream file) { + this.file = file; + return this; + } + + /** + * Set the filename. + * + * @param filename the filename + * @return the PushBatchesOptions builder + */ + public Builder filename(String filename) { + this.filename = filename; + return this; + } + + /** + * Set the file. + * + * @param file the file + * @return the PushBatchesOptions builder + * @throws FileNotFoundException if the file could not be found + */ + public Builder file(File file) throws FileNotFoundException { + this.file = new FileInputStream(file); + this.filename = file.getName(); + return this; + } + } + + protected PushBatchesOptions() {} + + protected PushBatchesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.projectId, "projectId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.collectionId, "collectionId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.batchId, "batchId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.isTrue( + (builder.file == null) || (builder.filename != null), + "filename cannot be null if file is not null."); + projectId = builder.projectId; + collectionId = builder.collectionId; + batchId = builder.batchId; + file = builder.file; + filename = builder.filename; + } + + /** + * New builder. + * + * @return a PushBatchesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the projectId. + * + *

The Universally Unique Identifier (UUID) of the project. This information can be found from + * the *Integrate and Deploy* page in Discovery. + * + * @return the projectId + */ + public String projectId() { + return projectId; + } + + /** + * Gets the collectionId. + * + *

The Universally Unique Identifier (UUID) of the collection. + * + * @return the collectionId + */ + public String collectionId() { + return collectionId; + } + + /** + * Gets the batchId. + * + *

The Universally Unique Identifier (UUID) of the document batch that is being requested from + * Discovery. + * + * @return the batchId + */ + public String batchId() { + return batchId; + } + + /** + * Gets the file. + * + *

A compressed newline-delimited JSON (NDJSON), which is a JSON file with one row of data per + * line. For example, `{batch_id}.ndjson.gz`. For more information, see [Binary attachment in the + * push batches + * method](/docs/discovery-data?topic=discovery-data-external-enrichment#binary-attachment-push-batches). + * + *

There is no limitation on the name of the file because Discovery does not use the name for + * processing. The list of features in the document is specified in the `features` object. + * + * @return the file + */ + public InputStream file() { + return file; + } + + /** + * Gets the filename. + * + *

The filename for file. + * + * @return the filename + */ + public String filename() { + return filename; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java index 6065328419..d60a1076e9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java @@ -178,8 +178,8 @@ public Builder newBuilder() { /** * Gets the projectId. * - *

The ID of the project. This information can be found from the *Integrate and Deploy* page in - * Discovery. + *

The Universally Unique Identifier (UUID) of the project. This information can be found from + * the *Integrate and Deploy* page in Discovery. * * @return the projectId */ @@ -190,7 +190,7 @@ public String projectId() { /** * Gets the collectionId. * - *

The ID of the collection. + *

The Universally Unique Identifier (UUID) of the collection. * * @return the collectionId */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java index 4f6a614cd4..407dd01051 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java @@ -446,8 +446,15 @@ public List xReturn() { /** * Gets the offset. * - *

The number of query results to skip at the beginning. For example, if the total number of - * results that are returned is 10 and the offset is 8, it returns the last two results. + *

The number of query results to skip at the beginning. Consider that the `count` is set to 10 + * (the default value) and the total number of results that are returned is 100. In this case, the + * following examples show the returned results for different `offset` values: + * + *

* If `offset` is set to 95, it returns the last 5 results. + * + *

* If `offset` is set to 10, it returns the second batch of 10 results. + * + *

* If `offset` is set to 100 or more, it returns empty results. * * @return the offset */ diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java index 9169adb714..7dcb74dd08 100644 --- a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java @@ -75,6 +75,8 @@ import com.ibm.watson.discovery.v2.model.GetProjectOptions; import com.ibm.watson.discovery.v2.model.GetStopwordListOptions; import com.ibm.watson.discovery.v2.model.GetTrainingQueryOptions; +import com.ibm.watson.discovery.v2.model.ListBatchesOptions; +import com.ibm.watson.discovery.v2.model.ListBatchesResponse; import com.ibm.watson.discovery.v2.model.ListCollectionsOptions; import com.ibm.watson.discovery.v2.model.ListCollectionsResponse; import com.ibm.watson.discovery.v2.model.ListDocumentClassifierModelsOptions; @@ -89,6 +91,9 @@ import com.ibm.watson.discovery.v2.model.ListProjectsResponse; import com.ibm.watson.discovery.v2.model.ListTrainingQueriesOptions; import com.ibm.watson.discovery.v2.model.ProjectDetails; +import com.ibm.watson.discovery.v2.model.PullBatchesOptions; +import com.ibm.watson.discovery.v2.model.PullBatchesResponse; +import com.ibm.watson.discovery.v2.model.PushBatchesOptions; import com.ibm.watson.discovery.v2.model.QueryCollectionNoticesOptions; import com.ibm.watson.discovery.v2.model.QueryLargePassages; import com.ibm.watson.discovery.v2.model.QueryLargeSimilar; @@ -2462,6 +2467,175 @@ public void testDeleteEnrichmentNoOptions() throws Throwable { discoveryService.deleteEnrichment(null).execute(); } + // Test the listBatches operation with a valid options model parameter + @Test + public void testListBatchesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"batches\": [{\"batch_id\": \"batchId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"enrichment_id\": \"enrichmentId\"}]}"; + String listBatchesPath = "/v2/projects/testString/collections/testString/batches"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListBatchesOptions model + ListBatchesOptions listBatchesOptionsModel = + new ListBatchesOptions.Builder().projectId("testString").collectionId("testString").build(); + + // Invoke listBatches() with a valid options model and verify the result + Response response = + discoveryService.listBatches(listBatchesOptionsModel).execute(); + assertNotNull(response); + ListBatchesResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listBatchesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the listBatches operation with and without retries enabled + @Test + public void testListBatchesWRetries() throws Throwable { + discoveryService.enableRetries(4, 30); + testListBatchesWOptions(); + + discoveryService.disableRetries(); + testListBatchesWOptions(); + } + + // Test the listBatches operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListBatchesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + discoveryService.listBatches(null).execute(); + } + + // Test the pullBatches operation with a valid options model parameter + @Test + public void testPullBatchesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"file\": \"file\"}"; + String pullBatchesPath = "/v2/projects/testString/collections/testString/batches/testString"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the PullBatchesOptions model + PullBatchesOptions pullBatchesOptionsModel = + new PullBatchesOptions.Builder() + .projectId("testString") + .collectionId("testString") + .batchId("testString") + .build(); + + // Invoke pullBatches() with a valid options model and verify the result + Response response = + discoveryService.pullBatches(pullBatchesOptionsModel).execute(); + assertNotNull(response); + PullBatchesResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, pullBatchesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the pullBatches operation with and without retries enabled + @Test + public void testPullBatchesWRetries() throws Throwable { + discoveryService.enableRetries(4, 30); + testPullBatchesWOptions(); + + discoveryService.disableRetries(); + testPullBatchesWOptions(); + } + + // Test the pullBatches operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testPullBatchesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + discoveryService.pullBatches(null).execute(); + } + + // Test the pushBatches operation with a valid options model parameter + @Test + public void testPushBatchesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "false"; + String pushBatchesPath = "/v2/projects/testString/collections/testString/batches/testString"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(202) + .setBody(mockResponseBody)); + + // Construct an instance of the PushBatchesOptions model + PushBatchesOptions pushBatchesOptionsModel = + new PushBatchesOptions.Builder() + .projectId("testString") + .collectionId("testString") + .batchId("testString") + .file(TestUtilities.createMockStream("This is a mock file.")) + .filename("testString") + .build(); + + // Invoke pushBatches() with a valid options model and verify the result + Response response = discoveryService.pushBatches(pushBatchesOptionsModel).execute(); + assertNotNull(response); + Boolean responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, pushBatchesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the pushBatches operation with and without retries enabled + @Test + public void testPushBatchesWRetries() throws Throwable { + discoveryService.enableRetries(4, 30); + testPushBatchesWOptions(); + + discoveryService.disableRetries(); + testPushBatchesWOptions(); + } + + // Test the pushBatches operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testPushBatchesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + discoveryService.pushBatches(null).execute(); + } + // Test the listDocumentClassifiers operation with a valid options model parameter @Test public void testListDocumentClassifiersWOptions() throws Throwable { diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/BatchDetailsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/BatchDetailsTest.java new file mode 100644 index 0000000000..5c1dcff29d --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/BatchDetailsTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the BatchDetails model. */ +public class BatchDetailsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBatchDetails() throws Throwable { + BatchDetails batchDetailsModel = new BatchDetails(); + assertNull(batchDetailsModel.getEnrichmentId()); + } +} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesOptionsTest.java new file mode 100644 index 0000000000..eaa058224c --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesOptionsTest.java @@ -0,0 +1,43 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ListBatchesOptions model. */ +public class ListBatchesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListBatchesOptions() throws Throwable { + ListBatchesOptions listBatchesOptionsModel = + new ListBatchesOptions.Builder().projectId("testString").collectionId("testString").build(); + assertEquals(listBatchesOptionsModel.projectId(), "testString"); + assertEquals(listBatchesOptionsModel.collectionId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListBatchesOptionsError() throws Throwable { + new ListBatchesOptions.Builder().build(); + } +} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesResponseTest.java new file mode 100644 index 0000000000..8e60ce0928 --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/ListBatchesResponseTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ListBatchesResponse model. */ +public class ListBatchesResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListBatchesResponse() throws Throwable { + ListBatchesResponse listBatchesResponseModel = new ListBatchesResponse(); + assertNull(listBatchesResponseModel.getBatches()); + } +} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesOptionsTest.java new file mode 100644 index 0000000000..6f434b72ac --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesOptionsTest.java @@ -0,0 +1,48 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the PullBatchesOptions model. */ +public class PullBatchesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testPullBatchesOptions() throws Throwable { + PullBatchesOptions pullBatchesOptionsModel = + new PullBatchesOptions.Builder() + .projectId("testString") + .collectionId("testString") + .batchId("testString") + .build(); + assertEquals(pullBatchesOptionsModel.projectId(), "testString"); + assertEquals(pullBatchesOptionsModel.collectionId(), "testString"); + assertEquals(pullBatchesOptionsModel.batchId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testPullBatchesOptionsError() throws Throwable { + new PullBatchesOptions.Builder().build(); + } +} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesResponseTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesResponseTest.java new file mode 100644 index 0000000000..e219749c1e --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PullBatchesResponseTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the PullBatchesResponse model. */ +public class PullBatchesResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testPullBatchesResponse() throws Throwable { + PullBatchesResponse pullBatchesResponseModel = new PullBatchesResponse(); + assertNull(pullBatchesResponseModel.getFile()); + } +} diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PushBatchesOptionsTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PushBatchesOptionsTest.java new file mode 100644 index 0000000000..3926863a99 --- /dev/null +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/model/PushBatchesOptionsTest.java @@ -0,0 +1,55 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.discovery.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.discovery.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.apache.commons.io.IOUtils; +import org.testng.annotations.Test; + +/** Unit test class for the PushBatchesOptions model. */ +public class PushBatchesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testPushBatchesOptions() throws Throwable { + PushBatchesOptions pushBatchesOptionsModel = + new PushBatchesOptions.Builder() + .projectId("testString") + .collectionId("testString") + .batchId("testString") + .file(TestUtilities.createMockStream("This is a mock file.")) + .filename("testString") + .build(); + assertEquals(pushBatchesOptionsModel.projectId(), "testString"); + assertEquals(pushBatchesOptionsModel.collectionId(), "testString"); + assertEquals(pushBatchesOptionsModel.batchId(), "testString"); + assertEquals( + IOUtils.toString(pushBatchesOptionsModel.file()), + IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); + assertEquals(pushBatchesOptionsModel.filename(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testPushBatchesOptionsError() throws Throwable { + new PushBatchesOptions.Builder().build(); + } +} From cd950086bb71fdf1ad3ef1c5dd9c70e647aab8b9 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Thu, 31 Oct 2024 15:17:53 -0500 Subject: [PATCH 08/12] chore: update to generator 3.96.0 --- .../java/com/ibm/watson/assistant/v1/Assistant.java | 2 +- .../assistant/v1/model/AgentAvailabilityMessage.java | 3 ++- .../assistant/v1/model/BulkClassifyOptions.java | 3 ++- .../assistant/v1/model/BulkClassifyOutput.java | 3 ++- .../assistant/v1/model/BulkClassifyResponse.java | 3 ++- .../assistant/v1/model/BulkClassifyUtterance.java | 3 ++- .../ibm/watson/assistant/v1/model/CaptureGroup.java | 3 ++- .../assistant/v1/model/ChannelTransferInfo.java | 3 ++- .../assistant/v1/model/ChannelTransferTarget.java | 3 ++- .../v1/model/ChannelTransferTargetChat.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Context.java | 7 +++++-- .../watson/assistant/v1/model/Counterexample.java | 3 ++- .../assistant/v1/model/CounterexampleCollection.java | 3 ++- .../v1/model/CreateCounterexampleOptions.java | 3 ++- .../assistant/v1/model/CreateDialogNodeOptions.java | 3 ++- .../ibm/watson/assistant/v1/model/CreateEntity.java | 3 ++- .../assistant/v1/model/CreateEntityOptions.java | 3 ++- .../assistant/v1/model/CreateExampleOptions.java | 3 ++- .../ibm/watson/assistant/v1/model/CreateIntent.java | 3 ++- .../assistant/v1/model/CreateIntentOptions.java | 3 ++- .../assistant/v1/model/CreateSynonymOptions.java | 3 ++- .../ibm/watson/assistant/v1/model/CreateValue.java | 3 ++- .../assistant/v1/model/CreateValueOptions.java | 3 ++- .../v1/model/CreateWorkspaceAsyncOptions.java | 3 ++- .../assistant/v1/model/CreateWorkspaceOptions.java | 3 ++- .../v1/model/DeleteCounterexampleOptions.java | 3 ++- .../assistant/v1/model/DeleteDialogNodeOptions.java | 3 ++- .../assistant/v1/model/DeleteEntityOptions.java | 3 ++- .../assistant/v1/model/DeleteExampleOptions.java | 3 ++- .../assistant/v1/model/DeleteIntentOptions.java | 3 ++- .../assistant/v1/model/DeleteSynonymOptions.java | 3 ++- .../assistant/v1/model/DeleteUserDataOptions.java | 3 ++- .../assistant/v1/model/DeleteValueOptions.java | 3 ++- .../assistant/v1/model/DeleteWorkspaceOptions.java | 3 ++- .../ibm/watson/assistant/v1/model/DialogNode.java | 3 ++- .../watson/assistant/v1/model/DialogNodeAction.java | 3 ++- .../assistant/v1/model/DialogNodeCollection.java | 3 ++- .../watson/assistant/v1/model/DialogNodeContext.java | 11 ++++++++--- .../assistant/v1/model/DialogNodeNextStep.java | 3 ++- .../watson/assistant/v1/model/DialogNodeOutput.java | 8 ++++++-- .../DialogNodeOutputConnectToAgentTransferInfo.java | 3 ++- .../assistant/v1/model/DialogNodeOutputGeneric.java | 4 ++-- ...tputGenericDialogNodeOutputResponseTypeAudio.java | 3 ++- ...cDialogNodeOutputResponseTypeChannelTransfer.java | 7 ++++--- ...icDialogNodeOutputResponseTypeConnectToAgent.java | 3 ++- ...putGenericDialogNodeOutputResponseTypeIframe.java | 3 ++- ...tputGenericDialogNodeOutputResponseTypeImage.java | 3 ++- ...putGenericDialogNodeOutputResponseTypeOption.java | 3 ++- ...tputGenericDialogNodeOutputResponseTypePause.java | 3 ++- ...nericDialogNodeOutputResponseTypeSearchSkill.java | 3 ++- ...utputGenericDialogNodeOutputResponseTypeText.java | 3 ++- ...nericDialogNodeOutputResponseTypeUserDefined.java | 3 ++- ...tputGenericDialogNodeOutputResponseTypeVideo.java | 3 ++- .../v1/model/DialogNodeOutputModifiers.java | 3 ++- .../v1/model/DialogNodeOutputOptionsElement.java | 3 ++- .../model/DialogNodeOutputOptionsElementValue.java | 3 ++- .../v1/model/DialogNodeOutputTextValuesElement.java | 3 ++- .../assistant/v1/model/DialogNodeVisitedDetails.java | 3 ++- .../watson/assistant/v1/model/DialogSuggestion.java | 3 ++- .../assistant/v1/model/DialogSuggestionValue.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Entity.java | 3 ++- .../watson/assistant/v1/model/EntityCollection.java | 3 ++- .../ibm/watson/assistant/v1/model/EntityMention.java | 3 ++- .../assistant/v1/model/EntityMentionCollection.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Example.java | 3 ++- .../watson/assistant/v1/model/ExampleCollection.java | 3 ++- .../v1/model/ExportWorkspaceAsyncOptions.java | 3 ++- .../assistant/v1/model/GetCounterexampleOptions.java | 3 ++- .../assistant/v1/model/GetDialogNodeOptions.java | 3 ++- .../watson/assistant/v1/model/GetEntityOptions.java | 3 ++- .../watson/assistant/v1/model/GetExampleOptions.java | 3 ++- .../watson/assistant/v1/model/GetIntentOptions.java | 3 ++- .../watson/assistant/v1/model/GetSynonymOptions.java | 3 ++- .../watson/assistant/v1/model/GetValueOptions.java | 3 ++- .../assistant/v1/model/GetWorkspaceOptions.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Intent.java | 3 ++- .../watson/assistant/v1/model/IntentCollection.java | 3 ++- .../assistant/v1/model/ListAllLogsOptions.java | 3 ++- .../v1/model/ListCounterexamplesOptions.java | 3 ++- .../assistant/v1/model/ListDialogNodesOptions.java | 3 ++- .../assistant/v1/model/ListEntitiesOptions.java | 3 ++- .../assistant/v1/model/ListExamplesOptions.java | 3 ++- .../assistant/v1/model/ListIntentsOptions.java | 3 ++- .../watson/assistant/v1/model/ListLogsOptions.java | 3 ++- .../assistant/v1/model/ListMentionsOptions.java | 3 ++- .../assistant/v1/model/ListSynonymsOptions.java | 3 ++- .../watson/assistant/v1/model/ListValuesOptions.java | 3 ++- .../assistant/v1/model/ListWorkspacesOptions.java | 3 ++- .../java/com/ibm/watson/assistant/v1/model/Log.java | 3 ++- .../ibm/watson/assistant/v1/model/LogCollection.java | 3 ++- .../ibm/watson/assistant/v1/model/LogMessage.java | 3 ++- .../watson/assistant/v1/model/LogMessageSource.java | 3 ++- .../ibm/watson/assistant/v1/model/LogPagination.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Mention.java | 3 ++- .../assistant/v1/model/MessageContextMetadata.java | 3 ++- .../ibm/watson/assistant/v1/model/MessageInput.java | 12 +++++++++--- .../watson/assistant/v1/model/MessageOptions.java | 3 ++- .../watson/assistant/v1/model/MessageRequest.java | 3 ++- .../watson/assistant/v1/model/MessageResponse.java | 3 ++- .../ibm/watson/assistant/v1/model/OutputData.java | 8 ++++++-- .../ibm/watson/assistant/v1/model/Pagination.java | 3 ++- .../assistant/v1/model/ResponseGenericChannel.java | 3 ++- .../ibm/watson/assistant/v1/model/RuntimeEntity.java | 3 ++- .../assistant/v1/model/RuntimeEntityAlternative.java | 3 ++- .../v1/model/RuntimeEntityInterpretation.java | 3 ++- .../watson/assistant/v1/model/RuntimeEntityRole.java | 3 ++- .../ibm/watson/assistant/v1/model/RuntimeIntent.java | 3 ++- .../assistant/v1/model/RuntimeResponseGeneric.java | 4 ++-- ...ntimeResponseGenericRuntimeResponseTypeAudio.java | 3 ++- ...nseGenericRuntimeResponseTypeChannelTransfer.java | 3 ++- ...onseGenericRuntimeResponseTypeConnectToAgent.java | 3 ++- ...timeResponseGenericRuntimeResponseTypeIframe.java | 3 ++- ...ntimeResponseGenericRuntimeResponseTypeImage.java | 3 ++- ...timeResponseGenericRuntimeResponseTypeOption.java | 3 ++- ...ntimeResponseGenericRuntimeResponseTypePause.java | 3 ++- ...ResponseGenericRuntimeResponseTypeSuggestion.java | 3 ++- ...untimeResponseGenericRuntimeResponseTypeText.java | 3 ++- ...esponseGenericRuntimeResponseTypeUserDefined.java | 3 ++- ...ntimeResponseGenericRuntimeResponseTypeVideo.java | 3 ++- .../ibm/watson/assistant/v1/model/StatusError.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Synonym.java | 3 ++- .../watson/assistant/v1/model/SynonymCollection.java | 3 ++- .../v1/model/UpdateCounterexampleOptions.java | 3 ++- .../assistant/v1/model/UpdateDialogNodeOptions.java | 3 ++- .../assistant/v1/model/UpdateEntityOptions.java | 3 ++- .../assistant/v1/model/UpdateExampleOptions.java | 3 ++- .../assistant/v1/model/UpdateIntentOptions.java | 3 ++- .../assistant/v1/model/UpdateSynonymOptions.java | 3 ++- .../assistant/v1/model/UpdateValueOptions.java | 3 ++- .../v1/model/UpdateWorkspaceAsyncOptions.java | 3 ++- .../assistant/v1/model/UpdateWorkspaceOptions.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Value.java | 3 ++- .../watson/assistant/v1/model/ValueCollection.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Webhook.java | 3 ++- .../ibm/watson/assistant/v1/model/WebhookHeader.java | 3 ++- .../com/ibm/watson/assistant/v1/model/Workspace.java | 3 ++- .../assistant/v1/model/WorkspaceCollection.java | 3 ++- .../watson/assistant/v1/model/WorkspaceCounts.java | 3 ++- .../assistant/v1/model/WorkspaceSystemSettings.java | 11 ++++++++--- .../model/WorkspaceSystemSettingsDisambiguation.java | 3 ++- .../v1/model/WorkspaceSystemSettingsNlp.java | 3 ++- .../v1/model/WorkspaceSystemSettingsOffTopic.java | 3 ++- .../model/WorkspaceSystemSettingsSystemEntities.java | 3 ++- .../v1/model/WorkspaceSystemSettingsTooling.java | 3 ++- .../com/ibm/watson/assistant/v1/package-info.java | 1 + .../com/ibm/watson/assistant/v1/AssistantTest.java | 1 + .../ibm/watson/assistant/v1/utils/TestUtilities.java | 8 +++++--- .../java/com/ibm/watson/discovery/v2/Discovery.java | 2 +- .../discovery/v2/model/AddDocumentOptions.java | 3 ++- .../discovery/v2/model/AnalyzeDocumentOptions.java | 3 ++- .../watson/discovery/v2/model/AnalyzedDocument.java | 3 ++- .../watson/discovery/v2/model/AnalyzedResult.java | 9 +++++++-- .../ibm/watson/discovery/v2/model/BatchDetails.java | 1 + .../discovery/v2/model/ClassifierFederatedModel.java | 3 ++- .../v2/model/ClassifierModelEvaluation.java | 3 ++- .../ibm/watson/discovery/v2/model/Collection.java | 3 ++- .../watson/discovery/v2/model/CollectionDetails.java | 3 ++- .../CollectionDetailsSmartDocumentUnderstanding.java | 3 ++- .../discovery/v2/model/CollectionEnrichment.java | 3 ++- .../ibm/watson/discovery/v2/model/Completions.java | 3 ++- .../v2/model/ComponentSettingsAggregation.java | 3 ++- .../v2/model/ComponentSettingsFieldsShown.java | 3 ++- .../v2/model/ComponentSettingsFieldsShownBody.java | 3 ++- .../v2/model/ComponentSettingsFieldsShownTitle.java | 3 ++- .../v2/model/ComponentSettingsResponse.java | 3 ++- .../discovery/v2/model/CreateCollectionOptions.java | 3 ++- .../discovery/v2/model/CreateDocumentClassifier.java | 3 ++- .../model/CreateDocumentClassifierModelOptions.java | 3 ++- .../v2/model/CreateDocumentClassifierOptions.java | 3 ++- .../watson/discovery/v2/model/CreateEnrichment.java | 3 ++- .../discovery/v2/model/CreateEnrichmentOptions.java | 3 ++- .../discovery/v2/model/CreateExpansionsOptions.java | 3 ++- .../discovery/v2/model/CreateProjectOptions.java | 3 ++- .../v2/model/CreateStopwordListOptions.java | 3 ++- .../v2/model/CreateTrainingQueryOptions.java | 3 ++- .../discovery/v2/model/DefaultQueryParams.java | 3 ++- .../v2/model/DefaultQueryParamsPassages.java | 3 ++- .../DefaultQueryParamsSuggestedRefinements.java | 3 ++- .../v2/model/DefaultQueryParamsTableResults.java | 3 ++- .../discovery/v2/model/DeleteCollectionOptions.java | 3 ++- .../model/DeleteDocumentClassifierModelOptions.java | 3 ++- .../v2/model/DeleteDocumentClassifierOptions.java | 3 ++- .../discovery/v2/model/DeleteDocumentOptions.java | 3 ++- .../discovery/v2/model/DeleteDocumentResponse.java | 3 ++- .../discovery/v2/model/DeleteEnrichmentOptions.java | 3 ++- .../discovery/v2/model/DeleteExpansionsOptions.java | 3 ++- .../discovery/v2/model/DeleteProjectOptions.java | 3 ++- .../v2/model/DeleteStopwordListOptions.java | 3 ++- .../v2/model/DeleteTrainingQueriesOptions.java | 3 ++- .../v2/model/DeleteTrainingQueryOptions.java | 3 ++- .../discovery/v2/model/DeleteUserDataOptions.java | 3 ++- .../watson/discovery/v2/model/DocumentAccepted.java | 3 ++- .../watson/discovery/v2/model/DocumentAttribute.java | 3 ++- .../discovery/v2/model/DocumentClassifier.java | 3 ++- .../v2/model/DocumentClassifierEnrichment.java | 3 ++- .../discovery/v2/model/DocumentClassifierModel.java | 3 ++- .../discovery/v2/model/DocumentClassifierModels.java | 3 ++- .../discovery/v2/model/DocumentClassifiers.java | 3 ++- .../watson/discovery/v2/model/DocumentDetails.java | 3 ++- .../discovery/v2/model/DocumentDetailsChildren.java | 3 ++- .../ibm/watson/discovery/v2/model/Enrichment.java | 3 ++- .../watson/discovery/v2/model/EnrichmentOptions.java | 3 ++- .../ibm/watson/discovery/v2/model/Enrichments.java | 3 ++- .../com/ibm/watson/discovery/v2/model/Expansion.java | 3 ++- .../ibm/watson/discovery/v2/model/Expansions.java | 3 ++- .../com/ibm/watson/discovery/v2/model/Field.java | 3 ++- .../discovery/v2/model/GetAutocompletionOptions.java | 3 ++- .../discovery/v2/model/GetCollectionOptions.java | 3 ++- .../v2/model/GetComponentSettingsOptions.java | 3 ++- .../v2/model/GetDocumentClassifierModelOptions.java | 3 ++- .../v2/model/GetDocumentClassifierOptions.java | 3 ++- .../discovery/v2/model/GetDocumentOptions.java | 3 ++- .../discovery/v2/model/GetEnrichmentOptions.java | 3 ++- .../watson/discovery/v2/model/GetProjectOptions.java | 3 ++- .../discovery/v2/model/GetStopwordListOptions.java | 3 ++- .../discovery/v2/model/GetTrainingQueryOptions.java | 3 ++- .../discovery/v2/model/ListBatchesOptions.java | 1 + .../discovery/v2/model/ListBatchesResponse.java | 1 + .../discovery/v2/model/ListCollectionsOptions.java | 3 ++- .../discovery/v2/model/ListCollectionsResponse.java | 3 ++- .../model/ListDocumentClassifierModelsOptions.java | 3 ++- .../v2/model/ListDocumentClassifiersOptions.java | 3 ++- .../discovery/v2/model/ListDocumentsOptions.java | 3 ++- .../discovery/v2/model/ListDocumentsResponse.java | 3 ++- .../discovery/v2/model/ListEnrichmentsOptions.java | 3 ++- .../discovery/v2/model/ListExpansionsOptions.java | 3 ++- .../watson/discovery/v2/model/ListFieldsOptions.java | 3 ++- .../discovery/v2/model/ListFieldsResponse.java | 3 ++- .../discovery/v2/model/ListProjectsOptions.java | 3 ++- .../discovery/v2/model/ListProjectsResponse.java | 3 ++- .../v2/model/ListTrainingQueriesOptions.java | 3 ++- .../v2/model/ModelEvaluationMacroAverage.java | 3 ++- .../v2/model/ModelEvaluationMicroAverage.java | 3 ++- .../com/ibm/watson/discovery/v2/model/Notice.java | 3 ++- .../discovery/v2/model/PerClassModelEvaluation.java | 3 ++- .../watson/discovery/v2/model/ProjectDetails.java | 3 ++- .../discovery/v2/model/ProjectListDetails.java | 3 ++- .../ProjectListDetailsRelevancyTrainingStatus.java | 3 ++- .../discovery/v2/model/PullBatchesOptions.java | 1 + .../discovery/v2/model/PullBatchesResponse.java | 1 + .../discovery/v2/model/PushBatchesOptions.java | 1 + .../watson/discovery/v2/model/QueryAggregation.java | 3 ++- .../QueryAggregationQueryCalculationAggregation.java | 3 ++- .../QueryAggregationQueryFilterAggregation.java | 3 ++- .../QueryAggregationQueryGroupByAggregation.java | 3 ++- .../QueryAggregationQueryHistogramAggregation.java | 3 ++- .../QueryAggregationQueryNestedAggregation.java | 3 ++- .../model/QueryAggregationQueryPairAggregation.java | 3 ++- .../model/QueryAggregationQueryTermAggregation.java | 3 ++- .../QueryAggregationQueryTimesliceAggregation.java | 3 ++- .../QueryAggregationQueryTopHitsAggregation.java | 3 ++- .../model/QueryAggregationQueryTopicAggregation.java | 3 ++- .../model/QueryAggregationQueryTrendAggregation.java | 3 ++- .../v2/model/QueryCollectionNoticesOptions.java | 3 ++- .../v2/model/QueryGroupByAggregationResult.java | 3 ++- .../v2/model/QueryHistogramAggregationResult.java | 3 ++- .../discovery/v2/model/QueryLargePassages.java | 3 ++- .../watson/discovery/v2/model/QueryLargeSimilar.java | 3 ++- .../v2/model/QueryLargeSuggestedRefinements.java | 3 ++- .../discovery/v2/model/QueryLargeTableResults.java | 3 ++- .../discovery/v2/model/QueryNoticesOptions.java | 3 ++- .../discovery/v2/model/QueryNoticesResponse.java | 3 ++- .../ibm/watson/discovery/v2/model/QueryOptions.java | 3 ++- .../v2/model/QueryPairAggregationResult.java | 3 ++- .../ibm/watson/discovery/v2/model/QueryResponse.java | 3 ++- .../discovery/v2/model/QueryResponsePassage.java | 3 ++- .../ibm/watson/discovery/v2/model/QueryResult.java | 9 +++++++-- .../discovery/v2/model/QueryResultMetadata.java | 3 ++- .../discovery/v2/model/QueryResultPassage.java | 3 ++- .../discovery/v2/model/QuerySuggestedRefinement.java | 3 ++- .../watson/discovery/v2/model/QueryTableResult.java | 3 ++- .../v2/model/QueryTermAggregationResult.java | 3 ++- .../v2/model/QueryTimesliceAggregationResult.java | 3 ++- .../v2/model/QueryTopHitsAggregationResult.java | 3 ++- .../v2/model/QueryTopicAggregationResult.java | 3 ++- .../v2/model/QueryTrendAggregationResult.java | 3 ++- .../discovery/v2/model/ResultPassageAnswer.java | 3 ++- .../watson/discovery/v2/model/RetrievalDetails.java | 3 ++- .../ibm/watson/discovery/v2/model/StopWordList.java | 3 ++- .../watson/discovery/v2/model/TableBodyCells.java | 3 ++- .../ibm/watson/discovery/v2/model/TableCellKey.java | 3 ++- .../watson/discovery/v2/model/TableCellValues.java | 3 ++- .../discovery/v2/model/TableColumnHeaders.java | 3 ++- .../discovery/v2/model/TableElementLocation.java | 3 ++- .../ibm/watson/discovery/v2/model/TableHeaders.java | 3 ++- .../discovery/v2/model/TableKeyValuePairs.java | 3 ++- .../watson/discovery/v2/model/TableResultTable.java | 3 ++- .../watson/discovery/v2/model/TableRowHeaders.java | 3 ++- .../watson/discovery/v2/model/TableTextLocation.java | 3 ++- .../watson/discovery/v2/model/TrainingExample.java | 3 ++- .../ibm/watson/discovery/v2/model/TrainingQuery.java | 3 ++- .../watson/discovery/v2/model/TrainingQuerySet.java | 3 ++- .../discovery/v2/model/UpdateCollectionOptions.java | 3 ++- .../discovery/v2/model/UpdateDocumentClassifier.java | 3 ++- .../model/UpdateDocumentClassifierModelOptions.java | 3 ++- .../v2/model/UpdateDocumentClassifierOptions.java | 3 ++- .../discovery/v2/model/UpdateDocumentOptions.java | 3 ++- .../discovery/v2/model/UpdateEnrichmentOptions.java | 3 ++- .../discovery/v2/model/UpdateProjectOptions.java | 3 ++- .../v2/model/UpdateTrainingQueryOptions.java | 3 ++- .../ibm/watson/discovery/v2/model/WebhookHeader.java | 1 + .../com/ibm/watson/discovery/v2/package-info.java | 3 ++- .../com/ibm/watson/discovery/v2/DiscoveryTest.java | 3 ++- .../ibm/watson/discovery/v2/utils/TestUtilities.java | 8 +++++--- .../ibm/watson/speech_to_text/v1/SpeechToText.java | 4 ++-- .../speech_to_text/v1/model/AcousticModel.java | 3 ++- .../speech_to_text/v1/model/AcousticModels.java | 3 ++- .../speech_to_text/v1/model/AddAudioOptions.java | 3 ++- .../speech_to_text/v1/model/AddCorpusOptions.java | 3 ++- .../speech_to_text/v1/model/AddGrammarOptions.java | 3 ++- .../speech_to_text/v1/model/AddWordOptions.java | 3 ++- .../speech_to_text/v1/model/AddWordsOptions.java | 3 ++- .../watson/speech_to_text/v1/model/AudioDetails.java | 3 ++- .../watson/speech_to_text/v1/model/AudioListing.java | 3 ++- .../watson/speech_to_text/v1/model/AudioMetrics.java | 3 ++- .../speech_to_text/v1/model/AudioMetricsDetails.java | 3 ++- .../v1/model/AudioMetricsHistogramBin.java | 3 ++- .../speech_to_text/v1/model/AudioResource.java | 3 ++- .../speech_to_text/v1/model/AudioResources.java | 3 ++- .../speech_to_text/v1/model/CheckJobOptions.java | 3 ++- .../speech_to_text/v1/model/CheckJobsOptions.java | 3 ++- .../ibm/watson/speech_to_text/v1/model/Corpora.java | 3 ++- .../ibm/watson/speech_to_text/v1/model/Corpus.java | 3 ++- .../v1/model/CreateAcousticModelOptions.java | 3 ++- .../speech_to_text/v1/model/CreateJobOptions.java | 3 ++- .../v1/model/CreateLanguageModelOptions.java | 3 ++- .../watson/speech_to_text/v1/model/CustomWord.java | 3 ++- .../v1/model/DeleteAcousticModelOptions.java | 3 ++- .../speech_to_text/v1/model/DeleteAudioOptions.java | 3 ++- .../speech_to_text/v1/model/DeleteCorpusOptions.java | 3 ++- .../v1/model/DeleteGrammarOptions.java | 3 ++- .../speech_to_text/v1/model/DeleteJobOptions.java | 3 ++- .../v1/model/DeleteLanguageModelOptions.java | 3 ++- .../v1/model/DeleteUserDataOptions.java | 3 ++- .../speech_to_text/v1/model/DeleteWordOptions.java | 3 ++- .../v1/model/GetAcousticModelOptions.java | 3 ++- .../speech_to_text/v1/model/GetAudioOptions.java | 3 ++- .../speech_to_text/v1/model/GetCorpusOptions.java | 3 ++- .../speech_to_text/v1/model/GetGrammarOptions.java | 3 ++- .../v1/model/GetLanguageModelOptions.java | 3 ++- .../speech_to_text/v1/model/GetModelOptions.java | 3 ++- .../speech_to_text/v1/model/GetWordOptions.java | 3 ++- .../ibm/watson/speech_to_text/v1/model/Grammar.java | 3 ++- .../ibm/watson/speech_to_text/v1/model/Grammars.java | 3 ++- .../speech_to_text/v1/model/KeywordResult.java | 3 ++- .../speech_to_text/v1/model/LanguageModel.java | 3 ++- .../speech_to_text/v1/model/LanguageModels.java | 3 ++- .../v1/model/ListAcousticModelsOptions.java | 3 ++- .../speech_to_text/v1/model/ListAudioOptions.java | 3 ++- .../speech_to_text/v1/model/ListCorporaOptions.java | 3 ++- .../speech_to_text/v1/model/ListGrammarsOptions.java | 3 ++- .../v1/model/ListLanguageModelsOptions.java | 3 ++- .../speech_to_text/v1/model/ListModelsOptions.java | 3 ++- .../speech_to_text/v1/model/ListWordsOptions.java | 3 ++- .../speech_to_text/v1/model/ProcessedAudio.java | 3 ++- .../speech_to_text/v1/model/ProcessingMetrics.java | 3 ++- .../speech_to_text/v1/model/RecognitionJob.java | 3 ++- .../speech_to_text/v1/model/RecognitionJobs.java | 3 ++- .../speech_to_text/v1/model/RecognizeOptions.java | 3 ++- .../v1/model/RegisterCallbackOptions.java | 3 ++- .../speech_to_text/v1/model/RegisterStatus.java | 3 ++- .../v1/model/ResetAcousticModelOptions.java | 3 ++- .../v1/model/ResetLanguageModelOptions.java | 3 ++- .../speech_to_text/v1/model/SpeakerLabelsResult.java | 3 ++- .../watson/speech_to_text/v1/model/SpeechModel.java | 3 ++- .../watson/speech_to_text/v1/model/SpeechModels.java | 3 ++- .../v1/model/SpeechRecognitionAlternative.java | 3 ++- .../v1/model/SpeechRecognitionResult.java | 3 ++- .../v1/model/SpeechRecognitionResults.java | 3 ++- .../speech_to_text/v1/model/SupportedFeatures.java | 3 ++- .../v1/model/TrainAcousticModelOptions.java | 3 ++- .../v1/model/TrainLanguageModelOptions.java | 3 ++- .../speech_to_text/v1/model/TrainingResponse.java | 3 ++- .../speech_to_text/v1/model/TrainingWarning.java | 3 ++- .../v1/model/UnregisterCallbackOptions.java | 3 ++- .../v1/model/UpgradeAcousticModelOptions.java | 3 ++- .../v1/model/UpgradeLanguageModelOptions.java | 3 ++- .../com/ibm/watson/speech_to_text/v1/model/Word.java | 3 ++- .../v1/model/WordAlternativeResult.java | 3 ++- .../v1/model/WordAlternativeResults.java | 3 ++- .../watson/speech_to_text/v1/model/WordError.java | 3 ++- .../ibm/watson/speech_to_text/v1/model/Words.java | 3 ++- .../ibm/watson/speech_to_text/v1/package-info.java | 3 ++- .../watson/speech_to_text/v1/SpeechToTextTest.java | 3 ++- .../speech_to_text/v1/utils/TestUtilities.java | 8 +++++--- .../ibm/watson/text_to_speech/v1/TextToSpeech.java | 2 +- .../v1/model/AddCustomPromptOptions.java | 3 ++- .../text_to_speech/v1/model/AddWordOptions.java | 3 ++- .../text_to_speech/v1/model/AddWordsOptions.java | 3 ++- .../v1/model/CreateCustomModelOptions.java | 3 ++- .../v1/model/CreateSpeakerModelOptions.java | 3 ++- .../watson/text_to_speech/v1/model/CustomModel.java | 3 ++- .../watson/text_to_speech/v1/model/CustomModels.java | 3 ++- .../v1/model/DeleteCustomModelOptions.java | 3 ++- .../v1/model/DeleteCustomPromptOptions.java | 3 ++- .../v1/model/DeleteSpeakerModelOptions.java | 3 ++- .../v1/model/DeleteUserDataOptions.java | 3 ++- .../text_to_speech/v1/model/DeleteWordOptions.java | 3 ++- .../v1/model/GetCustomModelOptions.java | 3 ++- .../v1/model/GetCustomPromptOptions.java | 3 ++- .../v1/model/GetPronunciationOptions.java | 3 ++- .../v1/model/GetSpeakerModelOptions.java | 3 ++- .../text_to_speech/v1/model/GetVoiceOptions.java | 3 ++- .../text_to_speech/v1/model/GetWordOptions.java | 3 ++- .../v1/model/ListCustomModelsOptions.java | 3 ++- .../v1/model/ListCustomPromptsOptions.java | 3 ++- .../v1/model/ListSpeakerModelsOptions.java | 3 ++- .../text_to_speech/v1/model/ListVoicesOptions.java | 3 ++- .../text_to_speech/v1/model/ListWordsOptions.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Prompt.java | 3 ++- .../text_to_speech/v1/model/PromptMetadata.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Prompts.java | 3 ++- .../text_to_speech/v1/model/Pronunciation.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Speaker.java | 3 ++- .../text_to_speech/v1/model/SpeakerCustomModel.java | 3 ++- .../text_to_speech/v1/model/SpeakerCustomModels.java | 3 ++- .../watson/text_to_speech/v1/model/SpeakerModel.java | 3 ++- .../text_to_speech/v1/model/SpeakerPrompt.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Speakers.java | 3 ++- .../text_to_speech/v1/model/SupportedFeatures.java | 3 ++- .../text_to_speech/v1/model/SynthesizeOptions.java | 3 ++- .../watson/text_to_speech/v1/model/Translation.java | 3 ++- .../v1/model/UpdateCustomModelOptions.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Voice.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Voices.java | 3 ++- .../com/ibm/watson/text_to_speech/v1/model/Word.java | 3 ++- .../ibm/watson/text_to_speech/v1/model/Words.java | 3 ++- .../ibm/watson/text_to_speech/v1/package-info.java | 3 ++- .../watson/text_to_speech/v1/TextToSpeechTest.java | 9 +++++---- .../text_to_speech/v1/utils/TestUtilities.java | 8 +++++--- 430 files changed, 905 insertions(+), 448 deletions(-) diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java index 8856c8e6e5..53400ad134 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 */ package com.ibm.watson.assistant.v1; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java index 1bebda3b79..b9f865e6b5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java index f0aebfea00..70c1b69101 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java index 2d7f5508b2..c84f6aff6b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java index b92455bcee..a4ecb3240a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java index 2a23484c20..5c49dd8d3b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java index ba7b762046..703430b82a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java index ec8d97cc76..21a31849bd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java index 4d0a3b3d28..d9e356ed9f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java index 8daa25e257..5a77e961f7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java index c1a748d045..d8d293c20a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -21,6 +22,8 @@ /** * State information for the conversation. To maintain state, include the context from the previous * response. + * + *

This type supports additional properties of type Object. Any context variable. */ public class Context extends DynamicModel { @@ -102,7 +105,7 @@ public Builder metadata(MessageContextMetadata metadata) { } /** - * Add an arbitrary property. + * Add an arbitrary property. Any context variable. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java index f6395882b6..0c7c8fac7e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java index 2ecabe732b..80f23c8287 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java index b6576d773d..776a4ec5ff 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java index 41e874dbff..4948adcce8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java index f34cf57e12..a8799f596f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java index e74d3c4a14..b31bbdd032 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java index 3597553a1a..701577e4cb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java index 9e929b96a5..7190514337 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java index 16c250c77b..a1a9efb2d7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java index 954bb40983..126ddbf9a3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java index 64cbdcea17..7d1ec802cb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java index 98e5b354d2..746dd0673a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java index 90996b4dd7..c60c4c2349 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java index c2a646f28e..3779168661 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java index e4e3e16313..7b4a711f46 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java index 9bf0bd6b3f..aae01ce1fc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java index e37314d60e..db2ef5c04b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java index 40472e68f8..1d06a94ed2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java index 16ab640d39..9b4b66f6b6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java index 80c52690c4..26bd471822 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java index 5c71ac8539..b7097b588f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java index cc85a130e0..cadaae7ba9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java index 5fec8892a7..9cf7991eef 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java index a565fa1f5f..b5d64a9571 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java index 7001daf1ea..12be01a0a5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java index 5430b2c324..63626cec5f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java index 9474235c3d..887ff2d613 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -18,7 +19,11 @@ import java.util.HashMap; import java.util.Map; -/** The context for the dialog node. */ +/** + * The context for the dialog node. + * + *

This type supports additional properties of type Object. Any context variable. + */ public class DialogNodeContext extends DynamicModel { @SerializedName("integrations") @@ -67,7 +72,7 @@ public Builder integrations(Map> integrations) { } /** - * Add an arbitrary property. + * Add an arbitrary property. Any context variable. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java index 6f8949fd68..64ce52c8a3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java index d906c530f0..23e42525fb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -24,6 +25,9 @@ * The output of the dialog node. For more information about how to specify dialog node output, see * the * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses). + * + *

This type supports additional properties of type Object. Any additional data included in the + * dialog node output. */ public class DialogNodeOutput extends DynamicModel { @@ -120,7 +124,7 @@ public Builder modifiers(DialogNodeOutputModifiers modifiers) { } /** - * Add an arbitrary property. + * Add an arbitrary property. Any additional data included in the dialog node output. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java index 0f34e32b42..44b5741345 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java index 7603100f4e..2307bfa534 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2022. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -64,7 +65,6 @@ public class DialogNodeOutputGeneric extends GenericModel { discriminatorMapping.put( "video", DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.class); } - /** How a response is selected from the list, if more than one response is specified. */ public interface SelectionPolicy { /** sequential. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java index af1e9c1558..07ec650673 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer.java index 38ad6183d1..1b52182a23 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -75,9 +76,9 @@ public DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer build( } /** - * Adds an channels to channels. + * Adds a new element to channels. * - * @param channels the new channels + * @param channels the new element to be added * @return the DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer builder */ public Builder addChannels(ResponseGenericChannel channels) { diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java index c10e4e4fae..9d72ed76fd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java index 7422d29faa..bbc4c5c76a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java index 56bbc4afc3..87aed0075d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java index 9dcdb83d5b..94ad391435 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java index 1391110618..e54d30a649 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java index 5d1245c39e..e27dae0d35 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java index b9025cb20f..88661a0f12 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java index 100f0b48c0..3ba0775b34 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java index e4ec9a28cf..1db469c5e1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java index 9bce4a05c4..6ee4f9dafc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java index dab274df95..991d24240d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java index bb9ba3b752..1fa5f8cd41 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java index 23c323c801..1bb323e118 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java index cb6fb468be..74c025b46a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java index a9def32ba6..4b88a882de 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java index 376f3d4db2..ea5c77a2c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java index e4b3a2b4d0..2ac42c0860 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java index 93966cd54d..c9b5af911a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java index 27f71f8a93..f1c372c1ff 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java index 6fbfb3b7c0..d6119ba117 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java index c99929fb77..9b5d5851e9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java index 66050326e7..f88e08da0a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java index 006be25def..02b58ba103 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java index c232b2a77f..4868c1e54a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java index fe20549866..b328f67fdc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java index 3f9b12b7aa..91cda6e576 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java index 6440f6fbee..01656d0cfa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java index e7933b36e6..fe34bc4c53 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java index cf6b13c14f..4754d96cb4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java index 4dfeaddcb4..336711bb7d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java index 352afeab11..cacd9dc9a7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java index 8b92cf4e60..029aa562bf 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java index 38501ac31c..f260c0a90b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java index 61eb483bd9..17adaaa9c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java index 98d2feb8c4..fee3cd9dbf 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java index de85887e29..5cc5c7210a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java index 8f5833d256..6f263ee784 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java index fe74075671..a8ea214394 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java index ba1f9467e4..7497f9632c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java index d4968b1668..81e0cd06ca 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java index 14739a2fbb..7f25c64e86 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java index d758ac5392..314de3cd93 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java index bbd8a647d4..a73a3c0d5c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java index 23f7401c9a..28b3f4c0d1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java index 74e68e05b1..13ace4db53 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java index 3a5de1b0c5..9ef8b229f1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java index 8fe228b23e..937b66d4ae 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java index 224b85b449..b4368929fc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java index bd28ed88af..2f22512046 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java index 0b8974fd1e..363856d50a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java index 82a94709cd..f9a4e83ebc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java index 8f3791ef19..c29507b343 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -18,7 +19,12 @@ import java.util.HashMap; import java.util.Map; -/** An input object that includes the input text. */ +/** + * An input object that includes the input text. + * + *

This type supports additional properties of type Object. Any additional data included with the + * message input. + */ public class MessageInput extends DynamicModel { @SerializedName("text") @@ -105,7 +111,7 @@ public Builder spellingAutoCorrect(Boolean spellingAutoCorrect) { } /** - * Add an arbitrary property. + * Add an arbitrary property. Any additional data included with the message input. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java index 742b272698..2f39c7868d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java index c26998337e..ad5e0db38a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java index e2eeae7a58..06e8c0a4e0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java index da3df15b10..685f87544b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -23,6 +24,9 @@ /** * An output object that includes the response to the user, the dialog nodes that were triggered, * and messages from the log. + * + *

This type supports additional properties of type Object. Any additional data included with the + * output. */ public class OutputData extends DynamicModel { @@ -190,7 +194,7 @@ public Builder generic(List generic) { } /** - * Add an arbitrary property. + * Add an arbitrary property. Any additional data included with the output. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java index 667c87f4bb..b289d28d65 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java index a2d4d67443..ddfc2d667a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java index 2fd381a8dd..537d87d763 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java index a9c44a85be..bbb3c3b236 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java index f6711e962d..41c5d84891 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java index 62cbfa7bed..993dc76362 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java index aaf3a0eb32..2cd97781f1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java index 6a18570cd4..b2b05c485b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -54,7 +55,6 @@ public class RuntimeResponseGeneric extends GenericModel { "user_defined", RuntimeResponseGenericRuntimeResponseTypeUserDefined.class); discriminatorMapping.put("video", RuntimeResponseGenericRuntimeResponseTypeVideo.class); } - /** The preferred type of control to display. */ public interface Preference { /** dropdown. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java index 15ccf3688b..fc2da527a3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java index 38983d48c9..d77c637c9f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java index c423bcd884..4c71beb97b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java index 98962decdf..af2c0b4507 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java index c597df1f1a..b49947e932 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java index 966aa633c6..565110a145 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java index dba2edbbb4..04a0fb3e4c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java index 34a118ff06..03a270804c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java index 33e8d51959..5d87621e27 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java index 2d81aed659..40bfb43f2e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java index ca52b98c46..85df306c20 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import java.util.ArrayList; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java index 6d6a81300b..108600d433 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java index 427cae9c51..2be3dc5129 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java index 1d08253b3a..2f8e64ae79 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java index 04487ae10b..c79cc10acc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java index 549fba21b2..89d53aab51 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java index fb107317ff..37ba5ad952 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java index 1efae407ca..6863175d82 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java index f62166a1c7..3dfd9e9ee1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java index 6713a5d2cc..a85f862447 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java index c425cf2485..35318497bc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java index 8874c404f9..96defb0c77 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java index a46f6ab162..50b99afd9a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java index 92c00e7df7..60ef41c1aa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java index 7c580f5117..256d7c38df 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java index 6667fbd62c..9b1d9aa420 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java index 8224f1f2e9..c590f1d79c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java index b6c48f4db0..78c481834e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java index 02b76e034f..5bd68ab68a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2017, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java index e57f27827b..3c842541d9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java index 9f093fe884..15d334dfb8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; @@ -18,7 +19,11 @@ import java.util.HashMap; import java.util.Map; -/** Global settings for the workspace. */ +/** + * Global settings for the workspace. + * + *

This type supports additional properties of type Object. For internal use only. + */ public class WorkspaceSystemSettings extends DynamicModel { @SerializedName("tooling") @@ -179,7 +184,7 @@ public Builder nlp(WorkspaceSystemSettingsNlp nlp) { } /** - * Add an arbitrary property. + * Add an arbitrary property. For internal use only. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java index e7804b6ffb..cd1cbf5f7f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java index 5968f9d50e..c0b39d91b5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java index 3e20794090..227493d4d9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java index b1416063c6..eb471372a4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java index c2c69707d7..32d0e745cb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java index 1fef121beb..3ae4569c2c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java @@ -10,5 +10,6 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + /** Watson Assistant v1 v1. */ package com.ibm.watson.assistant.v1; diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v1/AssistantTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v1/AssistantTest.java index 543a16333f..19dc8438dc 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v1/AssistantTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v1/AssistantTest.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1; import static org.testng.Assert.*; diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java b/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java index 94cf7454f6..3963cbad75 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v1.utils; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -18,6 +19,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Base64; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -114,8 +116,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java index 83df9f00b5..e31b842af0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 */ package com.ibm.watson.discovery.v2; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java index dc9d9ddf12..3de39048d6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java index 1b7c1034b1..02ef1ebd0a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java index 842a4434a5..55a200d05b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java index 4f21965dc9..c734dc6f08 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; @@ -17,7 +18,11 @@ import com.ibm.cloud.sdk.core.service.model.DynamicModel; import java.util.Map; -/** Result of the document analysis. */ +/** + * Result of the document analysis. + * + *

This type supports additional properties of type Object. The remaining key-value pairs. + */ public class AnalyzedResult extends DynamicModel { @SerializedName("metadata") diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java index 24ce42cc15..a193a9b4fb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/BatchDetails.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java index a23d28ee0f..8d234d25ae 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java index 295249cb70..5865eac0e0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java index f882dcff71..92a9227a6d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java index ecb4e67c7c..a3779de09e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java index fad1bf4bf8..193e8308a3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java index fed974be1f..1446e066a3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java index 5cd24086e9..2e01a8ee25 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java index d1495035ae..bf6bad2538 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java index 927c39dc94..89eddcd124 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java index f1901e4223..fe4f1b1d8a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java index c77a859f34..b366485525 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java index 432f8290ae..fbc977733c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java index 2639f8ce8d..c21c3783d3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java index e9640b42a5..fed83d946d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java index b587cb5378..e90ea3f7be 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java index 772c69d76e..e8e21ecd79 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java index 2d6b35aed5..0e98849ac6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java index c22a9d2df3..7c7b97e08b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java index 2bcf88bd0d..a89934518f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java index e3d18f6e3d..5dacff5fe3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java index 08c3fa467c..cf83287016 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java index 1d090d9247..50699a9a9f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java index b5c4a6ee78..d216315bf2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java index 84b634409e..9e420586d8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java index 3f54d75431..eb4545db71 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java index 16180c02c3..3ce9869fe4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java index 4314ad8a7a..3fe8d69e96 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java index 94248906d0..86f5d13eef 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java index 5054ec8185..79b77163f8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java index c09bcda6b6..eb2a7c8394 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java index 665dfd67dd..618d53c0ad 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java index e444d62241..264b7f169f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java index be0c9ff50e..f8d12be054 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java index fb8559bb00..462c8cb332 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java index e23d5cf3b9..e807646f1f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java index 72602016fb..4e0335979c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java index 6e8c45ec59..cf8c2d6ba0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java index 0bc8bebbc9..92c8e0a2fe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java index 32c3c326f9..29b4426aec 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java index 4e268b32fc..ab35efd6d0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java index 7b807f6996..9d13c2e62d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java index 94a7cfd17f..c399f2b7fc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java index cc3ba0cd40..927291cf35 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java index 0a0c006ca5..7b745dc5a6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java index 9a885735f3..acbc2a42b6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java index 3db1993a34..237eda2774 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java index 0ccc1bee70..bb1d3b03c7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java index 74ecf80c38..accbf48101 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java index baea3a8148..5c9c12717b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java index 1899329be3..ec6c28298d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java index fd3031a46b..5cb8469dfe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java index cbe5358cbb..18d6051f9e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java index 7578bbb803..774ce497d2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java index 6136d04d01..8bd496d57b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java index 332998d3b6..be4d6f8f94 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java index c41f0c3cef..8c4374a833 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java index 262a818cae..b6c99c511a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java index a0cbf320d2..f7eb9cdc66 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java index fcc44584f7..20d925b457 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java index 7082e8a30f..d9a0aa5cfc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java index 5ba084acca..82acf8cefe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java index 689fdca7a6..a42f183c2f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java index a1c6c76a3f..5366ee019d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java index 09f9323b67..d2ad01f337 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesOptions.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java index fb0ad853d1..8ad9f8a471 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListBatchesResponse.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java index 78be90e1df..5526aa60a8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java index 1c8b098a4d..9a22eb75a6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java index 6a8a2eede8..8f5d2307d0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java index f63c0680fd..5cd98c8758 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java index 3d4fc99d93..d8014479f3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java index 72d3c3435b..649c6be5d5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java index d012519e50..d6f60488e9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java index 287760564a..b81a52bea2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java index e373e8f29c..147ca005d2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java index 767029e341..d32acf9d5d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java index 0c7ff09100..7500274ae4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java index 3bf338295b..99599df08a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java index 8bce0a07a0..c548eef9ee 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java index 06da580e90..3b90f5059a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java index 16e1d6314b..8205f1c41b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java index 632c90c10c..77d54aa647 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java index f3397e91db..22ce86ae68 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java index 24800540a4..445c8d1447 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java index d93651447a..9e539ef2be 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java index 9ed84bb695..b1a4f7a2d5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java index 3987301fbf..5684ab4793 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesOptions.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java index 985d413dc5..bc895802a6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PullBatchesResponse.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java index 97700fd5c6..af86c0af80 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PushBatchesOptions.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java index 78336453ce..e8391aa71a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java index 7c19cc9ffc..701be13935 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; /** diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java index cfe378d53d..71080fec1c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; /** A modifier that narrows the document set of the subaggregations it precedes. */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java index b938bfaa32..6845a1e646 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java index 3bf854e299..e4b11a8f28 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java index f619de39a2..9d96beffba 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; /** diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java index 9a956f969a..94c40a5f0b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java index 186e981a49..0c8ddfa3ca 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java index b2a62375ce..0bc9da2f8e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java index 434d249b23..1d9e0f8a1d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java index c923e543ef..76e9cc7d6f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java index ea83353485..80d0b348c0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import java.util.List; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java index d60a1076e9..0c99e3f763 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java index 6ea88e04f2..abc4393f1b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java index 1f28682393..85f8ad4d1a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java index a9a4c79214..b593d4f326 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java index 883ad6f1f0..0117f2f941 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java index 8b7e49ccf7..8c0e4a4102 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java index 18d7b7de20..1dd43db122 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java index d50937249f..513cf067dc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java index 38af3db30c..b7e576d89e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java index 407dd01051..15cb9daf76 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java index 02c78d2500..9a2f6367d8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java index 5d774a6d0d..af85e32af7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java index 77a3c3c888..ddfbb2fe97 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java index 05388eac52..3add5caf2e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; @@ -18,7 +19,11 @@ import java.util.List; import java.util.Map; -/** Result document for the specified query. */ +/** + * Result document for the specified query. + * + *

This type supports additional properties of type Object. The remaining key-value pairs. + */ public class QueryResult extends DynamicModel { @SerializedName("document_id") diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java index 5c37df20ec..58db1a6b8e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java index 552fd71b0d..f527ab8eb7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java index 61f2176f04..db63d21646 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java index eb388eccba..67418f8267 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java index 0603746e74..aa69c3d07f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java index e1e02efe48..d22ddc44b6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java index cb9107b2e1..fdcd4b2db0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java index 3dc978de20..f5c6a28076 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java index f15d77694d..35aa02bded 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java index 18ad6c2ff6..b0196f1238 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java index 50967926ce..04547f9c56 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java index 0234e11147..a005e1f393 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java index 7330a0c778..363ed3b527 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java index 2fab962313..eadcb28576 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java index 0483b53df8..3e6665d59b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java index 55938549ce..438007b374 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java index 4620571d5f..bf9a5393dc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java index f6a66b1cb9..5443415f36 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java index bfc5f7789f..1cb9bd411b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java index cbfe5daef3..5de18b4691 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java index 539ecdaf77..aa8706ee44 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java index 022a84bc9b..376d2ce8c0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java index 0066ab8206..0c01555b4a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java index 9944b30538..a5ff56b650 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java index 9c3936e56f..eb3ab11c8c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java index d1c0cc8f29..eb5fcd27e3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java index fbc5a9f9fc..cf38d04219 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java index af86087545..2314bd64b6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java index f23fdbe8dd..b837f3fba4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java index 9c58dd4b12..255a0b4f41 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java index 530e75d2b1..d7f7d2b2ff 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java index cb43c1e63c..f7eb31d73d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java index dadc0a4cc3..40a5d0c414 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/WebhookHeader.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/WebhookHeader.java index b8dcf9a18d..7b67a8eb23 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/WebhookHeader.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/WebhookHeader.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java index cbaa3e0ed7..f699afd217 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,5 +10,6 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + /** Discovery v2 v2. */ package com.ibm.watson.discovery.v2; diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java index 7dcb74dd08..41cd9f9931 100644 --- a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2; import static org.testng.Assert.*; diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java index a3905c1597..5fb30f6649 100644 --- a/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.discovery.v2.utils; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -18,6 +19,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Base64; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -114,8 +116,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java index 433fbcd695..7308227382 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 */ package com.ibm.watson.speech_to_text.v1; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java index 8e188067d1..4e7f0e288f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java index bc6f448af6..b68d47ed5c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java index f3165a888a..c48f54e426 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java index b25865a120..910c2763bc 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java index 9f6e924713..b592235d5b 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java index 35baf8e95c..aba6752f2f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java index edf9356d12..76840a9439 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java index 6c3f673fbf..74d8bf5bf8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java index 67fcf8e028..fe87636370 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java index f1d5778ffb..57c6971d62 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java index b5e6fa7a9e..9e8d0b6bb5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java index 827b6e506a..ccd26638f5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java index 35742fb0ee..70ffefaf7f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java index 342d21d2ee..c2bf787556 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java index 444d25e112..a05b617cc3 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java index c7543de868..24e0d47bbd 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java index a009d40343..dd8b124260 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java index 4f691fb23d..ebe95e5ed9 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java index 2a1bd9a716..55e8918013 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java index 15d4969436..6fbaca0932 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java index daa9865a9d..0b05f0a6c4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java index b1b79fe23b..12f5682ca3 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java index e4f2c70e94..6fe946d909 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java index 0a3c8e43ed..5cd532a02c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java index 840f6f8399..099bdfdb42 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java index 3a76237321..1d350f1b50 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java index a423d01429..651d0b70e4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java index c1d059c043..075c47e211 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java index af01bac6b2..a563019be9 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java index 8d93965418..130c7d5125 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java index d06aa52ed6..62ffa7ffc4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java index 90b3297ca0..65c9bd5eb2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java index c2273f7b57..dc6df1f693 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java index a1e52d778f..c088c4e07e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java index 0889276c82..0f329ddb37 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java index bb66c632fb..ff79fd634e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java index 55dcc3e1bf..9dc767eba4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java index c08a0dc933..bd74114aab 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java index 107395c9cd..ce5d6a6aca 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java index a32341fa9b..ccc72efbea 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java index 02aa2b806f..76b15e5da4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java index 75bc04748a..35ed2ecab1 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java index efc74c89f9..4bc8224b06 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java index de1a6bf0bc..a6f9036883 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java index d4fabffa10..42c8c855ef 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java index a76ea0f433..e36043eb75 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java index 05b4302285..57d5a0de13 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java index a07dac6acf..cdef9106d1 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java index 6f387b2a54..a31f25bad8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java index 35e59400c2..58dc6c4f2f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java index e85c1a1278..b7fec9f473 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java index 5bae0b8983..30c3e7e0a4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java index 5a26f09bf6..53dc645527 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java index d1e511b94c..4c1afd9fb8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java index 7f3628fd9c..6399ab93ce 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java index 853115034a..53d0a65a32 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java index ec1e6d83d1..606979e3db 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java index 0f33556fc9..f1ba982a6a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java index 4df2f89845..ce5d05138b 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java index 09c9c556ff..2cf825a6cc 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java index 8a6770c140..c2bdc50eb4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java index 21d6b55939..e80b24b270 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java index 874dc8605f..4311d956d7 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java index 873221235c..f2f3b06fd4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java index c250d49455..f0e05edb9f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java index d1f7ee2ff6..bac74dbcec 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java index 2ca530c64e..bce52bd609 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java index 14213b48da..e58448de5e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java index aaae37115d..11b70b1a31 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java index 4f5aa76b61..9bd69be788 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java index 29905635d6..f75b132d73 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java index 84a7d22c96..946cc23b0a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java index 7efb5894e8..66932e21c2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java index b4c28972b0..98f22aab0e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java index b2a8991e10..776f5daf1e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java index 592d4d4040..44cfc2af71 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java index a751492248..77dfea159d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java index 30434f58d3..a52ea6d163 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,5 +10,6 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + /** Speech to Text v1. */ package com.ibm.watson.speech_to_text.v1; diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java index 4f6dbc7d02..dc3af3002e 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1; import static org.testng.Assert.*; diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java index 5074c91f25..2041395f6a 100644 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.speech_to_text.v1.utils; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -18,6 +19,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Base64; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -114,8 +116,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java index 67addf83d8..efc7ada0c1 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 */ package com.ibm.watson.text_to_speech.v1; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java index 39f0098341..63eedd760d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java index daabc44a1c..1d4542831d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java index 365a8ecc37..58ab8e68e4 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java index 48c9174420..6f66cb934e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java index 5938b0a35a..0ee54a37b4 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java index 966b8cd9be..cdfd7d8b9e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java index aa7fc3190a..79ca90caed 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java index ab0bd5b4f6..3d6f396779 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java index 22aaedba00..157214ddc4 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java index 4e0bfa63a6..907426c1b7 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java index a2f4effd35..6adbc2c25a 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java index d5cbeae592..c21e21e06e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java index 53a755114a..25fa92bb6d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java index 1f3c43f2ac..4abde5177c 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java index 7b7a57bb0c..ef102e94e3 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java index 75bc0729ab..8a1e5e52ae 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java index 824a54cdbb..081103940d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java index 08c43a903f..21f13b8ed2 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java index 9f1ec46664..a40ecd4480 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java index ddd50aa304..4ca5f0f82e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java index 6d965520d9..5b727e7929 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java index 1b3d89a500..bb1a70661c 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java index 308f7ee79c..b03b7d6581 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java index 7efc75d8f3..f9d8bc27b7 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java index bbe98a49e5..2bd3b3321c 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java index a27d0b5a46..75d0b5fb5b 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java index 9323f46d2c..4567fd8717 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java index 94fbca22c1..124a2acb4b 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java index e1429f26c1..27661ad6a0 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java index 8a3f039c2c..436a8c7216 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java index 8ff3232152..0fc013a293 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java index 035417c98f..a83396c962 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java index 66786bac46..69b2bdcc7e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java index 9d02e305f6..b04b735fb6 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java index 3c939c7a6c..2b19f3088f 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java index 431532ac33..4306f29692 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java index 05c7a94a03..6f4e59e4dc 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java index d1fdec1c85..0ec0a18e20 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java index 728416d35b..9752529be1 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java index cee523fe5f..900ea4831e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.google.gson.annotations.SerializedName; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java index 91836506f4..7c135fbf79 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java index 341d196313..44b4f3858d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,5 +10,6 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + /** Text to Speech v1. */ package com.ibm.watson.text_to_speech.v1; diff --git a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java index 054b4471b2..7cd4260319 100644 --- a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java +++ b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1; import static org.testng.Assert.*; @@ -213,9 +214,9 @@ public void testSynthesizeWOptions() throws Throwable { Response response = textToSpeechService.synthesize(synthesizeOptionsModel).execute(); assertNotNull(response); - InputStream responseObj = response.getResult(); - assertNotNull(responseObj); - responseObj.close(); + try (InputStream responseObj = response.getResult(); ) { + assertNotNull(responseObj); + } // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); diff --git a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java index 22c7e5c65a..e72dac7aee 100644 --- a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java +++ b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.text_to_speech.v1.utils; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -18,6 +19,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Base64; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -114,8 +116,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { From 2cf5cce1875182f84e2b89f021f36802772a2f93 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Tue, 3 Dec 2024 21:41:52 -0600 Subject: [PATCH 09/12] feat(WxA): add new functions and update required params BREAKING CHANGE: `environmentId` now required for `message` and `messageStateless` functions Add support for message streaming and new APIs New functions: createProviders, listProviders, updateProviders, createReleaseExport, downloadReleaseExport, createReleaseImport, getReleaseImportStatus, messageStream, messageStreamStateless --- assistant/pom.xml | 17 + .../ibm/watson/assistant/v2/Assistant.java | 488 ++++++- .../v2/model/AgentAvailabilityMessage.java | 3 +- .../v2/model/AssistantCollection.java | 3 +- .../assistant/v2/model/AssistantData.java | 3 +- .../assistant/v2/model/AssistantSkill.java | 3 +- .../assistant/v2/model/AssistantState.java | 3 +- .../model/BaseEnvironmentOrchestration.java | 55 +- .../BaseEnvironmentReleaseReference.java | 55 +- .../v2/model/BulkClassifyOptions.java | 3 +- .../v2/model/BulkClassifyOutput.java | 3 +- .../v2/model/BulkClassifyResponse.java | 3 +- .../v2/model/BulkClassifyUtterance.java | 3 +- .../assistant/v2/model/CaptureGroup.java | 3 +- .../v2/model/ChannelTransferInfo.java | 3 +- .../v2/model/ChannelTransferTarget.java | 3 +- .../v2/model/ChannelTransferTargetChat.java | 3 +- .../assistant/v2/model/CompleteItem.java | 42 + .../v2/model/CreateAssistantOptions.java | 3 +- .../CreateAssistantReleaseImportResponse.java | 129 ++ .../v2/model/CreateProviderOptions.java | 155 ++ .../v2/model/CreateReleaseExportOptions.java | 162 +++ .../CreateReleaseExportWithStatusErrors.java | 151 ++ .../v2/model/CreateReleaseImportOptions.java | 178 +++ .../v2/model/CreateReleaseOptions.java | 3 +- .../v2/model/CreateSessionOptions.java | 3 +- .../v2/model/DeleteAssistantOptions.java | 3 +- .../v2/model/DeleteReleaseOptions.java | 3 +- .../v2/model/DeleteSessionOptions.java | 3 +- .../v2/model/DeleteUserDataOptions.java | 3 +- .../v2/model/DeployReleaseOptions.java | 3 +- .../assistant/v2/model/DialogLogMessage.java | 3 +- .../assistant/v2/model/DialogNodeAction.java | 3 +- ...gNodeOutputConnectToAgentTransferInfo.java | 3 +- .../model/DialogNodeOutputOptionsElement.java | 3 +- .../DialogNodeOutputOptionsElementValue.java | 3 +- .../assistant/v2/model/DialogNodeVisited.java | 3 +- .../assistant/v2/model/DialogSuggestion.java | 3 +- .../v2/model/DialogSuggestionValue.java | 3 +- .../model/DownloadReleaseExportOptions.java | 162 +++ .../assistant/v2/model/Environment.java | 3 +- .../v2/model/EnvironmentCollection.java | 3 +- .../v2/model/EnvironmentReference.java | 3 +- .../assistant/v2/model/EnvironmentSkill.java | 3 +- .../v2/model/ExportSkillsOptions.java | 3 +- .../assistant/v2/model/FinalResponse.java | 102 ++ .../v2/model/FinalResponseOutput.java | 129 ++ .../v2/model/GetEnvironmentOptions.java | 3 +- .../model/GetReleaseImportStatusOptions.java | 133 ++ .../assistant/v2/model/GetReleaseOptions.java | 3 +- .../assistant/v2/model/GetSkillOptions.java | 3 +- .../v2/model/ImportSkillsOptions.java | 3 +- .../v2/model/ImportSkillsStatusOptions.java | 3 +- .../v2/model/InputStreamConnectStrategy.java | 123 ++ .../v2/model/IntegrationReference.java | 3 +- .../v2/model/ListAssistantsOptions.java | 3 +- .../v2/model/ListEnvironmentsOptions.java | 3 +- .../assistant/v2/model/ListLogsOptions.java | 3 +- .../v2/model/ListProvidersOptions.java | 204 +++ .../v2/model/ListReleasesOptions.java | 3 +- .../ibm/watson/assistant/v2/model/Log.java | 3 +- .../assistant/v2/model/LogCollection.java | 3 +- .../assistant/v2/model/LogMessageSource.java | 3 +- .../v2/model/LogMessageSourceAction.java | 3 +- .../v2/model/LogMessageSourceDialogNode.java | 3 +- .../v2/model/LogMessageSourceHandler.java | 3 +- .../v2/model/LogMessageSourceStep.java | 3 +- .../assistant/v2/model/LogPagination.java | 3 +- .../watson/assistant/v2/model/LogRequest.java | 1 + .../assistant/v2/model/LogRequestInput.java | 1 + .../assistant/v2/model/LogResponse.java | 1 + .../assistant/v2/model/LogResponseOutput.java | 1 + .../assistant/v2/model/MessageContext.java | 3 +- .../v2/model/MessageContextActionSkill.java | 1 + .../v2/model/MessageContextDialogSkill.java | 1 + .../v2/model/MessageContextGlobal.java | 3 +- .../v2/model/MessageContextGlobalSystem.java | 3 +- .../v2/model/MessageContextSkillSystem.java | 11 +- .../v2/model/MessageContextSkills.java | 3 +- .../v2/model/MessageEventDeserializer.java | 137 ++ .../assistant/v2/model/MessageInput.java | 3 +- .../v2/model/MessageInputAttachment.java | 3 +- .../v2/model/MessageInputOptions.java | 3 +- .../v2/model/MessageInputOptionsSpelling.java | 3 +- .../assistant/v2/model/MessageOptions.java | 37 +- .../assistant/v2/model/MessageOutput.java | 3 +- .../v2/model/MessageOutputDebug.java | 3 +- .../v2/model/MessageOutputDebugTurnEvent.java | 4 +- ...DebugTurnEventTurnEventActionFinished.java | 3 +- ...tDebugTurnEventTurnEventActionVisited.java | 3 +- ...eOutputDebugTurnEventTurnEventCallout.java | 3 +- ...DebugTurnEventTurnEventHandlerVisited.java | 3 +- ...putDebugTurnEventTurnEventNodeVisited.java | 3 +- ...geOutputDebugTurnEventTurnEventSearch.java | 3 +- ...utDebugTurnEventTurnEventStepAnswered.java | 3 +- ...putDebugTurnEventTurnEventStepVisited.java | 3 +- .../v2/model/MessageOutputSpelling.java | 3 +- .../v2/model/MessageStatelessOptions.java | 37 +- .../v2/model/MessageStreamMetadata.java | 37 + .../v2/model/MessageStreamOptions.java | 258 ++++ .../v2/model/MessageStreamResponse.java | 69 + .../model/MessageStreamStatelessOptions.java | 229 +++ .../watson/assistant/v2/model/Metadata.java | 35 + ...ssistantReleaseImportArtifactResponse.java | 160 ++ .../watson/assistant/v2/model/Pagination.java | 3 +- .../assistant/v2/model/PartialItem.java | 65 + .../model/ProviderAuthenticationOAuth2.java | 131 ++ .../ProviderAuthenticationOAuth2Flows.java | 149 ++ ...AuthenticationOAuth2AuthorizationCode.java | 190 +++ ...AuthenticationOAuth2ClientCredentials.java | 156 ++ ...owsProviderAuthenticationOAuth2Custom.java | 77 + ...sProviderAuthenticationOAuth2Password.java | 160 ++ ...rAuthenticationOAuth2PasswordUsername.java | 120 ++ .../ProviderAuthenticationTypeAndValue.java | 117 ++ .../v2/model/ProviderCollection.java | 53 + .../assistant/v2/model/ProviderPrivate.java | 96 ++ .../model/ProviderPrivateAuthentication.java | 65 + ...roviderPrivateAuthenticationBasicFlow.java | 70 + ...oviderPrivateAuthenticationBearerFlow.java | 70 + ...oviderPrivateAuthenticationOAuth2Flow.java | 70 + ...rPrivateAuthenticationOAuth2FlowFlows.java | 114 ++ ...AuthenticationOAuth2AuthorizationCode.java | 165 +++ ...AuthenticationOAuth2ClientCredentials.java | 149 ++ ...iderPrivateAuthenticationOAuth2Custom.java | 89 ++ ...erPrivateAuthenticationOAuth2Password.java | 162 +++ ...eAuthenticationOAuth2PasswordPassword.java | 121 ++ .../assistant/v2/model/ProviderResponse.java | 50 + .../model/ProviderResponseSpecification.java | 50 + ...oviderResponseSpecificationComponents.java | 35 + ...pecificationComponentsSecuritySchemes.java | 80 + ...icationComponentsSecuritySchemesBasic.java | 35 + ...viderResponseSpecificationServersItem.java | 35 + .../v2/model/ProviderSpecification.java | 140 ++ .../ProviderSpecificationComponents.java | 85 ++ ...pecificationComponentsSecuritySchemes.java | 163 +++ ...icationComponentsSecuritySchemesBasic.java | 89 ++ .../ProviderSpecificationServersItem.java | 85 ++ .../watson/assistant/v2/model/Release.java | 3 +- .../assistant/v2/model/ReleaseCollection.java | 3 +- .../assistant/v2/model/ReleaseContent.java | 3 +- .../assistant/v2/model/ReleaseSkill.java | 3 +- .../assistant/v2/model/RequestAnalytics.java | 3 +- .../v2/model/ResponseGenericChannel.java | 3 +- .../assistant/v2/model/RuntimeEntity.java | 3 +- .../v2/model/RuntimeEntityAlternative.java | 3 +- .../v2/model/RuntimeEntityInterpretation.java | 3 +- .../assistant/v2/model/RuntimeEntityRole.java | 3 +- .../assistant/v2/model/RuntimeIntent.java | 3 +- .../v2/model/RuntimeResponseGeneric.java | 4 +- ...sponseGenericRuntimeResponseTypeAudio.java | 3 +- ...ricRuntimeResponseTypeChannelTransfer.java | 3 +- ...ericRuntimeResponseTypeConnectToAgent.java | 3 +- ...esponseGenericRuntimeResponseTypeDate.java | 3 +- ...ponseGenericRuntimeResponseTypeIframe.java | 3 +- ...sponseGenericRuntimeResponseTypeImage.java | 3 +- ...ponseGenericRuntimeResponseTypeOption.java | 3 +- ...sponseGenericRuntimeResponseTypePause.java | 3 +- ...ponseGenericRuntimeResponseTypeSearch.java | 3 +- ...eGenericRuntimeResponseTypeSuggestion.java | 3 +- ...esponseGenericRuntimeResponseTypeText.java | 3 +- ...GenericRuntimeResponseTypeUserDefined.java | 3 +- ...sponseGenericRuntimeResponseTypeVideo.java | 3 +- .../assistant/v2/model/SearchResult.java | 3 +- .../v2/model/SearchResultAnswer.java | 3 +- .../v2/model/SearchResultHighlight.java | 8 +- .../v2/model/SearchResultMetadata.java | 3 +- .../assistant/v2/model/SearchSettings.java | 118 +- .../model/SearchSettingsClientSideSearch.java | 115 ++ .../SearchSettingsConversationalSearch.java | 149 ++ ...ngsConversationalSearchResponseLength.java | 99 ++ ...sConversationalSearchSearchConfidence.java | 105 ++ .../v2/model/SearchSettingsDiscovery.java | 3 +- ...SearchSettingsDiscoveryAuthentication.java | 3 +- .../v2/model/SearchSettingsElasticSearch.java | 344 +++++ .../v2/model/SearchSettingsMessages.java | 3 +- .../v2/model/SearchSettingsSchemaMapping.java | 3 +- .../model/SearchSettingsServerSideSearch.java | 324 +++++ .../v2/model/SearchSkillWarning.java | 3 +- .../assistant/v2/model/SessionResponse.java | 3 +- .../ibm/watson/assistant/v2/model/Skill.java | 3 +- .../assistant/v2/model/SkillImport.java | 3 +- .../v2/model/SkillsAsyncRequestStatus.java | 3 +- .../assistant/v2/model/SkillsExport.java | 3 +- .../v2/model/StatefulMessageResponse.java | 1 + .../v2/model/StatelessFinalResponse.java | 73 + .../model/StatelessFinalResponseOutput.java | 127 ++ .../v2/model/StatelessMessageContext.java | 1 + .../model/StatelessMessageContextGlobal.java | 1 + .../model/StatelessMessageContextSkills.java | 1 + ...elessMessageContextSkillsActionsSkill.java | 1 + .../v2/model/StatelessMessageInput.java | 1 + .../model/StatelessMessageInputOptions.java | 1 + .../v2/model/StatelessMessageResponse.java | 1 + .../model/StatelessMessageStreamResponse.java | 69 + .../assistant/v2/model/StatusError.java | 3 +- .../v2/model/TurnEventActionSource.java | 3 +- .../v2/model/TurnEventCalloutCallout.java | 28 +- .../model/TurnEventCalloutCalloutRequest.java | 115 ++ .../TurnEventCalloutCalloutResponse.java | 66 + .../v2/model/TurnEventCalloutError.java | 3 +- .../v2/model/TurnEventNodeSource.java | 3 +- .../v2/model/TurnEventSearchError.java | 3 +- .../v2/model/UpdateEnvironmentOptions.java | 11 +- .../model/UpdateEnvironmentOrchestration.java | 89 ++ .../v2/model/UpdateProviderOptions.java | 156 ++ .../v2/model/UpdateSkillOptions.java | 3 +- .../ibm/watson/assistant/v2/package-info.java | 1 + .../assistant/v2/AssistantServiceIT.java | 103 +- .../watson/assistant/v2/AssistantTest.java | 1296 ++++++++++++++++- .../BaseEnvironmentOrchestrationTest.java | 13 +- .../BaseEnvironmentReleaseReferenceTest.java | 13 +- .../assistant/v2/model/CompleteItemTest.java | 59 + ...ateAssistantReleaseImportResponseTest.java | 37 + .../v2/model/CreateProviderOptionsTest.java | 146 ++ .../model/CreateReleaseExportOptionsTest.java | 48 + ...eateReleaseExportWithStatusErrorsTest.java | 36 + .../model/CreateReleaseImportOptionsTest.java | 51 + .../DownloadReleaseExportOptionsTest.java | 48 + .../v2/model/FinalResponseOutputTest.java | 43 + .../assistant/v2/model/FinalResponseTest.java | 40 + .../GetReleaseImportStatusOptionsTest.java | 46 + .../v2/model/ImportSkillsOptionsTest.java | 97 +- .../v2/model/ListProvidersOptionsTest.java | 47 + .../v2/model/MessageOptionsTest.java | 4 +- .../v2/model/MessageStatelessOptionsTest.java | 4 +- .../v2/model/MessageStreamMetadataTest.java | 36 + .../v2/model/MessageStreamOptionsTest.java | 302 ++++ .../v2/model/MessageStreamResponseTest.java | 37 + .../MessageStreamStatelessOptionsTest.java | 300 ++++ .../assistant/v2/model/MetadataTest.java | 36 + ...tantReleaseImportArtifactResponseTest.java | 38 + .../assistant/v2/model/PartialItemTest.java | 38 + ...enticationOAuth2AuthorizationCodeTest.java | 121 ++ ...enticationOAuth2ClientCredentialsTest.java | 103 ++ ...roviderAuthenticationOAuth2CustomTest.java | 117 ++ ...viderAuthenticationOAuth2PasswordTest.java | 108 ++ ...ProviderAuthenticationOAuth2FlowsTest.java | 38 + ...henticationOAuth2PasswordUsernameTest.java | 52 + .../ProviderAuthenticationOAuth2Test.java | 78 + ...roviderAuthenticationTypeAndValueTest.java | 47 + .../v2/model/ProviderCollectionTest.java | 37 + ...derPrivateAuthenticationBasicFlowTest.java | 57 + ...erPrivateAuthenticationBearerFlowTest.java | 57 + ...enticationOAuth2AuthorizationCodeTest.java | 106 ++ ...enticationOAuth2ClientCredentialsTest.java | 97 ++ ...PrivateAuthenticationOAuth2CustomTest.java | 116 ++ ...ivateAuthenticationOAuth2PasswordTest.java | 115 ++ ...vateAuthenticationOAuth2FlowFlowsTest.java | 38 + ...erPrivateAuthenticationOAuth2FlowTest.java | 79 + ...henticationOAuth2PasswordPasswordTest.java | 54 + .../ProviderPrivateAuthenticationTest.java | 38 + .../v2/model/ProviderPrivateTest.java | 63 + ...ionComponentsSecuritySchemesBasicTest.java | 38 + ...ficationComponentsSecuritySchemesTest.java | 41 + ...erResponseSpecificationComponentsTest.java | 37 + ...rResponseSpecificationServersItemTest.java | 37 + .../ProviderResponseSpecificationTest.java | 38 + .../v2/model/ProviderResponseTest.java | 37 + ...ionComponentsSecuritySchemesBasicTest.java | 60 + ...ficationComponentsSecuritySchemesTest.java | 115 ++ .../ProviderSpecificationComponentsTest.java | 115 ++ .../ProviderSpecificationServersItemTest.java | 45 + .../v2/model/ProviderSpecificationTest.java | 134 ++ .../SearchSettingsClientSideSearchTest.java | 53 + ...onversationalSearchResponseLengthTest.java | 50 + ...versationalSearchSearchConfidenceTest.java | 52 + ...earchSettingsConversationalSearchTest.java | 80 + .../SearchSettingsElasticSearchTest.java | 78 + .../SearchSettingsServerSideSearchTest.java | 79 + .../v2/model/SearchSettingsTest.java | 109 +- .../assistant/v2/model/SkillImportTest.java | 97 +- .../StatelessFinalResponseOutputTest.java | 44 + .../v2/model/StatelessFinalResponseTest.java | 38 + .../StatelessMessageStreamResponseTest.java | 38 + .../TurnEventCalloutCalloutRequestTest.java | 42 + .../TurnEventCalloutCalloutResponseTest.java | 39 + .../v2/model/TurnEventCalloutCalloutTest.java | 4 +- .../model/UpdateEnvironmentOptionsTest.java | 13 +- .../UpdateEnvironmentOrchestrationTest.java | 45 + .../v2/model/UpdateProviderOptionsTest.java | 146 ++ .../v2/model/UpdateSkillOptionsTest.java | 97 +- .../assistant/v2/utils/TestUtilities.java | 8 +- .../com/ibm/watson/common/RetryRunner.java | 2 +- pom.xml | 5 + 284 files changed, 14840 insertions(+), 310 deletions(-) create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CompleteItem.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateProviderOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrors.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponseOutput.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/InputStreamConnectStrategy.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListProvidersOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadata.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/Metadata.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/PartialItem.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Flows.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsername.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValue.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderCollection.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivate.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthentication.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlow.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlow.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2Flow.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlows.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPassword.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecification.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponents.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemes.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasic.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItem.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecification.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponents.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemes.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasic.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItem.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLength.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidence.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutput.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequest.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestration.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptions.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CompleteItemTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateProviderOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrorsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseOutputTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ListProvidersOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadataTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MetadataTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/PartialItemTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsernameTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Test.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValueTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderCollectionTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlowTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlowTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPasswordTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasicTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItemTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasicTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItemTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLengthTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidenceTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutputTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequestTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestrationTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptionsTest.java diff --git a/assistant/pom.xml b/assistant/pom.xml index 911a53cbdd..d3630854ce 100644 --- a/assistant/pom.xml +++ b/assistant/pom.xml @@ -2,6 +2,18 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 11 + 11 + + + + ibm-watson-parent @@ -36,6 +48,11 @@ testng test + + com.launchdarkly + okhttp-eventsource + 4.1.1 + com.squareup.okhttp3 mockwebserver diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java index a5c66e1cfe..4973bd3c2c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-77cc8190-20241107-152357 */ package com.ibm.watson.assistant.v2; @@ -30,6 +30,11 @@ import com.ibm.watson.assistant.v2.model.BulkClassifyOptions; import com.ibm.watson.assistant.v2.model.BulkClassifyResponse; import com.ibm.watson.assistant.v2.model.CreateAssistantOptions; +import com.ibm.watson.assistant.v2.model.CreateAssistantReleaseImportResponse; +import com.ibm.watson.assistant.v2.model.CreateProviderOptions; +import com.ibm.watson.assistant.v2.model.CreateReleaseExportOptions; +import com.ibm.watson.assistant.v2.model.CreateReleaseExportWithStatusErrors; +import com.ibm.watson.assistant.v2.model.CreateReleaseImportOptions; import com.ibm.watson.assistant.v2.model.CreateReleaseOptions; import com.ibm.watson.assistant.v2.model.CreateSessionOptions; import com.ibm.watson.assistant.v2.model.DeleteAssistantOptions; @@ -37,10 +42,12 @@ import com.ibm.watson.assistant.v2.model.DeleteSessionOptions; import com.ibm.watson.assistant.v2.model.DeleteUserDataOptions; import com.ibm.watson.assistant.v2.model.DeployReleaseOptions; +import com.ibm.watson.assistant.v2.model.DownloadReleaseExportOptions; import com.ibm.watson.assistant.v2.model.Environment; import com.ibm.watson.assistant.v2.model.EnvironmentCollection; import com.ibm.watson.assistant.v2.model.ExportSkillsOptions; import com.ibm.watson.assistant.v2.model.GetEnvironmentOptions; +import com.ibm.watson.assistant.v2.model.GetReleaseImportStatusOptions; import com.ibm.watson.assistant.v2.model.GetReleaseOptions; import com.ibm.watson.assistant.v2.model.GetSkillOptions; import com.ibm.watson.assistant.v2.model.ImportSkillsOptions; @@ -48,10 +55,16 @@ import com.ibm.watson.assistant.v2.model.ListAssistantsOptions; import com.ibm.watson.assistant.v2.model.ListEnvironmentsOptions; import com.ibm.watson.assistant.v2.model.ListLogsOptions; +import com.ibm.watson.assistant.v2.model.ListProvidersOptions; import com.ibm.watson.assistant.v2.model.ListReleasesOptions; import com.ibm.watson.assistant.v2.model.LogCollection; import com.ibm.watson.assistant.v2.model.MessageOptions; import com.ibm.watson.assistant.v2.model.MessageStatelessOptions; +import com.ibm.watson.assistant.v2.model.MessageStreamOptions; +import com.ibm.watson.assistant.v2.model.MessageStreamStatelessOptions; +import com.ibm.watson.assistant.v2.model.MonitorAssistantReleaseImportArtifactResponse; +import com.ibm.watson.assistant.v2.model.ProviderCollection; +import com.ibm.watson.assistant.v2.model.ProviderResponse; import com.ibm.watson.assistant.v2.model.Release; import com.ibm.watson.assistant.v2.model.ReleaseCollection; import com.ibm.watson.assistant.v2.model.SessionResponse; @@ -61,8 +74,10 @@ import com.ibm.watson.assistant.v2.model.StatefulMessageResponse; import com.ibm.watson.assistant.v2.model.StatelessMessageResponse; import com.ibm.watson.assistant.v2.model.UpdateEnvironmentOptions; +import com.ibm.watson.assistant.v2.model.UpdateProviderOptions; import com.ibm.watson.assistant.v2.model.UpdateSkillOptions; import com.ibm.watson.common.SdkCommon; +import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -166,6 +181,138 @@ public void setVersion(final String version) { this.version = version; } + /** + * Create a conversational skill provider. + * + *

Create a new conversational skill provider. + * + * @param createProviderOptions the {@link CreateProviderOptions} containing the options for the + * call + * @return a {@link ServiceCall} with a result of type {@link ProviderResponse} + */ + public ServiceCall createProvider(CreateProviderOptions createProviderOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + createProviderOptions, "createProviderOptions cannot be null"); + RequestBuilder builder = + RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v2/providers")); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "createProvider"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("provider_id", createProviderOptions.providerId()); + contentJson.add( + "specification", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(createProviderOptions.specification())); + contentJson.add( + "private", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(createProviderOptions.xPrivate())); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List conversational skill providers. + * + *

List the conversational skill providers associated with a Watson Assistant service instance. + * + * @param listProvidersOptions the {@link ListProvidersOptions} containing the options for the + * call + * @return a {@link ServiceCall} with a result of type {@link ProviderCollection} + */ + public ServiceCall listProviders(ListProvidersOptions listProvidersOptions) { + if (listProvidersOptions == null) { + listProvidersOptions = new ListProvidersOptions.Builder().build(); + } + RequestBuilder builder = + RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v2/providers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("conversation", "v2", "listProviders"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + if (listProvidersOptions.pageLimit() != null) { + builder.query("page_limit", String.valueOf(listProvidersOptions.pageLimit())); + } + if (listProvidersOptions.includeCount() != null) { + builder.query("include_count", String.valueOf(listProvidersOptions.includeCount())); + } + if (listProvidersOptions.sort() != null) { + builder.query("sort", String.valueOf(listProvidersOptions.sort())); + } + if (listProvidersOptions.cursor() != null) { + builder.query("cursor", String.valueOf(listProvidersOptions.cursor())); + } + if (listProvidersOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(listProvidersOptions.includeAudit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List conversational skill providers. + * + *

List the conversational skill providers associated with a Watson Assistant service instance. + * + * @return a {@link ServiceCall} with a result of type {@link ProviderCollection} + */ + public ServiceCall listProviders() { + return listProviders(null); + } + + /** + * Update a conversational skill provider. + * + *

Update a new conversational skill provider. + * + * @param updateProviderOptions the {@link UpdateProviderOptions} containing the options for the + * call + * @return a {@link ServiceCall} with a result of type {@link ProviderResponse} + */ + public ServiceCall updateProvider(UpdateProviderOptions updateProviderOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + updateProviderOptions, "updateProviderOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("provider_id", updateProviderOptions.providerId()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), "/v2/providers/{provider_id}", pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "updateProvider"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + contentJson.add( + "specification", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(updateProviderOptions.specification())); + contentJson.add( + "private", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(updateProviderOptions.xPrivate())); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + /** * Create an assistant. * @@ -391,6 +538,7 @@ public ServiceCall message(MessageOptions messageOption com.ibm.cloud.sdk.core.util.Validator.notNull(messageOptions, "messageOptions cannot be null"); Map pathParamsMap = new HashMap(); pathParamsMap.put("assistant_id", messageOptions.assistantId()); + pathParamsMap.put("environment_id", messageOptions.environmentId()); pathParamsMap.put("session_id", messageOptions.sessionId()); RequestBuilder builder = RequestBuilder.post( @@ -441,6 +589,7 @@ public ServiceCall messageStateless( messageStatelessOptions, "messageStatelessOptions cannot be null"); Map pathParamsMap = new HashMap(); pathParamsMap.put("assistant_id", messageStatelessOptions.assistantId()); + pathParamsMap.put("environment_id", messageStatelessOptions.environmentId()); RequestBuilder builder = RequestBuilder.post( RequestBuilder.resolveRequestUrl( @@ -475,6 +624,107 @@ public ServiceCall messageStateless( return createServiceCall(builder.build(), responseConverter); } + /** + * Send user input to assistant (stateful). + * + *

Send user input to an assistant and receive a streamed response, with conversation state + * (including context data) stored by watsonx Assistant for the duration of the session. + * + * @param messageStreamOptions the {@link MessageStreamOptions} containing the options for the + * call + * @return a {@link ServiceCall} with a result of type {@link InputStream} + */ + public ServiceCall messageStream(MessageStreamOptions messageStreamOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + messageStreamOptions, "messageStreamOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", messageStreamOptions.assistantId()); + pathParamsMap.put("environment_id", messageStreamOptions.environmentId()); + pathParamsMap.put("session_id", messageStreamOptions.sessionId()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/assistants/{assistant_id}/environments/{environment_id}/sessions/{session_id}/message_stream", + pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("conversation", "v2", "messageStream"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "text/event-stream"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + if (messageStreamOptions.input() != null) { + contentJson.add( + "input", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(messageStreamOptions.input())); + } + if (messageStreamOptions.context() != null) { + contentJson.add( + "context", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(messageStreamOptions.context())); + } + if (messageStreamOptions.userId() != null) { + contentJson.addProperty("user_id", messageStreamOptions.userId()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getInputStream(); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Send user input to assistant (stateless). + * + *

Send user input to an assistant and receive a response, with conversation state (including + * context data) managed by your application. + * + * @param messageStreamStatelessOptions the {@link MessageStreamStatelessOptions} containing the + * options for the call + * @return a {@link ServiceCall} with a result of type {@link InputStream} + */ + public ServiceCall messageStreamStateless( + MessageStreamStatelessOptions messageStreamStatelessOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + messageStreamStatelessOptions, "messageStreamStatelessOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", messageStreamStatelessOptions.assistantId()); + pathParamsMap.put("environment_id", messageStreamStatelessOptions.environmentId()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/assistants/{assistant_id}/environments/{environment_id}/message_stream", + pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "messageStreamStateless"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "text/event-stream"); + builder.query("version", String.valueOf(this.version)); + final JsonObject contentJson = new JsonObject(); + if (messageStreamStatelessOptions.input() != null) { + contentJson.add( + "input", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(messageStreamStatelessOptions.input())); + } + if (messageStreamStatelessOptions.context() != null) { + contentJson.add( + "context", + com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() + .toJsonTree(messageStreamStatelessOptions.context())); + } + if (messageStreamStatelessOptions.userId() != null) { + contentJson.addProperty("user_id", messageStreamStatelessOptions.userId()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getInputStream(); + return createServiceCall(builder.build(), responseConverter); + } + /** * Identify intents and entities in multiple user utterances. * @@ -937,6 +1187,242 @@ public ServiceCall deployRelease(DeployReleaseOptions deployRelease return createServiceCall(builder.build(), responseConverter); } + /** + * Create release export. + * + *

Initiate an asynchronous process which will create a downloadable Zip file artifact + * (/package) for an assistant release. This artifact will contain Action and/or Dialog skills + * that are part of the release. The Dialog skill will only be included in the event that + * coexistence is enabled on the assistant. The expected workflow with the use of Release Export + * endpoint is to first initiate the creation of the artifact with the POST endpoint and then poll + * the GET endpoint to retrieve the artifact. Once the artifact has been created, it will last for + * the duration (/scope) of the release. + * + * @param createReleaseExportOptions the {@link CreateReleaseExportOptions} containing the options + * for the call + * @return a {@link ServiceCall} with a result of type {@link CreateReleaseExportWithStatusErrors} + */ + public ServiceCall createReleaseExport( + CreateReleaseExportOptions createReleaseExportOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + createReleaseExportOptions, "createReleaseExportOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", createReleaseExportOptions.assistantId()); + pathParamsMap.put("release", createReleaseExportOptions.release()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/assistants/{assistant_id}/releases/{release}/export", + pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "createReleaseExport"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + if (createReleaseExportOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(createReleaseExportOptions.includeAudit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken< + CreateReleaseExportWithStatusErrors>() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Get release export. + * + *

A dual function endpoint to either retrieve the Zip file artifact that is associated with an + * assistant release or, retrieve the status of the artifact's creation. It is assumed that the + * artifact creation was already initiated prior to calling this endpoint. In the event that the + * artifact is not yet created and ready for download, this endpoint can be used to poll the + * system until the creation is completed or has failed. On the other hand, if the artifact is + * created, this endpoint will return the Zip file artifact as an octet stream. Once the artifact + * has been created, it will last for the duration (/scope) of the release. <br /><br + * /> When you will have downloaded the Zip file artifact, you have one of three ways to import + * it into an assistant's draft environment. These are as follows. <br + * /><ol><li>Import the zip package in Tooling via <var>"Assistant Settings" + * -> "Download/Upload files" -> "Upload" -> "Assistant + * only"</var>.</li><li>Import the zip package via "Create release import" + * endpoint using the APIs.</li><li>Extract the contents of the Zip file artifact and + * individually import the skill JSONs via skill update endpoints.</li></ol>. + * + * @param downloadReleaseExportOptions the {@link DownloadReleaseExportOptions} containing the + * options for the call + * @return a {@link ServiceCall} with a result of type {@link CreateReleaseExportWithStatusErrors} + */ + public ServiceCall downloadReleaseExport( + DownloadReleaseExportOptions downloadReleaseExportOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + downloadReleaseExportOptions, "downloadReleaseExportOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", downloadReleaseExportOptions.assistantId()); + pathParamsMap.put("release", downloadReleaseExportOptions.release()); + RequestBuilder builder = + RequestBuilder.get( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/assistants/{assistant_id}/releases/{release}/export", + pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "downloadReleaseExport"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + if (downloadReleaseExportOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(downloadReleaseExportOptions.includeAudit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken< + CreateReleaseExportWithStatusErrors>() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Get release export as stream. + * + *

A dual function endpoint to either retrieve the Zip file artifact that is associated with an + * assistant release or, retrieve the status of the artifact's creation. It is assumed that the + * artifact creation was already initiated prior to calling this endpoint. In the event that the + * artifact is not yet created and ready for download, this endpoint can be used to poll the + * system until the creation is completed or has failed. On the other hand, if the artifact is + * created, this endpoint will return the Zip file artifact as an octet stream. Once the artifact + * has been created, it will last for the duration (/scope) of the release. <br /><br + * /> When you will have downloaded the Zip file artifact, you have one of three ways to import + * it into an assistant's draft environment. These are as follows. <br + * /><ol><li>Import the zip package in Tooling via <var>"Assistant Settings" + * -> "Download/Upload files" -> "Upload" -> "Assistant + * only"</var>.</li><li>Import the zip package via "Create release import" + * endpoint using the APIs.</li><li>Extract the contents of the Zip file artifact and + * individually import the skill JSONs via skill update endpoints.</li></ol>. + * + * @param downloadReleaseExportOptions the {@link DownloadReleaseExportOptions} containing the + * options for the call + * @return a {@link ServiceCall} with a result of type {@link InputStream} + */ + public ServiceCall downloadReleaseExportAsStream( + DownloadReleaseExportOptions downloadReleaseExportOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + downloadReleaseExportOptions, "downloadReleaseExportOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", downloadReleaseExportOptions.assistantId()); + pathParamsMap.put("release", downloadReleaseExportOptions.release()); + RequestBuilder builder = + RequestBuilder.get( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), + "/v2/assistants/{assistant_id}/releases/{release}/export", + pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "downloadReleaseExportAsStream"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/octet-stream"); + builder.query("version", String.valueOf(this.version)); + if (downloadReleaseExportOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(downloadReleaseExportOptions.includeAudit())); + } + ResponseConverter responseConverter = ResponseConverterUtils.getInputStream(); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Create release import. + * + *

Import a previously exported assistant release Zip file artifact (/package) into an + * assistant. This endpoint creates (/initiates) an asynchronous task (/job) in the background + * which will import the artifact contents into the draft environment of the assistant on which + * this endpoint is called. Specifically, the asynchronous operation will override the action + * and/or dialog skills in the assistant. It will be worth noting that when the artifact that is + * provided to this endpoint is from an assistant release which has coexistence enabled (i.e., it + * has both action and dialog skills), the import process will automatically enable coexistence, + * if not already enabled, on the assistant into which said artifact is being uploaded to. On the + * other hand, if the artifact package being imported only has action skill in it, the import + * asynchronous process will only override the draft environment's action skill, regardless of + * whether coexistence is enabled on the assistant into which the package is being imported. + * Lastly, the system will only run one asynchronous import at a time on an assistant. As such, + * consecutive imports will override previous import's updates to the skills in the draft + * environment. Once created, you may poll the completion of the import via the "Get release + * import Status" endpoint. + * + * @param createReleaseImportOptions the {@link CreateReleaseImportOptions} containing the options + * for the call + * @return a {@link ServiceCall} with a result of type {@link + * CreateAssistantReleaseImportResponse} + */ + public ServiceCall createReleaseImport( + CreateReleaseImportOptions createReleaseImportOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + createReleaseImportOptions, "createReleaseImportOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", createReleaseImportOptions.assistantId()); + RequestBuilder builder = + RequestBuilder.post( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), "/v2/assistants/{assistant_id}/import", pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "createReleaseImport"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + if (createReleaseImportOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(createReleaseImportOptions.includeAudit())); + } + builder.bodyContent(createReleaseImportOptions.body(), "application/octet-stream"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken< + CreateAssistantReleaseImportResponse>() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Get release import Status. + * + *

Monitor the status of an assistant release import. You may poll this endpoint until the + * status of the import has either succeeded or failed. + * + * @param getReleaseImportStatusOptions the {@link GetReleaseImportStatusOptions} containing the + * options for the call + * @return a {@link ServiceCall} with a result of type {@link + * MonitorAssistantReleaseImportArtifactResponse} + */ + public ServiceCall getReleaseImportStatus( + GetReleaseImportStatusOptions getReleaseImportStatusOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + getReleaseImportStatusOptions, "getReleaseImportStatusOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("assistant_id", getReleaseImportStatusOptions.assistantId()); + RequestBuilder builder = + RequestBuilder.get( + RequestBuilder.resolveRequestUrl( + getServiceUrl(), "/v2/assistants/{assistant_id}/import", pathParamsMap)); + Map sdkHeaders = + SdkCommon.getSdkHeaders("conversation", "v2", "getReleaseImportStatus"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + if (getReleaseImportStatusOptions.includeAudit() != null) { + builder.query("include_audit", String.valueOf(getReleaseImportStatusOptions.includeAudit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue( + new com.google.gson.reflect.TypeToken< + MonitorAssistantReleaseImportArtifactResponse>() {}.getType()); + return createServiceCall(builder.build(), responseConverter); + } + /** * Get skill. * diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java index 9c4866d540..e51c6fead6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java index fd5a139ce8..0a247e00b9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java index 9ecad740d0..3c13096913 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java index f44bf9a1f1..7a1b696b3b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java index 5f5b8e0792..cd7928f154 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java index 076295420d..c9a48e8236 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -21,58 +22,8 @@ public class BaseEnvironmentOrchestration extends GenericModel { @SerializedName("search_skill_fallback") protected Boolean searchSkillFallback; - /** Builder. */ - public static class Builder { - private Boolean searchSkillFallback; - - /** - * Instantiates a new Builder from an existing BaseEnvironmentOrchestration instance. - * - * @param baseEnvironmentOrchestration the instance to initialize the Builder with - */ - private Builder(BaseEnvironmentOrchestration baseEnvironmentOrchestration) { - this.searchSkillFallback = baseEnvironmentOrchestration.searchSkillFallback; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a BaseEnvironmentOrchestration. - * - * @return the new BaseEnvironmentOrchestration instance - */ - public BaseEnvironmentOrchestration build() { - return new BaseEnvironmentOrchestration(this); - } - - /** - * Set the searchSkillFallback. - * - * @param searchSkillFallback the searchSkillFallback - * @return the BaseEnvironmentOrchestration builder - */ - public Builder searchSkillFallback(Boolean searchSkillFallback) { - this.searchSkillFallback = searchSkillFallback; - return this; - } - } - protected BaseEnvironmentOrchestration() {} - protected BaseEnvironmentOrchestration(Builder builder) { - searchSkillFallback = builder.searchSkillFallback; - } - - /** - * New builder. - * - * @return a BaseEnvironmentOrchestration builder - */ - public Builder newBuilder() { - return new Builder(this); - } - /** * Gets the searchSkillFallback. * @@ -82,7 +33,7 @@ public Builder newBuilder() { * * @return the searchSkillFallback */ - public Boolean searchSkillFallback() { + public Boolean isSearchSkillFallback() { return searchSkillFallback; } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java index 275437d577..b9b92f3677 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -19,58 +20,8 @@ public class BaseEnvironmentReleaseReference extends GenericModel { protected String release; - /** Builder. */ - public static class Builder { - private String release; - - /** - * Instantiates a new Builder from an existing BaseEnvironmentReleaseReference instance. - * - * @param baseEnvironmentReleaseReference the instance to initialize the Builder with - */ - private Builder(BaseEnvironmentReleaseReference baseEnvironmentReleaseReference) { - this.release = baseEnvironmentReleaseReference.release; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a BaseEnvironmentReleaseReference. - * - * @return the new BaseEnvironmentReleaseReference instance - */ - public BaseEnvironmentReleaseReference build() { - return new BaseEnvironmentReleaseReference(this); - } - - /** - * Set the release. - * - * @param release the release - * @return the BaseEnvironmentReleaseReference builder - */ - public Builder release(String release) { - this.release = release; - return this; - } - } - protected BaseEnvironmentReleaseReference() {} - protected BaseEnvironmentReleaseReference(Builder builder) { - release = builder.release; - } - - /** - * New builder. - * - * @return a BaseEnvironmentReleaseReference builder - */ - public Builder newBuilder() { - return new Builder(this); - } - /** * Gets the release. * @@ -78,7 +29,7 @@ public Builder newBuilder() { * * @return the release */ - public String release() { + public String getRelease() { return release; } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java index edf33d9ab8..36702559ad 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java index af7f8c3574..10b6e5d1ca 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java index dcd341597e..7d459037e4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java index 435af700aa..b85b69fdf3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java index 2a3acaeab9..3582732ac8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java index e6a5741c80..e9c6f612ed 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java index c4e396b6b0..78bbf25463 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java index 6e4ef47dcb..796cc50d24 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CompleteItem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CompleteItem.java new file mode 100644 index 0000000000..ecb728734c --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CompleteItem.java @@ -0,0 +1,42 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; + +/** CompleteItem. */ +public class CompleteItem extends RuntimeResponseGeneric { + + /** The preferred type of control to display. */ + public interface Preference { + /** dropdown. */ + String DROPDOWN = "dropdown"; + /** button. */ + String BUTTON = "button"; + } + + @SerializedName("streaming_metadata") + protected Metadata streamingMetadata; + + protected CompleteItem() {} + + /** + * Gets the streamingMetadata. + * + * @return the streamingMetadata + */ + public Metadata getStreamingMetadata() { + return streamingMetadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java index e3858f4eb9..2135ef30f2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponse.java new file mode 100644 index 0000000000..64909e1bca --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponse.java @@ -0,0 +1,129 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Date; +import java.util.List; + +/** CreateAssistantReleaseImportResponse. */ +public class CreateAssistantReleaseImportResponse extends GenericModel { + + /** + * The current status of the artifact import process: - **Failed**: The asynchronous artifact + * import process has failed. - **Processing**: An asynchronous operation to import artifact is + * underway and not yet completed. + */ + public interface Status { + /** Failed. */ + String FAILED = "Failed"; + /** Processing. */ + String PROCESSING = "Processing"; + } + + /** The type of the skill in the draft environment. */ + public interface SkillImpactInDraft { + /** action. */ + String ACTION = "action"; + /** dialog. */ + String DIALOG = "dialog"; + } + + protected String status; + + @SerializedName("task_id") + protected String taskId; + + @SerializedName("assistant_id") + protected String assistantId; + + @SerializedName("skill_impact_in_draft") + protected List skillImpactInDraft; + + protected Date created; + protected Date updated; + + protected CreateAssistantReleaseImportResponse() {} + + /** + * Gets the status. + * + *

The current status of the artifact import process: - **Failed**: The asynchronous artifact + * import process has failed. - **Processing**: An asynchronous operation to import artifact is + * underway and not yet completed. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the taskId. + * + *

A unique identifier for a background asynchronous task that is executing or has executed the + * operation. + * + * @return the taskId + */ + public String getTaskId() { + return taskId; + } + + /** + * Gets the assistantId. + * + *

The ID of the assistant to which the release belongs. + * + * @return the assistantId + */ + public String getAssistantId() { + return assistantId; + } + + /** + * Gets the skillImpactInDraft. + * + *

An array of skill types in the draft environment which will be overridden with skills from + * the artifact being imported. + * + * @return the skillImpactInDraft + */ + public List getSkillImpactInDraft() { + return skillImpactInDraft; + } + + /** + * Gets the created. + * + *

The timestamp for creation of the object. + * + * @return the created + */ + public Date getCreated() { + return created; + } + + /** + * Gets the updated. + * + *

The timestamp for the most recent update to the object. + * + * @return the updated + */ + public Date getUpdated() { + return updated; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateProviderOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateProviderOptions.java new file mode 100644 index 0000000000..70a3b6527f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateProviderOptions.java @@ -0,0 +1,155 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The createProvider options. */ +public class CreateProviderOptions extends GenericModel { + + protected String providerId; + protected ProviderSpecification specification; + protected ProviderPrivate xPrivate; + + /** Builder. */ + public static class Builder { + private String providerId; + private ProviderSpecification specification; + private ProviderPrivate xPrivate; + + /** + * Instantiates a new Builder from an existing CreateProviderOptions instance. + * + * @param createProviderOptions the instance to initialize the Builder with + */ + private Builder(CreateProviderOptions createProviderOptions) { + this.providerId = createProviderOptions.providerId; + this.specification = createProviderOptions.specification; + this.xPrivate = createProviderOptions.xPrivate; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param providerId the providerId + * @param specification the specification + * @param xPrivate the xPrivate + */ + public Builder( + String providerId, ProviderSpecification specification, ProviderPrivate xPrivate) { + this.providerId = providerId; + this.specification = specification; + this.xPrivate = xPrivate; + } + + /** + * Builds a CreateProviderOptions. + * + * @return the new CreateProviderOptions instance + */ + public CreateProviderOptions build() { + return new CreateProviderOptions(this); + } + + /** + * Set the providerId. + * + * @param providerId the providerId + * @return the CreateProviderOptions builder + */ + public Builder providerId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Set the specification. + * + * @param specification the specification + * @return the CreateProviderOptions builder + */ + public Builder specification(ProviderSpecification specification) { + this.specification = specification; + return this; + } + + /** + * Set the xPrivate. + * + * @param xPrivate the xPrivate + * @return the CreateProviderOptions builder + */ + public Builder xPrivate(ProviderPrivate xPrivate) { + this.xPrivate = xPrivate; + return this; + } + } + + protected CreateProviderOptions() {} + + protected CreateProviderOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.providerId, "providerId cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull( + builder.specification, "specification cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.xPrivate, "xPrivate cannot be null"); + providerId = builder.providerId; + specification = builder.specification; + xPrivate = builder.xPrivate; + } + + /** + * New builder. + * + * @return a CreateProviderOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the providerId. + * + *

The unique identifier of the provider. + * + * @return the providerId + */ + public String providerId() { + return providerId; + } + + /** + * Gets the specification. + * + *

The specification of the provider. + * + * @return the specification + */ + public ProviderSpecification specification() { + return specification; + } + + /** + * Gets the xPrivate. + * + *

Private information of the provider. + * + * @return the xPrivate + */ + public ProviderPrivate xPrivate() { + return xPrivate; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptions.java new file mode 100644 index 0000000000..5aa750c4a4 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptions.java @@ -0,0 +1,162 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The createReleaseExport options. */ +public class CreateReleaseExportOptions extends GenericModel { + + protected String assistantId; + protected String release; + protected Boolean includeAudit; + + /** Builder. */ + public static class Builder { + private String assistantId; + private String release; + private Boolean includeAudit; + + /** + * Instantiates a new Builder from an existing CreateReleaseExportOptions instance. + * + * @param createReleaseExportOptions the instance to initialize the Builder with + */ + private Builder(CreateReleaseExportOptions createReleaseExportOptions) { + this.assistantId = createReleaseExportOptions.assistantId; + this.release = createReleaseExportOptions.release; + this.includeAudit = createReleaseExportOptions.includeAudit; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + * @param release the release + */ + public Builder(String assistantId, String release) { + this.assistantId = assistantId; + this.release = release; + } + + /** + * Builds a CreateReleaseExportOptions. + * + * @return the new CreateReleaseExportOptions instance + */ + public CreateReleaseExportOptions build() { + return new CreateReleaseExportOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the CreateReleaseExportOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the release. + * + * @param release the release + * @return the CreateReleaseExportOptions builder + */ + public Builder release(String release) { + this.release = release; + return this; + } + + /** + * Set the includeAudit. + * + * @param includeAudit the includeAudit + * @return the CreateReleaseExportOptions builder + */ + public Builder includeAudit(Boolean includeAudit) { + this.includeAudit = includeAudit; + return this; + } + } + + protected CreateReleaseExportOptions() {} + + protected CreateReleaseExportOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.release, "release cannot be empty"); + assistantId = builder.assistantId; + release = builder.release; + includeAudit = builder.includeAudit; + } + + /** + * New builder. + * + * @return a CreateReleaseExportOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the release. + * + *

Unique identifier of the release. + * + * @return the release + */ + public String release() { + return release; + } + + /** + * Gets the includeAudit. + * + *

Whether to include the audit properties (`created` and `updated` timestamps) in the + * response. + * + * @return the includeAudit + */ + public Boolean includeAudit() { + return includeAudit; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrors.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrors.java new file mode 100644 index 0000000000..7e7353f979 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrors.java @@ -0,0 +1,151 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Date; +import java.util.List; + +/** CreateReleaseExportWithStatusErrors. */ +public class CreateReleaseExportWithStatusErrors extends GenericModel { + + /** + * The current status of the release export creation process: - **Available**: The release export + * package is available for download. - **Failed**: The asynchronous release export package + * creation process has failed. - **Processing**: An asynchronous operation to create the release + * export package is underway and not yet completed. + */ + public interface Status { + /** Available. */ + String AVAILABLE = "Available"; + /** Failed. */ + String FAILED = "Failed"; + /** Processing. */ + String PROCESSING = "Processing"; + } + + protected String status; + + @SerializedName("task_id") + protected String taskId; + + @SerializedName("assistant_id") + protected String assistantId; + + protected String release; + protected Date created; + protected Date updated; + + @SerializedName("status_errors") + protected List statusErrors; + + @SerializedName("status_description") + protected String statusDescription; + + protected CreateReleaseExportWithStatusErrors() {} + + /** + * Gets the status. + * + *

The current status of the release export creation process: - **Available**: The release + * export package is available for download. - **Failed**: The asynchronous release export package + * creation process has failed. - **Processing**: An asynchronous operation to create the release + * export package is underway and not yet completed. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the taskId. + * + *

A unique identifier for a background asynchronous task that is executing or has executed the + * operation. + * + * @return the taskId + */ + public String getTaskId() { + return taskId; + } + + /** + * Gets the assistantId. + * + *

The ID of the assistant to which the release belongs. + * + * @return the assistantId + */ + public String getAssistantId() { + return assistantId; + } + + /** + * Gets the release. + * + *

The name of the release. The name is the version number (an integer), returned as a string. + * + * @return the release + */ + public String getRelease() { + return release; + } + + /** + * Gets the created. + * + *

The timestamp for creation of the object. + * + * @return the created + */ + public Date getCreated() { + return created; + } + + /** + * Gets the updated. + * + *

The timestamp for the most recent update to the object. + * + * @return the updated + */ + public Date getUpdated() { + return updated; + } + + /** + * Gets the statusErrors. + * + *

An array of messages about errors that caused an asynchronous operation to fail. Included + * only if **status**=`Failed`. + * + * @return the statusErrors + */ + public List getStatusErrors() { + return statusErrors; + } + + /** + * Gets the statusDescription. + * + *

The description of the failed asynchronous operation. Included only if **status**=`Failed`. + * + * @return the statusDescription + */ + public String getStatusDescription() { + return statusDescription; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptions.java new file mode 100644 index 0000000000..5c25837a1f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptions.java @@ -0,0 +1,178 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; + +/** The createReleaseImport options. */ +public class CreateReleaseImportOptions extends GenericModel { + + protected String assistantId; + protected InputStream body; + protected Boolean includeAudit; + + /** Builder. */ + public static class Builder { + private String assistantId; + private InputStream body; + private Boolean includeAudit; + + /** + * Instantiates a new Builder from an existing CreateReleaseImportOptions instance. + * + * @param createReleaseImportOptions the instance to initialize the Builder with + */ + private Builder(CreateReleaseImportOptions createReleaseImportOptions) { + this.assistantId = createReleaseImportOptions.assistantId; + this.body = createReleaseImportOptions.body; + this.includeAudit = createReleaseImportOptions.includeAudit; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + * @param body the body + */ + public Builder(String assistantId, InputStream body) { + this.assistantId = assistantId; + this.body = body; + } + + /** + * Builds a CreateReleaseImportOptions. + * + * @return the new CreateReleaseImportOptions instance + */ + public CreateReleaseImportOptions build() { + return new CreateReleaseImportOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the CreateReleaseImportOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the body. + * + * @param body the body + * @return the CreateReleaseImportOptions builder + */ + public Builder body(InputStream body) { + this.body = body; + return this; + } + + /** + * Set the includeAudit. + * + * @param includeAudit the includeAudit + * @return the CreateReleaseImportOptions builder + */ + public Builder includeAudit(Boolean includeAudit) { + this.includeAudit = includeAudit; + return this; + } + + /** + * Set the body. + * + * @param body the body + * @return the CreateReleaseImportOptions builder + * @throws FileNotFoundException if the file could not be found + */ + public Builder body(File body) throws FileNotFoundException { + this.body = new FileInputStream(body); + return this; + } + } + + protected CreateReleaseImportOptions() {} + + protected CreateReleaseImportOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.body, "body cannot be null"); + assistantId = builder.assistantId; + body = builder.body; + includeAudit = builder.includeAudit; + } + + /** + * New builder. + * + * @return a CreateReleaseImportOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the body. + * + *

Request body is an Octet-stream of the artifact Zip file that is being imported. + * + * @return the body + */ + public InputStream body() { + return body; + } + + /** + * Gets the includeAudit. + * + *

Whether to include the audit properties (`created` and `updated` timestamps) in the + * response. + * + * @return the includeAudit + */ + public Boolean includeAudit() { + return includeAudit; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java index 67096e9ddf..2df89ae548 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java index 07c065d481..91eeb60f2e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java index 40b27e6bdc..57dd003c46 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java index 230c9d4b70..7b099fb4d3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java index bab9f8e0a4..4b6f95a5b0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java index d413deeaab..993cfed06d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java index 4ec983e483..0227ea7bd5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java index 51788a2e00..54945331b0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java index 231d8a601b..b531472527 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java index b18ff5f0dc..75f63d74f8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java index 976eb37ea8..7ff329ff2c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java index c8af9f2f7e..70181433c8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java index 0c574579a0..8d79140aa2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java index d711ee0e9c..eb40bf2467 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java index 035714b4a5..51695aa85d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptions.java new file mode 100644 index 0000000000..e902819c84 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptions.java @@ -0,0 +1,162 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The downloadReleaseExport options. */ +public class DownloadReleaseExportOptions extends GenericModel { + + protected String assistantId; + protected String release; + protected Boolean includeAudit; + + /** Builder. */ + public static class Builder { + private String assistantId; + private String release; + private Boolean includeAudit; + + /** + * Instantiates a new Builder from an existing DownloadReleaseExportOptions instance. + * + * @param downloadReleaseExportOptions the instance to initialize the Builder with + */ + private Builder(DownloadReleaseExportOptions downloadReleaseExportOptions) { + this.assistantId = downloadReleaseExportOptions.assistantId; + this.release = downloadReleaseExportOptions.release; + this.includeAudit = downloadReleaseExportOptions.includeAudit; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + * @param release the release + */ + public Builder(String assistantId, String release) { + this.assistantId = assistantId; + this.release = release; + } + + /** + * Builds a DownloadReleaseExportOptions. + * + * @return the new DownloadReleaseExportOptions instance + */ + public DownloadReleaseExportOptions build() { + return new DownloadReleaseExportOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the DownloadReleaseExportOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the release. + * + * @param release the release + * @return the DownloadReleaseExportOptions builder + */ + public Builder release(String release) { + this.release = release; + return this; + } + + /** + * Set the includeAudit. + * + * @param includeAudit the includeAudit + * @return the DownloadReleaseExportOptions builder + */ + public Builder includeAudit(Boolean includeAudit) { + this.includeAudit = includeAudit; + return this; + } + } + + protected DownloadReleaseExportOptions() {} + + protected DownloadReleaseExportOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.release, "release cannot be empty"); + assistantId = builder.assistantId; + release = builder.release; + includeAudit = builder.includeAudit; + } + + /** + * New builder. + * + * @return a DownloadReleaseExportOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the release. + * + *

Unique identifier of the release. + * + * @return the release + */ + public String release() { + return release; + } + + /** + * Gets the includeAudit. + * + *

Whether to include the audit properties (`created` and `updated` timestamps) in the + * response. + * + * @return the includeAudit + */ + public Boolean includeAudit() { + return includeAudit; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java index b4a0ad8a2a..601a4be5dd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java index 120e14458a..e728380922 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java index d78b2c6a0b..411b3c8170 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java index 5bb781a2e5..64641afcee 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java index 869f014832..045aea997a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponse.java new file mode 100644 index 0000000000..b2e923a9e9 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponse.java @@ -0,0 +1,102 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Message final response content. */ +public class FinalResponse extends GenericModel { + + protected FinalResponseOutput output; + protected MessageContext context; + + @SerializedName("user_id") + protected String userId; + + @SerializedName("masked_output") + protected MessageOutput maskedOutput; + + @SerializedName("masked_input") + protected MessageInput maskedInput; + + protected FinalResponse() {} + + /** + * Gets the output. + * + *

Assistant output to be rendered or processed by the client. + * + * @return the output + */ + public FinalResponseOutput getOutput() { + return output; + } + + /** + * Gets the context. + * + *

Context data for the conversation. You can use this property to access context variables. + * The context is stored by the assistant on a per-session basis. + * + *

**Note:** The context is included in message responses only if **return_context**=`true` in + * the message request. Full context is always included in logs. + * + * @return the context + */ + public MessageContext getContext() { + return context; + } + + /** + * Gets the userId. + * + *

A string value that identifies the user who is interacting with the assistant. The client + * must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This + * string cannot contain carriage return, newline, or tab characters. If no value is specified in + * the input, **user_id** is automatically set to the value of **context.global.session_id**. + * + *

**Note:** This property is the same as the **user_id** property in the global system + * context. + * + * @return the userId + */ + public String getUserId() { + return userId; + } + + /** + * Gets the maskedOutput. + * + *

Assistant output to be rendered or processed by the client. All private data is masked or + * removed. + * + * @return the maskedOutput + */ + public MessageOutput getMaskedOutput() { + return maskedOutput; + } + + /** + * Gets the maskedInput. + * + *

An input object that includes the input text. All private data is masked or removed. + * + * @return the maskedInput + */ + public MessageInput getMaskedInput() { + return maskedInput; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponseOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponseOutput.java new file mode 100644 index 0000000000..c8c3161e7d --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/FinalResponseOutput.java @@ -0,0 +1,129 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; + +/** Assistant output to be rendered or processed by the client. */ +public class FinalResponseOutput extends GenericModel { + + protected List generic; + protected List intents; + protected List entities; + protected List actions; + protected MessageOutputDebug debug; + + @SerializedName("user_defined") + protected Map userDefined; + + protected MessageOutputSpelling spelling; + + @SerializedName("streaming_metadata") + protected MessageStreamMetadata streamingMetadata; + + protected FinalResponseOutput() {} + + /** + * Gets the generic. + * + *

Output intended for any channel. It is the responsibility of the client application to + * implement the supported response types. + * + * @return the generic + */ + public List getGeneric() { + return generic; + } + + /** + * Gets the intents. + * + *

An array of intents recognized in the user input, sorted in descending order of confidence. + * + * @return the intents + */ + public List getIntents() { + return intents; + } + + /** + * Gets the entities. + * + *

An array of entities identified in the user input. + * + * @return the entities + */ + public List getEntities() { + return entities; + } + + /** + * Gets the actions. + * + *

An array of objects describing any actions requested by the dialog node. + * + * @return the actions + */ + public List getActions() { + return actions; + } + + /** + * Gets the debug. + * + *

Additional detailed information about a message response and how it was generated. + * + * @return the debug + */ + public MessageOutputDebug getDebug() { + return debug; + } + + /** + * Gets the userDefined. + * + *

An object containing any custom properties included in the response. This object includes + * any arbitrary properties defined in the dialog JSON editor as part of the dialog node output. + * + * @return the userDefined + */ + public Map getUserDefined() { + return userDefined; + } + + /** + * Gets the spelling. + * + *

Properties describing any spelling corrections in the user input that was received. + * + * @return the spelling + */ + public MessageOutputSpelling getSpelling() { + return spelling; + } + + /** + * Gets the streamingMetadata. + * + *

Contains meta-information about the item(s) being streamed. + * + * @return the streamingMetadata + */ + public MessageStreamMetadata getStreamingMetadata() { + return streamingMetadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java index e2c5667b67..bb32ff4608 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptions.java new file mode 100644 index 0000000000..de8feba7f8 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptions.java @@ -0,0 +1,133 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The getReleaseImportStatus options. */ +public class GetReleaseImportStatusOptions extends GenericModel { + + protected String assistantId; + protected Boolean includeAudit; + + /** Builder. */ + public static class Builder { + private String assistantId; + private Boolean includeAudit; + + /** + * Instantiates a new Builder from an existing GetReleaseImportStatusOptions instance. + * + * @param getReleaseImportStatusOptions the instance to initialize the Builder with + */ + private Builder(GetReleaseImportStatusOptions getReleaseImportStatusOptions) { + this.assistantId = getReleaseImportStatusOptions.assistantId; + this.includeAudit = getReleaseImportStatusOptions.includeAudit; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + */ + public Builder(String assistantId) { + this.assistantId = assistantId; + } + + /** + * Builds a GetReleaseImportStatusOptions. + * + * @return the new GetReleaseImportStatusOptions instance + */ + public GetReleaseImportStatusOptions build() { + return new GetReleaseImportStatusOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the GetReleaseImportStatusOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the includeAudit. + * + * @param includeAudit the includeAudit + * @return the GetReleaseImportStatusOptions builder + */ + public Builder includeAudit(Boolean includeAudit) { + this.includeAudit = includeAudit; + return this; + } + } + + protected GetReleaseImportStatusOptions() {} + + protected GetReleaseImportStatusOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + assistantId = builder.assistantId; + includeAudit = builder.includeAudit; + } + + /** + * New builder. + * + * @return a GetReleaseImportStatusOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the includeAudit. + * + *

Whether to include the audit properties (`created` and `updated` timestamps) in the + * response. + * + * @return the includeAudit + */ + public Boolean includeAudit() { + return includeAudit; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java index e21331f728..88b09fee39 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java index c0e5dd256d..6af67ec78c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java index 76fa94a63a..2860b823c3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java index 4227b1ae98..4f619ccbae 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/InputStreamConnectStrategy.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/InputStreamConnectStrategy.java new file mode 100644 index 0000000000..17c5b2ec93 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/InputStreamConnectStrategy.java @@ -0,0 +1,123 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.launchdarkly.eventsource.ConnectStrategy; +import com.launchdarkly.eventsource.StreamException; +import com.launchdarkly.logging.LDLogger; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; + +public class InputStreamConnectStrategy extends ConnectStrategy { + + protected InputStream inputStream; + + /** Builder. */ + public static class Builder { + private InputStream inputStream; + + /** + * Instantiates a new Builder from an existing InputStreamConnectStrategy instance. + * + * @param inputStreamConnectStrategy the instance to initialize the Builder with + */ + private Builder(InputStreamConnectStrategy inputStreamConnectStrategy) { + this.inputStream = inputStreamConnectStrategy.inputStream; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param inputStream the inputStream + */ + public Builder(InputStream inputStream) { + this.inputStream = inputStream; + } + + /** + * Builds a InputStreamConnectStrategy. + * + * @return the new InputStreamConnectStrategy instance + */ + public InputStreamConnectStrategy build() { + return new InputStreamConnectStrategy(this); + } + + /** + * Set the inputStream. + * + * @param inputStream the inputStream + * @return the InputStreamConnectStrategy builder + */ + public Builder inputStream(InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + } + + protected InputStreamConnectStrategy() {} + + protected InputStreamConnectStrategy(Builder builder) { + inputStream = builder.inputStream; + } + + /** + * New builder. + * + * @return a InputStreamConnectStrategy builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the inputStream. + * + * @return the inputStream + */ + public InputStream inputStream() { + return inputStream; + } + + @Override + public Client createClient(LDLogger ldLogger) { + Client client = new Client() { + @Override + public Result connect(String s) throws StreamException { + Result result = new Result(inputStream, null, inputStream); + return result; + } + + @Override + public boolean awaitClosed(long l) throws InterruptedException { + return false; + } + + @Override + public URI getOrigin() { + return null; + } + + @Override + public void close() throws IOException { + inputStream.close(); + } + }; + return client; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java index 6f455b7cbc..59140411c5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java index 7afdf0280a..dcdd28a959 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java index b3a1ff1046..53cc2b9137 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java index e2cd21e79a..12d20a2ca0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListProvidersOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListProvidersOptions.java new file mode 100644 index 0000000000..56f04a797b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListProvidersOptions.java @@ -0,0 +1,204 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The listProviders options. */ +public class ListProvidersOptions extends GenericModel { + + /** + * The attribute by which returned conversational skill providers will be sorted. To reverse the + * sort order, prefix the value with a minus sign (`-`). + */ + public interface Sort { + /** name. */ + String NAME = "name"; + /** updated. */ + String UPDATED = "updated"; + } + + protected Long pageLimit; + protected Boolean includeCount; + protected String sort; + protected String cursor; + protected Boolean includeAudit; + + /** Builder. */ + public static class Builder { + private Long pageLimit; + private Boolean includeCount; + private String sort; + private String cursor; + private Boolean includeAudit; + + /** + * Instantiates a new Builder from an existing ListProvidersOptions instance. + * + * @param listProvidersOptions the instance to initialize the Builder with + */ + private Builder(ListProvidersOptions listProvidersOptions) { + this.pageLimit = listProvidersOptions.pageLimit; + this.includeCount = listProvidersOptions.includeCount; + this.sort = listProvidersOptions.sort; + this.cursor = listProvidersOptions.cursor; + this.includeAudit = listProvidersOptions.includeAudit; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ListProvidersOptions. + * + * @return the new ListProvidersOptions instance + */ + public ListProvidersOptions build() { + return new ListProvidersOptions(this); + } + + /** + * Set the pageLimit. + * + * @param pageLimit the pageLimit + * @return the ListProvidersOptions builder + */ + public Builder pageLimit(long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set the includeCount. + * + * @param includeCount the includeCount + * @return the ListProvidersOptions builder + */ + public Builder includeCount(Boolean includeCount) { + this.includeCount = includeCount; + return this; + } + + /** + * Set the sort. + * + * @param sort the sort + * @return the ListProvidersOptions builder + */ + public Builder sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set the cursor. + * + * @param cursor the cursor + * @return the ListProvidersOptions builder + */ + public Builder cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * Set the includeAudit. + * + * @param includeAudit the includeAudit + * @return the ListProvidersOptions builder + */ + public Builder includeAudit(Boolean includeAudit) { + this.includeAudit = includeAudit; + return this; + } + } + + protected ListProvidersOptions() {} + + protected ListProvidersOptions(Builder builder) { + pageLimit = builder.pageLimit; + includeCount = builder.includeCount; + sort = builder.sort; + cursor = builder.cursor; + includeAudit = builder.includeAudit; + } + + /** + * New builder. + * + * @return a ListProvidersOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the pageLimit. + * + *

The number of records to return in each page of results. + * + * @return the pageLimit + */ + public Long pageLimit() { + return pageLimit; + } + + /** + * Gets the includeCount. + * + *

Whether to include information about the number of records that satisfy the request, + * regardless of the page limit. If this parameter is `true`, the `pagination` object in the + * response includes the `total` property. + * + * @return the includeCount + */ + public Boolean includeCount() { + return includeCount; + } + + /** + * Gets the sort. + * + *

The attribute by which returned conversational skill providers will be sorted. To reverse + * the sort order, prefix the value with a minus sign (`-`). + * + * @return the sort + */ + public String sort() { + return sort; + } + + /** + * Gets the cursor. + * + *

A token identifying the page of results to retrieve. + * + * @return the cursor + */ + public String cursor() { + return cursor; + } + + /** + * Gets the includeAudit. + * + *

Whether to include the audit properties (`created` and `updated` timestamps) in the + * response. + * + * @return the includeAudit + */ + public Boolean includeAudit() { + return includeAudit; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java index f298b2e301..06d12fb984 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java index 6c99175288..847a14c60a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java index 841bd5331d..bf62b20686 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java index 8705e0a6ac..3800d8e619 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java index 457b07b25d..1e46248d1c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** An object that identifies the dialog element that generated the error message. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java index b722b5080b..6c1faa9e34 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** An object that identifies the dialog element that generated the error message. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java index d87ab86fce..683208bfbe 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** An object that identifies the dialog element that generated the error message. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java index 92c6c1ae1f..dd6fa094a9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** An object that identifies the dialog element that generated the error message. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java index 8f1f54a489..dd0e1cd911 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequest.java index a76b154364..57212bb192 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequest.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequest.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequestInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequestInput.java index 9cd634b3e3..ec17a513f1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequestInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogRequestInput.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponse.java index 4addd4267f..9ee1ca0738 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponse.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponseOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponseOutput.java index 1229aa9158..7e89e07c93 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponseOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogResponseOutput.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java index 0134c13f79..ca38764c6f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextActionSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextActionSkill.java index f172a5ccde..1075b69a5c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextActionSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextActionSkill.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextDialogSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextDialogSkill.java index b53c711235..1f414becb1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextDialogSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextDialogSkill.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java index f87e3069d9..725fbf45a1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java index e7cf359875..938bbc57cb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java index 00cdc10a07..9e6279075c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -18,7 +19,11 @@ import java.util.HashMap; import java.util.Map; -/** System context data used by the skill. */ +/** + * System context data used by the skill. + * + *

This type supports additional properties of type Object. For internal use only. + */ public class MessageContextSkillSystem extends DynamicModel { @SerializedName("state") @@ -67,7 +72,7 @@ public Builder state(String state) { } /** - * Add an arbitrary property. + * Add an arbitrary property. For internal use only. * * @param name the name of the property to add * @param value the value of the property to add diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java index a7c0e57d40..d1828a9400 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java new file mode 100644 index 0000000000..3c02ccda36 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java @@ -0,0 +1,137 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.Gson; +import com.launchdarkly.eventsource.EventSource; +import com.launchdarkly.eventsource.MessageEvent; +import java.io.InputStream; +import java.util.Iterator; + +public class MessageEventDeserializer extends MessageStreamResponse { + + protected EventSource eventSource; + + /** Builder. */ + public static class Builder { + private EventSource eventSource; + + /** + * Instantiates a new Builder from an existing MessageEventDeserializer instance. + * + * @param messageEventDeserializer the instance to initialize the Builder with + */ + private Builder(MessageEventDeserializer messageEventDeserializer) { + this.eventSource = messageEventDeserializer.eventSource; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param inputStream the inputStream + */ + public Builder(InputStream inputStream) { + var inputStreamConnectStrategy = + new InputStreamConnectStrategy.Builder().inputStream(inputStream).build(); + this.eventSource = new EventSource.Builder(inputStreamConnectStrategy).build(); + } + + /** + * Builds a MessageEventDeserializer. + * + * @return the new MessageEventDeserializer instance + */ + public MessageEventDeserializer build() { + return new MessageEventDeserializer(this); + } + + /** + * Set the inputStream. + * + * @param inputStream the inputStream + * @return the MessageEventDeserializer builder + */ + public MessageEventDeserializer.Builder inputStream(InputStream inputStream) { + var inputStreamConnectStrategy = + new InputStreamConnectStrategy.Builder().inputStream(inputStream).build(); + this.eventSource = new EventSource.Builder(inputStreamConnectStrategy).build(); + return this; + } + } + + protected MessageEventDeserializer() {} + + protected MessageEventDeserializer(MessageEventDeserializer.Builder builder) { + eventSource = builder.eventSource; + } + + /** + * New builder. + * + * @return a MessageEventDeserializer builder + */ + public MessageEventDeserializer.Builder newBuilder() { + return new MessageEventDeserializer.Builder(this); + } + + public Iterable messages() { + return () -> new IteratorImpl<>(eventSource.messages()); + } + + public Iterable statelessMessages() { + return () -> new StatelessIteratorImpl<>(eventSource.messages()); + } + + + private class IteratorImpl implements Iterator { + private final Iterable messageEvents; + + IteratorImpl(Iterable messageEvents) { + this.messageEvents = messageEvents; + } + + public boolean hasNext() { + return messageEvents.iterator().hasNext(); + } + + public T next() { + var gson = new Gson(); + var messageEvent = messageEvents.iterator().next(); + T item = (T) gson.fromJson(messageEvent.getData(), MessageStreamResponse.class); + return item; + } + } + + private class StatelessIteratorImpl implements Iterator { + private final Iterable messageEvents; + + StatelessIteratorImpl(Iterable messageEvents) { + this.messageEvents = messageEvents; + } + + public boolean hasNext() { + return messageEvents.iterator().hasNext(); + } + + public T next() { + var gson = new Gson(); + var messageEvent = messageEvents.iterator().next(); + T item = (T) gson.fromJson(messageEvent.getData(), StatelessMessageStreamResponse.class); + return item; + } + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java index 8b1301df36..b460f82eab 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java index 4becb71631..d86d48c8ed 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java index 6dbe793189..16646695c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java index f9b528d92d..b839f77392 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java index ee3d8840c3..016667e78e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -18,6 +19,7 @@ public class MessageOptions extends GenericModel { protected String assistantId; + protected String environmentId; protected String sessionId; protected MessageInput input; protected MessageContext context; @@ -26,6 +28,7 @@ public class MessageOptions extends GenericModel { /** Builder. */ public static class Builder { private String assistantId; + private String environmentId; private String sessionId; private MessageInput input; private MessageContext context; @@ -38,6 +41,7 @@ public static class Builder { */ private Builder(MessageOptions messageOptions) { this.assistantId = messageOptions.assistantId; + this.environmentId = messageOptions.environmentId; this.sessionId = messageOptions.sessionId; this.input = messageOptions.input; this.context = messageOptions.context; @@ -51,10 +55,12 @@ public Builder() {} * Instantiates a new builder with required properties. * * @param assistantId the assistantId + * @param environmentId the environmentId * @param sessionId the sessionId */ - public Builder(String assistantId, String sessionId) { + public Builder(String assistantId, String environmentId, String sessionId) { this.assistantId = assistantId; + this.environmentId = environmentId; this.sessionId = sessionId; } @@ -78,6 +84,17 @@ public Builder assistantId(String assistantId) { return this; } + /** + * Set the environmentId. + * + * @param environmentId the environmentId + * @return the MessageOptions builder + */ + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + /** * Set the sessionId. * @@ -128,8 +145,11 @@ protected MessageOptions() {} protected MessageOptions(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notEmpty( builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.environmentId, "environmentId cannot be empty"); com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.sessionId, "sessionId cannot be empty"); assistantId = builder.assistantId; + environmentId = builder.environmentId; sessionId = builder.sessionId; input = builder.input; context = builder.context; @@ -166,6 +186,19 @@ public String assistantId() { return assistantId; } + /** + * Gets the environmentId. + * + *

Unique identifier of the environment. To find the environment ID in the watsonx Assistant + * user interface, open the environment settings and click **API Details**. **Note:** Currently, + * the API does not support creating environments. + * + * @return the environmentId + */ + public String environmentId() { + return environmentId; + } + /** * Gets the sessionId. * diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java index 4169f9cf11..82084abf24 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java index b857f6bc6d..a4ee67d561 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java index 2cc111d8be..4c596e63c1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -47,7 +48,6 @@ public class MessageOutputDebugTurnEvent extends GenericModel { discriminatorMapping.put("search", MessageOutputDebugTurnEventTurnEventSearch.class); discriminatorMapping.put("node_visited", MessageOutputDebugTurnEventTurnEventNodeVisited.class); } - /** The type of condition (if any) that is defined for the action. */ public interface ConditionType { /** user_defined. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java index 90e69e62c8..8f226d7427 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventActionFinished. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java index 46e7444451..4cd680d5ea 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventActionVisited. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java index a7c5b7ce0a..0e8a636d6b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventCallout. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java index 583cf8b44b..d5adb0fc76 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventHandlerVisited. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java index 7ff90ef64e..7724ed9854 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventNodeVisited. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java index 809aff8862..065a74acc3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventSearch. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java index cd64051ef8..a81967cbe5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventStepAnswered. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java index 8ae7260108..82e2c19c51 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** MessageOutputDebugTurnEventTurnEventStepVisited. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java index b1acf4a2df..f84f298269 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java index b92ea56ac2..67b8d6fa14 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -18,6 +19,7 @@ public class MessageStatelessOptions extends GenericModel { protected String assistantId; + protected String environmentId; protected StatelessMessageInput input; protected StatelessMessageContext context; protected String userId; @@ -25,6 +27,7 @@ public class MessageStatelessOptions extends GenericModel { /** Builder. */ public static class Builder { private String assistantId; + private String environmentId; private StatelessMessageInput input; private StatelessMessageContext context; private String userId; @@ -36,6 +39,7 @@ public static class Builder { */ private Builder(MessageStatelessOptions messageStatelessOptions) { this.assistantId = messageStatelessOptions.assistantId; + this.environmentId = messageStatelessOptions.environmentId; this.input = messageStatelessOptions.input; this.context = messageStatelessOptions.context; this.userId = messageStatelessOptions.userId; @@ -48,9 +52,11 @@ public Builder() {} * Instantiates a new builder with required properties. * * @param assistantId the assistantId + * @param environmentId the environmentId */ - public Builder(String assistantId) { + public Builder(String assistantId, String environmentId) { this.assistantId = assistantId; + this.environmentId = environmentId; } /** @@ -73,6 +79,17 @@ public Builder assistantId(String assistantId) { return this; } + /** + * Set the environmentId. + * + * @param environmentId the environmentId + * @return the MessageStatelessOptions builder + */ + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + /** * Set the input. * @@ -112,7 +129,10 @@ protected MessageStatelessOptions() {} protected MessageStatelessOptions(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notEmpty( builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.environmentId, "environmentId cannot be empty"); assistantId = builder.assistantId; + environmentId = builder.environmentId; input = builder.input; context = builder.context; userId = builder.userId; @@ -148,6 +168,19 @@ public String assistantId() { return assistantId; } + /** + * Gets the environmentId. + * + *

Unique identifier of the environment. To find the environment ID in the watsonx Assistant + * user interface, open the environment settings and click **API Details**. **Note:** Currently, + * the API does not support creating environments. + * + * @return the environmentId + */ + public String environmentId() { + return environmentId; + } + /** * Gets the input. * diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadata.java new file mode 100644 index 0000000000..1d5999a5ce --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadata.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Contains meta-information about the item(s) being streamed. */ +public class MessageStreamMetadata extends GenericModel { + + @SerializedName("streaming_metadata") + protected Metadata streamingMetadata; + + protected MessageStreamMetadata() {} + + /** + * Gets the streamingMetadata. + * + *

Contains meta-information about the item(s) being streamed. + * + * @return the streamingMetadata + */ + public Metadata getStreamingMetadata() { + return streamingMetadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamOptions.java new file mode 100644 index 0000000000..af36dad5e4 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamOptions.java @@ -0,0 +1,258 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The messageStream options. */ +public class MessageStreamOptions extends GenericModel { + + protected String assistantId; + protected String environmentId; + protected String sessionId; + protected MessageInput input; + protected MessageContext context; + protected String userId; + + /** Builder. */ + public static class Builder { + private String assistantId; + private String environmentId; + private String sessionId; + private MessageInput input; + private MessageContext context; + private String userId; + + /** + * Instantiates a new Builder from an existing MessageStreamOptions instance. + * + * @param messageStreamOptions the instance to initialize the Builder with + */ + private Builder(MessageStreamOptions messageStreamOptions) { + this.assistantId = messageStreamOptions.assistantId; + this.environmentId = messageStreamOptions.environmentId; + this.sessionId = messageStreamOptions.sessionId; + this.input = messageStreamOptions.input; + this.context = messageStreamOptions.context; + this.userId = messageStreamOptions.userId; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + * @param environmentId the environmentId + * @param sessionId the sessionId + */ + public Builder(String assistantId, String environmentId, String sessionId) { + this.assistantId = assistantId; + this.environmentId = environmentId; + this.sessionId = sessionId; + } + + /** + * Builds a MessageStreamOptions. + * + * @return the new MessageStreamOptions instance + */ + public MessageStreamOptions build() { + return new MessageStreamOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the MessageStreamOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the environmentId. + * + * @param environmentId the environmentId + * @return the MessageStreamOptions builder + */ + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Set the sessionId. + * + * @param sessionId the sessionId + * @return the MessageStreamOptions builder + */ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Set the input. + * + * @param input the input + * @return the MessageStreamOptions builder + */ + public Builder input(MessageInput input) { + this.input = input; + return this; + } + + /** + * Set the context. + * + * @param context the context + * @return the MessageStreamOptions builder + */ + public Builder context(MessageContext context) { + this.context = context; + return this; + } + + /** + * Set the userId. + * + * @param userId the userId + * @return the MessageStreamOptions builder + */ + public Builder userId(String userId) { + this.userId = userId; + return this; + } + } + + protected MessageStreamOptions() {} + + protected MessageStreamOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.environmentId, "environmentId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.sessionId, "sessionId cannot be empty"); + assistantId = builder.assistantId; + environmentId = builder.environmentId; + sessionId = builder.sessionId; + input = builder.input; + context = builder.context; + userId = builder.userId; + } + + /** + * New builder. + * + * @return a MessageStreamOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the environmentId. + * + *

Unique identifier of the environment. To find the environment ID in the watsonx Assistant + * user interface, open the environment settings and click **API Details**. **Note:** Currently, + * the API does not support creating environments. + * + * @return the environmentId + */ + public String environmentId() { + return environmentId; + } + + /** + * Gets the sessionId. + * + *

Unique identifier of the session. + * + * @return the sessionId + */ + public String sessionId() { + return sessionId; + } + + /** + * Gets the input. + * + *

An input object that includes the input text. + * + * @return the input + */ + public MessageInput input() { + return input; + } + + /** + * Gets the context. + * + *

Context data for the conversation. You can use this property to set or modify context + * variables, which can also be accessed by dialog nodes. The context is stored by the assistant + * on a per-session basis. + * + *

**Note:** The total size of the context data stored for a stateful session cannot exceed + * 100KB. + * + * @return the context + */ + public MessageContext context() { + return context; + } + + /** + * Gets the userId. + * + *

A string value that identifies the user who is interacting with the assistant. The client + * must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This + * string cannot contain carriage return, newline, or tab characters. If no value is specified in + * the input, **user_id** is automatically set to the value of **context.global.session_id**. + * + *

**Note:** This property is the same as the **user_id** property in the global system + * context. If **user_id** is specified in both locations, the value specified at the root is + * used. + * + * @return the userId + */ + public String userId() { + return userId; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamResponse.java new file mode 100644 index 0000000000..ec46e1f435 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamResponse.java @@ -0,0 +1,69 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * A streamed response from the watsonx Assistant service. + * + *

Classes which extend this class: - MessageStreamResponseMessageStreamPartialItem - + * MessageStreamResponseMessageStreamCompleteItem - + * MessageStreamResponseStatefulMessageStreamFinalResponse + */ +public class MessageStreamResponse extends GenericModel { + + @SerializedName("partial_item") + protected PartialItem partialItem; + + @SerializedName("complete_item") + protected CompleteItem completeItem; + + @SerializedName("final_response") + protected FinalResponse finalResponse; + + protected MessageStreamResponse() {} + + /** + * Gets the partialItem. + * + *

Message response partial item content. + * + * @return the partialItem + */ + public PartialItem getPartialItem() { + return partialItem; + } + + /** + * Gets the completeItem. + * + * @return the completeItem + */ + public CompleteItem getCompleteItem() { + return completeItem; + } + + /** + * Gets the finalResponse. + * + *

Message final response content. + * + * @return the finalResponse + */ + public FinalResponse getFinalResponse() { + return finalResponse; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptions.java new file mode 100644 index 0000000000..d4e0da7fcb --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptions.java @@ -0,0 +1,229 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The messageStreamStateless options. */ +public class MessageStreamStatelessOptions extends GenericModel { + + protected String assistantId; + protected String environmentId; + protected MessageInput input; + protected MessageContext context; + protected String userId; + + /** Builder. */ + public static class Builder { + private String assistantId; + private String environmentId; + private MessageInput input; + private MessageContext context; + private String userId; + + /** + * Instantiates a new Builder from an existing MessageStreamStatelessOptions instance. + * + * @param messageStreamStatelessOptions the instance to initialize the Builder with + */ + private Builder(MessageStreamStatelessOptions messageStreamStatelessOptions) { + this.assistantId = messageStreamStatelessOptions.assistantId; + this.environmentId = messageStreamStatelessOptions.environmentId; + this.input = messageStreamStatelessOptions.input; + this.context = messageStreamStatelessOptions.context; + this.userId = messageStreamStatelessOptions.userId; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param assistantId the assistantId + * @param environmentId the environmentId + */ + public Builder(String assistantId, String environmentId) { + this.assistantId = assistantId; + this.environmentId = environmentId; + } + + /** + * Builds a MessageStreamStatelessOptions. + * + * @return the new MessageStreamStatelessOptions instance + */ + public MessageStreamStatelessOptions build() { + return new MessageStreamStatelessOptions(this); + } + + /** + * Set the assistantId. + * + * @param assistantId the assistantId + * @return the MessageStreamStatelessOptions builder + */ + public Builder assistantId(String assistantId) { + this.assistantId = assistantId; + return this; + } + + /** + * Set the environmentId. + * + * @param environmentId the environmentId + * @return the MessageStreamStatelessOptions builder + */ + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Set the input. + * + * @param input the input + * @return the MessageStreamStatelessOptions builder + */ + public Builder input(MessageInput input) { + this.input = input; + return this; + } + + /** + * Set the context. + * + * @param context the context + * @return the MessageStreamStatelessOptions builder + */ + public Builder context(MessageContext context) { + this.context = context; + return this; + } + + /** + * Set the userId. + * + * @param userId the userId + * @return the MessageStreamStatelessOptions builder + */ + public Builder userId(String userId) { + this.userId = userId; + return this; + } + } + + protected MessageStreamStatelessOptions() {} + + protected MessageStreamStatelessOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.assistantId, "assistantId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.environmentId, "environmentId cannot be empty"); + assistantId = builder.assistantId; + environmentId = builder.environmentId; + input = builder.input; + context = builder.context; + userId = builder.userId; + } + + /** + * New builder. + * + * @return a MessageStreamStatelessOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the assistantId. + * + *

The assistant ID or the environment ID of the environment where the assistant is deployed, + * depending on the type of request: - For message, session, and log requests, specify the + * environment ID of the environment where the assistant is deployed. - For all other requests, + * specify the assistant ID of the assistant. + * + *

To find the environment ID or assistant ID in the watsonx Assistant user interface, open the + * assistant settings and scroll to the **Environments** section. + * + *

**Note:** If you are using the classic Watson Assistant experience, always use the assistant + * ID. To find the assistant ID in the user interface, open the assistant settings and click API + * Details. + * + * @return the assistantId + */ + public String assistantId() { + return assistantId; + } + + /** + * Gets the environmentId. + * + *

Unique identifier of the environment. To find the environment ID in the watsonx Assistant + * user interface, open the environment settings and click **API Details**. **Note:** Currently, + * the API does not support creating environments. + * + * @return the environmentId + */ + public String environmentId() { + return environmentId; + } + + /** + * Gets the input. + * + *

An input object that includes the input text. + * + * @return the input + */ + public MessageInput input() { + return input; + } + + /** + * Gets the context. + * + *

Context data for the conversation. You can use this property to set or modify context + * variables, which can also be accessed by dialog nodes. The context is stored by the assistant + * on a per-session basis. + * + *

**Note:** The total size of the context data stored for a stateful session cannot exceed + * 100KB. + * + * @return the context + */ + public MessageContext context() { + return context; + } + + /** + * Gets the userId. + * + *

A string value that identifies the user who is interacting with the assistant. The client + * must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This + * string cannot contain carriage return, newline, or tab characters. If no value is specified in + * the input, **user_id** is automatically set to the value of **context.global.session_id**. + * + *

**Note:** This property is the same as the **user_id** property in the global system + * context. If **user_id** is specified in both locations, the value specified at the root is + * used. + * + * @return the userId + */ + public String userId() { + return userId; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Metadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Metadata.java new file mode 100644 index 0000000000..47c4ec1308 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Metadata.java @@ -0,0 +1,35 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Contains meta-information about the item(s) being streamed. */ +public class Metadata extends GenericModel { + + protected Long id; + + protected Metadata() {} + + /** + * Gets the id. + * + *

Identifies the index and sequence of the current streamed response item. + * + * @return the id + */ + public Long getId() { + return id; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponse.java new file mode 100644 index 0000000000..349643b9b4 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponse.java @@ -0,0 +1,160 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Date; +import java.util.List; + +/** MonitorAssistantReleaseImportArtifactResponse. */ +public class MonitorAssistantReleaseImportArtifactResponse extends GenericModel { + + /** + * The current status of the release import process: - **Completed**: The artifact import has + * completed. - **Failed**: The asynchronous artifact import process has failed. - **Processing**: + * An asynchronous operation to import the artifact is underway and not yet completed. + */ + public interface Status { + /** Completed. */ + String COMPLETED = "Completed"; + /** Failed. */ + String FAILED = "Failed"; + /** Processing. */ + String PROCESSING = "Processing"; + } + + /** The type of the skill in the draft environment. */ + public interface SkillImpactInDraft { + /** action. */ + String ACTION = "action"; + /** dialog. */ + String DIALOG = "dialog"; + } + + protected String status; + + @SerializedName("task_id") + protected String taskId; + + @SerializedName("assistant_id") + protected String assistantId; + + @SerializedName("status_errors") + protected List statusErrors; + + @SerializedName("status_description") + protected String statusDescription; + + @SerializedName("skill_impact_in_draft") + protected List skillImpactInDraft; + + protected Date created; + protected Date updated; + + protected MonitorAssistantReleaseImportArtifactResponse() {} + + /** + * Gets the status. + * + *

The current status of the release import process: - **Completed**: The artifact import has + * completed. - **Failed**: The asynchronous artifact import process has failed. - **Processing**: + * An asynchronous operation to import the artifact is underway and not yet completed. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the taskId. + * + *

A unique identifier for a background asynchronous task that is executing or has executed the + * operation. + * + * @return the taskId + */ + public String getTaskId() { + return taskId; + } + + /** + * Gets the assistantId. + * + *

The ID of the assistant to which the release belongs. + * + * @return the assistantId + */ + public String getAssistantId() { + return assistantId; + } + + /** + * Gets the statusErrors. + * + *

An array of messages about errors that caused an asynchronous operation to fail. Included + * only if **status**=`Failed`. + * + * @return the statusErrors + */ + public List getStatusErrors() { + return statusErrors; + } + + /** + * Gets the statusDescription. + * + *

The description of the failed asynchronous operation. Included only if **status**=`Failed`. + * + * @return the statusDescription + */ + public String getStatusDescription() { + return statusDescription; + } + + /** + * Gets the skillImpactInDraft. + * + *

An array of skill types in the draft environment which will be overridden with skills from + * the artifact being imported. + * + * @return the skillImpactInDraft + */ + public List getSkillImpactInDraft() { + return skillImpactInDraft; + } + + /** + * Gets the created. + * + *

The timestamp for creation of the object. + * + * @return the created + */ + public Date getCreated() { + return created; + } + + /** + * Gets the updated. + * + *

The timestamp for the most recent update to the object. + * + * @return the updated + */ + public Date getUpdated() { + return updated; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java index 7bf1184c57..0d04d03586 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/PartialItem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/PartialItem.java new file mode 100644 index 0000000000..f1ff5d426c --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/PartialItem.java @@ -0,0 +1,65 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Message response partial item content. */ +public class PartialItem extends GenericModel { + + @SerializedName("response_type") + protected String responseType; + + protected String text; + + @SerializedName("streaming_metadata") + protected Metadata streamingMetadata; + + protected PartialItem() {} + + /** + * Gets the responseType. + * + *

The type of response returned by the dialog node. The specified response type must be + * supported by the client application or channel. + * + * @return the responseType + */ + public String getResponseType() { + return responseType; + } + + /** + * Gets the text. + * + *

The text within the partial chunk of the message stream response. + * + * @return the text + */ + public String getText() { + return text; + } + + /** + * Gets the streamingMetadata. + * + *

Contains meta-information about the item(s) being streamed. + * + * @return the streamingMetadata + */ + public Metadata getStreamingMetadata() { + return streamingMetadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2.java new file mode 100644 index 0000000000..88eb0c23ff --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2.java @@ -0,0 +1,131 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Non-private settings for oauth2 authentication. */ +public class ProviderAuthenticationOAuth2 extends GenericModel { + + /** + * The preferred "flow" or "grant type" for the API client to fetch an access token from the + * authorization server. + */ + public interface PreferredFlow { + /** password. */ + String PASSWORD = "password"; + /** client_credentials. */ + String CLIENT_CREDENTIALS = "client_credentials"; + /** authorization_code. */ + String AUTHORIZATION_CODE = "authorization_code"; + /** <$custom_flow_name>. */ + String CUSTOM_FLOW_NAME = "<$custom_flow_name>"; + } + + @SerializedName("preferred_flow") + protected String preferredFlow; + + protected ProviderAuthenticationOAuth2Flows flows; + + /** Builder. */ + public static class Builder { + private String preferredFlow; + private ProviderAuthenticationOAuth2Flows flows; + + /** + * Instantiates a new Builder from an existing ProviderAuthenticationOAuth2 instance. + * + * @param providerAuthenticationOAuth2 the instance to initialize the Builder with + */ + private Builder(ProviderAuthenticationOAuth2 providerAuthenticationOAuth2) { + this.preferredFlow = providerAuthenticationOAuth2.preferredFlow; + this.flows = providerAuthenticationOAuth2.flows; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2. + * + * @return the new ProviderAuthenticationOAuth2 instance + */ + public ProviderAuthenticationOAuth2 build() { + return new ProviderAuthenticationOAuth2(this); + } + + /** + * Set the preferredFlow. + * + * @param preferredFlow the preferredFlow + * @return the ProviderAuthenticationOAuth2 builder + */ + public Builder preferredFlow(String preferredFlow) { + this.preferredFlow = preferredFlow; + return this; + } + + /** + * Set the flows. + * + * @param flows the flows + * @return the ProviderAuthenticationOAuth2 builder + */ + public Builder flows(ProviderAuthenticationOAuth2Flows flows) { + this.flows = flows; + return this; + } + } + + protected ProviderAuthenticationOAuth2() {} + + protected ProviderAuthenticationOAuth2(Builder builder) { + preferredFlow = builder.preferredFlow; + flows = builder.flows; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2 builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the preferredFlow. + * + *

The preferred "flow" or "grant type" for the API client to fetch an access token from the + * authorization server. + * + * @return the preferredFlow + */ + public String preferredFlow() { + return preferredFlow; + } + + /** + * Gets the flows. + * + *

Scenarios performed by the API client to fetch an access token from the authorization + * server. + * + * @return the flows + */ + public ProviderAuthenticationOAuth2Flows flows() { + return flows; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Flows.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Flows.java new file mode 100644 index 0000000000..c1f213937d --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Flows.java @@ -0,0 +1,149 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Scenarios performed by the API client to fetch an access token from the authorization server. + * + *

Classes which extend this class: - + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password - + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials - + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + */ +public class ProviderAuthenticationOAuth2Flows extends GenericModel { + + /** The client authorization type. */ + public interface ClientAuthType { + /** Body. */ + String BODY = "Body"; + /** BasicAuthHeader. */ + String BASICAUTHHEADER = "BasicAuthHeader"; + } + + @SerializedName("token_url") + protected String tokenUrl; + + @SerializedName("refresh_url") + protected String refreshUrl; + + @SerializedName("client_auth_type") + protected String clientAuthType; + + @SerializedName("content_type") + protected String contentType; + + @SerializedName("header_prefix") + protected String headerPrefix; + + protected ProviderAuthenticationOAuth2PasswordUsername username; + + @SerializedName("authorization_url") + protected String authorizationUrl; + + @SerializedName("redirect_uri") + protected String redirectUri; + + protected ProviderAuthenticationOAuth2Flows() {} + + /** + * Gets the tokenUrl. + * + *

The token URL. + * + * @return the tokenUrl + */ + public String tokenUrl() { + return tokenUrl; + } + + /** + * Gets the refreshUrl. + * + *

The refresh token URL. + * + * @return the refreshUrl + */ + public String refreshUrl() { + return refreshUrl; + } + + /** + * Gets the clientAuthType. + * + *

The client authorization type. + * + * @return the clientAuthType + */ + public String clientAuthType() { + return clientAuthType; + } + + /** + * Gets the contentType. + * + *

The content type. + * + * @return the contentType + */ + public String contentType() { + return contentType; + } + + /** + * Gets the headerPrefix. + * + *

The prefix fo the header. + * + * @return the headerPrefix + */ + public String headerPrefix() { + return headerPrefix; + } + + /** + * Gets the username. + * + *

The username for oauth2 authentication when the preferred flow is "password". + * + * @return the username + */ + public ProviderAuthenticationOAuth2PasswordUsername username() { + return username; + } + + /** + * Gets the authorizationUrl. + * + *

The authorization URL. + * + * @return the authorizationUrl + */ + public String authorizationUrl() { + return authorizationUrl; + } + + /** + * Gets the redirectUri. + * + *

The redirect URI. + * + * @return the redirectUri + */ + public String redirectUri() { + return redirectUri; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.java new file mode 100644 index 0000000000..f4729f54b9 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.java @@ -0,0 +1,190 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** Non-private authentication settings for authorization-code flow. */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + extends ProviderAuthenticationOAuth2Flows { + + /** The client authorization type. */ + public interface ClientAuthType { + /** Body. */ + String BODY = "Body"; + /** BasicAuthHeader. */ + String BASICAUTHHEADER = "BasicAuthHeader"; + } + + /** Builder. */ + public static class Builder { + private String tokenUrl; + private String refreshUrl; + private String clientAuthType; + private String contentType; + private String headerPrefix; + private String authorizationUrl; + private String redirectUri; + + /** + * Instantiates a new Builder from an existing + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode instance. + * + * @param providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode the + * instance to initialize the Builder with + */ + public Builder( + ProviderAuthenticationOAuth2Flows + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode) { + this.tokenUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.tokenUrl; + this.refreshUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.refreshUrl; + this.clientAuthType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .clientAuthType; + this.contentType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .contentType; + this.headerPrefix = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .headerPrefix; + this.authorizationUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .authorizationUrl; + this.redirectUri = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .redirectUri; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode. + * + * @return the new + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode instance + */ + public ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode build() { + return new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode( + this); + } + + /** + * Set the tokenUrl. + * + * @param tokenUrl the tokenUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder tokenUrl(String tokenUrl) { + this.tokenUrl = tokenUrl; + return this; + } + + /** + * Set the refreshUrl. + * + * @param refreshUrl the refreshUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder refreshUrl(String refreshUrl) { + this.refreshUrl = refreshUrl; + return this; + } + + /** + * Set the clientAuthType. + * + * @param clientAuthType the clientAuthType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder clientAuthType(String clientAuthType) { + this.clientAuthType = clientAuthType; + return this; + } + + /** + * Set the contentType. + * + * @param contentType the contentType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Set the headerPrefix. + * + * @param headerPrefix the headerPrefix + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder headerPrefix(String headerPrefix) { + this.headerPrefix = headerPrefix; + return this; + } + + /** + * Set the authorizationUrl. + * + * @param authorizationUrl the authorizationUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder authorizationUrl(String authorizationUrl) { + this.authorizationUrl = authorizationUrl; + return this; + } + + /** + * Set the redirectUri. + * + * @param redirectUri the redirectUri + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder redirectUri(String redirectUri) { + this.redirectUri = redirectUri; + return this; + } + } + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode() {} + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode( + Builder builder) { + tokenUrl = builder.tokenUrl; + refreshUrl = builder.refreshUrl; + clientAuthType = builder.clientAuthType; + contentType = builder.contentType; + headerPrefix = builder.headerPrefix; + authorizationUrl = builder.authorizationUrl; + redirectUri = builder.redirectUri; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.java new file mode 100644 index 0000000000..f4f9b82deb --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.java @@ -0,0 +1,156 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials. */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + extends ProviderAuthenticationOAuth2Flows { + + /** The client authorization type. */ + public interface ClientAuthType { + /** Body. */ + String BODY = "Body"; + /** BasicAuthHeader. */ + String BASICAUTHHEADER = "BasicAuthHeader"; + } + + /** Builder. */ + public static class Builder { + private String tokenUrl; + private String refreshUrl; + private String clientAuthType; + private String contentType; + private String headerPrefix; + + /** + * Instantiates a new Builder from an existing + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials instance. + * + * @param providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials the + * instance to initialize the Builder with + */ + public Builder( + ProviderAuthenticationOAuth2Flows + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials) { + this.tokenUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.tokenUrl; + this.refreshUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.refreshUrl; + this.clientAuthType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + .clientAuthType; + this.contentType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + .contentType; + this.headerPrefix = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + .headerPrefix; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials. + * + * @return the new + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials instance + */ + public ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials build() { + return new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials( + this); + } + + /** + * Set the tokenUrl. + * + * @param tokenUrl the tokenUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder tokenUrl(String tokenUrl) { + this.tokenUrl = tokenUrl; + return this; + } + + /** + * Set the refreshUrl. + * + * @param refreshUrl the refreshUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder refreshUrl(String refreshUrl) { + this.refreshUrl = refreshUrl; + return this; + } + + /** + * Set the clientAuthType. + * + * @param clientAuthType the clientAuthType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder clientAuthType(String clientAuthType) { + this.clientAuthType = clientAuthType; + return this; + } + + /** + * Set the contentType. + * + * @param contentType the contentType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Set the headerPrefix. + * + * @param headerPrefix the headerPrefix + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder headerPrefix(String headerPrefix) { + this.headerPrefix = headerPrefix; + return this; + } + } + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials() {} + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials( + Builder builder) { + tokenUrl = builder.tokenUrl; + refreshUrl = builder.refreshUrl; + clientAuthType = builder.clientAuthType; + contentType = builder.contentType; + headerPrefix = builder.headerPrefix; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java new file mode 100644 index 0000000000..b3aafab36b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java @@ -0,0 +1,77 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom. */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom + extends ProviderAuthenticationOAuth2Flows { + + /** Builder. */ + public static class Builder { + private ProviderAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property; + + /** + * Instantiates a new Builder from an existing + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom instance. + * + * @param providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom the instance to + * initialize the Builder with + */ + public Builder( + ProviderAuthenticationOAuth2Flows + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom) { + this.customOauth2Property = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.customOauth2Property; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom. + * + * @return the new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom instance + */ + public ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom build() { + return new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom(this); + } + + /** + * Set the customOauth2Property. + * + * @param customOauth2Property the customOauth2Property + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom builder + */ + public Builder customOauth2Property( + ProviderAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property) { + this.customOauth2Property = customOauth2Property; + return this; + } + } + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom() {} + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom(Builder builder) { + customOauth2Property = builder.customOauth2Property; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.java new file mode 100644 index 0000000000..ea2133b60f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.java @@ -0,0 +1,160 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** Non-private authentication settings for resource owner password flow. */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + extends ProviderAuthenticationOAuth2Flows { + + /** The client authorization type. */ + public interface ClientAuthType { + /** Body. */ + String BODY = "Body"; + /** BasicAuthHeader. */ + String BASICAUTHHEADER = "BasicAuthHeader"; + } + + /** Builder. */ + public static class Builder { + private String tokenUrl; + private String refreshUrl; + private String clientAuthType; + private String contentType; + private String headerPrefix; + private ProviderAuthenticationOAuth2PasswordUsername username; + + /** + * Instantiates a new Builder from an existing + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password instance. + * + * @param providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password the instance to + * initialize the Builder with + */ + public Builder( + ProviderAuthenticationOAuth2Flows + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password) { + this.tokenUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.tokenUrl; + this.refreshUrl = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.refreshUrl; + this.clientAuthType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.clientAuthType; + this.contentType = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.contentType; + this.headerPrefix = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.headerPrefix; + this.username = + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.username; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password. + * + * @return the new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + * instance + */ + public ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password build() { + return new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password(this); + } + + /** + * Set the tokenUrl. + * + * @param tokenUrl the tokenUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder tokenUrl(String tokenUrl) { + this.tokenUrl = tokenUrl; + return this; + } + + /** + * Set the refreshUrl. + * + * @param refreshUrl the refreshUrl + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder refreshUrl(String refreshUrl) { + this.refreshUrl = refreshUrl; + return this; + } + + /** + * Set the clientAuthType. + * + * @param clientAuthType the clientAuthType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder clientAuthType(String clientAuthType) { + this.clientAuthType = clientAuthType; + return this; + } + + /** + * Set the contentType. + * + * @param contentType the contentType + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Set the headerPrefix. + * + * @param headerPrefix the headerPrefix + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder headerPrefix(String headerPrefix) { + this.headerPrefix = headerPrefix; + return this; + } + + /** + * Set the username. + * + * @param username the username + * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder username(ProviderAuthenticationOAuth2PasswordUsername username) { + this.username = username; + return this; + } + } + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password() {} + + protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password(Builder builder) { + tokenUrl = builder.tokenUrl; + refreshUrl = builder.refreshUrl; + clientAuthType = builder.clientAuthType; + contentType = builder.contentType; + headerPrefix = builder.headerPrefix; + username = builder.username; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsername.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsername.java new file mode 100644 index 0000000000..787ff4f82e --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsername.java @@ -0,0 +1,120 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The username for oauth2 authentication when the preferred flow is "password". */ +public class ProviderAuthenticationOAuth2PasswordUsername extends GenericModel { + + /** The type of property observed in "value". */ + public interface Type { + /** value. */ + String VALUE = "value"; + } + + protected String type; + protected String value; + + /** Builder. */ + public static class Builder { + private String type; + private String value; + + /** + * Instantiates a new Builder from an existing ProviderAuthenticationOAuth2PasswordUsername + * instance. + * + * @param providerAuthenticationOAuth2PasswordUsername the instance to initialize the Builder + * with + */ + private Builder( + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsername) { + this.type = providerAuthenticationOAuth2PasswordUsername.type; + this.value = providerAuthenticationOAuth2PasswordUsername.value; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationOAuth2PasswordUsername. + * + * @return the new ProviderAuthenticationOAuth2PasswordUsername instance + */ + public ProviderAuthenticationOAuth2PasswordUsername build() { + return new ProviderAuthenticationOAuth2PasswordUsername(this); + } + + /** + * Set the type. + * + * @param type the type + * @return the ProviderAuthenticationOAuth2PasswordUsername builder + */ + public Builder type(String type) { + this.type = type; + return this; + } + + /** + * Set the value. + * + * @param value the value + * @return the ProviderAuthenticationOAuth2PasswordUsername builder + */ + public Builder value(String value) { + this.value = value; + return this; + } + } + + protected ProviderAuthenticationOAuth2PasswordUsername() {} + + protected ProviderAuthenticationOAuth2PasswordUsername(Builder builder) { + type = builder.type; + value = builder.value; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationOAuth2PasswordUsername builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the type. + * + *

The type of property observed in "value". + * + * @return the type + */ + public String type() { + return type; + } + + /** + * Gets the value. + * + *

The stored information of the value. + * + * @return the value + */ + public String value() { + return value; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValue.java new file mode 100644 index 0000000000..ab74a9f0fb --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValue.java @@ -0,0 +1,117 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ProviderAuthenticationTypeAndValue. */ +public class ProviderAuthenticationTypeAndValue extends GenericModel { + + /** The type of property observed in "value". */ + public interface Type { + /** value. */ + String VALUE = "value"; + } + + protected String type; + protected String value; + + /** Builder. */ + public static class Builder { + private String type; + private String value; + + /** + * Instantiates a new Builder from an existing ProviderAuthenticationTypeAndValue instance. + * + * @param providerAuthenticationTypeAndValue the instance to initialize the Builder with + */ + private Builder(ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValue) { + this.type = providerAuthenticationTypeAndValue.type; + this.value = providerAuthenticationTypeAndValue.value; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderAuthenticationTypeAndValue. + * + * @return the new ProviderAuthenticationTypeAndValue instance + */ + public ProviderAuthenticationTypeAndValue build() { + return new ProviderAuthenticationTypeAndValue(this); + } + + /** + * Set the type. + * + * @param type the type + * @return the ProviderAuthenticationTypeAndValue builder + */ + public Builder type(String type) { + this.type = type; + return this; + } + + /** + * Set the value. + * + * @param value the value + * @return the ProviderAuthenticationTypeAndValue builder + */ + public Builder value(String value) { + this.value = value; + return this; + } + } + + protected ProviderAuthenticationTypeAndValue() {} + + protected ProviderAuthenticationTypeAndValue(Builder builder) { + type = builder.type; + value = builder.value; + } + + /** + * New builder. + * + * @return a ProviderAuthenticationTypeAndValue builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the type. + * + *

The type of property observed in "value". + * + * @return the type + */ + public String type() { + return type; + } + + /** + * Gets the value. + * + *

The stored information of the value. + * + * @return the value + */ + public String value() { + return value; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderCollection.java new file mode 100644 index 0000000000..f7b90e6e94 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderCollection.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; + +/** ProviderCollection. */ +public class ProviderCollection extends GenericModel { + + @SerializedName("conversational_skill_providers") + protected List conversationalSkillProviders; + + protected Pagination pagination; + + protected ProviderCollection() {} + + /** + * Gets the conversationalSkillProviders. + * + *

An array of objects describing the conversational skill providers associated with the + * instance. + * + * @return the conversationalSkillProviders + */ + public List getConversationalSkillProviders() { + return conversationalSkillProviders; + } + + /** + * Gets the pagination. + * + *

The pagination data for the returned objects. For more information about using pagination, + * see [Pagination](#pagination). + * + * @return the pagination + */ + public Pagination getPagination() { + return pagination; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivate.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivate.java new file mode 100644 index 0000000000..ef65093978 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivate.java @@ -0,0 +1,96 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Private information of the provider. */ +public class ProviderPrivate extends GenericModel { + + protected ProviderPrivateAuthentication authentication; + + /** Builder. */ + public static class Builder { + private ProviderPrivateAuthentication authentication; + + /** + * Instantiates a new Builder from an existing ProviderPrivate instance. + * + * @param providerPrivate the instance to initialize the Builder with + */ + private Builder(ProviderPrivate providerPrivate) { + this.authentication = providerPrivate.authentication; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param authentication the authentication + */ + public Builder(ProviderPrivateAuthentication authentication) { + this.authentication = authentication; + } + + /** + * Builds a ProviderPrivate. + * + * @return the new ProviderPrivate instance + */ + public ProviderPrivate build() { + return new ProviderPrivate(this); + } + + /** + * Set the authentication. + * + * @param authentication the authentication + * @return the ProviderPrivate builder + */ + public Builder authentication(ProviderPrivateAuthentication authentication) { + this.authentication = authentication; + return this; + } + } + + protected ProviderPrivate() {} + + protected ProviderPrivate(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull( + builder.authentication, "authentication cannot be null"); + authentication = builder.authentication; + } + + /** + * New builder. + * + * @return a ProviderPrivate builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the authentication. + * + *

Private authentication information of the provider. + * + * @return the authentication + */ + public ProviderPrivateAuthentication authentication() { + return authentication; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthentication.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthentication.java new file mode 100644 index 0000000000..ccc23d2f4c --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthentication.java @@ -0,0 +1,65 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Private authentication information of the provider. + * + *

Classes which extend this class: - ProviderPrivateAuthenticationBearerFlow - + * ProviderPrivateAuthenticationBasicFlow - ProviderPrivateAuthenticationOAuth2Flow + */ +public class ProviderPrivateAuthentication extends GenericModel { + + protected ProviderAuthenticationTypeAndValue token; + protected ProviderAuthenticationTypeAndValue password; + protected ProviderPrivateAuthenticationOAuth2FlowFlows flows; + + protected ProviderPrivateAuthentication() {} + + /** + * Gets the token. + * + *

The token for bearer authentication. + * + * @return the token + */ + public ProviderAuthenticationTypeAndValue token() { + return token; + } + + /** + * Gets the password. + * + *

The password for bearer authentication. + * + * @return the password + */ + public ProviderAuthenticationTypeAndValue password() { + return password; + } + + /** + * Gets the flows. + * + *

Scenarios performed by the API client to fetch an access token from the authorization + * server. + * + * @return the flows + */ + public ProviderPrivateAuthenticationOAuth2FlowFlows flows() { + return flows; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlow.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlow.java new file mode 100644 index 0000000000..1dd3fdc027 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlow.java @@ -0,0 +1,70 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** The private data for basic authentication. */ +public class ProviderPrivateAuthenticationBasicFlow extends ProviderPrivateAuthentication { + + /** Builder. */ + public static class Builder { + private ProviderAuthenticationTypeAndValue password; + + /** + * Instantiates a new Builder from an existing ProviderPrivateAuthenticationBasicFlow instance. + * + * @param providerPrivateAuthenticationBasicFlow the instance to initialize the Builder with + */ + public Builder(ProviderPrivateAuthentication providerPrivateAuthenticationBasicFlow) { + this.password = providerPrivateAuthenticationBasicFlow.password; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderPrivateAuthenticationBasicFlow. + * + * @return the new ProviderPrivateAuthenticationBasicFlow instance + */ + public ProviderPrivateAuthenticationBasicFlow build() { + return new ProviderPrivateAuthenticationBasicFlow(this); + } + + /** + * Set the password. + * + * @param password the password + * @return the ProviderPrivateAuthenticationBasicFlow builder + */ + public Builder password(ProviderAuthenticationTypeAndValue password) { + this.password = password; + return this; + } + } + + protected ProviderPrivateAuthenticationBasicFlow() {} + + protected ProviderPrivateAuthenticationBasicFlow(Builder builder) { + password = builder.password; + } + + /** + * New builder. + * + * @return a ProviderPrivateAuthenticationBasicFlow builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlow.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlow.java new file mode 100644 index 0000000000..5933c815f5 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlow.java @@ -0,0 +1,70 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** The private data for bearer authentication. */ +public class ProviderPrivateAuthenticationBearerFlow extends ProviderPrivateAuthentication { + + /** Builder. */ + public static class Builder { + private ProviderAuthenticationTypeAndValue token; + + /** + * Instantiates a new Builder from an existing ProviderPrivateAuthenticationBearerFlow instance. + * + * @param providerPrivateAuthenticationBearerFlow the instance to initialize the Builder with + */ + public Builder(ProviderPrivateAuthentication providerPrivateAuthenticationBearerFlow) { + this.token = providerPrivateAuthenticationBearerFlow.token; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderPrivateAuthenticationBearerFlow. + * + * @return the new ProviderPrivateAuthenticationBearerFlow instance + */ + public ProviderPrivateAuthenticationBearerFlow build() { + return new ProviderPrivateAuthenticationBearerFlow(this); + } + + /** + * Set the token. + * + * @param token the token + * @return the ProviderPrivateAuthenticationBearerFlow builder + */ + public Builder token(ProviderAuthenticationTypeAndValue token) { + this.token = token; + return this; + } + } + + protected ProviderPrivateAuthenticationBearerFlow() {} + + protected ProviderPrivateAuthenticationBearerFlow(Builder builder) { + token = builder.token; + } + + /** + * New builder. + * + * @return a ProviderPrivateAuthenticationBearerFlow builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2Flow.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2Flow.java new file mode 100644 index 0000000000..2d45b3cb90 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2Flow.java @@ -0,0 +1,70 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** The private data for oauth2 authentication. */ +public class ProviderPrivateAuthenticationOAuth2Flow extends ProviderPrivateAuthentication { + + /** Builder. */ + public static class Builder { + private ProviderPrivateAuthenticationOAuth2FlowFlows flows; + + /** + * Instantiates a new Builder from an existing ProviderPrivateAuthenticationOAuth2Flow instance. + * + * @param providerPrivateAuthenticationOAuth2Flow the instance to initialize the Builder with + */ + public Builder(ProviderPrivateAuthentication providerPrivateAuthenticationOAuth2Flow) { + this.flows = providerPrivateAuthenticationOAuth2Flow.flows; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderPrivateAuthenticationOAuth2Flow. + * + * @return the new ProviderPrivateAuthenticationOAuth2Flow instance + */ + public ProviderPrivateAuthenticationOAuth2Flow build() { + return new ProviderPrivateAuthenticationOAuth2Flow(this); + } + + /** + * Set the flows. + * + * @param flows the flows + * @return the ProviderPrivateAuthenticationOAuth2Flow builder + */ + public Builder flows(ProviderPrivateAuthenticationOAuth2FlowFlows flows) { + this.flows = flows; + return this; + } + } + + protected ProviderPrivateAuthenticationOAuth2Flow() {} + + protected ProviderPrivateAuthenticationOAuth2Flow(Builder builder) { + flows = builder.flows; + } + + /** + * New builder. + * + * @return a ProviderPrivateAuthenticationOAuth2Flow builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlows.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlows.java new file mode 100644 index 0000000000..540d0eeef0 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlows.java @@ -0,0 +1,114 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * Scenarios performed by the API client to fetch an access token from the authorization server. + * + *

Classes which extend this class: - + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password - + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * - + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + */ +public class ProviderPrivateAuthenticationOAuth2FlowFlows extends GenericModel { + + @SerializedName("client_id") + protected String clientId; + + @SerializedName("client_secret") + protected String clientSecret; + + @SerializedName("access_token") + protected String accessToken; + + @SerializedName("refresh_token") + protected String refreshToken; + + protected ProviderPrivateAuthenticationOAuth2PasswordPassword password; + + @SerializedName("authorization_code") + protected String authorizationCode; + + protected ProviderPrivateAuthenticationOAuth2FlowFlows() {} + + /** + * Gets the clientId. + * + *

The client ID. + * + * @return the clientId + */ + public String clientId() { + return clientId; + } + + /** + * Gets the clientSecret. + * + *

The client secret. + * + * @return the clientSecret + */ + public String clientSecret() { + return clientSecret; + } + + /** + * Gets the accessToken. + * + *

The access token. + * + * @return the accessToken + */ + public String accessToken() { + return accessToken; + } + + /** + * Gets the refreshToken. + * + *

The refresh token. + * + * @return the refreshToken + */ + public String refreshToken() { + return refreshToken; + } + + /** + * Gets the password. + * + *

The password for oauth2 authentication when the preferred flow is "password". + * + * @return the password + */ + public ProviderPrivateAuthenticationOAuth2PasswordPassword password() { + return password; + } + + /** + * Gets the authorizationCode. + * + *

The authorization code. + * + * @return the authorizationCode + */ + public String authorizationCode() { + return authorizationCode; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode.java new file mode 100644 index 0000000000..876c313845 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode.java @@ -0,0 +1,165 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** Private authentication settings for client credentials flow. */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + extends ProviderPrivateAuthenticationOAuth2FlowFlows { + + /** Builder. */ + public static class Builder { + private String clientId; + private String clientSecret; + private String accessToken; + private String refreshToken; + private String authorizationCode; + + /** + * Instantiates a new Builder from an existing + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * instance. + * + * @param + * providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * the instance to initialize the Builder with + */ + public Builder( + ProviderPrivateAuthenticationOAuth2FlowFlows + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode) { + this.clientId = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .clientId; + this.clientSecret = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .clientSecret; + this.accessToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .accessToken; + this.refreshToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .refreshToken; + this.authorizationCode = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .authorizationCode; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode. + * + * @return the new + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * instance + */ + public + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + build() { + return new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode( + this); + } + + /** + * Set the clientId. + * + * @param clientId the clientId + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Set the clientSecret. + * + * @param clientSecret the clientSecret + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Set the accessToken. + * + * @param accessToken the accessToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder accessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Set the refreshToken. + * + * @param refreshToken the refreshToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder refreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Set the authorizationCode. + * + * @param authorizationCode the authorizationCode + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder authorizationCode(String authorizationCode) { + this.authorizationCode = authorizationCode; + return this; + } + } + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode() {} + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode( + Builder builder) { + clientId = builder.clientId; + clientSecret = builder.clientSecret; + accessToken = builder.accessToken; + refreshToken = builder.refreshToken; + authorizationCode = builder.authorizationCode; + } + + /** + * New builder. + * + * @return a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials.java new file mode 100644 index 0000000000..ad273689af --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials.java @@ -0,0 +1,149 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials. + */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + extends ProviderPrivateAuthenticationOAuth2FlowFlows { + + /** Builder. */ + public static class Builder { + private String clientId; + private String clientSecret; + private String accessToken; + private String refreshToken; + + /** + * Instantiates a new Builder from an existing + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * instance. + * + * @param + * providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * the instance to initialize the Builder with + */ + public Builder( + ProviderPrivateAuthenticationOAuth2FlowFlows + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials) { + this.clientId = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .clientId; + this.clientSecret = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .clientSecret; + this.accessToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .accessToken; + this.refreshToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .refreshToken; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials. + * + * @return the new + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * instance + */ + public + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + build() { + return new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials( + this); + } + + /** + * Set the clientId. + * + * @param clientId the clientId + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Set the clientSecret. + * + * @param clientSecret the clientSecret + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Set the accessToken. + * + * @param accessToken the accessToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder accessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Set the refreshToken. + * + * @param refreshToken the refreshToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder refreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + } + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials() {} + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials( + Builder builder) { + clientId = builder.clientId; + clientSecret = builder.clientSecret; + accessToken = builder.accessToken; + refreshToken = builder.refreshToken; + } + + /** + * New builder. + * + * @return a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java new file mode 100644 index 0000000000..0c4c947a3c --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom. */ +public class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + extends ProviderPrivateAuthenticationOAuth2FlowFlows { + + /** Builder. */ + public static class Builder { + private ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property; + + /** + * Instantiates a new Builder from an existing + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + * instance. + * + * @param providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + * the instance to initialize the Builder with + */ + public Builder( + ProviderPrivateAuthenticationOAuth2FlowFlows + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom) { + this.customOauth2Property = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + .customOauth2Property; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom. + * + * @return the new + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + * instance + */ + public ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + build() { + return new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom( + this); + } + + /** + * Set the customOauth2Property. + * + * @param customOauth2Property the customOauth2Property + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + * builder + */ + public Builder customOauth2Property( + ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property) { + this.customOauth2Property = customOauth2Property; + return this; + } + } + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom() {} + + protected ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom( + Builder builder) { + customOauth2Property = builder.customOauth2Property; + } + + /** + * New builder. + * + * @return a ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password.java new file mode 100644 index 0000000000..70c5031d22 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password.java @@ -0,0 +1,162 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** Private authentication settings for resource owner password flow. */ +public class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + extends ProviderPrivateAuthenticationOAuth2FlowFlows { + + /** Builder. */ + public static class Builder { + private String clientId; + private String clientSecret; + private String accessToken; + private String refreshToken; + private ProviderPrivateAuthenticationOAuth2PasswordPassword password; + + /** + * Instantiates a new Builder from an existing + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * instance. + * + * @param + * providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * the instance to initialize the Builder with + */ + public Builder( + ProviderPrivateAuthenticationOAuth2FlowFlows + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password) { + this.clientId = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .clientId; + this.clientSecret = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .clientSecret; + this.accessToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .accessToken; + this.refreshToken = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .refreshToken; + this.password = + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .password; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password. + * + * @return the new + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * instance + */ + public ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + build() { + return new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password( + this); + } + + /** + * Set the clientId. + * + * @param clientId the clientId + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Set the clientSecret. + * + * @param clientSecret the clientSecret + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Set the accessToken. + * + * @param accessToken the accessToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder accessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Set the refreshToken. + * + * @param refreshToken the refreshToken + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder refreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Set the password. + * + * @param password the password + * @return the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder password(ProviderPrivateAuthenticationOAuth2PasswordPassword password) { + this.password = password; + return this; + } + } + + protected + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password() {} + + protected ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password( + Builder builder) { + clientId = builder.clientId; + clientSecret = builder.clientSecret; + accessToken = builder.accessToken; + refreshToken = builder.refreshToken; + password = builder.password; + } + + /** + * New builder. + * + * @return a + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + * builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPassword.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPassword.java new file mode 100644 index 0000000000..d2ced7cb91 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPassword.java @@ -0,0 +1,121 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The password for oauth2 authentication when the preferred flow is "password". */ +public class ProviderPrivateAuthenticationOAuth2PasswordPassword extends GenericModel { + + /** The type of property observed in "value". */ + public interface Type { + /** value. */ + String VALUE = "value"; + } + + protected String type; + protected String value; + + /** Builder. */ + public static class Builder { + private String type; + private String value; + + /** + * Instantiates a new Builder from an existing + * ProviderPrivateAuthenticationOAuth2PasswordPassword instance. + * + * @param providerPrivateAuthenticationOAuth2PasswordPassword the instance to initialize the + * Builder with + */ + private Builder( + ProviderPrivateAuthenticationOAuth2PasswordPassword + providerPrivateAuthenticationOAuth2PasswordPassword) { + this.type = providerPrivateAuthenticationOAuth2PasswordPassword.type; + this.value = providerPrivateAuthenticationOAuth2PasswordPassword.value; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderPrivateAuthenticationOAuth2PasswordPassword. + * + * @return the new ProviderPrivateAuthenticationOAuth2PasswordPassword instance + */ + public ProviderPrivateAuthenticationOAuth2PasswordPassword build() { + return new ProviderPrivateAuthenticationOAuth2PasswordPassword(this); + } + + /** + * Set the type. + * + * @param type the type + * @return the ProviderPrivateAuthenticationOAuth2PasswordPassword builder + */ + public Builder type(String type) { + this.type = type; + return this; + } + + /** + * Set the value. + * + * @param value the value + * @return the ProviderPrivateAuthenticationOAuth2PasswordPassword builder + */ + public Builder value(String value) { + this.value = value; + return this; + } + } + + protected ProviderPrivateAuthenticationOAuth2PasswordPassword() {} + + protected ProviderPrivateAuthenticationOAuth2PasswordPassword(Builder builder) { + type = builder.type; + value = builder.value; + } + + /** + * New builder. + * + * @return a ProviderPrivateAuthenticationOAuth2PasswordPassword builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the type. + * + *

The type of property observed in "value". + * + * @return the type + */ + public String type() { + return type; + } + + /** + * Gets the value. + * + *

The stored information of the value. + * + * @return the value + */ + public String value() { + return value; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponse.java new file mode 100644 index 0000000000..3ae192e88f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponse.java @@ -0,0 +1,50 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ProviderResponse. */ +public class ProviderResponse extends GenericModel { + + @SerializedName("provider_id") + protected String providerId; + + protected ProviderResponseSpecification specification; + + protected ProviderResponse() {} + + /** + * Gets the providerId. + * + *

The unique identifier of the provider. + * + * @return the providerId + */ + public String getProviderId() { + return providerId; + } + + /** + * Gets the specification. + * + *

The specification of the provider. + * + * @return the specification + */ + public ProviderResponseSpecification getSpecification() { + return specification; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecification.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecification.java new file mode 100644 index 0000000000..45e497da7f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecification.java @@ -0,0 +1,50 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; + +/** The specification of the provider. */ +public class ProviderResponseSpecification extends GenericModel { + + protected List servers; + protected ProviderResponseSpecificationComponents components; + + protected ProviderResponseSpecification() {} + + /** + * Gets the servers. + * + *

An array of objects defining all endpoints of the provider. + * + *

**Note:** Multiple array items are reserved for future use. + * + * @return the servers + */ + public List getServers() { + return servers; + } + + /** + * Gets the components. + * + *

An object defining various reusable definitions of the provider. + * + * @return the components + */ + public ProviderResponseSpecificationComponents getComponents() { + return components; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponents.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponents.java new file mode 100644 index 0000000000..75c886cd23 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponents.java @@ -0,0 +1,35 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** An object defining various reusable definitions of the provider. */ +public class ProviderResponseSpecificationComponents extends GenericModel { + + protected ProviderResponseSpecificationComponentsSecuritySchemes securitySchemes; + + protected ProviderResponseSpecificationComponents() {} + + /** + * Gets the securitySchemes. + * + *

The definition of the security scheme for the provider. + * + * @return the securitySchemes + */ + public ProviderResponseSpecificationComponentsSecuritySchemes getSecuritySchemes() { + return securitySchemes; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemes.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemes.java new file mode 100644 index 0000000000..f7d5c1133b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemes.java @@ -0,0 +1,80 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The definition of the security scheme for the provider. */ +public class ProviderResponseSpecificationComponentsSecuritySchemes extends GenericModel { + + /** + * The authentication method required for requests made from watsonx Assistant to the + * conversational skill provider. + */ + public interface AuthenticationMethod { + /** basic. */ + String BASIC = "basic"; + /** bearer. */ + String BEARER = "bearer"; + /** api_key. */ + String API_KEY = "api_key"; + /** oauth2. */ + String OAUTH2 = "oauth2"; + /** none. */ + String NONE = "none"; + } + + @SerializedName("authentication_method") + protected String authenticationMethod; + + protected ProviderResponseSpecificationComponentsSecuritySchemesBasic basic; + protected ProviderAuthenticationOAuth2 oauth2; + + protected ProviderResponseSpecificationComponentsSecuritySchemes() {} + + /** + * Gets the authenticationMethod. + * + *

The authentication method required for requests made from watsonx Assistant to the + * conversational skill provider. + * + * @return the authenticationMethod + */ + public String getAuthenticationMethod() { + return authenticationMethod; + } + + /** + * Gets the basic. + * + *

Non-private settings for basic access authentication. + * + * @return the basic + */ + public ProviderResponseSpecificationComponentsSecuritySchemesBasic getBasic() { + return basic; + } + + /** + * Gets the oauth2. + * + *

Non-private settings for oauth2 authentication. + * + * @return the oauth2 + */ + public ProviderAuthenticationOAuth2 getOauth2() { + return oauth2; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasic.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasic.java new file mode 100644 index 0000000000..1e9f36be75 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasic.java @@ -0,0 +1,35 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Non-private settings for basic access authentication. */ +public class ProviderResponseSpecificationComponentsSecuritySchemesBasic extends GenericModel { + + protected ProviderAuthenticationTypeAndValue username; + + protected ProviderResponseSpecificationComponentsSecuritySchemesBasic() {} + + /** + * Gets the username. + * + *

The username for basic access authentication. + * + * @return the username + */ + public ProviderAuthenticationTypeAndValue getUsername() { + return username; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItem.java new file mode 100644 index 0000000000..71b5ac1151 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItem.java @@ -0,0 +1,35 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ProviderResponseSpecificationServersItem. */ +public class ProviderResponseSpecificationServersItem extends GenericModel { + + protected String url; + + protected ProviderResponseSpecificationServersItem() {} + + /** + * Gets the url. + * + *

The URL of the conversational skill provider. + * + * @return the url + */ + public String getUrl() { + return url; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecification.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecification.java new file mode 100644 index 0000000000..21afa8cfb2 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecification.java @@ -0,0 +1,140 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.ArrayList; +import java.util.List; + +/** The specification of the provider. */ +public class ProviderSpecification extends GenericModel { + + protected List servers; + protected ProviderSpecificationComponents components; + + /** Builder. */ + public static class Builder { + private List servers; + private ProviderSpecificationComponents components; + + /** + * Instantiates a new Builder from an existing ProviderSpecification instance. + * + * @param providerSpecification the instance to initialize the Builder with + */ + private Builder(ProviderSpecification providerSpecification) { + this.servers = providerSpecification.servers; + this.components = providerSpecification.components; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param servers the servers + */ + public Builder(List servers) { + this.servers = servers; + } + + /** + * Builds a ProviderSpecification. + * + * @return the new ProviderSpecification instance + */ + public ProviderSpecification build() { + return new ProviderSpecification(this); + } + + /** + * Adds a new element to servers. + * + * @param servers the new element to be added + * @return the ProviderSpecification builder + */ + public Builder addServers(ProviderSpecificationServersItem servers) { + com.ibm.cloud.sdk.core.util.Validator.notNull(servers, "servers cannot be null"); + if (this.servers == null) { + this.servers = new ArrayList(); + } + this.servers.add(servers); + return this; + } + + /** + * Set the servers. Existing servers will be replaced. + * + * @param servers the servers + * @return the ProviderSpecification builder + */ + public Builder servers(List servers) { + this.servers = servers; + return this; + } + + /** + * Set the components. + * + * @param components the components + * @return the ProviderSpecification builder + */ + public Builder components(ProviderSpecificationComponents components) { + this.components = components; + return this; + } + } + + protected ProviderSpecification() {} + + protected ProviderSpecification(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.servers, "servers cannot be null"); + servers = builder.servers; + components = builder.components; + } + + /** + * New builder. + * + * @return a ProviderSpecification builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the servers. + * + *

An array of objects defining all endpoints of the provider. + * + *

**Note:** Multiple array items are reserved for future use. + * + * @return the servers + */ + public List servers() { + return servers; + } + + /** + * Gets the components. + * + *

An object defining various reusable definitions of the provider. + * + * @return the components + */ + public ProviderSpecificationComponents components() { + return components; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponents.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponents.java new file mode 100644 index 0000000000..b82d934c83 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponents.java @@ -0,0 +1,85 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** An object defining various reusable definitions of the provider. */ +public class ProviderSpecificationComponents extends GenericModel { + + protected ProviderSpecificationComponentsSecuritySchemes securitySchemes; + + /** Builder. */ + public static class Builder { + private ProviderSpecificationComponentsSecuritySchemes securitySchemes; + + /** + * Instantiates a new Builder from an existing ProviderSpecificationComponents instance. + * + * @param providerSpecificationComponents the instance to initialize the Builder with + */ + private Builder(ProviderSpecificationComponents providerSpecificationComponents) { + this.securitySchemes = providerSpecificationComponents.securitySchemes; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderSpecificationComponents. + * + * @return the new ProviderSpecificationComponents instance + */ + public ProviderSpecificationComponents build() { + return new ProviderSpecificationComponents(this); + } + + /** + * Set the securitySchemes. + * + * @param securitySchemes the securitySchemes + * @return the ProviderSpecificationComponents builder + */ + public Builder securitySchemes(ProviderSpecificationComponentsSecuritySchemes securitySchemes) { + this.securitySchemes = securitySchemes; + return this; + } + } + + protected ProviderSpecificationComponents() {} + + protected ProviderSpecificationComponents(Builder builder) { + securitySchemes = builder.securitySchemes; + } + + /** + * New builder. + * + * @return a ProviderSpecificationComponents builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the securitySchemes. + * + *

The definition of the security scheme for the provider. + * + * @return the securitySchemes + */ + public ProviderSpecificationComponentsSecuritySchemes securitySchemes() { + return securitySchemes; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemes.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemes.java new file mode 100644 index 0000000000..e9e0946080 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemes.java @@ -0,0 +1,163 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The definition of the security scheme for the provider. */ +public class ProviderSpecificationComponentsSecuritySchemes extends GenericModel { + + /** + * The authentication method required for requests made from watsonx Assistant to the + * conversational skill provider. + */ + public interface AuthenticationMethod { + /** basic. */ + String BASIC = "basic"; + /** bearer. */ + String BEARER = "bearer"; + /** api_key. */ + String API_KEY = "api_key"; + /** oauth2. */ + String OAUTH2 = "oauth2"; + /** none. */ + String NONE = "none"; + } + + @SerializedName("authentication_method") + protected String authenticationMethod; + + protected ProviderSpecificationComponentsSecuritySchemesBasic basic; + protected ProviderAuthenticationOAuth2 oauth2; + + /** Builder. */ + public static class Builder { + private String authenticationMethod; + private ProviderSpecificationComponentsSecuritySchemesBasic basic; + private ProviderAuthenticationOAuth2 oauth2; + + /** + * Instantiates a new Builder from an existing ProviderSpecificationComponentsSecuritySchemes + * instance. + * + * @param providerSpecificationComponentsSecuritySchemes the instance to initialize the Builder + * with + */ + private Builder( + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemes) { + this.authenticationMethod = + providerSpecificationComponentsSecuritySchemes.authenticationMethod; + this.basic = providerSpecificationComponentsSecuritySchemes.basic; + this.oauth2 = providerSpecificationComponentsSecuritySchemes.oauth2; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderSpecificationComponentsSecuritySchemes. + * + * @return the new ProviderSpecificationComponentsSecuritySchemes instance + */ + public ProviderSpecificationComponentsSecuritySchemes build() { + return new ProviderSpecificationComponentsSecuritySchemes(this); + } + + /** + * Set the authenticationMethod. + * + * @param authenticationMethod the authenticationMethod + * @return the ProviderSpecificationComponentsSecuritySchemes builder + */ + public Builder authenticationMethod(String authenticationMethod) { + this.authenticationMethod = authenticationMethod; + return this; + } + + /** + * Set the basic. + * + * @param basic the basic + * @return the ProviderSpecificationComponentsSecuritySchemes builder + */ + public Builder basic(ProviderSpecificationComponentsSecuritySchemesBasic basic) { + this.basic = basic; + return this; + } + + /** + * Set the oauth2. + * + * @param oauth2 the oauth2 + * @return the ProviderSpecificationComponentsSecuritySchemes builder + */ + public Builder oauth2(ProviderAuthenticationOAuth2 oauth2) { + this.oauth2 = oauth2; + return this; + } + } + + protected ProviderSpecificationComponentsSecuritySchemes() {} + + protected ProviderSpecificationComponentsSecuritySchemes(Builder builder) { + authenticationMethod = builder.authenticationMethod; + basic = builder.basic; + oauth2 = builder.oauth2; + } + + /** + * New builder. + * + * @return a ProviderSpecificationComponentsSecuritySchemes builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the authenticationMethod. + * + *

The authentication method required for requests made from watsonx Assistant to the + * conversational skill provider. + * + * @return the authenticationMethod + */ + public String authenticationMethod() { + return authenticationMethod; + } + + /** + * Gets the basic. + * + *

Non-private settings for basic access authentication. + * + * @return the basic + */ + public ProviderSpecificationComponentsSecuritySchemesBasic basic() { + return basic; + } + + /** + * Gets the oauth2. + * + *

Non-private settings for oauth2 authentication. + * + * @return the oauth2 + */ + public ProviderAuthenticationOAuth2 oauth2() { + return oauth2; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasic.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasic.java new file mode 100644 index 0000000000..91ae68942d --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasic.java @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Non-private settings for basic access authentication. */ +public class ProviderSpecificationComponentsSecuritySchemesBasic extends GenericModel { + + protected ProviderAuthenticationTypeAndValue username; + + /** Builder. */ + public static class Builder { + private ProviderAuthenticationTypeAndValue username; + + /** + * Instantiates a new Builder from an existing + * ProviderSpecificationComponentsSecuritySchemesBasic instance. + * + * @param providerSpecificationComponentsSecuritySchemesBasic the instance to initialize the + * Builder with + */ + private Builder( + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasic) { + this.username = providerSpecificationComponentsSecuritySchemesBasic.username; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderSpecificationComponentsSecuritySchemesBasic. + * + * @return the new ProviderSpecificationComponentsSecuritySchemesBasic instance + */ + public ProviderSpecificationComponentsSecuritySchemesBasic build() { + return new ProviderSpecificationComponentsSecuritySchemesBasic(this); + } + + /** + * Set the username. + * + * @param username the username + * @return the ProviderSpecificationComponentsSecuritySchemesBasic builder + */ + public Builder username(ProviderAuthenticationTypeAndValue username) { + this.username = username; + return this; + } + } + + protected ProviderSpecificationComponentsSecuritySchemesBasic() {} + + protected ProviderSpecificationComponentsSecuritySchemesBasic(Builder builder) { + username = builder.username; + } + + /** + * New builder. + * + * @return a ProviderSpecificationComponentsSecuritySchemesBasic builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the username. + * + *

The username for basic access authentication. + * + * @return the username + */ + public ProviderAuthenticationTypeAndValue username() { + return username; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItem.java new file mode 100644 index 0000000000..e8e9812668 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItem.java @@ -0,0 +1,85 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ProviderSpecificationServersItem. */ +public class ProviderSpecificationServersItem extends GenericModel { + + protected String url; + + /** Builder. */ + public static class Builder { + private String url; + + /** + * Instantiates a new Builder from an existing ProviderSpecificationServersItem instance. + * + * @param providerSpecificationServersItem the instance to initialize the Builder with + */ + private Builder(ProviderSpecificationServersItem providerSpecificationServersItem) { + this.url = providerSpecificationServersItem.url; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a ProviderSpecificationServersItem. + * + * @return the new ProviderSpecificationServersItem instance + */ + public ProviderSpecificationServersItem build() { + return new ProviderSpecificationServersItem(this); + } + + /** + * Set the url. + * + * @param url the url + * @return the ProviderSpecificationServersItem builder + */ + public Builder url(String url) { + this.url = url; + return this; + } + } + + protected ProviderSpecificationServersItem() {} + + protected ProviderSpecificationServersItem(Builder builder) { + url = builder.url; + } + + /** + * New builder. + * + * @return a ProviderSpecificationServersItem builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the url. + * + *

The URL of the conversational skill provider. + * + * @return the url + */ + public String url() { + return url; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java index ab5e8fb6a8..45b04785c6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java index 221fe1d88b..910ce0223e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java index 00ae2f601a..2f67af3ad2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java index 065408f99c..4821906e6c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java index 9b9f4cfbe9..2031820985 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java index c206d2befd..f790528b7e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java index 5e9e93639e..6f6ebf2d7c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java index 6e1659254c..8beca95d21 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java index c91ddd877f..cfd8742c3d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java index e43b6a582a..2ca6b1b3de 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java index d69c9a66d8..dbe7cb4f74 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java index a8ccfb4ebd..75ef4ad8de 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -57,7 +58,6 @@ public class RuntimeResponseGeneric extends GenericModel { "user_defined", RuntimeResponseGenericRuntimeResponseTypeUserDefined.class); discriminatorMapping.put("video", RuntimeResponseGenericRuntimeResponseTypeVideo.class); } - /** The preferred type of control to display. */ public interface Preference { /** dropdown. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java index 0843ea2250..d60556cd92 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeAudio. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java index f74a7ee8b8..820b142668 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java index ab72ffed7b..4949ac3eed 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java index 375c9d78e5..e204b3bf4d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeDate. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java index 37ebece03b..31733278c8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeIframe. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java index 55b970b665..cb089838d3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeImage. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java index ad971c25dc..032cc2433b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeOption. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java index fca3095cf6..c8092a6a30 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypePause. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java index 59e0a67d12..41d11a2514 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeSearch. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java index 91cb8811b1..bf70de0a0b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeSuggestion. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java index 22f1ffe92f..03ea626c45 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeText. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java index e5e97cbc0a..f13c10629d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeUserDefined. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java index 22b7e6d248..32a0d8eeed 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; /** RuntimeResponseGenericRuntimeResponseTypeVideo. */ diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java index 0efcbc94da..60bffed05e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java index 7e311501eb..08fccd63a1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java index 568eee9f71..67e641c2e7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -20,6 +21,11 @@ /** * An object containing segments of text from search results with query-matching text highlighted * using HTML `<em>` tags. + * + *

This type supports additional properties of type List<String>. An array of strings + * containing segments taken from a field in the search results that is not mapped to the `body`, + * `title`, or `url` property, with query-matching substrings highlighted. The property name is the + * name of the field in the Discovery collection. */ public class SearchResultHighlight extends DynamicModel> { diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java index 24225043d6..4aa7b72b85 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java index 86fbfead8c..9d1a58451b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -29,11 +30,27 @@ public class SearchSettings extends GenericModel { @SerializedName("schema_mapping") protected SearchSettingsSchemaMapping schemaMapping; + @SerializedName("elastic_search") + protected SearchSettingsElasticSearch elasticSearch; + + @SerializedName("conversational_search") + protected SearchSettingsConversationalSearch conversationalSearch; + + @SerializedName("server_side_search") + protected SearchSettingsServerSideSearch serverSideSearch; + + @SerializedName("client_side_search") + protected SearchSettingsClientSideSearch clientSideSearch; + /** Builder. */ public static class Builder { private SearchSettingsDiscovery discovery; private SearchSettingsMessages messages; private SearchSettingsSchemaMapping schemaMapping; + private SearchSettingsElasticSearch elasticSearch; + private SearchSettingsConversationalSearch conversationalSearch; + private SearchSettingsServerSideSearch serverSideSearch; + private SearchSettingsClientSideSearch clientSideSearch; /** * Instantiates a new Builder from an existing SearchSettings instance. @@ -44,6 +61,10 @@ private Builder(SearchSettings searchSettings) { this.discovery = searchSettings.discovery; this.messages = searchSettings.messages; this.schemaMapping = searchSettings.schemaMapping; + this.elasticSearch = searchSettings.elasticSearch; + this.conversationalSearch = searchSettings.conversationalSearch; + this.serverSideSearch = searchSettings.serverSideSearch; + this.clientSideSearch = searchSettings.clientSideSearch; } /** Instantiates a new builder. */ @@ -106,6 +127,50 @@ public Builder schemaMapping(SearchSettingsSchemaMapping schemaMapping) { this.schemaMapping = schemaMapping; return this; } + + /** + * Set the elasticSearch. + * + * @param elasticSearch the elasticSearch + * @return the SearchSettings builder + */ + public Builder elasticSearch(SearchSettingsElasticSearch elasticSearch) { + this.elasticSearch = elasticSearch; + return this; + } + + /** + * Set the conversationalSearch. + * + * @param conversationalSearch the conversationalSearch + * @return the SearchSettings builder + */ + public Builder conversationalSearch(SearchSettingsConversationalSearch conversationalSearch) { + this.conversationalSearch = conversationalSearch; + return this; + } + + /** + * Set the serverSideSearch. + * + * @param serverSideSearch the serverSideSearch + * @return the SearchSettings builder + */ + public Builder serverSideSearch(SearchSettingsServerSideSearch serverSideSearch) { + this.serverSideSearch = serverSideSearch; + return this; + } + + /** + * Set the clientSideSearch. + * + * @param clientSideSearch the clientSideSearch + * @return the SearchSettings builder + */ + public Builder clientSideSearch(SearchSettingsClientSideSearch clientSideSearch) { + this.clientSideSearch = clientSideSearch; + return this; + } } protected SearchSettings() {} @@ -118,6 +183,10 @@ protected SearchSettings(Builder builder) { discovery = builder.discovery; messages = builder.messages; schemaMapping = builder.schemaMapping; + elasticSearch = builder.elasticSearch; + conversationalSearch = builder.conversationalSearch; + serverSideSearch = builder.serverSideSearch; + clientSideSearch = builder.clientSideSearch; } /** @@ -163,4 +232,51 @@ public SearchSettingsMessages messages() { public SearchSettingsSchemaMapping schemaMapping() { return schemaMapping; } + + /** + * Gets the elasticSearch. + * + *

Configuration settings for the Elasticsearch service used by the search integration. You can + * provide either basic auth or apiKey auth. + * + * @return the elasticSearch + */ + public SearchSettingsElasticSearch elasticSearch() { + return elasticSearch; + } + + /** + * Gets the conversationalSearch. + * + *

Configuration settings for conversational search. + * + * @return the conversationalSearch + */ + public SearchSettingsConversationalSearch conversationalSearch() { + return conversationalSearch; + } + + /** + * Gets the serverSideSearch. + * + *

Configuration settings for the server-side search service used by the search integration. + * You can provide either basic auth, apiKey auth or none. + * + * @return the serverSideSearch + */ + public SearchSettingsServerSideSearch serverSideSearch() { + return serverSideSearch; + } + + /** + * Gets the clientSideSearch. + * + *

Configuration settings for the client-side search service or server-side search service used + * by the search integration. + * + * @return the clientSideSearch + */ + public SearchSettingsClientSideSearch clientSideSearch() { + return clientSideSearch; + } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearch.java new file mode 100644 index 0000000000..04cf2a565b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearch.java @@ -0,0 +1,115 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Map; + +/** + * Configuration settings for the client-side search service or server-side search service used by + * the search integration. + */ +public class SearchSettingsClientSideSearch extends GenericModel { + + protected String filter; + protected Map metadata; + + /** Builder. */ + public static class Builder { + private String filter; + private Map metadata; + + /** + * Instantiates a new Builder from an existing SearchSettingsClientSideSearch instance. + * + * @param searchSettingsClientSideSearch the instance to initialize the Builder with + */ + private Builder(SearchSettingsClientSideSearch searchSettingsClientSideSearch) { + this.filter = searchSettingsClientSideSearch.filter; + this.metadata = searchSettingsClientSideSearch.metadata; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a SearchSettingsClientSideSearch. + * + * @return the new SearchSettingsClientSideSearch instance + */ + public SearchSettingsClientSideSearch build() { + return new SearchSettingsClientSideSearch(this); + } + + /** + * Set the filter. + * + * @param filter the filter + * @return the SearchSettingsClientSideSearch builder + */ + public Builder filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set the metadata. + * + * @param metadata the metadata + * @return the SearchSettingsClientSideSearch builder + */ + public Builder metadata(Map metadata) { + this.metadata = metadata; + return this; + } + } + + protected SearchSettingsClientSideSearch() {} + + protected SearchSettingsClientSideSearch(Builder builder) { + filter = builder.filter; + metadata = builder.metadata; + } + + /** + * New builder. + * + * @return a SearchSettingsClientSideSearch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the filter. + * + *

The filter string that is applied to the search results. + * + * @return the filter + */ + public String filter() { + return filter; + } + + /** + * Gets the metadata. + * + *

The metadata object. + * + * @return the metadata + */ + public Map metadata() { + return metadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearch.java new file mode 100644 index 0000000000..77cc98e8a6 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearch.java @@ -0,0 +1,149 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Configuration settings for conversational search. */ +public class SearchSettingsConversationalSearch extends GenericModel { + + protected Boolean enabled; + + @SerializedName("response_length") + protected SearchSettingsConversationalSearchResponseLength responseLength; + + @SerializedName("search_confidence") + protected SearchSettingsConversationalSearchSearchConfidence searchConfidence; + + /** Builder. */ + public static class Builder { + private Boolean enabled; + private SearchSettingsConversationalSearchResponseLength responseLength; + private SearchSettingsConversationalSearchSearchConfidence searchConfidence; + + /** + * Instantiates a new Builder from an existing SearchSettingsConversationalSearch instance. + * + * @param searchSettingsConversationalSearch the instance to initialize the Builder with + */ + private Builder(SearchSettingsConversationalSearch searchSettingsConversationalSearch) { + this.enabled = searchSettingsConversationalSearch.enabled; + this.responseLength = searchSettingsConversationalSearch.responseLength; + this.searchConfidence = searchSettingsConversationalSearch.searchConfidence; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param enabled the enabled + */ + public Builder(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Builds a SearchSettingsConversationalSearch. + * + * @return the new SearchSettingsConversationalSearch instance + */ + public SearchSettingsConversationalSearch build() { + return new SearchSettingsConversationalSearch(this); + } + + /** + * Set the enabled. + * + * @param enabled the enabled + * @return the SearchSettingsConversationalSearch builder + */ + public Builder enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Set the responseLength. + * + * @param responseLength the responseLength + * @return the SearchSettingsConversationalSearch builder + */ + public Builder responseLength(SearchSettingsConversationalSearchResponseLength responseLength) { + this.responseLength = responseLength; + return this; + } + + /** + * Set the searchConfidence. + * + * @param searchConfidence the searchConfidence + * @return the SearchSettingsConversationalSearch builder + */ + public Builder searchConfidence( + SearchSettingsConversationalSearchSearchConfidence searchConfidence) { + this.searchConfidence = searchConfidence; + return this; + } + } + + protected SearchSettingsConversationalSearch() {} + + protected SearchSettingsConversationalSearch(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.enabled, "enabled cannot be null"); + enabled = builder.enabled; + responseLength = builder.responseLength; + searchConfidence = builder.searchConfidence; + } + + /** + * New builder. + * + * @return a SearchSettingsConversationalSearch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the enabled. + * + *

Whether to enable conversational search. + * + * @return the enabled + */ + public Boolean enabled() { + return enabled; + } + + /** + * Gets the responseLength. + * + * @return the responseLength + */ + public SearchSettingsConversationalSearchResponseLength responseLength() { + return responseLength; + } + + /** + * Gets the searchConfidence. + * + * @return the searchConfidence + */ + public SearchSettingsConversationalSearchSearchConfidence searchConfidence() { + return searchConfidence; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLength.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLength.java new file mode 100644 index 0000000000..e28aba049d --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLength.java @@ -0,0 +1,99 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** SearchSettingsConversationalSearchResponseLength. */ +public class SearchSettingsConversationalSearchResponseLength extends GenericModel { + + /** The response length option. It controls the length of the generated response. */ + public interface Option { + /** concise. */ + String CONCISE = "concise"; + /** moderate. */ + String MODERATE = "moderate"; + /** verbose. */ + String VERBOSE = "verbose"; + } + + protected String option; + + /** Builder. */ + public static class Builder { + private String option; + + /** + * Instantiates a new Builder from an existing SearchSettingsConversationalSearchResponseLength + * instance. + * + * @param searchSettingsConversationalSearchResponseLength the instance to initialize the + * Builder with + */ + private Builder( + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLength) { + this.option = searchSettingsConversationalSearchResponseLength.option; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a SearchSettingsConversationalSearchResponseLength. + * + * @return the new SearchSettingsConversationalSearchResponseLength instance + */ + public SearchSettingsConversationalSearchResponseLength build() { + return new SearchSettingsConversationalSearchResponseLength(this); + } + + /** + * Set the option. + * + * @param option the option + * @return the SearchSettingsConversationalSearchResponseLength builder + */ + public Builder option(String option) { + this.option = option; + return this; + } + } + + protected SearchSettingsConversationalSearchResponseLength() {} + + protected SearchSettingsConversationalSearchResponseLength(Builder builder) { + option = builder.option; + } + + /** + * New builder. + * + * @return a SearchSettingsConversationalSearchResponseLength builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the option. + * + *

The response length option. It controls the length of the generated response. + * + * @return the option + */ + public String option() { + return option; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidence.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidence.java new file mode 100644 index 0000000000..09c5f6139e --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidence.java @@ -0,0 +1,105 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** SearchSettingsConversationalSearchSearchConfidence. */ +public class SearchSettingsConversationalSearchSearchConfidence extends GenericModel { + + /** + * The search confidence threshold. It controls the tendency for conversational search to produce + * “I don't know” answers. + */ + public interface Threshold { + /** rarely. */ + String RARELY = "rarely"; + /** less_often. */ + String LESS_OFTEN = "less_often"; + /** more_often. */ + String MORE_OFTEN = "more_often"; + /** most_often. */ + String MOST_OFTEN = "most_often"; + } + + protected String threshold; + + /** Builder. */ + public static class Builder { + private String threshold; + + /** + * Instantiates a new Builder from an existing + * SearchSettingsConversationalSearchSearchConfidence instance. + * + * @param searchSettingsConversationalSearchSearchConfidence the instance to initialize the + * Builder with + */ + private Builder( + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidence) { + this.threshold = searchSettingsConversationalSearchSearchConfidence.threshold; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a SearchSettingsConversationalSearchSearchConfidence. + * + * @return the new SearchSettingsConversationalSearchSearchConfidence instance + */ + public SearchSettingsConversationalSearchSearchConfidence build() { + return new SearchSettingsConversationalSearchSearchConfidence(this); + } + + /** + * Set the threshold. + * + * @param threshold the threshold + * @return the SearchSettingsConversationalSearchSearchConfidence builder + */ + public Builder threshold(String threshold) { + this.threshold = threshold; + return this; + } + } + + protected SearchSettingsConversationalSearchSearchConfidence() {} + + protected SearchSettingsConversationalSearchSearchConfidence(Builder builder) { + threshold = builder.threshold; + } + + /** + * New builder. + * + * @return a SearchSettingsConversationalSearchSearchConfidence builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the threshold. + * + *

The search confidence threshold. It controls the tendency for conversational search to + * produce “I don't know” answers. + * + * @return the threshold + */ + public String threshold() { + return threshold; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java index 4a76f2fddd..6a132eab83 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java index f1de10d32b..b62faaab35 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearch.java new file mode 100644 index 0000000000..162f662aee --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearch.java @@ -0,0 +1,344 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * Configuration settings for the Elasticsearch service used by the search integration. You can + * provide either basic auth or apiKey auth. + */ +public class SearchSettingsElasticSearch extends GenericModel { + + protected String url; + protected String port; + protected String username; + protected String password; + protected String index; + protected List filter; + + @SerializedName("query_body") + protected Map queryBody; + + @SerializedName("managed_index") + protected String managedIndex; + + protected String apikey; + + /** Builder. */ + public static class Builder { + private String url; + private String port; + private String username; + private String password; + private String index; + private List filter; + private Map queryBody; + private String managedIndex; + private String apikey; + + /** + * Instantiates a new Builder from an existing SearchSettingsElasticSearch instance. + * + * @param searchSettingsElasticSearch the instance to initialize the Builder with + */ + private Builder(SearchSettingsElasticSearch searchSettingsElasticSearch) { + this.url = searchSettingsElasticSearch.url; + this.port = searchSettingsElasticSearch.port; + this.username = searchSettingsElasticSearch.username; + this.password = searchSettingsElasticSearch.password; + this.index = searchSettingsElasticSearch.index; + this.filter = searchSettingsElasticSearch.filter; + this.queryBody = searchSettingsElasticSearch.queryBody; + this.managedIndex = searchSettingsElasticSearch.managedIndex; + this.apikey = searchSettingsElasticSearch.apikey; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param url the url + * @param port the port + * @param index the index + */ + public Builder(String url, String port, String index) { + this.url = url; + this.port = port; + this.index = index; + } + + /** + * Builds a SearchSettingsElasticSearch. + * + * @return the new SearchSettingsElasticSearch instance + */ + public SearchSettingsElasticSearch build() { + return new SearchSettingsElasticSearch(this); + } + + /** + * Adds a new element to filter. + * + * @param filter the new element to be added + * @return the SearchSettingsElasticSearch builder + */ + public Builder addFilter(Object filter) { + com.ibm.cloud.sdk.core.util.Validator.notNull(filter, "filter cannot be null"); + if (this.filter == null) { + this.filter = new ArrayList(); + } + this.filter.add(filter); + return this; + } + + /** + * Set the url. + * + * @param url the url + * @return the SearchSettingsElasticSearch builder + */ + public Builder url(String url) { + this.url = url; + return this; + } + + /** + * Set the port. + * + * @param port the port + * @return the SearchSettingsElasticSearch builder + */ + public Builder port(String port) { + this.port = port; + return this; + } + + /** + * Set the username. + * + * @param username the username + * @return the SearchSettingsElasticSearch builder + */ + public Builder username(String username) { + this.username = username; + return this; + } + + /** + * Set the password. + * + * @param password the password + * @return the SearchSettingsElasticSearch builder + */ + public Builder password(String password) { + this.password = password; + return this; + } + + /** + * Set the index. + * + * @param index the index + * @return the SearchSettingsElasticSearch builder + */ + public Builder index(String index) { + this.index = index; + return this; + } + + /** + * Set the filter. Existing filter will be replaced. + * + * @param filter the filter + * @return the SearchSettingsElasticSearch builder + */ + public Builder filter(List filter) { + this.filter = filter; + return this; + } + + /** + * Set the queryBody. + * + * @param queryBody the queryBody + * @return the SearchSettingsElasticSearch builder + */ + public Builder queryBody(Map queryBody) { + this.queryBody = queryBody; + return this; + } + + /** + * Set the managedIndex. + * + * @param managedIndex the managedIndex + * @return the SearchSettingsElasticSearch builder + */ + public Builder managedIndex(String managedIndex) { + this.managedIndex = managedIndex; + return this; + } + + /** + * Set the apikey. + * + * @param apikey the apikey + * @return the SearchSettingsElasticSearch builder + */ + public Builder apikey(String apikey) { + this.apikey = apikey; + return this; + } + } + + protected SearchSettingsElasticSearch() {} + + protected SearchSettingsElasticSearch(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.url, "url cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.port, "port cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.index, "index cannot be null"); + url = builder.url; + port = builder.port; + username = builder.username; + password = builder.password; + index = builder.index; + filter = builder.filter; + queryBody = builder.queryBody; + managedIndex = builder.managedIndex; + apikey = builder.apikey; + } + + /** + * New builder. + * + * @return a SearchSettingsElasticSearch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the url. + * + *

The URL for the Elasticsearch service. + * + * @return the url + */ + public String url() { + return url; + } + + /** + * Gets the port. + * + *

The port number for the Elasticsearch service URL. + * + *

**Note:** It can be omitted if a port number is appended to the URL. + * + * @return the port + */ + public String port() { + return port; + } + + /** + * Gets the username. + * + *

The username of the basic authentication method. + * + * @return the username + */ + public String username() { + return username; + } + + /** + * Gets the password. + * + *

The password of the basic authentication method. The credentials are not returned due to + * security reasons. + * + * @return the password + */ + public String password() { + return password; + } + + /** + * Gets the index. + * + *

The Elasticsearch index to use for the search integration. + * + * @return the index + */ + public String index() { + return index; + } + + /** + * Gets the filter. + * + *

An array of filters that can be applied to the search results via the `$FILTER` variable in + * the `query_body`.For more information, see [Elasticsearch filter + * documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/filter-search-results.html). + * + * @return the filter + */ + public List filter() { + return filter; + } + + /** + * Gets the queryBody. + * + *

The Elasticsearch query object. For more information, see [Elasticsearch search API + * documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html). + * + * @return the queryBody + */ + public Map queryBody() { + return queryBody; + } + + /** + * Gets the managedIndex. + * + *

The Elasticsearch index for uploading documents. It is created automatically when the upload + * document option is selected from the user interface. + * + * @return the managedIndex + */ + public String managedIndex() { + return managedIndex; + } + + /** + * Gets the apikey. + * + *

The API key of the apiKey authentication method. Use either basic auth or apiKey auth. The + * credentials are not returned due to security reasons. + * + * @return the apikey + */ + public String apikey() { + return apikey; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java index 00f8b83c23..8e5cb77a89 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java index 7a78437bb4..0a31588b2c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearch.java new file mode 100644 index 0000000000..4f91a3dd09 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearch.java @@ -0,0 +1,324 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Map; + +/** + * Configuration settings for the server-side search service used by the search integration. You can + * provide either basic auth, apiKey auth or none. + */ +public class SearchSettingsServerSideSearch extends GenericModel { + + /** The authorization type that is used. */ + public interface AuthType { + /** basic. */ + String BASIC = "basic"; + /** apikey. */ + String APIKEY = "apikey"; + /** none. */ + String NONE = "none"; + } + + protected String url; + protected String port; + protected String username; + protected String password; + protected String filter; + protected Map metadata; + protected String apikey; + + @SerializedName("no_auth") + protected Boolean noAuth; + + @SerializedName("auth_type") + protected String authType; + + /** Builder. */ + public static class Builder { + private String url; + private String port; + private String username; + private String password; + private String filter; + private Map metadata; + private String apikey; + private Boolean noAuth; + private String authType; + + /** + * Instantiates a new Builder from an existing SearchSettingsServerSideSearch instance. + * + * @param searchSettingsServerSideSearch the instance to initialize the Builder with + */ + private Builder(SearchSettingsServerSideSearch searchSettingsServerSideSearch) { + this.url = searchSettingsServerSideSearch.url; + this.port = searchSettingsServerSideSearch.port; + this.username = searchSettingsServerSideSearch.username; + this.password = searchSettingsServerSideSearch.password; + this.filter = searchSettingsServerSideSearch.filter; + this.metadata = searchSettingsServerSideSearch.metadata; + this.apikey = searchSettingsServerSideSearch.apikey; + this.noAuth = searchSettingsServerSideSearch.noAuth; + this.authType = searchSettingsServerSideSearch.authType; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param url the url + */ + public Builder(String url) { + this.url = url; + } + + /** + * Builds a SearchSettingsServerSideSearch. + * + * @return the new SearchSettingsServerSideSearch instance + */ + public SearchSettingsServerSideSearch build() { + return new SearchSettingsServerSideSearch(this); + } + + /** + * Set the url. + * + * @param url the url + * @return the SearchSettingsServerSideSearch builder + */ + public Builder url(String url) { + this.url = url; + return this; + } + + /** + * Set the port. + * + * @param port the port + * @return the SearchSettingsServerSideSearch builder + */ + public Builder port(String port) { + this.port = port; + return this; + } + + /** + * Set the username. + * + * @param username the username + * @return the SearchSettingsServerSideSearch builder + */ + public Builder username(String username) { + this.username = username; + return this; + } + + /** + * Set the password. + * + * @param password the password + * @return the SearchSettingsServerSideSearch builder + */ + public Builder password(String password) { + this.password = password; + return this; + } + + /** + * Set the filter. + * + * @param filter the filter + * @return the SearchSettingsServerSideSearch builder + */ + public Builder filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set the metadata. + * + * @param metadata the metadata + * @return the SearchSettingsServerSideSearch builder + */ + public Builder metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set the apikey. + * + * @param apikey the apikey + * @return the SearchSettingsServerSideSearch builder + */ + public Builder apikey(String apikey) { + this.apikey = apikey; + return this; + } + + /** + * Set the noAuth. + * + * @param noAuth the noAuth + * @return the SearchSettingsServerSideSearch builder + */ + public Builder noAuth(Boolean noAuth) { + this.noAuth = noAuth; + return this; + } + + /** + * Set the authType. + * + * @param authType the authType + * @return the SearchSettingsServerSideSearch builder + */ + public Builder authType(String authType) { + this.authType = authType; + return this; + } + } + + protected SearchSettingsServerSideSearch() {} + + protected SearchSettingsServerSideSearch(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.url, "url cannot be null"); + url = builder.url; + port = builder.port; + username = builder.username; + password = builder.password; + filter = builder.filter; + metadata = builder.metadata; + apikey = builder.apikey; + noAuth = builder.noAuth; + authType = builder.authType; + } + + /** + * New builder. + * + * @return a SearchSettingsServerSideSearch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the url. + * + *

The URL of the server-side search service. + * + * @return the url + */ + public String url() { + return url; + } + + /** + * Gets the port. + * + *

The port number of the server-side search service. + * + * @return the port + */ + public String port() { + return port; + } + + /** + * Gets the username. + * + *

The username of the basic authentication method. + * + * @return the username + */ + public String username() { + return username; + } + + /** + * Gets the password. + * + *

The password of the basic authentication method. The credentials are not returned due to + * security reasons. + * + * @return the password + */ + public String password() { + return password; + } + + /** + * Gets the filter. + * + *

The filter string that is applied to the search results. + * + * @return the filter + */ + public String filter() { + return filter; + } + + /** + * Gets the metadata. + * + *

The metadata object. + * + * @return the metadata + */ + public Map metadata() { + return metadata; + } + + /** + * Gets the apikey. + * + *

The API key of the apiKey authentication method. The credentails are not returned due to + * security reasons. + * + * @return the apikey + */ + public String apikey() { + return apikey; + } + + /** + * Gets the noAuth. + * + *

To clear previous auth, specify `no_auth = true`. + * + * @return the noAuth + */ + public Boolean noAuth() { + return noAuth; + } + + /** + * Gets the authType. + * + *

The authorization type that is used. + * + * @return the authType + */ + public String authType() { + return authType; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java index 8f01d72f23..8f77d59b3a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java index a30588076a..3e207f6aa1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java index 8e11214b93..08c22e57bc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java index 543bbc3d6e..c696baf66e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java index 900ef99b8c..dc7806f2d6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java index 5f0c59d204..8de8756860 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatefulMessageResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatefulMessageResponse.java index 2216d78bb6..0511730897 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatefulMessageResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatefulMessageResponse.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponse.java new file mode 100644 index 0000000000..9ff9afeef0 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponse.java @@ -0,0 +1,73 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** Message final response content. */ +public class StatelessFinalResponse extends GenericModel { + + protected StatelessFinalResponseOutput output; + protected StatelessMessageContext context; + + @SerializedName("user_id") + protected String userId; + + protected StatelessFinalResponse() {} + + /** + * Gets the output. + * + *

Assistant output to be rendered or processed by the client. + * + * @return the output + */ + public StatelessFinalResponseOutput getOutput() { + return output; + } + + /** + * Gets the context. + * + *

Context data for the conversation. You can use this property to access context variables. + * The context is stored by the assistant on a per-session basis. + * + *

**Note:** The context is included in message responses only if **return_context**=`true` in + * the message request. Full context is always included in logs. + * + * @return the context + */ + public StatelessMessageContext getContext() { + return context; + } + + /** + * Gets the userId. + * + *

A string value that identifies the user who is interacting with the assistant. The client + * must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This + * string cannot contain carriage return, newline, or tab characters. If no value is specified in + * the input, **user_id** is automatically set to the value of **context.global.session_id**. + * + *

**Note:** This property is the same as the **user_id** property in the global system + * context. + * + * @return the userId + */ + public String getUserId() { + return userId; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutput.java new file mode 100644 index 0000000000..075d8de9b8 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutput.java @@ -0,0 +1,127 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; + +/** Assistant output to be rendered or processed by the client. */ +public class StatelessFinalResponseOutput extends GenericModel { + + protected List generic; + protected List intents; + protected List entities; + protected List actions; + protected MessageOutputDebug debug; + + @SerializedName("user_defined") + protected Map userDefined; + + protected MessageOutputSpelling spelling; + + @SerializedName("streaming_metadata") + protected StatelessMessageContext streamingMetadata; + + protected StatelessFinalResponseOutput() {} + + /** + * Gets the generic. + * + *

Output intended for any channel. It is the responsibility of the client application to + * implement the supported response types. + * + * @return the generic + */ + public List getGeneric() { + return generic; + } + + /** + * Gets the intents. + * + *

An array of intents recognized in the user input, sorted in descending order of confidence. + * + * @return the intents + */ + public List getIntents() { + return intents; + } + + /** + * Gets the entities. + * + *

An array of entities identified in the user input. + * + * @return the entities + */ + public List getEntities() { + return entities; + } + + /** + * Gets the actions. + * + *

An array of objects describing any actions requested by the dialog node. + * + * @return the actions + */ + public List getActions() { + return actions; + } + + /** + * Gets the debug. + * + *

Additional detailed information about a message response and how it was generated. + * + * @return the debug + */ + public MessageOutputDebug getDebug() { + return debug; + } + + /** + * Gets the userDefined. + * + *

An object containing any custom properties included in the response. This object includes + * any arbitrary properties defined in the dialog JSON editor as part of the dialog node output. + * + * @return the userDefined + */ + public Map getUserDefined() { + return userDefined; + } + + /** + * Gets the spelling. + * + *

Properties describing any spelling corrections in the user input that was received. + * + * @return the spelling + */ + public MessageOutputSpelling getSpelling() { + return spelling; + } + + /** + * Gets the streamingMetadata. + * + * @return the streamingMetadata + */ + public StatelessMessageContext getStreamingMetadata() { + return streamingMetadata; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContext.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContext.java index 7fed7ae990..b097069430 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContext.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContext.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextGlobal.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextGlobal.java index 80f2a41437..00631826f1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextGlobal.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextGlobal.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkills.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkills.java index 48ea9f6d89..6f2495d697 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkills.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkills.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkillsActionsSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkillsActionsSkill.java index f81d6c7ca3..c551297d57 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkillsActionsSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageContextSkillsActionsSkill.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInput.java index 3b4469784c..ea2995aeb3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInput.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInputOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInputOptions.java index 066dabb74e..f04c014ccc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInputOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageInputOptions.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageResponse.java index 3be46bf97f..c4a45493ac 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageResponse.java @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponse.java new file mode 100644 index 0000000000..67b52cd860 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponse.java @@ -0,0 +1,69 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * A stateless streamed response form the watsonx Assistant service. + * + *

Classes which extend this class: - StatelessMessageStreamResponseMessageStreamPartialItem - + * StatelessMessageStreamResponseMessageStreamCompleteItem - + * StatelessMessageStreamResponseStatelessMessageStreamFinalResponse + */ +public class StatelessMessageStreamResponse extends GenericModel { + + @SerializedName("partial_item") + protected PartialItem partialItem; + + @SerializedName("complete_item") + protected CompleteItem completeItem; + + @SerializedName("final_response") + protected StatelessFinalResponse finalResponse; + + protected StatelessMessageStreamResponse() {} + + /** + * Gets the partialItem. + * + *

Message response partial item content. + * + * @return the partialItem + */ + public PartialItem getPartialItem() { + return partialItem; + } + + /** + * Gets the completeItem. + * + * @return the completeItem + */ + public CompleteItem getCompleteItem() { + return completeItem; + } + + /** + * Gets the finalResponse. + * + *

Message final response content. + * + * @return the finalResponse + */ + public StatelessFinalResponse getFinalResponse() { + return finalResponse; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java index 3017e55e98..70656c0f20 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java index 0aa9252ca4..937754f2ab 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java index 95f5663861..749da57752 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; @@ -34,6 +35,9 @@ public interface Type { @SerializedName("result_variable") protected String resultVariable; + protected TurnEventCalloutCalloutRequest request; + protected TurnEventCalloutCalloutResponse response; + protected TurnEventCalloutCallout() {} /** @@ -69,4 +73,26 @@ public Map getInternal() { public String getResultVariable() { return resultVariable; } + + /** + * Gets the request. + * + *

The request object executed to the external server specified by the extension. + * + * @return the request + */ + public TurnEventCalloutCalloutRequest getRequest() { + return request; + } + + /** + * Gets the response. + * + *

The response object received by the external server made by the extension. + * + * @return the response + */ + public TurnEventCalloutCalloutResponse getResponse() { + return response; + } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequest.java new file mode 100644 index 0000000000..cdc9d43d5d --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequest.java @@ -0,0 +1,115 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Map; + +/** TurnEventCalloutCalloutRequest. */ +public class TurnEventCalloutCalloutRequest extends GenericModel { + + /** The REST method of the request. */ + public interface Method { + /** get. */ + String GET = "get"; + /** post. */ + String POST = "post"; + /** put. */ + String PUT = "put"; + /** delete. */ + String DELETE = "delete"; + /** patch. */ + String PATCH = "patch"; + } + + protected String method; + protected String url; + protected String path; + + @SerializedName("query_parameters") + protected String queryParameters; + + protected Map headers; + protected Map body; + + protected TurnEventCalloutCalloutRequest() {} + + /** + * Gets the method. + * + *

The REST method of the request. + * + * @return the method + */ + public String getMethod() { + return method; + } + + /** + * Gets the url. + * + *

The host URL of the request call. + * + * @return the url + */ + public String getUrl() { + return url; + } + + /** + * Gets the path. + * + *

The URL path of the request call. + * + * @return the path + */ + public String getPath() { + return path; + } + + /** + * Gets the queryParameters. + * + *

Any query parameters appended to the URL of the request call. + * + * @return the queryParameters + */ + public String getQueryParameters() { + return queryParameters; + } + + /** + * Gets the headers. + * + *

Any headers included in the request call. + * + * @return the headers + */ + public Map getHeaders() { + return headers; + } + + /** + * Gets the body. + * + *

Contains the response of the external server or an object. In cases like timeouts or + * connections errors, it will contain details of why the callout to the external server failed. + * + * @return the body + */ + public Map getBody() { + return body; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponse.java new file mode 100644 index 0000000000..ae2a2ebecb --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponse.java @@ -0,0 +1,66 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Map; + +/** TurnEventCalloutCalloutResponse. */ +public class TurnEventCalloutCalloutResponse extends GenericModel { + + protected String body; + + @SerializedName("status_code") + protected Long statusCode; + + @SerializedName("last_event") + protected Map lastEvent; + + protected TurnEventCalloutCalloutResponse() {} + + /** + * Gets the body. + * + *

The final response string. This response is a composition of every partial chunk received + * from the stream. + * + * @return the body + */ + public String getBody() { + return body; + } + + /** + * Gets the statusCode. + * + *

The final status code of the response. + * + * @return the statusCode + */ + public Long getStatusCode() { + return statusCode; + } + + /** + * Gets the lastEvent. + * + *

The response from the last chunk received from the response stream. + * + * @return the lastEvent + */ + public Map getLastEvent() { + return lastEvent; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java index 5b794e7300..e5a72c0ded 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java index 21ba926840..96c42d5721 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.google.gson.annotations.SerializedName; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java index ed01b57391..c15aa3f62b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java index 2fcaa69c08..2afc2a663c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -23,7 +24,7 @@ public class UpdateEnvironmentOptions extends GenericModel { protected String environmentId; protected String name; protected String description; - protected BaseEnvironmentOrchestration orchestration; + protected UpdateEnvironmentOrchestration orchestration; protected Long sessionTimeout; protected List skillReferences; @@ -33,7 +34,7 @@ public static class Builder { private String environmentId; private String name; private String description; - private BaseEnvironmentOrchestration orchestration; + private UpdateEnvironmentOrchestration orchestration; private Long sessionTimeout; private List skillReferences; @@ -141,7 +142,7 @@ public Builder description(String description) { * @param orchestration the orchestration * @return the UpdateEnvironmentOptions builder */ - public Builder orchestration(BaseEnvironmentOrchestration orchestration) { + public Builder orchestration(UpdateEnvironmentOrchestration orchestration) { this.orchestration = orchestration; return this; } @@ -257,7 +258,7 @@ public String description() { * * @return the orchestration */ - public BaseEnvironmentOrchestration orchestration() { + public UpdateEnvironmentOrchestration orchestration() { return orchestration; } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestration.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestration.java new file mode 100644 index 0000000000..bee979e0a4 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestration.java @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The search skill orchestration settings for the environment. */ +public class UpdateEnvironmentOrchestration extends GenericModel { + + @SerializedName("search_skill_fallback") + protected Boolean searchSkillFallback; + + /** Builder. */ + public static class Builder { + private Boolean searchSkillFallback; + + /** + * Instantiates a new Builder from an existing UpdateEnvironmentOrchestration instance. + * + * @param updateEnvironmentOrchestration the instance to initialize the Builder with + */ + private Builder(UpdateEnvironmentOrchestration updateEnvironmentOrchestration) { + this.searchSkillFallback = updateEnvironmentOrchestration.searchSkillFallback; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Builds a UpdateEnvironmentOrchestration. + * + * @return the new UpdateEnvironmentOrchestration instance + */ + public UpdateEnvironmentOrchestration build() { + return new UpdateEnvironmentOrchestration(this); + } + + /** + * Set the searchSkillFallback. + * + * @param searchSkillFallback the searchSkillFallback + * @return the UpdateEnvironmentOrchestration builder + */ + public Builder searchSkillFallback(Boolean searchSkillFallback) { + this.searchSkillFallback = searchSkillFallback; + return this; + } + } + + protected UpdateEnvironmentOrchestration() {} + + protected UpdateEnvironmentOrchestration(Builder builder) { + searchSkillFallback = builder.searchSkillFallback; + } + + /** + * New builder. + * + * @return a UpdateEnvironmentOrchestration builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the searchSkillFallback. + * + *

Whether to fall back to a search skill when responding to messages that do not match any + * intent or action defined in dialog or action skills. (If no search skill is configured for the + * environment, this property is ignored.). + * + * @return the searchSkillFallback + */ + public Boolean searchSkillFallback() { + return searchSkillFallback; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptions.java new file mode 100644 index 0000000000..23b9c42494 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptions.java @@ -0,0 +1,156 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The updateProvider options. */ +public class UpdateProviderOptions extends GenericModel { + + protected String providerId; + protected ProviderSpecification specification; + protected ProviderPrivate xPrivate; + + /** Builder. */ + public static class Builder { + private String providerId; + private ProviderSpecification specification; + private ProviderPrivate xPrivate; + + /** + * Instantiates a new Builder from an existing UpdateProviderOptions instance. + * + * @param updateProviderOptions the instance to initialize the Builder with + */ + private Builder(UpdateProviderOptions updateProviderOptions) { + this.providerId = updateProviderOptions.providerId; + this.specification = updateProviderOptions.specification; + this.xPrivate = updateProviderOptions.xPrivate; + } + + /** Instantiates a new builder. */ + public Builder() {} + + /** + * Instantiates a new builder with required properties. + * + * @param providerId the providerId + * @param specification the specification + * @param xPrivate the xPrivate + */ + public Builder( + String providerId, ProviderSpecification specification, ProviderPrivate xPrivate) { + this.providerId = providerId; + this.specification = specification; + this.xPrivate = xPrivate; + } + + /** + * Builds a UpdateProviderOptions. + * + * @return the new UpdateProviderOptions instance + */ + public UpdateProviderOptions build() { + return new UpdateProviderOptions(this); + } + + /** + * Set the providerId. + * + * @param providerId the providerId + * @return the UpdateProviderOptions builder + */ + public Builder providerId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Set the specification. + * + * @param specification the specification + * @return the UpdateProviderOptions builder + */ + public Builder specification(ProviderSpecification specification) { + this.specification = specification; + return this; + } + + /** + * Set the xPrivate. + * + * @param xPrivate the xPrivate + * @return the UpdateProviderOptions builder + */ + public Builder xPrivate(ProviderPrivate xPrivate) { + this.xPrivate = xPrivate; + return this; + } + } + + protected UpdateProviderOptions() {} + + protected UpdateProviderOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty( + builder.providerId, "providerId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notNull( + builder.specification, "specification cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.xPrivate, "xPrivate cannot be null"); + providerId = builder.providerId; + specification = builder.specification; + xPrivate = builder.xPrivate; + } + + /** + * New builder. + * + * @return a UpdateProviderOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the providerId. + * + *

Unique identifier of the conversational skill provider. + * + * @return the providerId + */ + public String providerId() { + return providerId; + } + + /** + * Gets the specification. + * + *

The specification of the provider. + * + * @return the specification + */ + public ProviderSpecification specification() { + return specification; + } + + /** + * Gets the xPrivate. + * + *

Private information of the provider. + * + * @return the xPrivate + */ + public ProviderPrivate xPrivate() { + return xPrivate; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java index 1ef9f7ed20..b7e023f4e4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/package-info.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/package-info.java index 6b85dcb3fd..9e101146c2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/package-info.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/package-info.java @@ -10,5 +10,6 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + /** watsonx Assistant v2 v2. */ package com.ibm.watson.assistant.v2; diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java index 21cadae38e..dcc7118f37 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java @@ -14,13 +14,20 @@ import static org.junit.Assert.*; -import com.ibm.cloud.sdk.core.security.*; import com.ibm.watson.assistant.v2.model.*; import com.ibm.watson.assistant.v2.model.ListLogsOptions.Builder; import com.ibm.watson.common.RetryRunner; +import com.launchdarkly.eventsource.StreamException; +import java.io.*; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import okhttp3.OkHttpClient; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -32,6 +39,8 @@ public class AssistantServiceIT extends AssistantServiceTest { private Assistant service; private String assistantId; + private static final String RESOURCE = "src/test/resources/assistant/"; + /** * Sets up the tests. * @@ -284,6 +293,98 @@ public void testGettingReleases() { assertEquals("Available", release.status()); } + /** Test Provider API */ + @Test + public void testProviders() { + var listProviderOptions = new ListProvidersOptions.Builder().build(); + var listProvidersResponse = service.listProviders(listProviderOptions).execute().getResult(); + var providerId = listProvidersResponse.getConversationalSkillProviders().get(0).getProviderId(); + assertNotNull(listProvidersResponse); + assertNotNull(providerId); + + ArrayList serverList = new ArrayList<>(); + serverList.add( + new ProviderSpecificationServersItem.Builder() + .url("https://myProCodeProvider.com") + .build()); + + ProviderSpecification providerSpecification = + new ProviderSpecification.Builder().servers(serverList).build(); + + var password = new ProviderAuthenticationTypeAndValue.Builder().type("value").value("test").build(); + var basicFlow = new ProviderPrivateAuthenticationBasicFlow.Builder().password(password).build(); + var providerPrivate = new ProviderPrivate.Builder().authentication(basicFlow).build(); + + // service.setServiceUrl("http://localhost:9001"); + + var updateProvidersOptions = + new UpdateProviderOptions.Builder() + .providerId(providerId) + .specification(providerSpecification) + .xPrivate(providerPrivate) + .build(); + var updateProvidersResponse = + service.updateProvider(updateProvidersOptions).execute().getResult(); + assertNotNull(updateProvidersResponse); + } + + /** Test Import/Export Release API */ + @Test + public void testImportRelease() throws IOException { + InputStream testFile = new FileInputStream(RESOURCE + "demo_wa_V4.zip"); + var importOptions = + new CreateReleaseImportOptions.Builder().assistantId(assistantId).body(testFile).build(); + var importResponse = service.createReleaseImport(importOptions).execute().getResult(); + assertNotNull(importResponse); + } + + @Test + public void testDownloadExportRelease() throws IOException { + var exportOptions = + new DownloadReleaseExportOptions.Builder().assistantId(assistantId).release("1").build(); + var exportResponse = service.downloadReleaseExport(exportOptions).execute().getResult(); + assertNotNull(exportResponse); + } + + @Test + public void testDownloadExportReleaseStream() throws IOException { + var exportOptions = + new DownloadReleaseExportOptions.Builder().assistantId(assistantId).release("1").build(); + var exportReleaseStream = + service.downloadReleaseExportAsStream(exportOptions).execute().getResult(); + assertNotNull(exportReleaseStream); + } + + @Test + public void testMessageStreamStateless() throws IOException, StreamException { + var messageInput = + new MessageInput.Builder() + .messageType("text") + .text("can you list the steps to create a custom extension?") + .build(); + var messageStreamStatelessOptions = + new MessageStreamStatelessOptions.Builder() + .assistantId("99a74576-47de-42a9-ab05-9dd98978809b") + .environmentId("03dce212-1aa3-436a-a747-8717a96ded5a") + .userId("Angelo") + .input(messageInput) + .build(); + InputStream inputStream = + service.messageStreamStateless(messageStreamStatelessOptions).execute().getResult(); + + var messageDeserializer = new MessageEventDeserializer.Builder(inputStream).build(); + for (StatelessMessageStreamResponse message : messageDeserializer.statelessMessages()) { + if (message.getPartialItem() != null) { + assertNotNull(message.getPartialItem().getText()); + } else if (message.getCompleteItem() != null) { + assertNotNull(message.getCompleteItem().text()); + } else if (message.getFinalResponse() != null) { + assertNotNull(message.getFinalResponse().getOutput()); + assertNotNull(message.getFinalResponse().getOutput()); + } + } + } + /** Test Deploy Releases. */ // @Test public void testDeployRelease() { diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java index 643a12bf86..36dbfa46d4 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2; import static org.testng.Assert.*; @@ -21,12 +22,16 @@ import com.ibm.watson.assistant.v2.model.AssistantCollection; import com.ibm.watson.assistant.v2.model.AssistantData; import com.ibm.watson.assistant.v2.model.AssistantState; -import com.ibm.watson.assistant.v2.model.BaseEnvironmentOrchestration; import com.ibm.watson.assistant.v2.model.BulkClassifyOptions; import com.ibm.watson.assistant.v2.model.BulkClassifyResponse; import com.ibm.watson.assistant.v2.model.BulkClassifyUtterance; import com.ibm.watson.assistant.v2.model.CaptureGroup; import com.ibm.watson.assistant.v2.model.CreateAssistantOptions; +import com.ibm.watson.assistant.v2.model.CreateAssistantReleaseImportResponse; +import com.ibm.watson.assistant.v2.model.CreateProviderOptions; +import com.ibm.watson.assistant.v2.model.CreateReleaseExportOptions; +import com.ibm.watson.assistant.v2.model.CreateReleaseExportWithStatusErrors; +import com.ibm.watson.assistant.v2.model.CreateReleaseImportOptions; import com.ibm.watson.assistant.v2.model.CreateReleaseOptions; import com.ibm.watson.assistant.v2.model.CreateSessionOptions; import com.ibm.watson.assistant.v2.model.DeleteAssistantOptions; @@ -34,11 +39,13 @@ import com.ibm.watson.assistant.v2.model.DeleteSessionOptions; import com.ibm.watson.assistant.v2.model.DeleteUserDataOptions; import com.ibm.watson.assistant.v2.model.DeployReleaseOptions; +import com.ibm.watson.assistant.v2.model.DownloadReleaseExportOptions; import com.ibm.watson.assistant.v2.model.Environment; import com.ibm.watson.assistant.v2.model.EnvironmentCollection; import com.ibm.watson.assistant.v2.model.EnvironmentSkill; import com.ibm.watson.assistant.v2.model.ExportSkillsOptions; import com.ibm.watson.assistant.v2.model.GetEnvironmentOptions; +import com.ibm.watson.assistant.v2.model.GetReleaseImportStatusOptions; import com.ibm.watson.assistant.v2.model.GetReleaseOptions; import com.ibm.watson.assistant.v2.model.GetSkillOptions; import com.ibm.watson.assistant.v2.model.ImportSkillsOptions; @@ -46,6 +53,7 @@ import com.ibm.watson.assistant.v2.model.ListAssistantsOptions; import com.ibm.watson.assistant.v2.model.ListEnvironmentsOptions; import com.ibm.watson.assistant.v2.model.ListLogsOptions; +import com.ibm.watson.assistant.v2.model.ListProvidersOptions; import com.ibm.watson.assistant.v2.model.ListReleasesOptions; import com.ibm.watson.assistant.v2.model.LogCollection; import com.ibm.watson.assistant.v2.model.MessageContext; @@ -61,6 +69,22 @@ import com.ibm.watson.assistant.v2.model.MessageInputOptionsSpelling; import com.ibm.watson.assistant.v2.model.MessageOptions; import com.ibm.watson.assistant.v2.model.MessageStatelessOptions; +import com.ibm.watson.assistant.v2.model.MessageStreamOptions; +import com.ibm.watson.assistant.v2.model.MessageStreamStatelessOptions; +import com.ibm.watson.assistant.v2.model.MonitorAssistantReleaseImportArtifactResponse; +import com.ibm.watson.assistant.v2.model.ProviderAuthenticationOAuth2; +import com.ibm.watson.assistant.v2.model.ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password; +import com.ibm.watson.assistant.v2.model.ProviderAuthenticationOAuth2PasswordUsername; +import com.ibm.watson.assistant.v2.model.ProviderAuthenticationTypeAndValue; +import com.ibm.watson.assistant.v2.model.ProviderCollection; +import com.ibm.watson.assistant.v2.model.ProviderPrivate; +import com.ibm.watson.assistant.v2.model.ProviderPrivateAuthenticationBearerFlow; +import com.ibm.watson.assistant.v2.model.ProviderResponse; +import com.ibm.watson.assistant.v2.model.ProviderSpecification; +import com.ibm.watson.assistant.v2.model.ProviderSpecificationComponents; +import com.ibm.watson.assistant.v2.model.ProviderSpecificationComponentsSecuritySchemes; +import com.ibm.watson.assistant.v2.model.ProviderSpecificationComponentsSecuritySchemesBasic; +import com.ibm.watson.assistant.v2.model.ProviderSpecificationServersItem; import com.ibm.watson.assistant.v2.model.Release; import com.ibm.watson.assistant.v2.model.ReleaseCollection; import com.ibm.watson.assistant.v2.model.RequestAnalytics; @@ -70,10 +94,16 @@ import com.ibm.watson.assistant.v2.model.RuntimeEntityRole; import com.ibm.watson.assistant.v2.model.RuntimeIntent; import com.ibm.watson.assistant.v2.model.SearchSettings; +import com.ibm.watson.assistant.v2.model.SearchSettingsClientSideSearch; +import com.ibm.watson.assistant.v2.model.SearchSettingsConversationalSearch; +import com.ibm.watson.assistant.v2.model.SearchSettingsConversationalSearchResponseLength; +import com.ibm.watson.assistant.v2.model.SearchSettingsConversationalSearchSearchConfidence; import com.ibm.watson.assistant.v2.model.SearchSettingsDiscovery; import com.ibm.watson.assistant.v2.model.SearchSettingsDiscoveryAuthentication; +import com.ibm.watson.assistant.v2.model.SearchSettingsElasticSearch; import com.ibm.watson.assistant.v2.model.SearchSettingsMessages; import com.ibm.watson.assistant.v2.model.SearchSettingsSchemaMapping; +import com.ibm.watson.assistant.v2.model.SearchSettingsServerSideSearch; import com.ibm.watson.assistant.v2.model.SessionResponse; import com.ibm.watson.assistant.v2.model.Skill; import com.ibm.watson.assistant.v2.model.SkillImport; @@ -88,6 +118,8 @@ import com.ibm.watson.assistant.v2.model.StatelessMessageInputOptions; import com.ibm.watson.assistant.v2.model.StatelessMessageResponse; import com.ibm.watson.assistant.v2.model.UpdateEnvironmentOptions; +import com.ibm.watson.assistant.v2.model.UpdateEnvironmentOrchestration; +import com.ibm.watson.assistant.v2.model.UpdateProviderOptions; import com.ibm.watson.assistant.v2.model.UpdateSkillOptions; import com.ibm.watson.assistant.v2.utils.TestUtilities; import java.io.IOException; @@ -127,6 +159,328 @@ public void testGetVersion() throws Throwable { assertEquals(assistantService.getVersion(), "testString"); } + // Test the createProvider operation with a valid options model parameter + @Test + public void testCreateProviderWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"provider_id\": \"providerId\", \"specification\": {\"servers\": [{\"url\": \"url\"}], \"components\": {\"securitySchemes\": {\"authentication_method\": \"basic\", \"basic\": {\"username\": {\"type\": \"value\", \"value\": \"value\"}}, \"oauth2\": {\"preferred_flow\": \"password\", \"flows\": {\"token_url\": \"tokenUrl\", \"refresh_url\": \"refreshUrl\", \"client_auth_type\": \"Body\", \"content_type\": \"contentType\", \"header_prefix\": \"headerPrefix\", \"username\": {\"type\": \"value\", \"value\": \"value\"}}}}}}}"; + String createProviderPath = "/v2/providers"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ProviderSpecificationServersItem model + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + + // Construct an instance of the ProviderAuthenticationTypeAndValue model + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + + // Construct an instance of the ProviderSpecificationComponentsSecuritySchemesBasic model + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + + // Construct an instance of the ProviderAuthenticationOAuth2PasswordUsername model + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + + // Construct an instance of the + // ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password model + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + + // Construct an instance of the ProviderAuthenticationOAuth2 model + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + + // Construct an instance of the ProviderSpecificationComponentsSecuritySchemes model + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + + // Construct an instance of the ProviderSpecificationComponents model + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + + // Construct an instance of the ProviderSpecification model + ProviderSpecification providerSpecificationModel = + new ProviderSpecification.Builder() + .servers(java.util.Arrays.asList(providerSpecificationServersItemModel)) + .components(providerSpecificationComponentsModel) + .build(); + + // Construct an instance of the ProviderPrivateAuthenticationBearerFlow model + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + + // Construct an instance of the ProviderPrivate model + ProviderPrivate providerPrivateModel = + new ProviderPrivate.Builder().authentication(providerPrivateAuthenticationModel).build(); + + // Construct an instance of the CreateProviderOptions model + CreateProviderOptions createProviderOptionsModel = + new CreateProviderOptions.Builder() + .providerId("testString") + .specification(providerSpecificationModel) + .xPrivate(providerPrivateModel) + .build(); + + // Invoke createProvider() with a valid options model and verify the result + Response response = + assistantService.createProvider(createProviderOptionsModel).execute(); + assertNotNull(response); + ProviderResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createProviderPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the createProvider operation with and without retries enabled + @Test + public void testCreateProviderWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testCreateProviderWOptions(); + + assistantService.disableRetries(); + testCreateProviderWOptions(); + } + + // Test the createProvider operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateProviderNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.createProvider(null).execute(); + } + + // Test the listProviders operation with a valid options model parameter + @Test + public void testListProvidersWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"conversational_skill_providers\": [{\"provider_id\": \"providerId\", \"specification\": {\"servers\": [{\"url\": \"url\"}], \"components\": {\"securitySchemes\": {\"authentication_method\": \"basic\", \"basic\": {\"username\": {\"type\": \"value\", \"value\": \"value\"}}, \"oauth2\": {\"preferred_flow\": \"password\", \"flows\": {\"token_url\": \"tokenUrl\", \"refresh_url\": \"refreshUrl\", \"client_auth_type\": \"Body\", \"content_type\": \"contentType\", \"header_prefix\": \"headerPrefix\", \"username\": {\"type\": \"value\", \"value\": \"value\"}}}}}}}], \"pagination\": {\"refresh_url\": \"refreshUrl\", \"next_url\": \"nextUrl\", \"total\": 5, \"matched\": 7, \"refresh_cursor\": \"refreshCursor\", \"next_cursor\": \"nextCursor\"}}"; + String listProvidersPath = "/v2/providers"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListProvidersOptions model + ListProvidersOptions listProvidersOptionsModel = + new ListProvidersOptions.Builder() + .pageLimit(Long.valueOf("100")) + .includeCount(false) + .sort("name") + .cursor("testString") + .includeAudit(false) + .build(); + + // Invoke listProviders() with a valid options model and verify the result + Response response = + assistantService.listProviders(listProvidersOptionsModel).execute(); + assertNotNull(response); + ProviderCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listProvidersPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Long.valueOf(query.get("page_limit")), Long.valueOf("100")); + assertEquals(Boolean.valueOf(query.get("include_count")), Boolean.valueOf(false)); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("cursor"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the listProviders operation with and without retries enabled + @Test + public void testListProvidersWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testListProvidersWOptions(); + + assistantService.disableRetries(); + testListProvidersWOptions(); + } + + // Test the updateProvider operation with a valid options model parameter + @Test + public void testUpdateProviderWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"provider_id\": \"providerId\", \"specification\": {\"servers\": [{\"url\": \"url\"}], \"components\": {\"securitySchemes\": {\"authentication_method\": \"basic\", \"basic\": {\"username\": {\"type\": \"value\", \"value\": \"value\"}}, \"oauth2\": {\"preferred_flow\": \"password\", \"flows\": {\"token_url\": \"tokenUrl\", \"refresh_url\": \"refreshUrl\", \"client_auth_type\": \"Body\", \"content_type\": \"contentType\", \"header_prefix\": \"headerPrefix\", \"username\": {\"type\": \"value\", \"value\": \"value\"}}}}}}}"; + String updateProviderPath = "/v2/providers/testString"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ProviderSpecificationServersItem model + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + + // Construct an instance of the ProviderAuthenticationTypeAndValue model + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + + // Construct an instance of the ProviderSpecificationComponentsSecuritySchemesBasic model + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + + // Construct an instance of the ProviderAuthenticationOAuth2PasswordUsername model + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + + // Construct an instance of the + // ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password model + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + + // Construct an instance of the ProviderAuthenticationOAuth2 model + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + + // Construct an instance of the ProviderSpecificationComponentsSecuritySchemes model + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + + // Construct an instance of the ProviderSpecificationComponents model + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + + // Construct an instance of the ProviderSpecification model + ProviderSpecification providerSpecificationModel = + new ProviderSpecification.Builder() + .servers(java.util.Arrays.asList(providerSpecificationServersItemModel)) + .components(providerSpecificationComponentsModel) + .build(); + + // Construct an instance of the ProviderPrivateAuthenticationBearerFlow model + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + + // Construct an instance of the ProviderPrivate model + ProviderPrivate providerPrivateModel = + new ProviderPrivate.Builder().authentication(providerPrivateAuthenticationModel).build(); + + // Construct an instance of the UpdateProviderOptions model + UpdateProviderOptions updateProviderOptionsModel = + new UpdateProviderOptions.Builder() + .providerId("testString") + .specification(providerSpecificationModel) + .xPrivate(providerPrivateModel) + .build(); + + // Invoke updateProvider() with a valid options model and verify the result + Response response = + assistantService.updateProvider(updateProviderOptionsModel).execute(); + assertNotNull(response); + ProviderResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateProviderPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the updateProvider operation with and without retries enabled + @Test + public void testUpdateProviderWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testUpdateProviderWOptions(); + + assistantService.disableRetries(); + testUpdateProviderWOptions(); + } + + // Test the updateProvider operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateProviderNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.updateProvider(null).execute(); + } + // Test the createAssistant operation with a valid options model parameter @Test public void testCreateAssistantWOptions() throws Throwable { @@ -584,6 +938,7 @@ public void testMessageWOptions() throws Throwable { MessageOptions messageOptionsModel = new MessageOptions.Builder() .assistantId("testString") + .environmentId("testString") .sessionId("testString") .input(messageInputModel) .context(messageContextModel) @@ -799,32 +1154,490 @@ public void testMessageStatelessWOptions() throws Throwable { StatelessMessageContextSkills statelessMessageContextSkillsModel = new StatelessMessageContextSkills.Builder() .mainSkill(messageContextDialogSkillModel) - .actionsSkill(statelessMessageContextSkillsActionsSkillModel) + .actionsSkill(statelessMessageContextSkillsActionsSkillModel) + .build(); + + // Construct an instance of the StatelessMessageContext model + StatelessMessageContext statelessMessageContextModel = + new StatelessMessageContext.Builder() + .global(statelessMessageContextGlobalModel) + .skills(statelessMessageContextSkillsModel) + .integrations(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + + // Construct an instance of the MessageStatelessOptions model + MessageStatelessOptions messageStatelessOptionsModel = + new MessageStatelessOptions.Builder() + .assistantId("testString") + .environmentId("testString") + .input(statelessMessageInputModel) + .context(statelessMessageContextModel) + .userId("testString") + .build(); + + // Invoke messageStateless() with a valid options model and verify the result + Response response = + assistantService.messageStateless(messageStatelessOptionsModel).execute(); + assertNotNull(response); + StatelessMessageResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, messageStatelessPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the messageStateless operation with and without retries enabled + @Test + public void testMessageStatelessWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testMessageStatelessWOptions(); + + assistantService.disableRetries(); + testMessageStatelessWOptions(); + } + + // Test the messageStateless operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMessageStatelessNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.messageStateless(null).execute(); + } + + // Test the messageStream operation with a valid options model parameter + @Test + public void testMessageStreamWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "This is a mock binary response."; + String messageStreamPath = + "/v2/assistants/testString/environments/testString/sessions/testString/message_stream"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "text/event-stream") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the RuntimeIntent model + RuntimeIntent runtimeIntentModel = + new RuntimeIntent.Builder() + .intent("testString") + .confidence(Double.valueOf("72.5")) + .skill("testString") + .build(); + + // Construct an instance of the CaptureGroup model + CaptureGroup captureGroupModel = + new CaptureGroup.Builder() + .group("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .build(); + + // Construct an instance of the RuntimeEntityInterpretation model + RuntimeEntityInterpretation runtimeEntityInterpretationModel = + new RuntimeEntityInterpretation.Builder() + .calendarType("testString") + .datetimeLink("testString") + .festival("testString") + .granularity("day") + .rangeLink("testString") + .rangeModifier("testString") + .relativeDay(Double.valueOf("72.5")) + .relativeMonth(Double.valueOf("72.5")) + .relativeWeek(Double.valueOf("72.5")) + .relativeWeekend(Double.valueOf("72.5")) + .relativeYear(Double.valueOf("72.5")) + .specificDay(Double.valueOf("72.5")) + .specificDayOfWeek("testString") + .specificMonth(Double.valueOf("72.5")) + .specificQuarter(Double.valueOf("72.5")) + .specificYear(Double.valueOf("72.5")) + .numericValue(Double.valueOf("72.5")) + .subtype("testString") + .partOfDay("testString") + .relativeHour(Double.valueOf("72.5")) + .relativeMinute(Double.valueOf("72.5")) + .relativeSecond(Double.valueOf("72.5")) + .specificHour(Double.valueOf("72.5")) + .specificMinute(Double.valueOf("72.5")) + .specificSecond(Double.valueOf("72.5")) + .timezone("testString") + .build(); + + // Construct an instance of the RuntimeEntityAlternative model + RuntimeEntityAlternative runtimeEntityAlternativeModel = + new RuntimeEntityAlternative.Builder() + .value("testString") + .confidence(Double.valueOf("72.5")) + .build(); + + // Construct an instance of the RuntimeEntityRole model + RuntimeEntityRole runtimeEntityRoleModel = + new RuntimeEntityRole.Builder().type("date_from").build(); + + // Construct an instance of the RuntimeEntity model + RuntimeEntity runtimeEntityModel = + new RuntimeEntity.Builder() + .entity("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .value("testString") + .confidence(Double.valueOf("72.5")) + .groups(java.util.Arrays.asList(captureGroupModel)) + .interpretation(runtimeEntityInterpretationModel) + .alternatives(java.util.Arrays.asList(runtimeEntityAlternativeModel)) + .role(runtimeEntityRoleModel) + .skill("testString") + .build(); + + // Construct an instance of the MessageInputAttachment model + MessageInputAttachment messageInputAttachmentModel = + new MessageInputAttachment.Builder().url("testString").mediaType("testString").build(); + + // Construct an instance of the RequestAnalytics model + RequestAnalytics requestAnalyticsModel = + new RequestAnalytics.Builder() + .browser("testString") + .device("testString") + .pageUrl("testString") + .build(); + + // Construct an instance of the MessageInputOptionsSpelling model + MessageInputOptionsSpelling messageInputOptionsSpellingModel = + new MessageInputOptionsSpelling.Builder().suggestions(true).autoCorrect(true).build(); + + // Construct an instance of the MessageInputOptions model + MessageInputOptions messageInputOptionsModel = + new MessageInputOptions.Builder() + .restart(false) + .alternateIntents(false) + .asyncCallout(false) + .spelling(messageInputOptionsSpellingModel) + .debug(false) + .returnContext(false) + .export(false) + .build(); + + // Construct an instance of the MessageInput model + MessageInput messageInputModel = + new MessageInput.Builder() + .messageType("text") + .text("testString") + .intents(java.util.Arrays.asList(runtimeIntentModel)) + .entities(java.util.Arrays.asList(runtimeEntityModel)) + .suggestionId("testString") + .attachments(java.util.Arrays.asList(messageInputAttachmentModel)) + .analytics(requestAnalyticsModel) + .options(messageInputOptionsModel) + .build(); + + // Construct an instance of the MessageContextGlobalSystem model + MessageContextGlobalSystem messageContextGlobalSystemModel = + new MessageContextGlobalSystem.Builder() + .timezone("testString") + .userId("testString") + .turnCount(Long.valueOf("26")) + .locale("en-us") + .referenceTime("testString") + .sessionStartTime("testString") + .state("testString") + .skipUserInput(true) + .build(); + + // Construct an instance of the MessageContextGlobal model + MessageContextGlobal messageContextGlobalModel = + new MessageContextGlobal.Builder().system(messageContextGlobalSystemModel).build(); + + // Construct an instance of the MessageContextSkillSystem model + MessageContextSkillSystem messageContextSkillSystemModel = + new MessageContextSkillSystem.Builder() + .state("testString") + .add("foo", "testString") + .build(); + + // Construct an instance of the MessageContextDialogSkill model + MessageContextDialogSkill messageContextDialogSkillModel = + new MessageContextDialogSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .build(); + + // Construct an instance of the MessageContextActionSkill model + MessageContextActionSkill messageContextActionSkillModel = + new MessageContextActionSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .actionVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .skillVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + + // Construct an instance of the MessageContextSkills model + MessageContextSkills messageContextSkillsModel = + new MessageContextSkills.Builder() + .mainSkill(messageContextDialogSkillModel) + .actionsSkill(messageContextActionSkillModel) + .build(); + + // Construct an instance of the MessageContext model + MessageContext messageContextModel = + new MessageContext.Builder() + .global(messageContextGlobalModel) + .skills(messageContextSkillsModel) + .integrations(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + + // Construct an instance of the MessageStreamOptions model + MessageStreamOptions messageStreamOptionsModel = + new MessageStreamOptions.Builder() + .assistantId("testString") + .environmentId("testString") + .sessionId("testString") + .input(messageInputModel) + .context(messageContextModel) + .userId("testString") + .build(); + + // Invoke messageStream() with a valid options model and verify the result + Response response = + assistantService.messageStream(messageStreamOptionsModel).execute(); + assertNotNull(response); + try (InputStream responseObj = response.getResult(); ) { + assertNotNull(responseObj); + } + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, messageStreamPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + } + + // Test the messageStream operation with and without retries enabled + @Test + public void testMessageStreamWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testMessageStreamWOptions(); + + assistantService.disableRetries(); + testMessageStreamWOptions(); + } + + // Test the messageStream operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMessageStreamNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.messageStream(null).execute(); + } + + // Test the messageStreamStateless operation with a valid options model parameter + @Test + public void testMessageStreamStatelessWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "This is a mock binary response."; + String messageStreamStatelessPath = + "/v2/assistants/testString/environments/testString/message_stream"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "text/event-stream") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the RuntimeIntent model + RuntimeIntent runtimeIntentModel = + new RuntimeIntent.Builder() + .intent("testString") + .confidence(Double.valueOf("72.5")) + .skill("testString") + .build(); + + // Construct an instance of the CaptureGroup model + CaptureGroup captureGroupModel = + new CaptureGroup.Builder() + .group("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .build(); + + // Construct an instance of the RuntimeEntityInterpretation model + RuntimeEntityInterpretation runtimeEntityInterpretationModel = + new RuntimeEntityInterpretation.Builder() + .calendarType("testString") + .datetimeLink("testString") + .festival("testString") + .granularity("day") + .rangeLink("testString") + .rangeModifier("testString") + .relativeDay(Double.valueOf("72.5")) + .relativeMonth(Double.valueOf("72.5")) + .relativeWeek(Double.valueOf("72.5")) + .relativeWeekend(Double.valueOf("72.5")) + .relativeYear(Double.valueOf("72.5")) + .specificDay(Double.valueOf("72.5")) + .specificDayOfWeek("testString") + .specificMonth(Double.valueOf("72.5")) + .specificQuarter(Double.valueOf("72.5")) + .specificYear(Double.valueOf("72.5")) + .numericValue(Double.valueOf("72.5")) + .subtype("testString") + .partOfDay("testString") + .relativeHour(Double.valueOf("72.5")) + .relativeMinute(Double.valueOf("72.5")) + .relativeSecond(Double.valueOf("72.5")) + .specificHour(Double.valueOf("72.5")) + .specificMinute(Double.valueOf("72.5")) + .specificSecond(Double.valueOf("72.5")) + .timezone("testString") + .build(); + + // Construct an instance of the RuntimeEntityAlternative model + RuntimeEntityAlternative runtimeEntityAlternativeModel = + new RuntimeEntityAlternative.Builder() + .value("testString") + .confidence(Double.valueOf("72.5")) + .build(); + + // Construct an instance of the RuntimeEntityRole model + RuntimeEntityRole runtimeEntityRoleModel = + new RuntimeEntityRole.Builder().type("date_from").build(); + + // Construct an instance of the RuntimeEntity model + RuntimeEntity runtimeEntityModel = + new RuntimeEntity.Builder() + .entity("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .value("testString") + .confidence(Double.valueOf("72.5")) + .groups(java.util.Arrays.asList(captureGroupModel)) + .interpretation(runtimeEntityInterpretationModel) + .alternatives(java.util.Arrays.asList(runtimeEntityAlternativeModel)) + .role(runtimeEntityRoleModel) + .skill("testString") + .build(); + + // Construct an instance of the MessageInputAttachment model + MessageInputAttachment messageInputAttachmentModel = + new MessageInputAttachment.Builder().url("testString").mediaType("testString").build(); + + // Construct an instance of the RequestAnalytics model + RequestAnalytics requestAnalyticsModel = + new RequestAnalytics.Builder() + .browser("testString") + .device("testString") + .pageUrl("testString") + .build(); + + // Construct an instance of the MessageInputOptionsSpelling model + MessageInputOptionsSpelling messageInputOptionsSpellingModel = + new MessageInputOptionsSpelling.Builder().suggestions(true).autoCorrect(true).build(); + + // Construct an instance of the MessageInputOptions model + MessageInputOptions messageInputOptionsModel = + new MessageInputOptions.Builder() + .restart(false) + .alternateIntents(false) + .asyncCallout(false) + .spelling(messageInputOptionsSpellingModel) + .debug(false) + .returnContext(false) + .export(false) + .build(); + + // Construct an instance of the MessageInput model + MessageInput messageInputModel = + new MessageInput.Builder() + .messageType("text") + .text("testString") + .intents(java.util.Arrays.asList(runtimeIntentModel)) + .entities(java.util.Arrays.asList(runtimeEntityModel)) + .suggestionId("testString") + .attachments(java.util.Arrays.asList(messageInputAttachmentModel)) + .analytics(requestAnalyticsModel) + .options(messageInputOptionsModel) + .build(); + + // Construct an instance of the MessageContextGlobalSystem model + MessageContextGlobalSystem messageContextGlobalSystemModel = + new MessageContextGlobalSystem.Builder() + .timezone("testString") + .userId("testString") + .turnCount(Long.valueOf("26")) + .locale("en-us") + .referenceTime("testString") + .sessionStartTime("testString") + .state("testString") + .skipUserInput(true) + .build(); + + // Construct an instance of the MessageContextGlobal model + MessageContextGlobal messageContextGlobalModel = + new MessageContextGlobal.Builder().system(messageContextGlobalSystemModel).build(); + + // Construct an instance of the MessageContextSkillSystem model + MessageContextSkillSystem messageContextSkillSystemModel = + new MessageContextSkillSystem.Builder() + .state("testString") + .add("foo", "testString") + .build(); + + // Construct an instance of the MessageContextDialogSkill model + MessageContextDialogSkill messageContextDialogSkillModel = + new MessageContextDialogSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .build(); + + // Construct an instance of the MessageContextActionSkill model + MessageContextActionSkill messageContextActionSkillModel = + new MessageContextActionSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .actionVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .skillVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + + // Construct an instance of the MessageContextSkills model + MessageContextSkills messageContextSkillsModel = + new MessageContextSkills.Builder() + .mainSkill(messageContextDialogSkillModel) + .actionsSkill(messageContextActionSkillModel) .build(); - // Construct an instance of the StatelessMessageContext model - StatelessMessageContext statelessMessageContextModel = - new StatelessMessageContext.Builder() - .global(statelessMessageContextGlobalModel) - .skills(statelessMessageContextSkillsModel) + // Construct an instance of the MessageContext model + MessageContext messageContextModel = + new MessageContext.Builder() + .global(messageContextGlobalModel) + .skills(messageContextSkillsModel) .integrations(java.util.Collections.singletonMap("anyKey", "anyValue")) .build(); - // Construct an instance of the MessageStatelessOptions model - MessageStatelessOptions messageStatelessOptionsModel = - new MessageStatelessOptions.Builder() + // Construct an instance of the MessageStreamStatelessOptions model + MessageStreamStatelessOptions messageStreamStatelessOptionsModel = + new MessageStreamStatelessOptions.Builder() .assistantId("testString") - .input(statelessMessageInputModel) - .context(statelessMessageContextModel) + .environmentId("testString") + .input(messageInputModel) + .context(messageContextModel) .userId("testString") .build(); - // Invoke messageStateless() with a valid options model and verify the result - Response response = - assistantService.messageStateless(messageStatelessOptionsModel).execute(); + // Invoke messageStreamStateless() with a valid options model and verify the result + Response response = + assistantService.messageStreamStateless(messageStreamStatelessOptionsModel).execute(); assertNotNull(response); - StatelessMessageResponse responseObj = response.getResult(); - assertNotNull(responseObj); + try (InputStream responseObj = response.getResult(); ) { + assertNotNull(responseObj); + } // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -832,28 +1645,28 @@ public void testMessageStatelessWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, messageStatelessPath); + assertEquals(parsedPath, messageStreamStatelessPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); assertEquals(query.get("version"), "testString"); } - // Test the messageStateless operation with and without retries enabled + // Test the messageStreamStateless operation with and without retries enabled @Test - public void testMessageStatelessWRetries() throws Throwable { + public void testMessageStreamStatelessWRetries() throws Throwable { assistantService.enableRetries(4, 30); - testMessageStatelessWOptions(); + testMessageStreamStatelessWOptions(); assistantService.disableRetries(); - testMessageStatelessWOptions(); + testMessageStreamStatelessWOptions(); } - // Test the messageStateless operation with a null options model (negative test) + // Test the messageStreamStateless operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testMessageStatelessNoOptions() throws Throwable { + public void testMessageStreamStatelessNoOptions() throws Throwable { server.enqueue(new MockResponse()); - assistantService.messageStateless(null).execute(); + assistantService.messageStreamStateless(null).execute(); } // Test the bulkClassify operation with a valid options model parameter @@ -1167,9 +1980,9 @@ public void testUpdateEnvironmentWOptions() throws Throwable { .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the BaseEnvironmentOrchestration model - BaseEnvironmentOrchestration baseEnvironmentOrchestrationModel = - new BaseEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); + // Construct an instance of the UpdateEnvironmentOrchestration model + UpdateEnvironmentOrchestration updateEnvironmentOrchestrationModel = + new UpdateEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); // Construct an instance of the EnvironmentSkill model EnvironmentSkill environmentSkillModel = @@ -1188,7 +2001,7 @@ public void testUpdateEnvironmentWOptions() throws Throwable { .environmentId("testString") .name("testString") .description("testString") - .orchestration(baseEnvironmentOrchestrationModel) + .orchestration(updateEnvironmentOrchestrationModel) .sessionTimeout(Long.valueOf("10")) .skillReferences(java.util.Arrays.asList(environmentSkillModel)) .build(); @@ -1519,12 +2332,307 @@ public void testDeployReleaseNoOptions() throws Throwable { assistantService.deployRelease(null).execute(); } + // Test the createReleaseExport operation with a valid options model parameter + @Test + public void testCreateReleaseExportWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"status\": \"Available\", \"task_id\": \"taskId\", \"assistant_id\": \"assistantId\", \"release\": \"release\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\"}"; + String createReleaseExportPath = "/v2/assistants/testString/releases/testString/export"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the CreateReleaseExportOptions model + CreateReleaseExportOptions createReleaseExportOptionsModel = + new CreateReleaseExportOptions.Builder() + .assistantId("testString") + .release("testString") + .includeAudit(false) + .build(); + + // Invoke createReleaseExport() with a valid options model and verify the result + Response response = + assistantService.createReleaseExport(createReleaseExportOptionsModel).execute(); + assertNotNull(response); + CreateReleaseExportWithStatusErrors responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createReleaseExportPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the createReleaseExport operation with and without retries enabled + @Test + public void testCreateReleaseExportWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testCreateReleaseExportWOptions(); + + assistantService.disableRetries(); + testCreateReleaseExportWOptions(); + } + + // Test the createReleaseExport operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateReleaseExportNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.createReleaseExport(null).execute(); + } + + // Test the downloadReleaseExport operation with a valid options model parameter + @Test + public void testDownloadReleaseExportWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"status\": \"Available\", \"task_id\": \"taskId\", \"assistant_id\": \"assistantId\", \"release\": \"release\", \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\"}"; + String downloadReleaseExportPath = "/v2/assistants/testString/releases/testString/export"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the DownloadReleaseExportOptions model + DownloadReleaseExportOptions downloadReleaseExportOptionsModel = + new DownloadReleaseExportOptions.Builder() + .assistantId("testString") + .release("testString") + .includeAudit(false) + .build(); + + // Invoke downloadReleaseExport() with a valid options model and verify the result + Response response = + assistantService.downloadReleaseExport(downloadReleaseExportOptionsModel).execute(); + assertNotNull(response); + CreateReleaseExportWithStatusErrors responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, downloadReleaseExportPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the downloadReleaseExport operation with and without retries enabled + @Test + public void testDownloadReleaseExportWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testDownloadReleaseExportWOptions(); + + assistantService.disableRetries(); + testDownloadReleaseExportWOptions(); + } + + // Test the downloadReleaseExport operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDownloadReleaseExportNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.downloadReleaseExport(null).execute(); + } + + // Test the downloadReleaseExportAsStream operation with a valid options model parameter + @Test + public void testDownloadReleaseExportAsStreamWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "This is a mock binary response."; + String downloadReleaseExportAsStreamPath = + "/v2/assistants/testString/releases/testString/export"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/octet-stream") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the DownloadReleaseExportOptions model + DownloadReleaseExportOptions downloadReleaseExportOptionsModel = + new DownloadReleaseExportOptions.Builder() + .assistantId("testString") + .release("testString") + .includeAudit(false) + .build(); + + // Invoke downloadReleaseExportAsStream() with a valid options model and verify the result + Response response = + assistantService.downloadReleaseExportAsStream(downloadReleaseExportOptionsModel).execute(); + assertNotNull(response); + try (InputStream responseObj = response.getResult(); ) { + assertNotNull(responseObj); + } + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, downloadReleaseExportAsStreamPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the downloadReleaseExportAsStream operation with and without retries enabled + @Test + public void testDownloadReleaseExportAsStreamWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testDownloadReleaseExportAsStreamWOptions(); + + assistantService.disableRetries(); + testDownloadReleaseExportAsStreamWOptions(); + } + + // Test the downloadReleaseExportAsStream operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDownloadReleaseExportAsStreamNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.downloadReleaseExportAsStream(null).execute(); + } + + // Test the createReleaseImport operation with a valid options model parameter + @Test + public void testCreateReleaseImportWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"status\": \"Failed\", \"task_id\": \"taskId\", \"assistant_id\": \"assistantId\", \"skill_impact_in_draft\": [\"action\"], \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\"}"; + String createReleaseImportPath = "/v2/assistants/testString/import"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(202) + .setBody(mockResponseBody)); + + // Construct an instance of the CreateReleaseImportOptions model + CreateReleaseImportOptions createReleaseImportOptionsModel = + new CreateReleaseImportOptions.Builder() + .assistantId("testString") + .body(TestUtilities.createMockStream("This is a mock file.")) + .includeAudit(false) + .build(); + + // Invoke createReleaseImport() with a valid options model and verify the result + Response response = + assistantService.createReleaseImport(createReleaseImportOptionsModel).execute(); + assertNotNull(response); + CreateAssistantReleaseImportResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createReleaseImportPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the createReleaseImport operation with and without retries enabled + @Test + public void testCreateReleaseImportWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testCreateReleaseImportWOptions(); + + assistantService.disableRetries(); + testCreateReleaseImportWOptions(); + } + + // Test the createReleaseImport operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateReleaseImportNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.createReleaseImport(null).execute(); + } + + // Test the getReleaseImportStatus operation with a valid options model parameter + @Test + public void testGetReleaseImportStatusWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = + "{\"status\": \"Completed\", \"task_id\": \"taskId\", \"assistant_id\": \"assistantId\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"skill_impact_in_draft\": [\"action\"], \"created\": \"2019-01-01T12:00:00.000Z\", \"updated\": \"2019-01-01T12:00:00.000Z\"}"; + String getReleaseImportStatusPath = "/v2/assistants/testString/import"; + server.enqueue( + new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetReleaseImportStatusOptions model + GetReleaseImportStatusOptions getReleaseImportStatusOptionsModel = + new GetReleaseImportStatusOptions.Builder() + .assistantId("testString") + .includeAudit(false) + .build(); + + // Invoke getReleaseImportStatus() with a valid options model and verify the result + Response response = + assistantService.getReleaseImportStatus(getReleaseImportStatusOptionsModel).execute(); + assertNotNull(response); + MonitorAssistantReleaseImportArtifactResponse responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getReleaseImportStatusPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "testString"); + assertEquals(Boolean.valueOf(query.get("include_audit")), Boolean.valueOf(false)); + } + + // Test the getReleaseImportStatus operation with and without retries enabled + @Test + public void testGetReleaseImportStatusWRetries() throws Throwable { + assistantService.enableRetries(4, 30); + testGetReleaseImportStatusWOptions(); + + assistantService.disableRetries(); + testGetReleaseImportStatusWOptions(); + } + + // Test the getReleaseImportStatus operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetReleaseImportStatusNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + assistantService.getReleaseImportStatus(null).execute(); + } + // Test the getSkill operation with a valid options model parameter @Test public void testGetSkillWOptions() throws Throwable { // Register a mock response String mockResponseBody = - "{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}"; + "{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}, \"elastic_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"index\": \"index\", \"filter\": [\"anyValue\"], \"query_body\": {\"anyKey\": \"anyValue\"}, \"managed_index\": \"managedIndex\", \"apikey\": \"apikey\"}, \"conversational_search\": {\"enabled\": true, \"response_length\": {\"option\": \"moderate\"}, \"search_confidence\": {\"threshold\": \"less_often\"}}, \"server_side_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"apikey\": \"apikey\", \"no_auth\": true, \"auth_type\": \"basic\"}, \"client_side_search\": {\"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}"; String getSkillPath = "/v2/assistants/testString/skills/testString"; server.enqueue( new MockResponse() @@ -1577,7 +2685,7 @@ public void testGetSkillNoOptions() throws Throwable { public void testUpdateSkillWOptions() throws Throwable { // Register a mock response String mockResponseBody = - "{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}"; + "{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}, \"elastic_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"index\": \"index\", \"filter\": [\"anyValue\"], \"query_body\": {\"anyKey\": \"anyValue\"}, \"managed_index\": \"managedIndex\", \"apikey\": \"apikey\"}, \"conversational_search\": {\"enabled\": true, \"response_length\": {\"option\": \"moderate\"}, \"search_confidence\": {\"threshold\": \"less_often\"}}, \"server_side_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"apikey\": \"apikey\", \"no_auth\": true, \"auth_type\": \"basic\"}, \"client_side_search\": {\"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}"; String updateSkillPath = "/v2/assistants/testString/skills/testString"; server.enqueue( new MockResponse() @@ -1622,12 +2730,73 @@ public void testUpdateSkillWOptions() throws Throwable { .title("testString") .build(); + // Construct an instance of the SearchSettingsElasticSearch model + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearchResponseLength model + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearchSearchConfidence model + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearch model + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + + // Construct an instance of the SearchSettingsServerSideSearch model + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + + // Construct an instance of the SearchSettingsClientSideSearch model + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + // Construct an instance of the SearchSettings model SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); // Construct an instance of the UpdateSkillOptions model @@ -1683,7 +2852,7 @@ public void testUpdateSkillNoOptions() throws Throwable { public void testExportSkillsWOptions() throws Throwable { // Register a mock response String mockResponseBody = - "{\"assistant_skills\": [{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}], \"assistant_state\": {\"action_disabled\": true, \"dialog_disabled\": true}}"; + "{\"assistant_skills\": [{\"name\": \"name\", \"description\": \"description\", \"workspace\": {\"anyKey\": \"anyValue\"}, \"skill_id\": \"skillId\", \"status\": \"Available\", \"status_errors\": [{\"message\": \"message\"}], \"status_description\": \"statusDescription\", \"dialog_settings\": {\"anyKey\": \"anyValue\"}, \"assistant_id\": \"assistantId\", \"workspace_id\": \"workspaceId\", \"environment_id\": \"environmentId\", \"valid\": false, \"next_snapshot_version\": \"nextSnapshotVersion\", \"search_settings\": {\"discovery\": {\"instance_id\": \"instanceId\", \"project_id\": \"projectId\", \"url\": \"url\", \"max_primary_results\": 10000, \"max_total_results\": 10000, \"confidence_threshold\": 0.0, \"highlight\": false, \"find_answers\": false, \"authentication\": {\"basic\": \"basic\", \"bearer\": \"bearer\"}}, \"messages\": {\"success\": \"success\", \"error\": \"error\", \"no_result\": \"noResult\"}, \"schema_mapping\": {\"url\": \"url\", \"body\": \"body\", \"title\": \"title\"}, \"elastic_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"index\": \"index\", \"filter\": [\"anyValue\"], \"query_body\": {\"anyKey\": \"anyValue\"}, \"managed_index\": \"managedIndex\", \"apikey\": \"apikey\"}, \"conversational_search\": {\"enabled\": true, \"response_length\": {\"option\": \"moderate\"}, \"search_confidence\": {\"threshold\": \"less_often\"}}, \"server_side_search\": {\"url\": \"url\", \"port\": \"port\", \"username\": \"username\", \"password\": \"password\", \"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}, \"apikey\": \"apikey\", \"no_auth\": true, \"auth_type\": \"basic\"}, \"client_side_search\": {\"filter\": \"filter\", \"metadata\": {\"anyKey\": \"anyValue\"}}}, \"warnings\": [{\"code\": \"code\", \"path\": \"path\", \"message\": \"message\"}], \"language\": \"language\", \"type\": \"action\"}], \"assistant_state\": {\"action_disabled\": true, \"dialog_disabled\": true}}"; String exportSkillsPath = "/v2/assistants/testString/skills_export"; server.enqueue( new MockResponse() @@ -1783,12 +2952,73 @@ public void testImportSkillsWOptions() throws Throwable { .title("testString") .build(); + // Construct an instance of the SearchSettingsElasticSearch model + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearchResponseLength model + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearchSearchConfidence model + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + + // Construct an instance of the SearchSettingsConversationalSearch model + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + + // Construct an instance of the SearchSettingsServerSideSearch model + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + + // Construct an instance of the SearchSettingsClientSideSearch model + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + // Construct an instance of the SearchSettings model SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); // Construct an instance of the SkillImport model diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java index c8616a8484..1a22f5c674 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,14 +31,7 @@ public class BaseEnvironmentOrchestrationTest { @Test public void testBaseEnvironmentOrchestration() throws Throwable { BaseEnvironmentOrchestration baseEnvironmentOrchestrationModel = - new BaseEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); - assertEquals(baseEnvironmentOrchestrationModel.searchSkillFallback(), Boolean.valueOf(true)); - - String json = TestUtilities.serialize(baseEnvironmentOrchestrationModel); - - BaseEnvironmentOrchestration baseEnvironmentOrchestrationModelNew = - TestUtilities.deserialize(json, BaseEnvironmentOrchestration.class); - assertTrue(baseEnvironmentOrchestrationModelNew instanceof BaseEnvironmentOrchestration); - assertEquals(baseEnvironmentOrchestrationModelNew.searchSkillFallback(), Boolean.valueOf(true)); + new BaseEnvironmentOrchestration(); + assertNull(baseEnvironmentOrchestrationModel.isSearchSkillFallback()); } } diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java index 62c0be7abb..d78b6a7272 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,14 +31,7 @@ public class BaseEnvironmentReleaseReferenceTest { @Test public void testBaseEnvironmentReleaseReference() throws Throwable { BaseEnvironmentReleaseReference baseEnvironmentReleaseReferenceModel = - new BaseEnvironmentReleaseReference.Builder().release("testString").build(); - assertEquals(baseEnvironmentReleaseReferenceModel.release(), "testString"); - - String json = TestUtilities.serialize(baseEnvironmentReleaseReferenceModel); - - BaseEnvironmentReleaseReference baseEnvironmentReleaseReferenceModelNew = - TestUtilities.deserialize(json, BaseEnvironmentReleaseReference.class); - assertTrue(baseEnvironmentReleaseReferenceModelNew instanceof BaseEnvironmentReleaseReference); - assertEquals(baseEnvironmentReleaseReferenceModelNew.release(), "testString"); + new BaseEnvironmentReleaseReference(); + assertNull(baseEnvironmentReleaseReferenceModel.getRelease()); } } diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CompleteItemTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CompleteItemTest.java new file mode 100644 index 0000000000..54c64f22e8 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CompleteItemTest.java @@ -0,0 +1,59 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the CompleteItem model. */ +public class CompleteItemTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCompleteItem() throws Throwable { + CompleteItem completeItemModel = new CompleteItem(); + assertNull(completeItemModel.responseType()); + assertNull(completeItemModel.text()); + assertNull(completeItemModel.channels()); + assertNull(completeItemModel.time()); + assertNull(completeItemModel.typing()); + assertNull(completeItemModel.source()); + assertNull(completeItemModel.title()); + assertNull(completeItemModel.description()); + assertNull(completeItemModel.altText()); + assertNull(completeItemModel.preference()); + assertNull(completeItemModel.options()); + assertNull(completeItemModel.messageToHumanAgent()); + assertNull(completeItemModel.agentAvailable()); + assertNull(completeItemModel.agentUnavailable()); + assertNull(completeItemModel.topic()); + assertNull(completeItemModel.suggestions()); + assertNull(completeItemModel.messageToUser()); + assertNull(completeItemModel.header()); + assertNull(completeItemModel.primaryResults()); + assertNull(completeItemModel.additionalResults()); + assertNull(completeItemModel.userDefined()); + assertNull(completeItemModel.channelOptions()); + assertNull(completeItemModel.imageUrl()); + assertNull(completeItemModel.getStreamingMetadata()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponseTest.java new file mode 100644 index 0000000000..692a000677 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateAssistantReleaseImportResponseTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the CreateAssistantReleaseImportResponse model. */ +public class CreateAssistantReleaseImportResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateAssistantReleaseImportResponse() throws Throwable { + CreateAssistantReleaseImportResponse createAssistantReleaseImportResponseModel = + new CreateAssistantReleaseImportResponse(); + assertNull(createAssistantReleaseImportResponseModel.getSkillImpactInDraft()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateProviderOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateProviderOptionsTest.java new file mode 100644 index 0000000000..0f5361001e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateProviderOptionsTest.java @@ -0,0 +1,146 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the CreateProviderOptions model. */ +public class CreateProviderOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateProviderOptions() throws Throwable { + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + assertEquals(providerSpecificationServersItemModel.url(), "testString"); + + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.basic(), + providerSpecificationComponentsSecuritySchemesBasicModel); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.oauth2(), + providerAuthenticationOAuth2Model); + + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + assertEquals( + providerSpecificationComponentsModel.securitySchemes(), + providerSpecificationComponentsSecuritySchemesModel); + + ProviderSpecification providerSpecificationModel = + new ProviderSpecification.Builder() + .servers(java.util.Arrays.asList(providerSpecificationServersItemModel)) + .components(providerSpecificationComponentsModel) + .build(); + assertEquals( + providerSpecificationModel.servers(), + java.util.Arrays.asList(providerSpecificationServersItemModel)); + assertEquals(providerSpecificationModel.components(), providerSpecificationComponentsModel); + + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerPrivateAuthenticationModel.token(), providerAuthenticationTypeAndValueModel); + + ProviderPrivate providerPrivateModel = + new ProviderPrivate.Builder().authentication(providerPrivateAuthenticationModel).build(); + assertEquals(providerPrivateModel.authentication(), providerPrivateAuthenticationModel); + + CreateProviderOptions createProviderOptionsModel = + new CreateProviderOptions.Builder() + .providerId("testString") + .specification(providerSpecificationModel) + .xPrivate(providerPrivateModel) + .build(); + assertEquals(createProviderOptionsModel.providerId(), "testString"); + assertEquals(createProviderOptionsModel.specification(), providerSpecificationModel); + assertEquals(createProviderOptionsModel.xPrivate(), providerPrivateModel); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateProviderOptionsError() throws Throwable { + new CreateProviderOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptionsTest.java new file mode 100644 index 0000000000..7c999e079a --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportOptionsTest.java @@ -0,0 +1,48 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the CreateReleaseExportOptions model. */ +public class CreateReleaseExportOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateReleaseExportOptions() throws Throwable { + CreateReleaseExportOptions createReleaseExportOptionsModel = + new CreateReleaseExportOptions.Builder() + .assistantId("testString") + .release("testString") + .includeAudit(false) + .build(); + assertEquals(createReleaseExportOptionsModel.assistantId(), "testString"); + assertEquals(createReleaseExportOptionsModel.release(), "testString"); + assertEquals(createReleaseExportOptionsModel.includeAudit(), Boolean.valueOf(false)); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateReleaseExportOptionsError() throws Throwable { + new CreateReleaseExportOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrorsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrorsTest.java new file mode 100644 index 0000000000..c92d47417f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseExportWithStatusErrorsTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the CreateReleaseExportWithStatusErrors model. */ +public class CreateReleaseExportWithStatusErrorsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateReleaseExportWithStatusErrors() throws Throwable { + CreateReleaseExportWithStatusErrors createReleaseExportWithStatusErrorsModel = + new CreateReleaseExportWithStatusErrors(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptionsTest.java new file mode 100644 index 0000000000..0af03867ff --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/CreateReleaseImportOptionsTest.java @@ -0,0 +1,51 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.apache.commons.io.IOUtils; +import org.testng.annotations.Test; + +/** Unit test class for the CreateReleaseImportOptions model. */ +public class CreateReleaseImportOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateReleaseImportOptions() throws Throwable { + CreateReleaseImportOptions createReleaseImportOptionsModel = + new CreateReleaseImportOptions.Builder() + .assistantId("testString") + .body(TestUtilities.createMockStream("This is a mock file.")) + .includeAudit(false) + .build(); + assertEquals(createReleaseImportOptionsModel.assistantId(), "testString"); + assertEquals( + IOUtils.toString(createReleaseImportOptionsModel.body()), + IOUtils.toString(TestUtilities.createMockStream("This is a mock file."))); + assertEquals(createReleaseImportOptionsModel.includeAudit(), Boolean.valueOf(false)); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateReleaseImportOptionsError() throws Throwable { + new CreateReleaseImportOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptionsTest.java new file mode 100644 index 0000000000..2cfaf56597 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/DownloadReleaseExportOptionsTest.java @@ -0,0 +1,48 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the DownloadReleaseExportOptions model. */ +public class DownloadReleaseExportOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testDownloadReleaseExportOptions() throws Throwable { + DownloadReleaseExportOptions downloadReleaseExportOptionsModel = + new DownloadReleaseExportOptions.Builder() + .assistantId("testString") + .release("testString") + .includeAudit(false) + .build(); + assertEquals(downloadReleaseExportOptionsModel.assistantId(), "testString"); + assertEquals(downloadReleaseExportOptionsModel.release(), "testString"); + assertEquals(downloadReleaseExportOptionsModel.includeAudit(), Boolean.valueOf(false)); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDownloadReleaseExportOptionsError() throws Throwable { + new DownloadReleaseExportOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseOutputTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseOutputTest.java new file mode 100644 index 0000000000..3ee5e6f0ff --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseOutputTest.java @@ -0,0 +1,43 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the FinalResponseOutput model. */ +public class FinalResponseOutputTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testFinalResponseOutput() throws Throwable { + FinalResponseOutput finalResponseOutputModel = new FinalResponseOutput(); + assertNull(finalResponseOutputModel.getGeneric()); + assertNull(finalResponseOutputModel.getIntents()); + assertNull(finalResponseOutputModel.getEntities()); + assertNull(finalResponseOutputModel.getActions()); + assertNull(finalResponseOutputModel.getDebug()); + assertNull(finalResponseOutputModel.getUserDefined()); + assertNull(finalResponseOutputModel.getSpelling()); + assertNull(finalResponseOutputModel.getStreamingMetadata()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseTest.java new file mode 100644 index 0000000000..25a7caaa20 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/FinalResponseTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the FinalResponse model. */ +public class FinalResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testFinalResponse() throws Throwable { + FinalResponse finalResponseModel = new FinalResponse(); + assertNull(finalResponseModel.getOutput()); + assertNull(finalResponseModel.getContext()); + assertNull(finalResponseModel.getUserId()); + assertNull(finalResponseModel.getMaskedOutput()); + assertNull(finalResponseModel.getMaskedInput()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptionsTest.java new file mode 100644 index 0000000000..12c843ba57 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GetReleaseImportStatusOptionsTest.java @@ -0,0 +1,46 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the GetReleaseImportStatusOptions model. */ +public class GetReleaseImportStatusOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGetReleaseImportStatusOptions() throws Throwable { + GetReleaseImportStatusOptions getReleaseImportStatusOptionsModel = + new GetReleaseImportStatusOptions.Builder() + .assistantId("testString") + .includeAudit(false) + .build(); + assertEquals(getReleaseImportStatusOptionsModel.assistantId(), "testString"); + assertEquals(getReleaseImportStatusOptionsModel.includeAudit(), Boolean.valueOf(false)); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetReleaseImportStatusOptionsError() throws Throwable { + new GetReleaseImportStatusOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java index 97e7ad2953..d5e3f2aa3b 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -81,15 +81,110 @@ public void testImportSkillsOptions() throws Throwable { assertEquals(searchSettingsSchemaMappingModel.body(), "testString"); assertEquals(searchSettingsSchemaMappingModel.title(), "testString"); + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + assertEquals(searchSettingsElasticSearchModel.url(), "testString"); + assertEquals(searchSettingsElasticSearchModel.port(), "testString"); + assertEquals(searchSettingsElasticSearchModel.username(), "testString"); + assertEquals(searchSettingsElasticSearchModel.password(), "testString"); + assertEquals(searchSettingsElasticSearchModel.index(), "testString"); + assertEquals(searchSettingsElasticSearchModel.filter(), java.util.Arrays.asList("testString")); + assertEquals( + searchSettingsElasticSearchModel.queryBody(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsElasticSearchModel.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModel.apikey(), "testString"); + + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + assertEquals(searchSettingsConversationalSearchModel.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModel.responseLength(), + searchSettingsConversationalSearchResponseLengthModel); + assertEquals( + searchSettingsConversationalSearchModel.searchConfidence(), + searchSettingsConversationalSearchSearchConfidenceModel); + + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + assertEquals(searchSettingsServerSideSearchModel.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsServerSideSearchModel.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModel.authType(), "basic"); + + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(searchSettingsClientSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); assertEquals(searchSettingsModel.discovery(), searchSettingsDiscoveryModel); assertEquals(searchSettingsModel.messages(), searchSettingsMessagesModel); assertEquals(searchSettingsModel.schemaMapping(), searchSettingsSchemaMappingModel); + assertEquals(searchSettingsModel.elasticSearch(), searchSettingsElasticSearchModel); + assertEquals( + searchSettingsModel.conversationalSearch(), searchSettingsConversationalSearchModel); + assertEquals(searchSettingsModel.serverSideSearch(), searchSettingsServerSideSearchModel); + assertEquals(searchSettingsModel.clientSideSearch(), searchSettingsClientSideSearchModel); SkillImport skillImportModel = new SkillImport.Builder() diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ListProvidersOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ListProvidersOptionsTest.java new file mode 100644 index 0000000000..80d68b4321 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ListProvidersOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ListProvidersOptions model. */ +public class ListProvidersOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListProvidersOptions() throws Throwable { + ListProvidersOptions listProvidersOptionsModel = + new ListProvidersOptions.Builder() + .pageLimit(Long.valueOf("100")) + .includeCount(false) + .sort("name") + .cursor("testString") + .includeAudit(false) + .build(); + assertEquals(listProvidersOptionsModel.pageLimit(), Long.valueOf("100")); + assertEquals(listProvidersOptionsModel.includeCount(), Boolean.valueOf(false)); + assertEquals(listProvidersOptionsModel.sort(), "name"); + assertEquals(listProvidersOptionsModel.cursor(), "testString"); + assertEquals(listProvidersOptionsModel.includeAudit(), Boolean.valueOf(false)); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java index 7ce5df01da..7094b8bef8 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -281,12 +281,14 @@ public void testMessageOptions() throws Throwable { MessageOptions messageOptionsModel = new MessageOptions.Builder() .assistantId("testString") + .environmentId("testString") .sessionId("testString") .input(messageInputModel) .context(messageContextModel) .userId("testString") .build(); assertEquals(messageOptionsModel.assistantId(), "testString"); + assertEquals(messageOptionsModel.environmentId(), "testString"); assertEquals(messageOptionsModel.sessionId(), "testString"); assertEquals(messageOptionsModel.input(), messageInputModel); assertEquals(messageOptionsModel.context(), messageContextModel); diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java index e4ddeb449a..9940451858 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -294,11 +294,13 @@ public void testMessageStatelessOptions() throws Throwable { MessageStatelessOptions messageStatelessOptionsModel = new MessageStatelessOptions.Builder() .assistantId("testString") + .environmentId("testString") .input(statelessMessageInputModel) .context(statelessMessageContextModel) .userId("testString") .build(); assertEquals(messageStatelessOptionsModel.assistantId(), "testString"); + assertEquals(messageStatelessOptionsModel.environmentId(), "testString"); assertEquals(messageStatelessOptionsModel.input(), statelessMessageInputModel); assertEquals(messageStatelessOptionsModel.context(), statelessMessageContextModel); assertEquals(messageStatelessOptionsModel.userId(), "testString"); diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadataTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadataTest.java new file mode 100644 index 0000000000..56506432e9 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamMetadataTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageStreamMetadata model. */ +public class MessageStreamMetadataTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageStreamMetadata() throws Throwable { + MessageStreamMetadata messageStreamMetadataModel = new MessageStreamMetadata(); + assertNull(messageStreamMetadataModel.getStreamingMetadata()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamOptionsTest.java new file mode 100644 index 0000000000..73eaf1cf4f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamOptionsTest.java @@ -0,0 +1,302 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageStreamOptions model. */ +public class MessageStreamOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageStreamOptions() throws Throwable { + RuntimeIntent runtimeIntentModel = + new RuntimeIntent.Builder() + .intent("testString") + .confidence(Double.valueOf("72.5")) + .skill("testString") + .build(); + assertEquals(runtimeIntentModel.intent(), "testString"); + assertEquals(runtimeIntentModel.confidence(), Double.valueOf("72.5")); + assertEquals(runtimeIntentModel.skill(), "testString"); + + CaptureGroup captureGroupModel = + new CaptureGroup.Builder() + .group("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .build(); + assertEquals(captureGroupModel.group(), "testString"); + assertEquals(captureGroupModel.location(), java.util.Arrays.asList(Long.valueOf("26"))); + + RuntimeEntityInterpretation runtimeEntityInterpretationModel = + new RuntimeEntityInterpretation.Builder() + .calendarType("testString") + .datetimeLink("testString") + .festival("testString") + .granularity("day") + .rangeLink("testString") + .rangeModifier("testString") + .relativeDay(Double.valueOf("72.5")) + .relativeMonth(Double.valueOf("72.5")) + .relativeWeek(Double.valueOf("72.5")) + .relativeWeekend(Double.valueOf("72.5")) + .relativeYear(Double.valueOf("72.5")) + .specificDay(Double.valueOf("72.5")) + .specificDayOfWeek("testString") + .specificMonth(Double.valueOf("72.5")) + .specificQuarter(Double.valueOf("72.5")) + .specificYear(Double.valueOf("72.5")) + .numericValue(Double.valueOf("72.5")) + .subtype("testString") + .partOfDay("testString") + .relativeHour(Double.valueOf("72.5")) + .relativeMinute(Double.valueOf("72.5")) + .relativeSecond(Double.valueOf("72.5")) + .specificHour(Double.valueOf("72.5")) + .specificMinute(Double.valueOf("72.5")) + .specificSecond(Double.valueOf("72.5")) + .timezone("testString") + .build(); + assertEquals(runtimeEntityInterpretationModel.calendarType(), "testString"); + assertEquals(runtimeEntityInterpretationModel.datetimeLink(), "testString"); + assertEquals(runtimeEntityInterpretationModel.festival(), "testString"); + assertEquals(runtimeEntityInterpretationModel.granularity(), "day"); + assertEquals(runtimeEntityInterpretationModel.rangeLink(), "testString"); + assertEquals(runtimeEntityInterpretationModel.rangeModifier(), "testString"); + assertEquals(runtimeEntityInterpretationModel.relativeDay(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeMonth(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeWeek(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeWeekend(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeYear(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificDay(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificDayOfWeek(), "testString"); + assertEquals(runtimeEntityInterpretationModel.specificMonth(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificQuarter(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificYear(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.numericValue(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.subtype(), "testString"); + assertEquals(runtimeEntityInterpretationModel.partOfDay(), "testString"); + assertEquals(runtimeEntityInterpretationModel.relativeHour(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeMinute(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeSecond(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificHour(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificMinute(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificSecond(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.timezone(), "testString"); + + RuntimeEntityAlternative runtimeEntityAlternativeModel = + new RuntimeEntityAlternative.Builder() + .value("testString") + .confidence(Double.valueOf("72.5")) + .build(); + assertEquals(runtimeEntityAlternativeModel.value(), "testString"); + assertEquals(runtimeEntityAlternativeModel.confidence(), Double.valueOf("72.5")); + + RuntimeEntityRole runtimeEntityRoleModel = + new RuntimeEntityRole.Builder().type("date_from").build(); + assertEquals(runtimeEntityRoleModel.type(), "date_from"); + + RuntimeEntity runtimeEntityModel = + new RuntimeEntity.Builder() + .entity("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .value("testString") + .confidence(Double.valueOf("72.5")) + .groups(java.util.Arrays.asList(captureGroupModel)) + .interpretation(runtimeEntityInterpretationModel) + .alternatives(java.util.Arrays.asList(runtimeEntityAlternativeModel)) + .role(runtimeEntityRoleModel) + .skill("testString") + .build(); + assertEquals(runtimeEntityModel.entity(), "testString"); + assertEquals(runtimeEntityModel.location(), java.util.Arrays.asList(Long.valueOf("26"))); + assertEquals(runtimeEntityModel.value(), "testString"); + assertEquals(runtimeEntityModel.confidence(), Double.valueOf("72.5")); + assertEquals(runtimeEntityModel.groups(), java.util.Arrays.asList(captureGroupModel)); + assertEquals(runtimeEntityModel.interpretation(), runtimeEntityInterpretationModel); + assertEquals( + runtimeEntityModel.alternatives(), java.util.Arrays.asList(runtimeEntityAlternativeModel)); + assertEquals(runtimeEntityModel.role(), runtimeEntityRoleModel); + assertEquals(runtimeEntityModel.skill(), "testString"); + + MessageInputAttachment messageInputAttachmentModel = + new MessageInputAttachment.Builder().url("testString").mediaType("testString").build(); + assertEquals(messageInputAttachmentModel.url(), "testString"); + assertEquals(messageInputAttachmentModel.mediaType(), "testString"); + + RequestAnalytics requestAnalyticsModel = + new RequestAnalytics.Builder() + .browser("testString") + .device("testString") + .pageUrl("testString") + .build(); + assertEquals(requestAnalyticsModel.browser(), "testString"); + assertEquals(requestAnalyticsModel.device(), "testString"); + assertEquals(requestAnalyticsModel.pageUrl(), "testString"); + + MessageInputOptionsSpelling messageInputOptionsSpellingModel = + new MessageInputOptionsSpelling.Builder().suggestions(true).autoCorrect(true).build(); + assertEquals(messageInputOptionsSpellingModel.suggestions(), Boolean.valueOf(true)); + assertEquals(messageInputOptionsSpellingModel.autoCorrect(), Boolean.valueOf(true)); + + MessageInputOptions messageInputOptionsModel = + new MessageInputOptions.Builder() + .restart(false) + .alternateIntents(false) + .asyncCallout(false) + .spelling(messageInputOptionsSpellingModel) + .debug(false) + .returnContext(false) + .export(false) + .build(); + assertEquals(messageInputOptionsModel.restart(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.alternateIntents(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.asyncCallout(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.spelling(), messageInputOptionsSpellingModel); + assertEquals(messageInputOptionsModel.debug(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.returnContext(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.export(), Boolean.valueOf(false)); + + MessageInput messageInputModel = + new MessageInput.Builder() + .messageType("text") + .text("testString") + .intents(java.util.Arrays.asList(runtimeIntentModel)) + .entities(java.util.Arrays.asList(runtimeEntityModel)) + .suggestionId("testString") + .attachments(java.util.Arrays.asList(messageInputAttachmentModel)) + .analytics(requestAnalyticsModel) + .options(messageInputOptionsModel) + .build(); + assertEquals(messageInputModel.messageType(), "text"); + assertEquals(messageInputModel.text(), "testString"); + assertEquals(messageInputModel.intents(), java.util.Arrays.asList(runtimeIntentModel)); + assertEquals(messageInputModel.entities(), java.util.Arrays.asList(runtimeEntityModel)); + assertEquals(messageInputModel.suggestionId(), "testString"); + assertEquals( + messageInputModel.attachments(), java.util.Arrays.asList(messageInputAttachmentModel)); + assertEquals(messageInputModel.analytics(), requestAnalyticsModel); + assertEquals(messageInputModel.options(), messageInputOptionsModel); + + MessageContextGlobalSystem messageContextGlobalSystemModel = + new MessageContextGlobalSystem.Builder() + .timezone("testString") + .userId("testString") + .turnCount(Long.valueOf("26")) + .locale("en-us") + .referenceTime("testString") + .sessionStartTime("testString") + .state("testString") + .skipUserInput(true) + .build(); + assertEquals(messageContextGlobalSystemModel.timezone(), "testString"); + assertEquals(messageContextGlobalSystemModel.userId(), "testString"); + assertEquals(messageContextGlobalSystemModel.turnCount(), Long.valueOf("26")); + assertEquals(messageContextGlobalSystemModel.locale(), "en-us"); + assertEquals(messageContextGlobalSystemModel.referenceTime(), "testString"); + assertEquals(messageContextGlobalSystemModel.sessionStartTime(), "testString"); + assertEquals(messageContextGlobalSystemModel.state(), "testString"); + assertEquals(messageContextGlobalSystemModel.skipUserInput(), Boolean.valueOf(true)); + + MessageContextGlobal messageContextGlobalModel = + new MessageContextGlobal.Builder().system(messageContextGlobalSystemModel).build(); + assertEquals(messageContextGlobalModel.system(), messageContextGlobalSystemModel); + + MessageContextSkillSystem messageContextSkillSystemModel = + new MessageContextSkillSystem.Builder() + .state("testString") + .add("foo", "testString") + .build(); + assertEquals(messageContextSkillSystemModel.getState(), "testString"); + assertEquals(messageContextSkillSystemModel.get("foo"), "testString"); + + MessageContextDialogSkill messageContextDialogSkillModel = + new MessageContextDialogSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .build(); + assertEquals( + messageContextDialogSkillModel.userDefined(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(messageContextDialogSkillModel.system(), messageContextSkillSystemModel); + + MessageContextActionSkill messageContextActionSkillModel = + new MessageContextActionSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .actionVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .skillVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals( + messageContextActionSkillModel.userDefined(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(messageContextActionSkillModel.system(), messageContextSkillSystemModel); + assertEquals( + messageContextActionSkillModel.actionVariables(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals( + messageContextActionSkillModel.skillVariables(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + + MessageContextSkills messageContextSkillsModel = + new MessageContextSkills.Builder() + .mainSkill(messageContextDialogSkillModel) + .actionsSkill(messageContextActionSkillModel) + .build(); + assertEquals(messageContextSkillsModel.mainSkill(), messageContextDialogSkillModel); + assertEquals(messageContextSkillsModel.actionsSkill(), messageContextActionSkillModel); + + MessageContext messageContextModel = + new MessageContext.Builder() + .global(messageContextGlobalModel) + .skills(messageContextSkillsModel) + .integrations(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(messageContextModel.global(), messageContextGlobalModel); + assertEquals(messageContextModel.skills(), messageContextSkillsModel); + assertEquals( + messageContextModel.integrations(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + + MessageStreamOptions messageStreamOptionsModel = + new MessageStreamOptions.Builder() + .assistantId("testString") + .environmentId("testString") + .sessionId("testString") + .input(messageInputModel) + .context(messageContextModel) + .userId("testString") + .build(); + assertEquals(messageStreamOptionsModel.assistantId(), "testString"); + assertEquals(messageStreamOptionsModel.environmentId(), "testString"); + assertEquals(messageStreamOptionsModel.sessionId(), "testString"); + assertEquals(messageStreamOptionsModel.input(), messageInputModel); + assertEquals(messageStreamOptionsModel.context(), messageContextModel); + assertEquals(messageStreamOptionsModel.userId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMessageStreamOptionsError() throws Throwable { + new MessageStreamOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamResponseTest.java new file mode 100644 index 0000000000..82c6eb113c --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamResponseTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageStreamResponse model. */ +public class MessageStreamResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testMessageStreamResponse() throws Throwable { + MessageStreamResponse messageStreamResponseModel = new MessageStreamResponse(); + assertNotNull(messageStreamResponseModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptionsTest.java new file mode 100644 index 0000000000..da8efce94d --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStreamStatelessOptionsTest.java @@ -0,0 +1,300 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageStreamStatelessOptions model. */ +public class MessageStreamStatelessOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageStreamStatelessOptions() throws Throwable { + RuntimeIntent runtimeIntentModel = + new RuntimeIntent.Builder() + .intent("testString") + .confidence(Double.valueOf("72.5")) + .skill("testString") + .build(); + assertEquals(runtimeIntentModel.intent(), "testString"); + assertEquals(runtimeIntentModel.confidence(), Double.valueOf("72.5")); + assertEquals(runtimeIntentModel.skill(), "testString"); + + CaptureGroup captureGroupModel = + new CaptureGroup.Builder() + .group("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .build(); + assertEquals(captureGroupModel.group(), "testString"); + assertEquals(captureGroupModel.location(), java.util.Arrays.asList(Long.valueOf("26"))); + + RuntimeEntityInterpretation runtimeEntityInterpretationModel = + new RuntimeEntityInterpretation.Builder() + .calendarType("testString") + .datetimeLink("testString") + .festival("testString") + .granularity("day") + .rangeLink("testString") + .rangeModifier("testString") + .relativeDay(Double.valueOf("72.5")) + .relativeMonth(Double.valueOf("72.5")) + .relativeWeek(Double.valueOf("72.5")) + .relativeWeekend(Double.valueOf("72.5")) + .relativeYear(Double.valueOf("72.5")) + .specificDay(Double.valueOf("72.5")) + .specificDayOfWeek("testString") + .specificMonth(Double.valueOf("72.5")) + .specificQuarter(Double.valueOf("72.5")) + .specificYear(Double.valueOf("72.5")) + .numericValue(Double.valueOf("72.5")) + .subtype("testString") + .partOfDay("testString") + .relativeHour(Double.valueOf("72.5")) + .relativeMinute(Double.valueOf("72.5")) + .relativeSecond(Double.valueOf("72.5")) + .specificHour(Double.valueOf("72.5")) + .specificMinute(Double.valueOf("72.5")) + .specificSecond(Double.valueOf("72.5")) + .timezone("testString") + .build(); + assertEquals(runtimeEntityInterpretationModel.calendarType(), "testString"); + assertEquals(runtimeEntityInterpretationModel.datetimeLink(), "testString"); + assertEquals(runtimeEntityInterpretationModel.festival(), "testString"); + assertEquals(runtimeEntityInterpretationModel.granularity(), "day"); + assertEquals(runtimeEntityInterpretationModel.rangeLink(), "testString"); + assertEquals(runtimeEntityInterpretationModel.rangeModifier(), "testString"); + assertEquals(runtimeEntityInterpretationModel.relativeDay(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeMonth(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeWeek(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeWeekend(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeYear(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificDay(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificDayOfWeek(), "testString"); + assertEquals(runtimeEntityInterpretationModel.specificMonth(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificQuarter(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificYear(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.numericValue(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.subtype(), "testString"); + assertEquals(runtimeEntityInterpretationModel.partOfDay(), "testString"); + assertEquals(runtimeEntityInterpretationModel.relativeHour(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeMinute(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.relativeSecond(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificHour(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificMinute(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.specificSecond(), Double.valueOf("72.5")); + assertEquals(runtimeEntityInterpretationModel.timezone(), "testString"); + + RuntimeEntityAlternative runtimeEntityAlternativeModel = + new RuntimeEntityAlternative.Builder() + .value("testString") + .confidence(Double.valueOf("72.5")) + .build(); + assertEquals(runtimeEntityAlternativeModel.value(), "testString"); + assertEquals(runtimeEntityAlternativeModel.confidence(), Double.valueOf("72.5")); + + RuntimeEntityRole runtimeEntityRoleModel = + new RuntimeEntityRole.Builder().type("date_from").build(); + assertEquals(runtimeEntityRoleModel.type(), "date_from"); + + RuntimeEntity runtimeEntityModel = + new RuntimeEntity.Builder() + .entity("testString") + .location(java.util.Arrays.asList(Long.valueOf("26"))) + .value("testString") + .confidence(Double.valueOf("72.5")) + .groups(java.util.Arrays.asList(captureGroupModel)) + .interpretation(runtimeEntityInterpretationModel) + .alternatives(java.util.Arrays.asList(runtimeEntityAlternativeModel)) + .role(runtimeEntityRoleModel) + .skill("testString") + .build(); + assertEquals(runtimeEntityModel.entity(), "testString"); + assertEquals(runtimeEntityModel.location(), java.util.Arrays.asList(Long.valueOf("26"))); + assertEquals(runtimeEntityModel.value(), "testString"); + assertEquals(runtimeEntityModel.confidence(), Double.valueOf("72.5")); + assertEquals(runtimeEntityModel.groups(), java.util.Arrays.asList(captureGroupModel)); + assertEquals(runtimeEntityModel.interpretation(), runtimeEntityInterpretationModel); + assertEquals( + runtimeEntityModel.alternatives(), java.util.Arrays.asList(runtimeEntityAlternativeModel)); + assertEquals(runtimeEntityModel.role(), runtimeEntityRoleModel); + assertEquals(runtimeEntityModel.skill(), "testString"); + + MessageInputAttachment messageInputAttachmentModel = + new MessageInputAttachment.Builder().url("testString").mediaType("testString").build(); + assertEquals(messageInputAttachmentModel.url(), "testString"); + assertEquals(messageInputAttachmentModel.mediaType(), "testString"); + + RequestAnalytics requestAnalyticsModel = + new RequestAnalytics.Builder() + .browser("testString") + .device("testString") + .pageUrl("testString") + .build(); + assertEquals(requestAnalyticsModel.browser(), "testString"); + assertEquals(requestAnalyticsModel.device(), "testString"); + assertEquals(requestAnalyticsModel.pageUrl(), "testString"); + + MessageInputOptionsSpelling messageInputOptionsSpellingModel = + new MessageInputOptionsSpelling.Builder().suggestions(true).autoCorrect(true).build(); + assertEquals(messageInputOptionsSpellingModel.suggestions(), Boolean.valueOf(true)); + assertEquals(messageInputOptionsSpellingModel.autoCorrect(), Boolean.valueOf(true)); + + MessageInputOptions messageInputOptionsModel = + new MessageInputOptions.Builder() + .restart(false) + .alternateIntents(false) + .asyncCallout(false) + .spelling(messageInputOptionsSpellingModel) + .debug(false) + .returnContext(false) + .export(false) + .build(); + assertEquals(messageInputOptionsModel.restart(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.alternateIntents(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.asyncCallout(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.spelling(), messageInputOptionsSpellingModel); + assertEquals(messageInputOptionsModel.debug(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.returnContext(), Boolean.valueOf(false)); + assertEquals(messageInputOptionsModel.export(), Boolean.valueOf(false)); + + MessageInput messageInputModel = + new MessageInput.Builder() + .messageType("text") + .text("testString") + .intents(java.util.Arrays.asList(runtimeIntentModel)) + .entities(java.util.Arrays.asList(runtimeEntityModel)) + .suggestionId("testString") + .attachments(java.util.Arrays.asList(messageInputAttachmentModel)) + .analytics(requestAnalyticsModel) + .options(messageInputOptionsModel) + .build(); + assertEquals(messageInputModel.messageType(), "text"); + assertEquals(messageInputModel.text(), "testString"); + assertEquals(messageInputModel.intents(), java.util.Arrays.asList(runtimeIntentModel)); + assertEquals(messageInputModel.entities(), java.util.Arrays.asList(runtimeEntityModel)); + assertEquals(messageInputModel.suggestionId(), "testString"); + assertEquals( + messageInputModel.attachments(), java.util.Arrays.asList(messageInputAttachmentModel)); + assertEquals(messageInputModel.analytics(), requestAnalyticsModel); + assertEquals(messageInputModel.options(), messageInputOptionsModel); + + MessageContextGlobalSystem messageContextGlobalSystemModel = + new MessageContextGlobalSystem.Builder() + .timezone("testString") + .userId("testString") + .turnCount(Long.valueOf("26")) + .locale("en-us") + .referenceTime("testString") + .sessionStartTime("testString") + .state("testString") + .skipUserInput(true) + .build(); + assertEquals(messageContextGlobalSystemModel.timezone(), "testString"); + assertEquals(messageContextGlobalSystemModel.userId(), "testString"); + assertEquals(messageContextGlobalSystemModel.turnCount(), Long.valueOf("26")); + assertEquals(messageContextGlobalSystemModel.locale(), "en-us"); + assertEquals(messageContextGlobalSystemModel.referenceTime(), "testString"); + assertEquals(messageContextGlobalSystemModel.sessionStartTime(), "testString"); + assertEquals(messageContextGlobalSystemModel.state(), "testString"); + assertEquals(messageContextGlobalSystemModel.skipUserInput(), Boolean.valueOf(true)); + + MessageContextGlobal messageContextGlobalModel = + new MessageContextGlobal.Builder().system(messageContextGlobalSystemModel).build(); + assertEquals(messageContextGlobalModel.system(), messageContextGlobalSystemModel); + + MessageContextSkillSystem messageContextSkillSystemModel = + new MessageContextSkillSystem.Builder() + .state("testString") + .add("foo", "testString") + .build(); + assertEquals(messageContextSkillSystemModel.getState(), "testString"); + assertEquals(messageContextSkillSystemModel.get("foo"), "testString"); + + MessageContextDialogSkill messageContextDialogSkillModel = + new MessageContextDialogSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .build(); + assertEquals( + messageContextDialogSkillModel.userDefined(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(messageContextDialogSkillModel.system(), messageContextSkillSystemModel); + + MessageContextActionSkill messageContextActionSkillModel = + new MessageContextActionSkill.Builder() + .userDefined(java.util.Collections.singletonMap("anyKey", "anyValue")) + .system(messageContextSkillSystemModel) + .actionVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .skillVariables(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals( + messageContextActionSkillModel.userDefined(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(messageContextActionSkillModel.system(), messageContextSkillSystemModel); + assertEquals( + messageContextActionSkillModel.actionVariables(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals( + messageContextActionSkillModel.skillVariables(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + + MessageContextSkills messageContextSkillsModel = + new MessageContextSkills.Builder() + .mainSkill(messageContextDialogSkillModel) + .actionsSkill(messageContextActionSkillModel) + .build(); + assertEquals(messageContextSkillsModel.mainSkill(), messageContextDialogSkillModel); + assertEquals(messageContextSkillsModel.actionsSkill(), messageContextActionSkillModel); + + MessageContext messageContextModel = + new MessageContext.Builder() + .global(messageContextGlobalModel) + .skills(messageContextSkillsModel) + .integrations(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(messageContextModel.global(), messageContextGlobalModel); + assertEquals(messageContextModel.skills(), messageContextSkillsModel); + assertEquals( + messageContextModel.integrations(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + + MessageStreamStatelessOptions messageStreamStatelessOptionsModel = + new MessageStreamStatelessOptions.Builder() + .assistantId("testString") + .environmentId("testString") + .input(messageInputModel) + .context(messageContextModel) + .userId("testString") + .build(); + assertEquals(messageStreamStatelessOptionsModel.assistantId(), "testString"); + assertEquals(messageStreamStatelessOptionsModel.environmentId(), "testString"); + assertEquals(messageStreamStatelessOptionsModel.input(), messageInputModel); + assertEquals(messageStreamStatelessOptionsModel.context(), messageContextModel); + assertEquals(messageStreamStatelessOptionsModel.userId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMessageStreamStatelessOptionsError() throws Throwable { + new MessageStreamStatelessOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MetadataTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MetadataTest.java new file mode 100644 index 0000000000..ce7b2124f2 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MetadataTest.java @@ -0,0 +1,36 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the Metadata model. */ +public class MetadataTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMetadata() throws Throwable { + Metadata metadataModel = new Metadata(); + assertNull(metadataModel.getId()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponseTest.java new file mode 100644 index 0000000000..42e54e1148 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MonitorAssistantReleaseImportArtifactResponseTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MonitorAssistantReleaseImportArtifactResponse model. */ +public class MonitorAssistantReleaseImportArtifactResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMonitorAssistantReleaseImportArtifactResponse() throws Throwable { + MonitorAssistantReleaseImportArtifactResponse + monitorAssistantReleaseImportArtifactResponseModel = + new MonitorAssistantReleaseImportArtifactResponse(); + assertNull(monitorAssistantReleaseImportArtifactResponseModel.getSkillImpactInDraft()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/PartialItemTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/PartialItemTest.java new file mode 100644 index 0000000000..7cf518c58e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/PartialItemTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the PartialItem model. */ +public class PartialItemTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testPartialItem() throws Throwable { + PartialItem partialItemModel = new PartialItem(); + assertNull(partialItemModel.getResponseType()); + assertNull(partialItemModel.getText()); + assertNull(partialItemModel.getStreamingMetadata()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeTest.java new file mode 100644 index 0000000000..a63e14594e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeTest.java @@ -0,0 +1,121 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode model. + */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode() + throws Throwable { + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .authorizationUrl("testString") + .redirectUri("testString") + .build(); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .headerPrefix(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .authorizationUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel + .redirectUri(), + "testString"); + + String json = + TestUtilities.serialize( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModel); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew = + TestUtilities.deserialize( + json, + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode + .class); + assertTrue( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + instanceof + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .headerPrefix(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .authorizationUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCodeModelNew + .redirectUri(), + "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsTest.java new file mode 100644 index 0000000000..672b219b3d --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsTest.java @@ -0,0 +1,103 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials model. + */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials() + throws Throwable { + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + .Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .build(); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel + .tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel + .refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel + .clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel + .contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel + .headerPrefix(), + "testString"); + + String json = + TestUtilities.serialize( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModel); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew = + TestUtilities.deserialize( + json, + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials + .class); + assertTrue( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + instanceof + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + .tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + .refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + .clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + .contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentialsModelNew + .headerPrefix(), + "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java new file mode 100644 index 0000000000..4a09493b92 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java @@ -0,0 +1,117 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom + * model. + */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom() + throws Throwable { + ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2Parameter + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel = + new ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2Parameter + .Builder() + .type("value") + .value("testString") + .build(); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel + .type(), + "value"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel + .value(), + "testString"); + + ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParams + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel = + new ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParams.Builder() + .customOauth2Parameter( + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel) + .build(); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel.customOauth2Parameter(), + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel); + + ProviderAuthenticationOAuth2CustomCustomOauth2Property + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel = + new ProviderAuthenticationOAuth2CustomCustomOauth2Property.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .grantType("testString") + .params(providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel) + .build(); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.tokenUrl(), "testString"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.refreshUrl(), "testString"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.clientAuthType(), "Body"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.contentType(), "testString"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.grantType(), "testString"); + assertEquals( + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.params(), + providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.Builder() + .customOauth2Property(providerAuthenticationOAuth2CustomCustomOauth2PropertyModel) + .build(); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel + .customOauth2Property(), + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel); + + String json = + TestUtilities.serialize( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew = + TestUtilities.deserialize( + json, ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.class); + assertTrue( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew + instanceof ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew + .customOauth2Property() + .toString(), + providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordTest.java new file mode 100644 index 0000000000..c49d5fa6fe --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordTest.java @@ -0,0 +1,108 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + * model. + */ +public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password() + throws Throwable { + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.headerPrefix(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + String json = + TestUtilities.serialize( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModel); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew = + TestUtilities.deserialize( + json, ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.class); + assertTrue( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew + instanceof ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew.tokenUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew.refreshUrl(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew + .clientAuthType(), + "Body"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew.contentType(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew + .headerPrefix(), + "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2PasswordModelNew + .username() + .toString(), + providerAuthenticationOAuth2PasswordUsernameModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsTest.java new file mode 100644 index 0000000000..d9fe8a2979 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderAuthenticationOAuth2Flows model. */ +public class ProviderAuthenticationOAuth2FlowsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testProviderAuthenticationOAuth2Flows() throws Throwable { + ProviderAuthenticationOAuth2Flows providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2Flows(); + assertNotNull(providerAuthenticationOAuth2FlowsModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsernameTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsernameTest.java new file mode 100644 index 0000000000..81e55d7ac9 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2PasswordUsernameTest.java @@ -0,0 +1,52 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderAuthenticationOAuth2PasswordUsername model. */ +public class ProviderAuthenticationOAuth2PasswordUsernameTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2PasswordUsername() throws Throwable { + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + String json = TestUtilities.serialize(providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2PasswordUsername + providerAuthenticationOAuth2PasswordUsernameModelNew = + TestUtilities.deserialize(json, ProviderAuthenticationOAuth2PasswordUsername.class); + assertTrue( + providerAuthenticationOAuth2PasswordUsernameModelNew + instanceof ProviderAuthenticationOAuth2PasswordUsername); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModelNew.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModelNew.value(), "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Test.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Test.java new file mode 100644 index 0000000000..92ade353be --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2Test.java @@ -0,0 +1,78 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderAuthenticationOAuth2 model. */ +public class ProviderAuthenticationOAuth2Test { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationOAuth2() throws Throwable { + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + String json = TestUtilities.serialize(providerAuthenticationOAuth2Model); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2ModelNew = + TestUtilities.deserialize(json, ProviderAuthenticationOAuth2.class); + assertTrue(providerAuthenticationOAuth2ModelNew instanceof ProviderAuthenticationOAuth2); + assertEquals(providerAuthenticationOAuth2ModelNew.preferredFlow(), "password"); + assertEquals( + providerAuthenticationOAuth2ModelNew.flows().toString(), + providerAuthenticationOAuth2FlowsModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValueTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValueTest.java new file mode 100644 index 0000000000..2cc0fcea24 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationTypeAndValueTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderAuthenticationTypeAndValue model. */ +public class ProviderAuthenticationTypeAndValueTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderAuthenticationTypeAndValue() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + String json = TestUtilities.serialize(providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModelNew = + TestUtilities.deserialize(json, ProviderAuthenticationTypeAndValue.class); + assertTrue( + providerAuthenticationTypeAndValueModelNew instanceof ProviderAuthenticationTypeAndValue); + assertEquals(providerAuthenticationTypeAndValueModelNew.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModelNew.value(), "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderCollectionTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderCollectionTest.java new file mode 100644 index 0000000000..b8706260de --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderCollectionTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderCollection model. */ +public class ProviderCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderCollection() throws Throwable { + ProviderCollection providerCollectionModel = new ProviderCollection(); + assertNull(providerCollectionModel.getConversationalSkillProviders()); + assertNull(providerCollectionModel.getPagination()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlowTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlowTest.java new file mode 100644 index 0000000000..e7951c79a3 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBasicFlowTest.java @@ -0,0 +1,57 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthenticationBasicFlow model. */ +public class ProviderPrivateAuthenticationBasicFlowTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderPrivateAuthenticationBasicFlow() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderPrivateAuthenticationBasicFlow providerPrivateAuthenticationBasicFlowModel = + new ProviderPrivateAuthenticationBasicFlow.Builder() + .password(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerPrivateAuthenticationBasicFlowModel.password(), + providerAuthenticationTypeAndValueModel); + + String json = TestUtilities.serialize(providerPrivateAuthenticationBasicFlowModel); + + ProviderPrivateAuthenticationBasicFlow providerPrivateAuthenticationBasicFlowModelNew = + TestUtilities.deserialize(json, ProviderPrivateAuthenticationBasicFlow.class); + assertTrue( + providerPrivateAuthenticationBasicFlowModelNew + instanceof ProviderPrivateAuthenticationBasicFlow); + assertEquals( + providerPrivateAuthenticationBasicFlowModelNew.password().toString(), + providerAuthenticationTypeAndValueModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlowTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlowTest.java new file mode 100644 index 0000000000..92861f6be1 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationBearerFlowTest.java @@ -0,0 +1,57 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthenticationBearerFlow model. */ +public class ProviderPrivateAuthenticationBearerFlowTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderPrivateAuthenticationBearerFlow() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationBearerFlowModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerPrivateAuthenticationBearerFlowModel.token(), + providerAuthenticationTypeAndValueModel); + + String json = TestUtilities.serialize(providerPrivateAuthenticationBearerFlowModel); + + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationBearerFlowModelNew = + TestUtilities.deserialize(json, ProviderPrivateAuthenticationBearerFlow.class); + assertTrue( + providerPrivateAuthenticationBearerFlowModelNew + instanceof ProviderPrivateAuthenticationBearerFlow); + assertEquals( + providerPrivateAuthenticationBearerFlowModelNew.token().toString(), + providerAuthenticationTypeAndValueModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeTest.java new file mode 100644 index 0000000000..3f7fc71229 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeTest.java @@ -0,0 +1,106 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + * model. + */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void + testProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode() + throws Throwable { + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel = + new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .Builder() + .clientId("testString") + .clientSecret("testString") + .accessToken("testString") + .refreshToken("testString") + .authorizationCode("testString") + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel + .refreshToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel + .authorizationCode(), + "testString"); + + String json = + TestUtilities.serialize( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModel); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew = + TestUtilities.deserialize( + json, + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode + .class); + assertTrue( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + instanceof + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + .refreshToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCodeModelNew + .authorizationCode(), + "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsTest.java new file mode 100644 index 0000000000..783e4f8655 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsTest.java @@ -0,0 +1,97 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + * model. + */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void + testProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials() + throws Throwable { + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel = + new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .Builder() + .clientId("testString") + .clientSecret("testString") + .accessToken("testString") + .refreshToken("testString") + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel + .refreshToken(), + "testString"); + + String json = + TestUtilities.serialize( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModel); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew = + TestUtilities.deserialize( + json, + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials + .class); + assertTrue( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew + instanceof + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentialsModelNew + .refreshToken(), + "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java new file mode 100644 index 0000000000..3666a10b88 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java @@ -0,0 +1,116 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom model. + */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void + testProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom() + throws Throwable { + ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2Secret + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel = + new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2Secret + .Builder() + .type("value") + .value("testString") + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel + .type(), + "value"); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel + .value(), + "testString"); + + ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecrets + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel = + new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecrets.Builder() + .customOauth2Secret( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel) + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel + .customOauth2Secret(), + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel); + + ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel = + new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property.Builder() + .accessToken("testString") + .refreshToken("testString") + .customSecrets( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel) + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.refreshToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.customSecrets(), + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel = + new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + .Builder() + .customOauth2Property( + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel) + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel + .customOauth2Property(), + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel); + + String json = + TestUtilities.serialize( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew = + TestUtilities.deserialize( + json, + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom + .class); + assertTrue( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew + instanceof + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew + .customOauth2Property() + .toString(), + providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordTest.java new file mode 100644 index 0000000000..a3ad088b99 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordTest.java @@ -0,0 +1,115 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** + * Unit test class for the + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password model. + */ +public +class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void + testProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password() + throws Throwable { + ProviderPrivateAuthenticationOAuth2PasswordPassword + providerPrivateAuthenticationOAuth2PasswordPasswordModel = + new ProviderPrivateAuthenticationOAuth2PasswordPassword.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.type(), "value"); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.value(), "testString"); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel = + new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .Builder() + .clientId("testString") + .clientSecret("testString") + .accessToken("testString") + .refreshToken("testString") + .password(providerPrivateAuthenticationOAuth2PasswordPasswordModel) + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel + .refreshToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel + .password(), + providerPrivateAuthenticationOAuth2PasswordPasswordModel); + + String json = + TestUtilities.serialize( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModel); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew = + TestUtilities.deserialize( + json, + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .class); + assertTrue( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + instanceof + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + .clientId(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + .clientSecret(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + .accessToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + .refreshToken(), + "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2PasswordModelNew + .password() + .toString(), + providerPrivateAuthenticationOAuth2PasswordPasswordModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsTest.java new file mode 100644 index 0000000000..2e1eb99b3f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthenticationOAuth2FlowFlows model. */ +public class ProviderPrivateAuthenticationOAuth2FlowFlowsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testProviderPrivateAuthenticationOAuth2FlowFlows() throws Throwable { + ProviderPrivateAuthenticationOAuth2FlowFlows providerPrivateAuthenticationOAuth2FlowFlowsModel = + new ProviderPrivateAuthenticationOAuth2FlowFlows(); + assertNotNull(providerPrivateAuthenticationOAuth2FlowFlowsModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowTest.java new file mode 100644 index 0000000000..1d678e6da1 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowTest.java @@ -0,0 +1,79 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthenticationOAuth2Flow model. */ +public class ProviderPrivateAuthenticationOAuth2FlowTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderPrivateAuthenticationOAuth2Flow() throws Throwable { + ProviderPrivateAuthenticationOAuth2PasswordPassword + providerPrivateAuthenticationOAuth2PasswordPasswordModel = + new ProviderPrivateAuthenticationOAuth2PasswordPassword.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.type(), "value"); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.value(), "testString"); + + ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + providerPrivateAuthenticationOAuth2FlowFlowsModel = + new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password + .Builder() + .clientId("testString") + .clientSecret("testString") + .accessToken("testString") + .refreshToken("testString") + .password(providerPrivateAuthenticationOAuth2PasswordPasswordModel) + .build(); + assertEquals(providerPrivateAuthenticationOAuth2FlowFlowsModel.clientId(), "testString"); + assertEquals(providerPrivateAuthenticationOAuth2FlowFlowsModel.clientSecret(), "testString"); + assertEquals(providerPrivateAuthenticationOAuth2FlowFlowsModel.accessToken(), "testString"); + assertEquals(providerPrivateAuthenticationOAuth2FlowFlowsModel.refreshToken(), "testString"); + assertEquals( + providerPrivateAuthenticationOAuth2FlowFlowsModel.password(), + providerPrivateAuthenticationOAuth2PasswordPasswordModel); + + ProviderPrivateAuthenticationOAuth2Flow providerPrivateAuthenticationOAuth2FlowModel = + new ProviderPrivateAuthenticationOAuth2Flow.Builder() + .flows(providerPrivateAuthenticationOAuth2FlowFlowsModel) + .build(); + assertEquals( + providerPrivateAuthenticationOAuth2FlowModel.flows(), + providerPrivateAuthenticationOAuth2FlowFlowsModel); + + String json = TestUtilities.serialize(providerPrivateAuthenticationOAuth2FlowModel); + + ProviderPrivateAuthenticationOAuth2Flow providerPrivateAuthenticationOAuth2FlowModelNew = + TestUtilities.deserialize(json, ProviderPrivateAuthenticationOAuth2Flow.class); + assertTrue( + providerPrivateAuthenticationOAuth2FlowModelNew + instanceof ProviderPrivateAuthenticationOAuth2Flow); + assertEquals( + providerPrivateAuthenticationOAuth2FlowModelNew.flows().toString(), + providerPrivateAuthenticationOAuth2FlowFlowsModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPasswordTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPasswordTest.java new file mode 100644 index 0000000000..1a955309be --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2PasswordPasswordTest.java @@ -0,0 +1,54 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthenticationOAuth2PasswordPassword model. */ +public class ProviderPrivateAuthenticationOAuth2PasswordPasswordTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderPrivateAuthenticationOAuth2PasswordPassword() throws Throwable { + ProviderPrivateAuthenticationOAuth2PasswordPassword + providerPrivateAuthenticationOAuth2PasswordPasswordModel = + new ProviderPrivateAuthenticationOAuth2PasswordPassword.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.type(), "value"); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModel.value(), "testString"); + + String json = TestUtilities.serialize(providerPrivateAuthenticationOAuth2PasswordPasswordModel); + + ProviderPrivateAuthenticationOAuth2PasswordPassword + providerPrivateAuthenticationOAuth2PasswordPasswordModelNew = + TestUtilities.deserialize( + json, ProviderPrivateAuthenticationOAuth2PasswordPassword.class); + assertTrue( + providerPrivateAuthenticationOAuth2PasswordPasswordModelNew + instanceof ProviderPrivateAuthenticationOAuth2PasswordPassword); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModelNew.type(), "value"); + assertEquals(providerPrivateAuthenticationOAuth2PasswordPasswordModelNew.value(), "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationTest.java new file mode 100644 index 0000000000..1c3084e369 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivateAuthentication model. */ +public class ProviderPrivateAuthenticationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testProviderPrivateAuthentication() throws Throwable { + ProviderPrivateAuthentication providerPrivateAuthenticationModel = + new ProviderPrivateAuthentication(); + assertNotNull(providerPrivateAuthenticationModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateTest.java new file mode 100644 index 0000000000..08a874f888 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateTest.java @@ -0,0 +1,63 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderPrivate model. */ +public class ProviderPrivateTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderPrivate() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerPrivateAuthenticationModel.token(), providerAuthenticationTypeAndValueModel); + + ProviderPrivate providerPrivateModel = + new ProviderPrivate.Builder().authentication(providerPrivateAuthenticationModel).build(); + assertEquals(providerPrivateModel.authentication(), providerPrivateAuthenticationModel); + + String json = TestUtilities.serialize(providerPrivateModel); + + ProviderPrivate providerPrivateModelNew = + TestUtilities.deserialize(json, ProviderPrivate.class); + assertTrue(providerPrivateModelNew instanceof ProviderPrivate); + assertEquals( + providerPrivateModelNew.authentication().toString(), + providerPrivateAuthenticationModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testProviderPrivateError() throws Throwable { + new ProviderPrivate.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasicTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasicTest.java new file mode 100644 index 0000000000..a5a8acbe5e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesBasicTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponseSpecificationComponentsSecuritySchemesBasic model. */ +public class ProviderResponseSpecificationComponentsSecuritySchemesBasicTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponseSpecificationComponentsSecuritySchemesBasic() throws Throwable { + ProviderResponseSpecificationComponentsSecuritySchemesBasic + providerResponseSpecificationComponentsSecuritySchemesBasicModel = + new ProviderResponseSpecificationComponentsSecuritySchemesBasic(); + assertNull(providerResponseSpecificationComponentsSecuritySchemesBasicModel.getUsername()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesTest.java new file mode 100644 index 0000000000..c9ef14807e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsSecuritySchemesTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponseSpecificationComponentsSecuritySchemes model. */ +public class ProviderResponseSpecificationComponentsSecuritySchemesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponseSpecificationComponentsSecuritySchemes() throws Throwable { + ProviderResponseSpecificationComponentsSecuritySchemes + providerResponseSpecificationComponentsSecuritySchemesModel = + new ProviderResponseSpecificationComponentsSecuritySchemes(); + assertNull( + providerResponseSpecificationComponentsSecuritySchemesModel.getAuthenticationMethod()); + assertNull(providerResponseSpecificationComponentsSecuritySchemesModel.getBasic()); + assertNull(providerResponseSpecificationComponentsSecuritySchemesModel.getOauth2()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsTest.java new file mode 100644 index 0000000000..18c45260c8 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationComponentsTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponseSpecificationComponents model. */ +public class ProviderResponseSpecificationComponentsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponseSpecificationComponents() throws Throwable { + ProviderResponseSpecificationComponents providerResponseSpecificationComponentsModel = + new ProviderResponseSpecificationComponents(); + assertNull(providerResponseSpecificationComponentsModel.getSecuritySchemes()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItemTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItemTest.java new file mode 100644 index 0000000000..c790bd87e9 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationServersItemTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponseSpecificationServersItem model. */ +public class ProviderResponseSpecificationServersItemTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponseSpecificationServersItem() throws Throwable { + ProviderResponseSpecificationServersItem providerResponseSpecificationServersItemModel = + new ProviderResponseSpecificationServersItem(); + assertNull(providerResponseSpecificationServersItemModel.getUrl()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationTest.java new file mode 100644 index 0000000000..90f4f0b6e3 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseSpecificationTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponseSpecification model. */ +public class ProviderResponseSpecificationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponseSpecification() throws Throwable { + ProviderResponseSpecification providerResponseSpecificationModel = + new ProviderResponseSpecification(); + assertNull(providerResponseSpecificationModel.getServers()); + assertNull(providerResponseSpecificationModel.getComponents()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseTest.java new file mode 100644 index 0000000000..e3d04c50b3 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderResponseTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderResponse model. */ +public class ProviderResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderResponse() throws Throwable { + ProviderResponse providerResponseModel = new ProviderResponse(); + assertNull(providerResponseModel.getProviderId()); + assertNull(providerResponseModel.getSpecification()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasicTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasicTest.java new file mode 100644 index 0000000000..76af442b23 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesBasicTest.java @@ -0,0 +1,60 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderSpecificationComponentsSecuritySchemesBasic model. */ +public class ProviderSpecificationComponentsSecuritySchemesBasicTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderSpecificationComponentsSecuritySchemesBasic() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + String json = TestUtilities.serialize(providerSpecificationComponentsSecuritySchemesBasicModel); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModelNew = + TestUtilities.deserialize( + json, ProviderSpecificationComponentsSecuritySchemesBasic.class); + assertTrue( + providerSpecificationComponentsSecuritySchemesBasicModelNew + instanceof ProviderSpecificationComponentsSecuritySchemesBasic); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModelNew.username().toString(), + providerAuthenticationTypeAndValueModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesTest.java new file mode 100644 index 0000000000..66ec888230 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsSecuritySchemesTest.java @@ -0,0 +1,115 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderSpecificationComponentsSecuritySchemes model. */ +public class ProviderSpecificationComponentsSecuritySchemesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderSpecificationComponentsSecuritySchemes() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.basic(), + providerSpecificationComponentsSecuritySchemesBasicModel); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.oauth2(), + providerAuthenticationOAuth2Model); + + String json = TestUtilities.serialize(providerSpecificationComponentsSecuritySchemesModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModelNew = + TestUtilities.deserialize(json, ProviderSpecificationComponentsSecuritySchemes.class); + assertTrue( + providerSpecificationComponentsSecuritySchemesModelNew + instanceof ProviderSpecificationComponentsSecuritySchemes); + assertEquals( + providerSpecificationComponentsSecuritySchemesModelNew.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModelNew.basic().toString(), + providerSpecificationComponentsSecuritySchemesBasicModel.toString()); + assertEquals( + providerSpecificationComponentsSecuritySchemesModelNew.oauth2().toString(), + providerAuthenticationOAuth2Model.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsTest.java new file mode 100644 index 0000000000..9aee2603a0 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationComponentsTest.java @@ -0,0 +1,115 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderSpecificationComponents model. */ +public class ProviderSpecificationComponentsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderSpecificationComponents() throws Throwable { + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.basic(), + providerSpecificationComponentsSecuritySchemesBasicModel); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.oauth2(), + providerAuthenticationOAuth2Model); + + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + assertEquals( + providerSpecificationComponentsModel.securitySchemes(), + providerSpecificationComponentsSecuritySchemesModel); + + String json = TestUtilities.serialize(providerSpecificationComponentsModel); + + ProviderSpecificationComponents providerSpecificationComponentsModelNew = + TestUtilities.deserialize(json, ProviderSpecificationComponents.class); + assertTrue(providerSpecificationComponentsModelNew instanceof ProviderSpecificationComponents); + assertEquals( + providerSpecificationComponentsModelNew.securitySchemes().toString(), + providerSpecificationComponentsSecuritySchemesModel.toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItemTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItemTest.java new file mode 100644 index 0000000000..bd01d5005b --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationServersItemTest.java @@ -0,0 +1,45 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderSpecificationServersItem model. */ +public class ProviderSpecificationServersItemTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderSpecificationServersItem() throws Throwable { + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + assertEquals(providerSpecificationServersItemModel.url(), "testString"); + + String json = TestUtilities.serialize(providerSpecificationServersItemModel); + + ProviderSpecificationServersItem providerSpecificationServersItemModelNew = + TestUtilities.deserialize(json, ProviderSpecificationServersItem.class); + assertTrue( + providerSpecificationServersItemModelNew instanceof ProviderSpecificationServersItem); + assertEquals(providerSpecificationServersItemModelNew.url(), "testString"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationTest.java new file mode 100644 index 0000000000..7a44ab7440 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderSpecificationTest.java @@ -0,0 +1,134 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ProviderSpecification model. */ +public class ProviderSpecificationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testProviderSpecification() throws Throwable { + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + assertEquals(providerSpecificationServersItemModel.url(), "testString"); + + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.basic(), + providerSpecificationComponentsSecuritySchemesBasicModel); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.oauth2(), + providerAuthenticationOAuth2Model); + + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + assertEquals( + providerSpecificationComponentsModel.securitySchemes(), + providerSpecificationComponentsSecuritySchemesModel); + + ProviderSpecification providerSpecificationModel = + new ProviderSpecification.Builder() + .servers(java.util.Arrays.asList(providerSpecificationServersItemModel)) + .components(providerSpecificationComponentsModel) + .build(); + assertEquals( + providerSpecificationModel.servers(), + java.util.Arrays.asList(providerSpecificationServersItemModel)); + assertEquals(providerSpecificationModel.components(), providerSpecificationComponentsModel); + + String json = TestUtilities.serialize(providerSpecificationModel); + + ProviderSpecification providerSpecificationModelNew = + TestUtilities.deserialize(json, ProviderSpecification.class); + assertTrue(providerSpecificationModelNew instanceof ProviderSpecification); + assertEquals( + providerSpecificationModelNew.components().toString(), + providerSpecificationComponentsModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testProviderSpecificationError() throws Throwable { + new ProviderSpecification.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearchTest.java new file mode 100644 index 0000000000..af4a0e180a --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsClientSideSearchTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsClientSideSearch model. */ +public class SearchSettingsClientSideSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsClientSideSearch() throws Throwable { + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(searchSettingsClientSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + + String json = TestUtilities.serialize(searchSettingsClientSideSearchModel); + + SearchSettingsClientSideSearch searchSettingsClientSideSearchModelNew = + TestUtilities.deserialize(json, SearchSettingsClientSideSearch.class); + assertTrue(searchSettingsClientSideSearchModelNew instanceof SearchSettingsClientSideSearch); + assertEquals(searchSettingsClientSideSearchModelNew.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModelNew.metadata().toString(), + java.util.Collections.singletonMap("anyKey", "anyValue").toString()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLengthTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLengthTest.java new file mode 100644 index 0000000000..ebbd2b2d43 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchResponseLengthTest.java @@ -0,0 +1,50 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsConversationalSearchResponseLength model. */ +public class SearchSettingsConversationalSearchResponseLengthTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsConversationalSearchResponseLength() throws Throwable { + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + String json = TestUtilities.serialize(searchSettingsConversationalSearchResponseLengthModel); + + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModelNew = + TestUtilities.deserialize(json, SearchSettingsConversationalSearchResponseLength.class); + assertTrue( + searchSettingsConversationalSearchResponseLengthModelNew + instanceof SearchSettingsConversationalSearchResponseLength); + assertEquals(searchSettingsConversationalSearchResponseLengthModelNew.option(), "moderate"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidenceTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidenceTest.java new file mode 100644 index 0000000000..85008dc84f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchSearchConfidenceTest.java @@ -0,0 +1,52 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsConversationalSearchSearchConfidence model. */ +public class SearchSettingsConversationalSearchSearchConfidenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsConversationalSearchSearchConfidence() throws Throwable { + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + String json = TestUtilities.serialize(searchSettingsConversationalSearchSearchConfidenceModel); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModelNew = + TestUtilities.deserialize( + json, SearchSettingsConversationalSearchSearchConfidence.class); + assertTrue( + searchSettingsConversationalSearchSearchConfidenceModelNew + instanceof SearchSettingsConversationalSearchSearchConfidence); + assertEquals( + searchSettingsConversationalSearchSearchConfidenceModelNew.threshold(), "less_often"); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchTest.java new file mode 100644 index 0000000000..39a0d270ec --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsConversationalSearchTest.java @@ -0,0 +1,80 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsConversationalSearch model. */ +public class SearchSettingsConversationalSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsConversationalSearch() throws Throwable { + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + assertEquals(searchSettingsConversationalSearchModel.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModel.responseLength(), + searchSettingsConversationalSearchResponseLengthModel); + assertEquals( + searchSettingsConversationalSearchModel.searchConfidence(), + searchSettingsConversationalSearchSearchConfidenceModel); + + String json = TestUtilities.serialize(searchSettingsConversationalSearchModel); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModelNew = + TestUtilities.deserialize(json, SearchSettingsConversationalSearch.class); + assertTrue( + searchSettingsConversationalSearchModelNew instanceof SearchSettingsConversationalSearch); + assertEquals(searchSettingsConversationalSearchModelNew.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModelNew.responseLength().toString(), + searchSettingsConversationalSearchResponseLengthModel.toString()); + assertEquals( + searchSettingsConversationalSearchModelNew.searchConfidence().toString(), + searchSettingsConversationalSearchSearchConfidenceModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testSearchSettingsConversationalSearchError() throws Throwable { + new SearchSettingsConversationalSearch.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearchTest.java new file mode 100644 index 0000000000..a583f06e70 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsElasticSearchTest.java @@ -0,0 +1,78 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsElasticSearch model. */ +public class SearchSettingsElasticSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsElasticSearch() throws Throwable { + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + assertEquals(searchSettingsElasticSearchModel.url(), "testString"); + assertEquals(searchSettingsElasticSearchModel.port(), "testString"); + assertEquals(searchSettingsElasticSearchModel.username(), "testString"); + assertEquals(searchSettingsElasticSearchModel.password(), "testString"); + assertEquals(searchSettingsElasticSearchModel.index(), "testString"); + assertEquals(searchSettingsElasticSearchModel.filter(), java.util.Arrays.asList("testString")); + assertEquals( + searchSettingsElasticSearchModel.queryBody(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsElasticSearchModel.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModel.apikey(), "testString"); + + String json = TestUtilities.serialize(searchSettingsElasticSearchModel); + + SearchSettingsElasticSearch searchSettingsElasticSearchModelNew = + TestUtilities.deserialize(json, SearchSettingsElasticSearch.class); + assertTrue(searchSettingsElasticSearchModelNew instanceof SearchSettingsElasticSearch); + assertEquals(searchSettingsElasticSearchModelNew.url(), "testString"); + assertEquals(searchSettingsElasticSearchModelNew.port(), "testString"); + assertEquals(searchSettingsElasticSearchModelNew.username(), "testString"); + assertEquals(searchSettingsElasticSearchModelNew.password(), "testString"); + assertEquals(searchSettingsElasticSearchModelNew.index(), "testString"); + assertEquals( + searchSettingsElasticSearchModelNew.queryBody().toString(), + java.util.Collections.singletonMap("anyKey", "anyValue").toString()); + assertEquals(searchSettingsElasticSearchModelNew.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModelNew.apikey(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testSearchSettingsElasticSearchError() throws Throwable { + new SearchSettingsElasticSearch.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearchTest.java new file mode 100644 index 0000000000..5863cd436c --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsServerSideSearchTest.java @@ -0,0 +1,79 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchSettingsServerSideSearch model. */ +public class SearchSettingsServerSideSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchSettingsServerSideSearch() throws Throwable { + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + assertEquals(searchSettingsServerSideSearchModel.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsServerSideSearchModel.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModel.authType(), "basic"); + + String json = TestUtilities.serialize(searchSettingsServerSideSearchModel); + + SearchSettingsServerSideSearch searchSettingsServerSideSearchModelNew = + TestUtilities.deserialize(json, SearchSettingsServerSideSearch.class); + assertTrue(searchSettingsServerSideSearchModelNew instanceof SearchSettingsServerSideSearch); + assertEquals(searchSettingsServerSideSearchModelNew.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModelNew.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModelNew.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModelNew.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModelNew.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModelNew.metadata().toString(), + java.util.Collections.singletonMap("anyKey", "anyValue").toString()); + assertEquals(searchSettingsServerSideSearchModelNew.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModelNew.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModelNew.authType(), "basic"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testSearchSettingsServerSideSearchError() throws Throwable { + new SearchSettingsServerSideSearch.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java index c0c0ff305c..8da1cc6244 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -81,15 +81,110 @@ public void testSearchSettings() throws Throwable { assertEquals(searchSettingsSchemaMappingModel.body(), "testString"); assertEquals(searchSettingsSchemaMappingModel.title(), "testString"); + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + assertEquals(searchSettingsElasticSearchModel.url(), "testString"); + assertEquals(searchSettingsElasticSearchModel.port(), "testString"); + assertEquals(searchSettingsElasticSearchModel.username(), "testString"); + assertEquals(searchSettingsElasticSearchModel.password(), "testString"); + assertEquals(searchSettingsElasticSearchModel.index(), "testString"); + assertEquals(searchSettingsElasticSearchModel.filter(), java.util.Arrays.asList("testString")); + assertEquals( + searchSettingsElasticSearchModel.queryBody(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsElasticSearchModel.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModel.apikey(), "testString"); + + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + assertEquals(searchSettingsConversationalSearchModel.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModel.responseLength(), + searchSettingsConversationalSearchResponseLengthModel); + assertEquals( + searchSettingsConversationalSearchModel.searchConfidence(), + searchSettingsConversationalSearchSearchConfidenceModel); + + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + assertEquals(searchSettingsServerSideSearchModel.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsServerSideSearchModel.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModel.authType(), "basic"); + + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(searchSettingsClientSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); assertEquals(searchSettingsModel.discovery(), searchSettingsDiscoveryModel); assertEquals(searchSettingsModel.messages(), searchSettingsMessagesModel); assertEquals(searchSettingsModel.schemaMapping(), searchSettingsSchemaMappingModel); + assertEquals(searchSettingsModel.elasticSearch(), searchSettingsElasticSearchModel); + assertEquals( + searchSettingsModel.conversationalSearch(), searchSettingsConversationalSearchModel); + assertEquals(searchSettingsModel.serverSideSearch(), searchSettingsServerSideSearchModel); + assertEquals(searchSettingsModel.clientSideSearch(), searchSettingsClientSideSearchModel); String json = TestUtilities.serialize(searchSettingsModel); @@ -102,6 +197,18 @@ public void testSearchSettings() throws Throwable { assertEquals( searchSettingsModelNew.schemaMapping().toString(), searchSettingsSchemaMappingModel.toString()); + assertEquals( + searchSettingsModelNew.elasticSearch().toString(), + searchSettingsElasticSearchModel.toString()); + assertEquals( + searchSettingsModelNew.conversationalSearch().toString(), + searchSettingsConversationalSearchModel.toString()); + assertEquals( + searchSettingsModelNew.serverSideSearch().toString(), + searchSettingsServerSideSearchModel.toString()); + assertEquals( + searchSettingsModelNew.clientSideSearch().toString(), + searchSettingsClientSideSearchModel.toString()); } @Test(expectedExceptions = IllegalArgumentException.class) diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java index 12f1d0970f..79bfdcb16b 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -81,15 +81,110 @@ public void testSkillImport() throws Throwable { assertEquals(searchSettingsSchemaMappingModel.body(), "testString"); assertEquals(searchSettingsSchemaMappingModel.title(), "testString"); + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + assertEquals(searchSettingsElasticSearchModel.url(), "testString"); + assertEquals(searchSettingsElasticSearchModel.port(), "testString"); + assertEquals(searchSettingsElasticSearchModel.username(), "testString"); + assertEquals(searchSettingsElasticSearchModel.password(), "testString"); + assertEquals(searchSettingsElasticSearchModel.index(), "testString"); + assertEquals(searchSettingsElasticSearchModel.filter(), java.util.Arrays.asList("testString")); + assertEquals( + searchSettingsElasticSearchModel.queryBody(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsElasticSearchModel.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModel.apikey(), "testString"); + + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + assertEquals(searchSettingsConversationalSearchModel.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModel.responseLength(), + searchSettingsConversationalSearchResponseLengthModel); + assertEquals( + searchSettingsConversationalSearchModel.searchConfidence(), + searchSettingsConversationalSearchSearchConfidenceModel); + + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + assertEquals(searchSettingsServerSideSearchModel.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsServerSideSearchModel.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModel.authType(), "basic"); + + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(searchSettingsClientSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); assertEquals(searchSettingsModel.discovery(), searchSettingsDiscoveryModel); assertEquals(searchSettingsModel.messages(), searchSettingsMessagesModel); assertEquals(searchSettingsModel.schemaMapping(), searchSettingsSchemaMappingModel); + assertEquals(searchSettingsModel.elasticSearch(), searchSettingsElasticSearchModel); + assertEquals( + searchSettingsModel.conversationalSearch(), searchSettingsConversationalSearchModel); + assertEquals(searchSettingsModel.serverSideSearch(), searchSettingsServerSideSearchModel); + assertEquals(searchSettingsModel.clientSideSearch(), searchSettingsClientSideSearchModel); SkillImport skillImportModel = new SkillImport.Builder() diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutputTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutputTest.java new file mode 100644 index 0000000000..8223a8edd0 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseOutputTest.java @@ -0,0 +1,44 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the StatelessFinalResponseOutput model. */ +public class StatelessFinalResponseOutputTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testStatelessFinalResponseOutput() throws Throwable { + StatelessFinalResponseOutput statelessFinalResponseOutputModel = + new StatelessFinalResponseOutput(); + assertNull(statelessFinalResponseOutputModel.getGeneric()); + assertNull(statelessFinalResponseOutputModel.getIntents()); + assertNull(statelessFinalResponseOutputModel.getEntities()); + assertNull(statelessFinalResponseOutputModel.getActions()); + assertNull(statelessFinalResponseOutputModel.getDebug()); + assertNull(statelessFinalResponseOutputModel.getUserDefined()); + assertNull(statelessFinalResponseOutputModel.getSpelling()); + assertNull(statelessFinalResponseOutputModel.getStreamingMetadata()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseTest.java new file mode 100644 index 0000000000..beb4f048dd --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessFinalResponseTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the StatelessFinalResponse model. */ +public class StatelessFinalResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testStatelessFinalResponse() throws Throwable { + StatelessFinalResponse statelessFinalResponseModel = new StatelessFinalResponse(); + assertNull(statelessFinalResponseModel.getOutput()); + assertNull(statelessFinalResponseModel.getContext()); + assertNull(statelessFinalResponseModel.getUserId()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponseTest.java new file mode 100644 index 0000000000..36ffe5c04a --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/StatelessMessageStreamResponseTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the StatelessMessageStreamResponse model. */ +public class StatelessMessageStreamResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testStatelessMessageStreamResponse() throws Throwable { + StatelessMessageStreamResponse statelessMessageStreamResponseModel = + new StatelessMessageStreamResponse(); + assertNotNull(statelessMessageStreamResponseModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequestTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequestTest.java new file mode 100644 index 0000000000..75f2663bee --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutRequestTest.java @@ -0,0 +1,42 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventCalloutCalloutRequest model. */ +public class TurnEventCalloutCalloutRequestTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventCalloutCalloutRequest() throws Throwable { + TurnEventCalloutCalloutRequest turnEventCalloutCalloutRequestModel = + new TurnEventCalloutCalloutRequest(); + assertNull(turnEventCalloutCalloutRequestModel.getMethod()); + assertNull(turnEventCalloutCalloutRequestModel.getUrl()); + assertNull(turnEventCalloutCalloutRequestModel.getPath()); + assertNull(turnEventCalloutCalloutRequestModel.getQueryParameters()); + assertNull(turnEventCalloutCalloutRequestModel.getHeaders()); + assertNull(turnEventCalloutCalloutRequestModel.getBody()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponseTest.java new file mode 100644 index 0000000000..38a517e21e --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutResponseTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventCalloutCalloutResponse model. */ +public class TurnEventCalloutCalloutResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventCalloutCalloutResponse() throws Throwable { + TurnEventCalloutCalloutResponse turnEventCalloutCalloutResponseModel = + new TurnEventCalloutCalloutResponse(); + assertNull(turnEventCalloutCalloutResponseModel.getBody()); + assertNull(turnEventCalloutCalloutResponseModel.getStatusCode()); + assertNull(turnEventCalloutCalloutResponseModel.getLastEvent()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java index 76cfe5f1be..a189d0f97e 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022, 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,5 +34,7 @@ public void testTurnEventCalloutCallout() throws Throwable { assertNull(turnEventCalloutCalloutModel.getType()); assertNull(turnEventCalloutCalloutModel.getInternal()); assertNull(turnEventCalloutCalloutModel.getResultVariable()); + assertNull(turnEventCalloutCalloutModel.getRequest()); + assertNull(turnEventCalloutCalloutModel.getResponse()); } } diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java index baa8b66352..2882a05474 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -30,9 +30,9 @@ public class UpdateEnvironmentOptionsTest { @Test public void testUpdateEnvironmentOptions() throws Throwable { - BaseEnvironmentOrchestration baseEnvironmentOrchestrationModel = - new BaseEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); - assertEquals(baseEnvironmentOrchestrationModel.searchSkillFallback(), Boolean.valueOf(true)); + UpdateEnvironmentOrchestration updateEnvironmentOrchestrationModel = + new UpdateEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); + assertEquals(updateEnvironmentOrchestrationModel.searchSkillFallback(), Boolean.valueOf(true)); EnvironmentSkill environmentSkillModel = new EnvironmentSkill.Builder() @@ -54,7 +54,7 @@ public void testUpdateEnvironmentOptions() throws Throwable { .environmentId("testString") .name("testString") .description("testString") - .orchestration(baseEnvironmentOrchestrationModel) + .orchestration(updateEnvironmentOrchestrationModel) .sessionTimeout(Long.valueOf("10")) .skillReferences(java.util.Arrays.asList(environmentSkillModel)) .build(); @@ -62,7 +62,8 @@ public void testUpdateEnvironmentOptions() throws Throwable { assertEquals(updateEnvironmentOptionsModel.environmentId(), "testString"); assertEquals(updateEnvironmentOptionsModel.name(), "testString"); assertEquals(updateEnvironmentOptionsModel.description(), "testString"); - assertEquals(updateEnvironmentOptionsModel.orchestration(), baseEnvironmentOrchestrationModel); + assertEquals( + updateEnvironmentOptionsModel.orchestration(), updateEnvironmentOrchestrationModel); assertEquals(updateEnvironmentOptionsModel.sessionTimeout(), Long.valueOf("10")); assertEquals( updateEnvironmentOptionsModel.skillReferences(), diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestrationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestrationTest.java new file mode 100644 index 0000000000..d51e8c76e7 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOrchestrationTest.java @@ -0,0 +1,45 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the UpdateEnvironmentOrchestration model. */ +public class UpdateEnvironmentOrchestrationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testUpdateEnvironmentOrchestration() throws Throwable { + UpdateEnvironmentOrchestration updateEnvironmentOrchestrationModel = + new UpdateEnvironmentOrchestration.Builder().searchSkillFallback(true).build(); + assertEquals(updateEnvironmentOrchestrationModel.searchSkillFallback(), Boolean.valueOf(true)); + + String json = TestUtilities.serialize(updateEnvironmentOrchestrationModel); + + UpdateEnvironmentOrchestration updateEnvironmentOrchestrationModelNew = + TestUtilities.deserialize(json, UpdateEnvironmentOrchestration.class); + assertTrue(updateEnvironmentOrchestrationModelNew instanceof UpdateEnvironmentOrchestration); + assertEquals( + updateEnvironmentOrchestrationModelNew.searchSkillFallback(), Boolean.valueOf(true)); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptionsTest.java new file mode 100644 index 0000000000..f804b529c9 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateProviderOptionsTest.java @@ -0,0 +1,146 @@ +/* + * (C) Copyright IBM Corp. 2024. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the UpdateProviderOptions model. */ +public class UpdateProviderOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testUpdateProviderOptions() throws Throwable { + ProviderSpecificationServersItem providerSpecificationServersItemModel = + new ProviderSpecificationServersItem.Builder().url("testString").build(); + assertEquals(providerSpecificationServersItemModel.url(), "testString"); + + ProviderAuthenticationTypeAndValue providerAuthenticationTypeAndValueModel = + new ProviderAuthenticationTypeAndValue.Builder().type("value").value("testString").build(); + assertEquals(providerAuthenticationTypeAndValueModel.type(), "value"); + assertEquals(providerAuthenticationTypeAndValueModel.value(), "testString"); + + ProviderSpecificationComponentsSecuritySchemesBasic + providerSpecificationComponentsSecuritySchemesBasicModel = + new ProviderSpecificationComponentsSecuritySchemesBasic.Builder() + .username(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesBasicModel.username(), + providerAuthenticationTypeAndValueModel); + + ProviderAuthenticationOAuth2PasswordUsername providerAuthenticationOAuth2PasswordUsernameModel = + new ProviderAuthenticationOAuth2PasswordUsername.Builder() + .type("value") + .value("testString") + .build(); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.type(), "value"); + assertEquals(providerAuthenticationOAuth2PasswordUsernameModel.value(), "testString"); + + ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + providerAuthenticationOAuth2FlowsModel = + new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Builder() + .tokenUrl("testString") + .refreshUrl("testString") + .clientAuthType("Body") + .contentType("testString") + .headerPrefix("testString") + .username(providerAuthenticationOAuth2PasswordUsernameModel) + .build(); + assertEquals(providerAuthenticationOAuth2FlowsModel.tokenUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.refreshUrl(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.clientAuthType(), "Body"); + assertEquals(providerAuthenticationOAuth2FlowsModel.contentType(), "testString"); + assertEquals(providerAuthenticationOAuth2FlowsModel.headerPrefix(), "testString"); + assertEquals( + providerAuthenticationOAuth2FlowsModel.username(), + providerAuthenticationOAuth2PasswordUsernameModel); + + ProviderAuthenticationOAuth2 providerAuthenticationOAuth2Model = + new ProviderAuthenticationOAuth2.Builder() + .preferredFlow("password") + .flows(providerAuthenticationOAuth2FlowsModel) + .build(); + assertEquals(providerAuthenticationOAuth2Model.preferredFlow(), "password"); + assertEquals(providerAuthenticationOAuth2Model.flows(), providerAuthenticationOAuth2FlowsModel); + + ProviderSpecificationComponentsSecuritySchemes + providerSpecificationComponentsSecuritySchemesModel = + new ProviderSpecificationComponentsSecuritySchemes.Builder() + .authenticationMethod("basic") + .basic(providerSpecificationComponentsSecuritySchemesBasicModel) + .oauth2(providerAuthenticationOAuth2Model) + .build(); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.authenticationMethod(), "basic"); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.basic(), + providerSpecificationComponentsSecuritySchemesBasicModel); + assertEquals( + providerSpecificationComponentsSecuritySchemesModel.oauth2(), + providerAuthenticationOAuth2Model); + + ProviderSpecificationComponents providerSpecificationComponentsModel = + new ProviderSpecificationComponents.Builder() + .securitySchemes(providerSpecificationComponentsSecuritySchemesModel) + .build(); + assertEquals( + providerSpecificationComponentsModel.securitySchemes(), + providerSpecificationComponentsSecuritySchemesModel); + + ProviderSpecification providerSpecificationModel = + new ProviderSpecification.Builder() + .servers(java.util.Arrays.asList(providerSpecificationServersItemModel)) + .components(providerSpecificationComponentsModel) + .build(); + assertEquals( + providerSpecificationModel.servers(), + java.util.Arrays.asList(providerSpecificationServersItemModel)); + assertEquals(providerSpecificationModel.components(), providerSpecificationComponentsModel); + + ProviderPrivateAuthenticationBearerFlow providerPrivateAuthenticationModel = + new ProviderPrivateAuthenticationBearerFlow.Builder() + .token(providerAuthenticationTypeAndValueModel) + .build(); + assertEquals( + providerPrivateAuthenticationModel.token(), providerAuthenticationTypeAndValueModel); + + ProviderPrivate providerPrivateModel = + new ProviderPrivate.Builder().authentication(providerPrivateAuthenticationModel).build(); + assertEquals(providerPrivateModel.authentication(), providerPrivateAuthenticationModel); + + UpdateProviderOptions updateProviderOptionsModel = + new UpdateProviderOptions.Builder() + .providerId("testString") + .specification(providerSpecificationModel) + .xPrivate(providerPrivateModel) + .build(); + assertEquals(updateProviderOptionsModel.providerId(), "testString"); + assertEquals(updateProviderOptionsModel.specification(), providerSpecificationModel); + assertEquals(updateProviderOptionsModel.xPrivate(), providerPrivateModel); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateProviderOptionsError() throws Throwable { + new UpdateProviderOptions.Builder().build(); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java index 1c2756f687..fe007f3452 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -81,15 +81,110 @@ public void testUpdateSkillOptions() throws Throwable { assertEquals(searchSettingsSchemaMappingModel.body(), "testString"); assertEquals(searchSettingsSchemaMappingModel.title(), "testString"); + SearchSettingsElasticSearch searchSettingsElasticSearchModel = + new SearchSettingsElasticSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .index("testString") + .filter(java.util.Arrays.asList("testString")) + .queryBody(java.util.Collections.singletonMap("anyKey", "anyValue")) + .managedIndex("testString") + .apikey("testString") + .build(); + assertEquals(searchSettingsElasticSearchModel.url(), "testString"); + assertEquals(searchSettingsElasticSearchModel.port(), "testString"); + assertEquals(searchSettingsElasticSearchModel.username(), "testString"); + assertEquals(searchSettingsElasticSearchModel.password(), "testString"); + assertEquals(searchSettingsElasticSearchModel.index(), "testString"); + assertEquals(searchSettingsElasticSearchModel.filter(), java.util.Arrays.asList("testString")); + assertEquals( + searchSettingsElasticSearchModel.queryBody(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsElasticSearchModel.managedIndex(), "testString"); + assertEquals(searchSettingsElasticSearchModel.apikey(), "testString"); + + SearchSettingsConversationalSearchResponseLength + searchSettingsConversationalSearchResponseLengthModel = + new SearchSettingsConversationalSearchResponseLength.Builder() + .option("moderate") + .build(); + assertEquals(searchSettingsConversationalSearchResponseLengthModel.option(), "moderate"); + + SearchSettingsConversationalSearchSearchConfidence + searchSettingsConversationalSearchSearchConfidenceModel = + new SearchSettingsConversationalSearchSearchConfidence.Builder() + .threshold("less_often") + .build(); + assertEquals(searchSettingsConversationalSearchSearchConfidenceModel.threshold(), "less_often"); + + SearchSettingsConversationalSearch searchSettingsConversationalSearchModel = + new SearchSettingsConversationalSearch.Builder() + .enabled(true) + .responseLength(searchSettingsConversationalSearchResponseLengthModel) + .searchConfidence(searchSettingsConversationalSearchSearchConfidenceModel) + .build(); + assertEquals(searchSettingsConversationalSearchModel.enabled(), Boolean.valueOf(true)); + assertEquals( + searchSettingsConversationalSearchModel.responseLength(), + searchSettingsConversationalSearchResponseLengthModel); + assertEquals( + searchSettingsConversationalSearchModel.searchConfidence(), + searchSettingsConversationalSearchSearchConfidenceModel); + + SearchSettingsServerSideSearch searchSettingsServerSideSearchModel = + new SearchSettingsServerSideSearch.Builder() + .url("testString") + .port("testString") + .username("testString") + .password("testString") + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .apikey("testString") + .noAuth(true) + .authType("basic") + .build(); + assertEquals(searchSettingsServerSideSearchModel.url(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.port(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.username(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.password(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsServerSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(searchSettingsServerSideSearchModel.apikey(), "testString"); + assertEquals(searchSettingsServerSideSearchModel.noAuth(), Boolean.valueOf(true)); + assertEquals(searchSettingsServerSideSearchModel.authType(), "basic"); + + SearchSettingsClientSideSearch searchSettingsClientSideSearchModel = + new SearchSettingsClientSideSearch.Builder() + .filter("testString") + .metadata(java.util.Collections.singletonMap("anyKey", "anyValue")) + .build(); + assertEquals(searchSettingsClientSideSearchModel.filter(), "testString"); + assertEquals( + searchSettingsClientSideSearchModel.metadata(), + java.util.Collections.singletonMap("anyKey", "anyValue")); + SearchSettings searchSettingsModel = new SearchSettings.Builder() .discovery(searchSettingsDiscoveryModel) .messages(searchSettingsMessagesModel) .schemaMapping(searchSettingsSchemaMappingModel) + .elasticSearch(searchSettingsElasticSearchModel) + .conversationalSearch(searchSettingsConversationalSearchModel) + .serverSideSearch(searchSettingsServerSideSearchModel) + .clientSideSearch(searchSettingsClientSideSearchModel) .build(); assertEquals(searchSettingsModel.discovery(), searchSettingsDiscoveryModel); assertEquals(searchSettingsModel.messages(), searchSettingsMessagesModel); assertEquals(searchSettingsModel.schemaMapping(), searchSettingsSchemaMappingModel); + assertEquals(searchSettingsModel.elasticSearch(), searchSettingsElasticSearchModel); + assertEquals( + searchSettingsModel.conversationalSearch(), searchSettingsConversationalSearchModel); + assertEquals(searchSettingsModel.serverSideSearch(), searchSettingsServerSideSearchModel); + assertEquals(searchSettingsModel.clientSideSearch(), searchSettingsClientSideSearchModel); UpdateSkillOptions updateSkillOptionsModel = new UpdateSkillOptions.Builder() diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java index b1dd36beb4..26cf9a9487 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -10,6 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ + package com.ibm.watson.assistant.v2.utils; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -18,6 +19,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Base64; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -114,8 +116,8 @@ public static List creatMockListFileWithMetadata() { return list; } - public static byte[] createMockByteArray(String bytes) { - return bytes.getBytes(); + public static byte[] createMockByteArray(String encodedString) throws Exception { + return Base64.getDecoder().decode(encodedString); } public static Date createMockDate(String date) throws Exception { diff --git a/common/src/test/java/com/ibm/watson/common/RetryRunner.java b/common/src/test/java/com/ibm/watson/common/RetryRunner.java index faf1cfd623..03dcd2e6f7 100644 --- a/common/src/test/java/com/ibm/watson/common/RetryRunner.java +++ b/common/src/test/java/com/ibm/watson/common/RetryRunner.java @@ -31,7 +31,7 @@ public class RetryRunner extends BlockJUnit4ClassRunner { private static final Logger LOG = Logger.getLogger(RetryRunner.class.getName()); - private static final int RETRY_COUNT = 3; + private static final int RETRY_COUNT = 0; /** Delay factor when tests are failing. */ private static final int RETRY_DELAY_FACTOR = 2000; diff --git a/pom.xml b/pom.xml index b369db4def..409f2488d0 100644 --- a/pom.xml +++ b/pom.xml @@ -138,6 +138,11 @@ okhttp ${okhttp3-version} + + com.launchdarkly + okhttp-eventsource + 4.1.1 + com.squareup.okhttp3 mockwebserver From 43b8ba078e05ec5185a7cf6e7aaad6728f8be708 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Wed, 27 Nov 2024 14:08:22 -0500 Subject: [PATCH 10/12] chore: update services to version 3.97.0 of sdk generator --- .../ibm/watson/assistant/v1/Assistant.java | 2 +- .../ibm/watson/assistant/v2/Assistant.java | 2 +- ...owsProviderAuthenticationOAuth2Custom.java | 77 ------------ ...iderPrivateAuthenticationOAuth2Custom.java | 89 ------------- ...roviderAuthenticationOAuth2CustomTest.java | 117 ------------------ ...PrivateAuthenticationOAuth2CustomTest.java | 116 ----------------- .../ibm/watson/discovery/v2/Discovery.java | 2 +- .../speech_to_text/v1/SpeechToText.java | 2 +- .../text_to_speech/v1/TextToSpeech.java | 2 +- 9 files changed, 5 insertions(+), 404 deletions(-) delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java index 53400ad134..2c99bedb32 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 + * IBM OpenAPI SDK Code Generator Version: 3.97.0-0e90eab1-20241120-170029 */ package com.ibm.watson.assistant.v1; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java index 4973bd3c2c..edeaeea3ea 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-77cc8190-20241107-152357 + * IBM OpenAPI SDK Code Generator Version: 3.97.0-0e90eab1-20241120-170029 */ package com.ibm.watson.assistant.v2; diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java deleted file mode 100644 index b3aafab36b..0000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -/** ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom. */ -public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom - extends ProviderAuthenticationOAuth2Flows { - - /** Builder. */ - public static class Builder { - private ProviderAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property; - - /** - * Instantiates a new Builder from an existing - * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom instance. - * - * @param providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom the instance to - * initialize the Builder with - */ - public Builder( - ProviderAuthenticationOAuth2Flows - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom) { - this.customOauth2Property = - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.customOauth2Property; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom. - * - * @return the new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom instance - */ - public ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom build() { - return new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom(this); - } - - /** - * Set the customOauth2Property. - * - * @param customOauth2Property the customOauth2Property - * @return the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom builder - */ - public Builder customOauth2Property( - ProviderAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property) { - this.customOauth2Property = customOauth2Property; - return this; - } - } - - protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom() {} - - protected ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom(Builder builder) { - customOauth2Property = builder.customOauth2Property; - } - - /** - * New builder. - * - * @return a ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom builder - */ - public Builder newBuilder() { - return new Builder(this); - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java deleted file mode 100644 index 0c4c947a3c..0000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -/** ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom. */ -public class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - extends ProviderPrivateAuthenticationOAuth2FlowFlows { - - /** Builder. */ - public static class Builder { - private ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property; - - /** - * Instantiates a new Builder from an existing - * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - * instance. - * - * @param providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - * the instance to initialize the Builder with - */ - public Builder( - ProviderPrivateAuthenticationOAuth2FlowFlows - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom) { - this.customOauth2Property = - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - .customOauth2Property; - } - - /** Instantiates a new builder. */ - public Builder() {} - - /** - * Builds a - * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom. - * - * @return the new - * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - * instance - */ - public ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - build() { - return new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom( - this); - } - - /** - * Set the customOauth2Property. - * - * @param customOauth2Property the customOauth2Property - * @return the - * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - * builder - */ - public Builder customOauth2Property( - ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property customOauth2Property) { - this.customOauth2Property = customOauth2Property; - return this; - } - } - - protected - ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom() {} - - protected ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom( - Builder builder) { - customOauth2Property = builder.customOauth2Property; - } - - /** - * New builder. - * - * @return a ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - * builder - */ - public Builder newBuilder() { - return new Builder(this); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java deleted file mode 100644 index 4a09493b92..0000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** - * Unit test class for the ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom - * model. - */ -public class ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom() - throws Throwable { - ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2Parameter - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel = - new ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2Parameter - .Builder() - .type("value") - .value("testString") - .build(); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel - .type(), - "value"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel - .value(), - "testString"); - - ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParams - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel = - new ProviderAuthenticationOAuth2CustomCustomOauth2PropertyParams.Builder() - .customOauth2Parameter( - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel) - .build(); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel.customOauth2Parameter(), - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsCustomOauth2ParameterModel); - - ProviderAuthenticationOAuth2CustomCustomOauth2Property - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel = - new ProviderAuthenticationOAuth2CustomCustomOauth2Property.Builder() - .tokenUrl("testString") - .refreshUrl("testString") - .clientAuthType("Body") - .contentType("testString") - .headerPrefix("testString") - .grantType("testString") - .params(providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel) - .build(); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.tokenUrl(), "testString"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.refreshUrl(), "testString"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.clientAuthType(), "Body"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.contentType(), "testString"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.headerPrefix(), "testString"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.grantType(), "testString"); - assertEquals( - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.params(), - providerAuthenticationOAuth2CustomCustomOauth2PropertyParamsModel); - - ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel = - new ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.Builder() - .customOauth2Property(providerAuthenticationOAuth2CustomCustomOauth2PropertyModel) - .build(); - assertEquals( - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel - .customOauth2Property(), - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel); - - String json = - TestUtilities.serialize( - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModel); - - ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew = - TestUtilities.deserialize( - json, ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom.class); - assertTrue( - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew - instanceof ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Custom); - assertEquals( - providerAuthenticationOAuth2FlowsProviderAuthenticationOAuth2CustomModelNew - .customOauth2Property() - .toString(), - providerAuthenticationOAuth2CustomCustomOauth2PropertyModel.toString()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java deleted file mode 100644 index 3666a10b88..0000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** - * Unit test class for the - * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom model. - */ -public -class ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void - testProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom() - throws Throwable { - ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2Secret - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel = - new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2Secret - .Builder() - .type("value") - .value("testString") - .build(); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel - .type(), - "value"); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel - .value(), - "testString"); - - ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecrets - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel = - new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecrets.Builder() - .customOauth2Secret( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel) - .build(); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel - .customOauth2Secret(), - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsCustomOauth2SecretModel); - - ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel = - new ProviderPrivateAuthenticationOAuth2CustomCustomOauth2Property.Builder() - .accessToken("testString") - .refreshToken("testString") - .customSecrets( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel) - .build(); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.accessToken(), - "testString"); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.refreshToken(), - "testString"); - assertEquals( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.customSecrets(), - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyCustomSecretsModel); - - ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel = - new ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - .Builder() - .customOauth2Property( - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel) - .build(); - assertEquals( - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel - .customOauth2Property(), - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel); - - String json = - TestUtilities.serialize( - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModel); - - ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew = - TestUtilities.deserialize( - json, - ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom - .class); - assertTrue( - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew - instanceof - ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Custom); - assertEquals( - providerPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2CustomModelNew - .customOauth2Property() - .toString(), - providerPrivateAuthenticationOAuth2CustomCustomOauth2PropertyModel.toString()); - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java index e31b842af0..d5b518523f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 + * IBM OpenAPI SDK Code Generator Version: 3.97.0-0e90eab1-20241120-170029 */ package com.ibm.watson.discovery.v2; diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java index 7308227382..58b4e694a2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 + * IBM OpenAPI SDK Code Generator Version: 3.97.0-0e90eab1-20241120-170029 */ package com.ibm.watson.speech_to_text.v1; diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java index efc7ada0c1..7f77f70743 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 + * IBM OpenAPI SDK Code Generator Version: 3.97.0-0e90eab1-20241120-170029 */ package com.ibm.watson.text_to_speech.v1; From 3b4191ea52d5dfc855d440fefd02a49514c1ed3d Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Wed, 4 Dec 2024 09:49:01 -0600 Subject: [PATCH 11/12] chore: fix copyrights --- .../ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java | 2 +- .../com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java | 2 +- .../com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java | 2 +- .../ibm/watson/assistant/v1/model/BulkClassifyUtterance.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/CaptureGroup.java | 2 +- .../com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java | 2 +- .../ibm/watson/assistant/v1/model/ChannelTransferTarget.java | 2 +- .../watson/assistant/v1/model/ChannelTransferTargetChat.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Context.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/Counterexample.java | 2 +- .../ibm/watson/assistant/v1/model/CounterexampleCollection.java | 2 +- .../watson/assistant/v1/model/CreateCounterexampleOptions.java | 2 +- .../ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/CreateEntity.java | 2 +- .../com/ibm/watson/assistant/v1/model/CreateEntityOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/CreateExampleOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/CreateIntent.java | 2 +- .../com/ibm/watson/assistant/v1/model/CreateIntentOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/CreateValue.java | 2 +- .../com/ibm/watson/assistant/v1/model/CreateValueOptions.java | 2 +- .../watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java | 2 +- .../ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java | 2 +- .../watson/assistant/v1/model/DeleteCounterexampleOptions.java | 2 +- .../ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java | 2 +- .../ibm/watson/assistant/v1/model/DeleteUserDataOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/DeleteValueOptions.java | 2 +- .../ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/DialogNode.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogNodeAction.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogNodeCollection.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogNodeContext.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogNodeOutput.java | 2 +- .../v1/model/DialogNodeOutputConnectToAgentTransferInfo.java | 2 +- .../ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java | 2 +- ...ialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java | 2 +- ...OutputGenericDialogNodeOutputResponseTypeConnectToAgent.java | 2 +- ...alogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java | 2 +- ...ialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java | 2 +- ...alogNodeOutputGenericDialogNodeOutputResponseTypeOption.java | 2 +- ...ialogNodeOutputGenericDialogNodeOutputResponseTypePause.java | 2 +- ...odeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java | 2 +- ...DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java | 2 +- ...odeOutputGenericDialogNodeOutputResponseTypeUserDefined.java | 2 +- ...ialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java | 2 +- .../watson/assistant/v1/model/DialogNodeOutputModifiers.java | 2 +- .../assistant/v1/model/DialogNodeOutputOptionsElement.java | 2 +- .../assistant/v1/model/DialogNodeOutputOptionsElementValue.java | 2 +- .../assistant/v1/model/DialogNodeOutputTextValuesElement.java | 2 +- .../ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java | 2 +- .../com/ibm/watson/assistant/v1/model/DialogSuggestion.java | 2 +- .../ibm/watson/assistant/v1/model/DialogSuggestionValue.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v1/model/Entity.java | 2 +- .../com/ibm/watson/assistant/v1/model/EntityCollection.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/EntityMention.java | 2 +- .../ibm/watson/assistant/v1/model/EntityMentionCollection.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Example.java | 2 +- .../com/ibm/watson/assistant/v1/model/ExampleCollection.java | 2 +- .../watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java | 2 +- .../ibm/watson/assistant/v1/model/GetCounterexampleOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetEntityOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetExampleOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetIntentOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetSynonymOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/GetValueOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v1/model/Intent.java | 2 +- .../com/ibm/watson/assistant/v1/model/IntentCollection.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java | 2 +- .../watson/assistant/v1/model/ListCounterexamplesOptions.java | 2 +- .../ibm/watson/assistant/v1/model/ListDialogNodesOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListExamplesOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListIntentsOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListMentionsOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/ListValuesOptions.java | 2 +- .../ibm/watson/assistant/v1/model/ListWorkspacesOptions.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v1/model/Log.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/LogCollection.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/LogMessage.java | 2 +- .../com/ibm/watson/assistant/v1/model/LogMessageSource.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/LogPagination.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Mention.java | 2 +- .../ibm/watson/assistant/v1/model/MessageContextMetadata.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/MessageInput.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/MessageOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/MessageRequest.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/MessageResponse.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/OutputData.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Pagination.java | 2 +- .../ibm/watson/assistant/v1/model/ResponseGenericChannel.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java | 2 +- .../ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java | 2 +- .../watson/assistant/v1/model/RuntimeEntityInterpretation.java | 2 +- .../com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java | 2 +- .../ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeAudio.java | 2 +- ...untimeResponseGenericRuntimeResponseTypeChannelTransfer.java | 2 +- ...RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeIframe.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeImage.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeOption.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypePause.java | 2 +- .../RuntimeResponseGenericRuntimeResponseTypeSuggestion.java | 2 +- .../v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java | 2 +- .../RuntimeResponseGenericRuntimeResponseTypeUserDefined.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeVideo.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/StatusError.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Synonym.java | 2 +- .../com/ibm/watson/assistant/v1/model/SynonymCollection.java | 2 +- .../watson/assistant/v1/model/UpdateCounterexampleOptions.java | 2 +- .../ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java | 2 +- .../com/ibm/watson/assistant/v1/model/UpdateValueOptions.java | 2 +- .../watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java | 2 +- .../ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v1/model/Value.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/ValueCollection.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Webhook.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/WebhookHeader.java | 2 +- .../main/java/com/ibm/watson/assistant/v1/model/Workspace.java | 2 +- .../com/ibm/watson/assistant/v1/model/WorkspaceCollection.java | 2 +- .../java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java | 2 +- .../ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java | 2 +- .../v1/model/WorkspaceSystemSettingsDisambiguation.java | 2 +- .../watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java | 2 +- .../assistant/v1/model/WorkspaceSystemSettingsOffTopic.java | 2 +- .../v1/model/WorkspaceSystemSettingsSystemEntities.java | 2 +- .../assistant/v1/model/WorkspaceSystemSettingsTooling.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v1/package-info.java | 2 +- .../ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java | 2 +- .../com/ibm/watson/assistant/v2/model/AssistantCollection.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/AssistantData.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/AssistantSkill.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/AssistantState.java | 2 +- .../watson/assistant/v2/model/BaseEnvironmentOrchestration.java | 2 +- .../assistant/v2/model/BaseEnvironmentReleaseReference.java | 2 +- .../com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java | 2 +- .../com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java | 2 +- .../ibm/watson/assistant/v2/model/BulkClassifyUtterance.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/CaptureGroup.java | 2 +- .../com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java | 2 +- .../ibm/watson/assistant/v2/model/ChannelTransferTarget.java | 2 +- .../watson/assistant/v2/model/ChannelTransferTargetChat.java | 2 +- .../ibm/watson/assistant/v2/model/CreateAssistantOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/CreateSessionOptions.java | 2 +- .../ibm/watson/assistant/v2/model/DeleteAssistantOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java | 2 +- .../ibm/watson/assistant/v2/model/DeleteUserDataOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/DialogLogMessage.java | 2 +- .../com/ibm/watson/assistant/v2/model/DialogNodeAction.java | 2 +- .../v2/model/DialogNodeOutputConnectToAgentTransferInfo.java | 2 +- .../assistant/v2/model/DialogNodeOutputOptionsElement.java | 2 +- .../assistant/v2/model/DialogNodeOutputOptionsElementValue.java | 2 +- .../com/ibm/watson/assistant/v2/model/DialogNodeVisited.java | 2 +- .../com/ibm/watson/assistant/v2/model/DialogSuggestion.java | 2 +- .../ibm/watson/assistant/v2/model/DialogSuggestionValue.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/Environment.java | 2 +- .../ibm/watson/assistant/v2/model/EnvironmentCollection.java | 2 +- .../com/ibm/watson/assistant/v2/model/EnvironmentReference.java | 2 +- .../com/ibm/watson/assistant/v2/model/EnvironmentSkill.java | 2 +- .../com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java | 2 +- .../ibm/watson/assistant/v2/model/GetEnvironmentOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/GetReleaseOptions.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java | 2 +- .../watson/assistant/v2/model/ImportSkillsStatusOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/IntegrationReference.java | 2 +- .../ibm/watson/assistant/v2/model/ListAssistantsOptions.java | 2 +- .../ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/ListReleasesOptions.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v2/model/Log.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/LogCollection.java | 2 +- .../com/ibm/watson/assistant/v2/model/LogMessageSource.java | 2 +- .../ibm/watson/assistant/v2/model/LogMessageSourceAction.java | 2 +- .../watson/assistant/v2/model/LogMessageSourceDialogNode.java | 2 +- .../ibm/watson/assistant/v2/model/LogMessageSourceHandler.java | 2 +- .../com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/LogPagination.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/MessageContext.java | 2 +- .../com/ibm/watson/assistant/v2/model/MessageContextGlobal.java | 2 +- .../watson/assistant/v2/model/MessageContextGlobalSystem.java | 2 +- .../watson/assistant/v2/model/MessageContextSkillSystem.java | 2 +- .../com/ibm/watson/assistant/v2/model/MessageContextSkills.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/MessageInput.java | 2 +- .../ibm/watson/assistant/v2/model/MessageInputAttachment.java | 2 +- .../com/ibm/watson/assistant/v2/model/MessageInputOptions.java | 2 +- .../watson/assistant/v2/model/MessageInputOptionsSpelling.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/MessageOptions.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/MessageOutput.java | 2 +- .../com/ibm/watson/assistant/v2/model/MessageOutputDebug.java | 2 +- .../watson/assistant/v2/model/MessageOutputDebugTurnEvent.java | 2 +- .../MessageOutputDebugTurnEventTurnEventActionFinished.java | 2 +- .../MessageOutputDebugTurnEventTurnEventActionVisited.java | 2 +- .../v2/model/MessageOutputDebugTurnEventTurnEventCallout.java | 2 +- .../MessageOutputDebugTurnEventTurnEventHandlerVisited.java | 2 +- .../model/MessageOutputDebugTurnEventTurnEventNodeVisited.java | 2 +- .../v2/model/MessageOutputDebugTurnEventTurnEventSearch.java | 2 +- .../model/MessageOutputDebugTurnEventTurnEventStepAnswered.java | 2 +- .../model/MessageOutputDebugTurnEventTurnEventStepVisited.java | 2 +- .../ibm/watson/assistant/v2/model/MessageOutputSpelling.java | 2 +- .../ibm/watson/assistant/v2/model/MessageStatelessOptions.java | 2 +- .../main/java/com/ibm/watson/assistant/v2/model/Pagination.java | 2 +- .../main/java/com/ibm/watson/assistant/v2/model/Release.java | 2 +- .../com/ibm/watson/assistant/v2/model/ReleaseCollection.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/ReleaseContent.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java | 2 +- .../com/ibm/watson/assistant/v2/model/RequestAnalytics.java | 2 +- .../ibm/watson/assistant/v2/model/ResponseGenericChannel.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java | 2 +- .../ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java | 2 +- .../watson/assistant/v2/model/RuntimeEntityInterpretation.java | 2 +- .../com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java | 2 +- .../ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeAudio.java | 2 +- ...untimeResponseGenericRuntimeResponseTypeChannelTransfer.java | 2 +- ...RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java | 2 +- .../v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeIframe.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeImage.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeOption.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypePause.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeSearch.java | 2 +- .../RuntimeResponseGenericRuntimeResponseTypeSuggestion.java | 2 +- .../v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java | 2 +- .../RuntimeResponseGenericRuntimeResponseTypeUserDefined.java | 2 +- .../model/RuntimeResponseGenericRuntimeResponseTypeVideo.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SearchResult.java | 2 +- .../com/ibm/watson/assistant/v2/model/SearchResultAnswer.java | 2 +- .../ibm/watson/assistant/v2/model/SearchResultHighlight.java | 2 +- .../com/ibm/watson/assistant/v2/model/SearchResultMetadata.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SearchSettings.java | 2 +- .../ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java | 2 +- .../v2/model/SearchSettingsDiscoveryAuthentication.java | 2 +- .../ibm/watson/assistant/v2/model/SearchSettingsMessages.java | 2 +- .../watson/assistant/v2/model/SearchSettingsSchemaMapping.java | 2 +- .../com/ibm/watson/assistant/v2/model/SearchSkillWarning.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SessionResponse.java | 2 +- .../src/main/java/com/ibm/watson/assistant/v2/model/Skill.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SkillImport.java | 2 +- .../ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SkillsExport.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/StatusError.java | 2 +- .../ibm/watson/assistant/v2/model/TurnEventActionSource.java | 2 +- .../ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java | 2 +- .../ibm/watson/assistant/v2/model/TurnEventCalloutError.java | 2 +- .../com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java | 2 +- .../com/ibm/watson/assistant/v2/model/TurnEventSearchError.java | 2 +- .../ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java | 2 +- .../com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java | 2 +- .../java/com/ibm/watson/assistant/v1/utils/TestUtilities.java | 2 +- .../test/java/com/ibm/watson/assistant/v2/AssistantTest.java | 2 +- .../assistant/v2/model/BaseEnvironmentOrchestrationTest.java | 2 +- .../assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java | 2 +- .../ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java | 2 +- .../com/ibm/watson/assistant/v2/model/MessageOptionsTest.java | 2 +- .../watson/assistant/v2/model/MessageStatelessOptionsTest.java | 2 +- .../com/ibm/watson/assistant/v2/model/SearchSettingsTest.java | 2 +- .../java/com/ibm/watson/assistant/v2/model/SkillImportTest.java | 2 +- .../watson/assistant/v2/model/TurnEventCalloutCalloutTest.java | 2 +- .../watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java | 2 +- .../ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java | 2 +- .../java/com/ibm/watson/assistant/v2/utils/TestUtilities.java | 2 +- common/src/test/java/com/ibm/watson/common/RetryRunner.java | 2 +- .../com/ibm/watson/discovery/v2/model/AddDocumentOptions.java | 2 +- .../ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/AnalyzedDocument.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java | 2 +- .../ibm/watson/discovery/v2/model/ClassifierFederatedModel.java | 2 +- .../watson/discovery/v2/model/ClassifierModelEvaluation.java | 2 +- .../main/java/com/ibm/watson/discovery/v2/model/Collection.java | 2 +- .../com/ibm/watson/discovery/v2/model/CollectionDetails.java | 2 +- .../v2/model/CollectionDetailsSmartDocumentUnderstanding.java | 2 +- .../com/ibm/watson/discovery/v2/model/CollectionEnrichment.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/Completions.java | 2 +- .../watson/discovery/v2/model/ComponentSettingsAggregation.java | 2 +- .../watson/discovery/v2/model/ComponentSettingsFieldsShown.java | 2 +- .../discovery/v2/model/ComponentSettingsFieldsShownBody.java | 2 +- .../discovery/v2/model/ComponentSettingsFieldsShownTitle.java | 2 +- .../watson/discovery/v2/model/ComponentSettingsResponse.java | 2 +- .../ibm/watson/discovery/v2/model/CreateCollectionOptions.java | 2 +- .../ibm/watson/discovery/v2/model/CreateDocumentClassifier.java | 2 +- .../v2/model/CreateDocumentClassifierModelOptions.java | 2 +- .../discovery/v2/model/CreateDocumentClassifierOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/CreateEnrichment.java | 2 +- .../ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java | 2 +- .../ibm/watson/discovery/v2/model/CreateExpansionsOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/CreateProjectOptions.java | 2 +- .../watson/discovery/v2/model/CreateStopwordListOptions.java | 2 +- .../watson/discovery/v2/model/CreateTrainingQueryOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/DefaultQueryParams.java | 2 +- .../watson/discovery/v2/model/DefaultQueryParamsPassages.java | 2 +- .../v2/model/DefaultQueryParamsSuggestedRefinements.java | 2 +- .../discovery/v2/model/DefaultQueryParamsTableResults.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteCollectionOptions.java | 2 +- .../v2/model/DeleteDocumentClassifierModelOptions.java | 2 +- .../discovery/v2/model/DeleteDocumentClassifierOptions.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteDocumentOptions.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteDocumentResponse.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java | 2 +- .../watson/discovery/v2/model/DeleteStopwordListOptions.java | 2 +- .../watson/discovery/v2/model/DeleteTrainingQueriesOptions.java | 2 +- .../watson/discovery/v2/model/DeleteTrainingQueryOptions.java | 2 +- .../ibm/watson/discovery/v2/model/DeleteUserDataOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/DocumentAccepted.java | 2 +- .../com/ibm/watson/discovery/v2/model/DocumentAttribute.java | 2 +- .../com/ibm/watson/discovery/v2/model/DocumentClassifier.java | 2 +- .../watson/discovery/v2/model/DocumentClassifierEnrichment.java | 2 +- .../ibm/watson/discovery/v2/model/DocumentClassifierModel.java | 2 +- .../ibm/watson/discovery/v2/model/DocumentClassifierModels.java | 2 +- .../com/ibm/watson/discovery/v2/model/DocumentClassifiers.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/DocumentDetails.java | 2 +- .../ibm/watson/discovery/v2/model/DocumentDetailsChildren.java | 2 +- .../main/java/com/ibm/watson/discovery/v2/model/Enrichment.java | 2 +- .../com/ibm/watson/discovery/v2/model/EnrichmentOptions.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/Enrichments.java | 2 +- .../main/java/com/ibm/watson/discovery/v2/model/Expansion.java | 2 +- .../main/java/com/ibm/watson/discovery/v2/model/Expansions.java | 2 +- .../src/main/java/com/ibm/watson/discovery/v2/model/Field.java | 2 +- .../ibm/watson/discovery/v2/model/GetAutocompletionOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/GetCollectionOptions.java | 2 +- .../watson/discovery/v2/model/GetComponentSettingsOptions.java | 2 +- .../discovery/v2/model/GetDocumentClassifierModelOptions.java | 2 +- .../watson/discovery/v2/model/GetDocumentClassifierOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/GetDocumentOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/GetProjectOptions.java | 2 +- .../ibm/watson/discovery/v2/model/GetStopwordListOptions.java | 2 +- .../ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java | 2 +- .../ibm/watson/discovery/v2/model/ListCollectionsOptions.java | 2 +- .../ibm/watson/discovery/v2/model/ListCollectionsResponse.java | 2 +- .../discovery/v2/model/ListDocumentClassifierModelsOptions.java | 2 +- .../discovery/v2/model/ListDocumentClassifiersOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java | 2 +- .../ibm/watson/discovery/v2/model/ListDocumentsResponse.java | 2 +- .../ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java | 2 +- .../ibm/watson/discovery/v2/model/ListExpansionsOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/ListFieldsOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/ListFieldsResponse.java | 2 +- .../com/ibm/watson/discovery/v2/model/ListProjectsOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/ListProjectsResponse.java | 2 +- .../watson/discovery/v2/model/ListTrainingQueriesOptions.java | 2 +- .../watson/discovery/v2/model/ModelEvaluationMacroAverage.java | 2 +- .../watson/discovery/v2/model/ModelEvaluationMicroAverage.java | 2 +- .../src/main/java/com/ibm/watson/discovery/v2/model/Notice.java | 2 +- .../ibm/watson/discovery/v2/model/PerClassModelEvaluation.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/ProjectDetails.java | 2 +- .../com/ibm/watson/discovery/v2/model/ProjectListDetails.java | 2 +- .../v2/model/ProjectListDetailsRelevancyTrainingStatus.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryAggregation.java | 2 +- .../v2/model/QueryAggregationQueryCalculationAggregation.java | 2 +- .../v2/model/QueryAggregationQueryFilterAggregation.java | 2 +- .../v2/model/QueryAggregationQueryGroupByAggregation.java | 2 +- .../v2/model/QueryAggregationQueryHistogramAggregation.java | 2 +- .../v2/model/QueryAggregationQueryNestedAggregation.java | 2 +- .../v2/model/QueryAggregationQueryPairAggregation.java | 2 +- .../v2/model/QueryAggregationQueryTermAggregation.java | 2 +- .../v2/model/QueryAggregationQueryTimesliceAggregation.java | 2 +- .../v2/model/QueryAggregationQueryTopHitsAggregation.java | 2 +- .../v2/model/QueryAggregationQueryTopicAggregation.java | 2 +- .../v2/model/QueryAggregationQueryTrendAggregation.java | 2 +- .../discovery/v2/model/QueryCollectionNoticesOptions.java | 2 +- .../discovery/v2/model/QueryGroupByAggregationResult.java | 2 +- .../discovery/v2/model/QueryHistogramAggregationResult.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryLargePassages.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java | 2 +- .../discovery/v2/model/QueryLargeSuggestedRefinements.java | 2 +- .../ibm/watson/discovery/v2/model/QueryLargeTableResults.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/QueryOptions.java | 2 +- .../watson/discovery/v2/model/QueryPairAggregationResult.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/QueryResponse.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryResponsePassage.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/QueryResult.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryResultMetadata.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryResultPassage.java | 2 +- .../ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java | 2 +- .../com/ibm/watson/discovery/v2/model/QueryTableResult.java | 2 +- .../watson/discovery/v2/model/QueryTermAggregationResult.java | 2 +- .../discovery/v2/model/QueryTimesliceAggregationResult.java | 2 +- .../discovery/v2/model/QueryTopHitsAggregationResult.java | 2 +- .../watson/discovery/v2/model/QueryTopicAggregationResult.java | 2 +- .../watson/discovery/v2/model/QueryTrendAggregationResult.java | 2 +- .../com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java | 2 +- .../com/ibm/watson/discovery/v2/model/RetrievalDetails.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/StopWordList.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TableBodyCells.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TableCellKey.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TableCellValues.java | 2 +- .../com/ibm/watson/discovery/v2/model/TableColumnHeaders.java | 2 +- .../com/ibm/watson/discovery/v2/model/TableElementLocation.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TableHeaders.java | 2 +- .../com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java | 2 +- .../com/ibm/watson/discovery/v2/model/TableResultTable.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java | 2 +- .../com/ibm/watson/discovery/v2/model/TableTextLocation.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TrainingExample.java | 2 +- .../java/com/ibm/watson/discovery/v2/model/TrainingQuery.java | 2 +- .../com/ibm/watson/discovery/v2/model/TrainingQuerySet.java | 2 +- .../ibm/watson/discovery/v2/model/UpdateCollectionOptions.java | 2 +- .../ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java | 2 +- .../v2/model/UpdateDocumentClassifierModelOptions.java | 2 +- .../discovery/v2/model/UpdateDocumentClassifierOptions.java | 2 +- .../ibm/watson/discovery/v2/model/UpdateDocumentOptions.java | 2 +- .../ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java | 2 +- .../com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java | 2 +- .../watson/discovery/v2/model/UpdateTrainingQueryOptions.java | 2 +- .../src/main/java/com/ibm/watson/discovery/v2/package-info.java | 2 +- .../test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java | 2 +- .../java/com/ibm/watson/discovery/v2/utils/TestUtilities.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/SpeechToText.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AcousticModel.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AcousticModels.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AudioDetails.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AudioListing.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java | 2 +- .../ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java | 2 +- .../speech_to_text/v1/model/AudioMetricsHistogramBin.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AudioResource.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/AudioResources.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/Corpora.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/Corpus.java | 2 +- .../speech_to_text/v1/model/CreateAcousticModelOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/CreateJobOptions.java | 2 +- .../speech_to_text/v1/model/CreateLanguageModelOptions.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java | 2 +- .../speech_to_text/v1/model/DeleteAcousticModelOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java | 2 +- .../watson/speech_to_text/v1/model/DeleteGrammarOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java | 2 +- .../speech_to_text/v1/model/DeleteLanguageModelOptions.java | 2 +- .../watson/speech_to_text/v1/model/DeleteUserDataOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java | 2 +- .../watson/speech_to_text/v1/model/GetAcousticModelOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java | 2 +- .../watson/speech_to_text/v1/model/GetLanguageModelOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/Grammar.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/Grammars.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/KeywordResult.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/LanguageModel.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/LanguageModels.java | 2 +- .../speech_to_text/v1/model/ListAcousticModelsOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ListAudioOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java | 2 +- .../speech_to_text/v1/model/ListLanguageModelsOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ListModelsOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ListWordsOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java | 2 +- .../ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java | 2 +- .../ibm/watson/speech_to_text/v1/model/RecognizeOptions.java | 2 +- .../watson/speech_to_text/v1/model/RegisterCallbackOptions.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java | 2 +- .../speech_to_text/v1/model/ResetAcousticModelOptions.java | 2 +- .../speech_to_text/v1/model/ResetLanguageModelOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/SpeechModel.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/SpeechModels.java | 2 +- .../speech_to_text/v1/model/SpeechRecognitionAlternative.java | 2 +- .../watson/speech_to_text/v1/model/SpeechRecognitionResult.java | 2 +- .../speech_to_text/v1/model/SpeechRecognitionResults.java | 2 +- .../ibm/watson/speech_to_text/v1/model/SupportedFeatures.java | 2 +- .../speech_to_text/v1/model/TrainAcousticModelOptions.java | 2 +- .../speech_to_text/v1/model/TrainLanguageModelOptions.java | 2 +- .../ibm/watson/speech_to_text/v1/model/TrainingResponse.java | 2 +- .../com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java | 2 +- .../speech_to_text/v1/model/UnregisterCallbackOptions.java | 2 +- .../speech_to_text/v1/model/UpgradeAcousticModelOptions.java | 2 +- .../speech_to_text/v1/model/UpgradeLanguageModelOptions.java | 2 +- .../main/java/com/ibm/watson/speech_to_text/v1/model/Word.java | 2 +- .../watson/speech_to_text/v1/model/WordAlternativeResult.java | 2 +- .../watson/speech_to_text/v1/model/WordAlternativeResults.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/model/WordError.java | 2 +- .../main/java/com/ibm/watson/speech_to_text/v1/model/Words.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/package-info.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java | 2 +- .../java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java | 2 +- .../com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java | 2 +- .../watson/text_to_speech/v1/model/AddCustomPromptOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java | 2 +- .../text_to_speech/v1/model/CreateCustomModelOptions.java | 2 +- .../text_to_speech/v1/model/CreateSpeakerModelOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/CustomModel.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/CustomModels.java | 2 +- .../text_to_speech/v1/model/DeleteCustomModelOptions.java | 2 +- .../text_to_speech/v1/model/DeleteCustomPromptOptions.java | 2 +- .../text_to_speech/v1/model/DeleteSpeakerModelOptions.java | 2 +- .../watson/text_to_speech/v1/model/DeleteUserDataOptions.java | 2 +- .../ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java | 2 +- .../watson/text_to_speech/v1/model/GetCustomModelOptions.java | 2 +- .../watson/text_to_speech/v1/model/GetCustomPromptOptions.java | 2 +- .../watson/text_to_speech/v1/model/GetPronunciationOptions.java | 2 +- .../watson/text_to_speech/v1/model/GetSpeakerModelOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java | 2 +- .../watson/text_to_speech/v1/model/ListCustomModelsOptions.java | 2 +- .../text_to_speech/v1/model/ListCustomPromptsOptions.java | 2 +- .../text_to_speech/v1/model/ListSpeakerModelsOptions.java | 2 +- .../ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java | 2 +- .../ibm/watson/text_to_speech/v1/model/ListWordsOptions.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/model/Prompt.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/model/Prompts.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/Pronunciation.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/model/Speaker.java | 2 +- .../ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java | 2 +- .../ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/model/Speakers.java | 2 +- .../ibm/watson/text_to_speech/v1/model/SupportedFeatures.java | 2 +- .../ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java | 2 +- .../com/ibm/watson/text_to_speech/v1/model/Translation.java | 2 +- .../text_to_speech/v1/model/UpdateCustomModelOptions.java | 2 +- .../main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/model/Voices.java | 2 +- .../main/java/com/ibm/watson/text_to_speech/v1/model/Word.java | 2 +- .../main/java/com/ibm/watson/text_to_speech/v1/model/Words.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/package-info.java | 2 +- .../java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java | 2 +- .../com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java | 2 +- 558 files changed, 558 insertions(+), 558 deletions(-) diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java index b9f865e6b5..026d672a48 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java index 70c1b69101..b563417282 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java index c84f6aff6b..791bdf2cc9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java index a4ecb3240a..30569021ea 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java index 5c49dd8d3b..76611d1f71 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java index 703430b82a..939e5f580a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java index 21a31849bd..d5840b03af 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java index d9e356ed9f..eb7cb1078a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java index 5a77e961f7..a864109831 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java index d8d293c20a..6b3c1d60a6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Context.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java index 0c7c8fac7e..df36b2032f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Counterexample.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java index 80f23c8287..2b07cced72 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CounterexampleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java index 776a4ec5ff..27b3a9e92d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java index 4948adcce8..af160c9061 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java index a8799f596f..2614611051 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java index b31bbdd032..b27c226a16 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java index 701577e4cb..7aff2e8be3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java index 7190514337..3dae5e0730 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java index a1a9efb2d7..a1e8d20e99 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java index 126ddbf9a3..5f645b9084 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java index 7d1ec802cb..75624523cf 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java index 746dd0673a..b184a4064c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java index c60c4c2349..76cdc34ed6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java index 3779168661..baa22d73ff 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/CreateWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java index 7b4a711f46..bdaaa73d6a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java index aae01ce1fc..ddd3bc396c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java index db2ef5c04b..d6ddd677fe 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java index 1d06a94ed2..5599e588a5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java index 9b4b66f6b6..9394b8ae51 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java index 26bd471822..f4bb375e6a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java index b7097b588f..c53c1735af 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java index cadaae7ba9..9338a62ac2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java index 9cf7991eef..85d048abf7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DeleteWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java index b5d64a9571..b76dcc8ca4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java index 12be01a0a5..7460443db7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java index 63626cec5f..5b138fa980 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java index 887ff2d613..281a6738ce 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java index 64ce52c8a3..9ef1cafb65 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeNextStep.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java index 23e42525fb..2f49be9ea5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java index 44b5741345..0ec868810d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputConnectToAgentTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java index 2307bfa534..0dcac9e1e6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java index 07ec650673..d217dc51fa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java index 9d72ed76fd..ef1563daa0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java index bbc4c5c76a..c89aa5abf8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java index 87aed0075d..ea26846188 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java index 94ad391435..a83ebe0897 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java index e54d30a649..ae005273ba 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java index e27dae0d35..49c046a5b8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java index 88661a0f12..d37ffd716c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java index 3ba0775b34..f9524dd5b2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java index 1db469c5e1..51975ba1cb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java index 6ee4f9dafc..03ff8da2fa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputModifiers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java index 991d24240d..f5c0d073b1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java index 1fa5f8cd41..c6d8c1d037 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputOptionsElementValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java index 1bb323e118..ba8d16b6a7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputTextValuesElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java index 74c025b46a..78d92f013c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeVisitedDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java index 4b88a882de..30b7a68c1b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java index ea5c77a2c4..3c5e1530df 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java index 2ac42c0860..c753e9cb88 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Entity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java index c9b5af911a..744c50c0a0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java index f1c372c1ff..a381eb16e4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMention.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java index d6119ba117..8d31644fb1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/EntityMentionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java index 9b5d5851e9..422e3a5cbe 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Example.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java index f88e08da0a..1b8e27a8fc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExampleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java index 02b58ba103..b917693956 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ExportWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java index 4868c1e54a..d97e00dff2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java index b328f67fdc..3787e20764 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java index 91cda6e576..a1176c282a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java index 01656d0cfa..416bb3a580 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java index fe34bc4c53..358b9fbcc1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java index 4754d96cb4..4bb883c447 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java index 336711bb7d..004815013f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java index cacd9dc9a7..636698cf09 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/GetWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java index 029aa562bf..c9d78bf9a3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Intent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java index f260c0a90b..aff2659db5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/IntentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java index 17adaaa9c4..f230f37b47 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListAllLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java index fee3cd9dbf..923a6cf0e2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListCounterexamplesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java index 5cc5c7210a..e0e379f240 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListDialogNodesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java index 6f263ee784..5bde74c0b6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListEntitiesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java index a8ea214394..cb9c4d04ab 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListExamplesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java index 7497f9632c..a022fe595f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListIntentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java index 81e0cd06ca..92e26d0d00 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java index 7f25c64e86..b2a5de946e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListMentionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java index 314de3cd93..3c794bbbe0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListSynonymsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java index a73a3c0d5c..93d4ed90e1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListValuesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java index 28b3f4c0d1..1452142121 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ListWorkspacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java index 13ace4db53..60faa6695c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Log.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java index 9ef8b229f1..741d5a7db9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java index 937b66d4ae..6bfac0d015 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java index b4368929fc..a1445839df 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogMessageSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java index 2f22512046..1abfdc2cf6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/LogPagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java index 363856d50a..f7dc287904 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Mention.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java index f9a4e83ebc..c661adf3aa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageContextMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java index c29507b343..af19308b24 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageInput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java index 2f39c7868d..7f7ea15a2c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java index ad5e0db38a..13907a4831 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageRequest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java index 06e8c0a4e0..bbee4e5803 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/MessageResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java index 685f87544b..94bb544239 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/OutputData.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java index b289d28d65..e0f8b841fa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Pagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java index ddfc2d667a..93d0c289c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ResponseGenericChannel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java index 537d87d763..52aacfbebd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java index bbb3c3b236..eb7ce56abb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java index 41c5d84891..a4e654279b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityInterpretation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java index 993dc76362..9ffe6b8427 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntityRole.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java index 2cd97781f1..c60fd8effc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java index b2b05c485b..c9d96256a5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java index fc2da527a3..927428615f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java index d77c637c9f..4c110f4f96 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java index 4c71beb97b..ed4198fcae 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java index af2c0b4507..b5e957ea02 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java index b49947e932..92932326b2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java index 565110a145..b087b49a81 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java index 04a0fb3e4c..be94efe951 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java index 03a270804c..d3554705d7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java index 5d87621e27..af0a6ca0a5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java index 40bfb43f2e..ec17b5eee8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java index 85df306c20..ce94e813f2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java index 108600d433..68a23b7e88 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/StatusError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java index 2be3dc5129..6860d79e61 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Synonym.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java index 2f8e64ae79..54f547936b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/SynonymCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java index c79cc10acc..accef10adc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateCounterexampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java index 89d53aab51..a0a29569b5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateDialogNodeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java index 37ba5ad952..5adcc61633 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateEntityOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java index 6863175d82..8de7bd36e5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateExampleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java index 3dfd9e9ee1..8a0247e353 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateIntentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java index a85f862447..7af939d703 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateSynonymOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java index 35318497bc..4058378978 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateValueOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java index 96defb0c77..fb6d5e2cb7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceAsyncOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java index 50b99afd9a..a1c069de5f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/UpdateWorkspaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java index 60ef41c1aa..c538586599 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Value.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java index 256d7c38df..869b0a0702 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/ValueCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java index 9b1d9aa420..7a9efcf30b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Webhook.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java index c590f1d79c..436bfb87b6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WebhookHeader.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java index 78c481834e..4fc9c506a7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/Workspace.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java index 5bd68ab68a..6c98c577cc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2017, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java index 3c842541d9..6545cf2d07 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceCounts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java index 15d334dfb8..ccab1bbf8f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java index cd1cbf5f7f..80f3d6c563 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java index c0b39d91b5..ea83778cf9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsNlp.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java index 227493d4d9..f948dc2ecf 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsOffTopic.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java index eb471372a4..2cb0a99a5d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsSystemEntities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java index 32d0e745cb..b4e0484f73 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsTooling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java index 3ae4569c2c..2c201294c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java index e51c6fead6..a5ad57a6d0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AgentAvailabilityMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java index 0a247e00b9..a58601d0c3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java index 3c13096913..c8c471f9ab 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantData.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java index 7a1b696b3b..ed7e27d76d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java index cd7928f154..ec42a9ab0b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/AssistantState.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java index c9a48e8236..99c91f1939 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestration.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java index b9b92f3677..83988680d4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java index 36702559ad..926510629f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java index 10b6e5d1ca..e40425a7c5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java index 7d459037e4..f9b8bf8734 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java index b85b69fdf3..7c18e41109 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/BulkClassifyUtterance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java index 3582732ac8..4b040d9d8f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CaptureGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java index e9c6f612ed..64b78d7773 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java index 78bbf25463..21b3b7ff1c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java index 796cc50d24..ff4ebb0f5a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ChannelTransferTargetChat.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java index 2135ef30f2..be3c309ab6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateAssistantOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java index 2df89ae548..e77ee9b4c4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java index 91eeb60f2e..c9731f2334 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/CreateSessionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java index 57dd003c46..5b6a60c879 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteAssistantOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java index 7b099fb4d3..a800d9be56 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java index 4b6f95a5b0..c7e3ac2e8c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteSessionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java index 993cfed06d..ab31e077f9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java index 0227ea7bd5..9fd1b9afda 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DeployReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java index 54945331b0..b8233f14bc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogLogMessage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java index b531472527..2a9ef0237d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java index 75f63d74f8..d2d9ac173a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputConnectToAgentTransferInfo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java index 7ff329ff2c..812e7fe145 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java index 70181433c8..46c1e983f7 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeOutputOptionsElementValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java index 8d79140aa2..081831d590 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogNodeVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java index eb40bf2467..eb1c29b233 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java index 51695aa85d..fb3208180f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestionValue.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java index 601a4be5dd..76f418cc8e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Environment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java index e728380922..e4b387f144 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java index 411b3c8170..987a43cb75 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java index 64641afcee..8514538fca 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/EnvironmentSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java index 045aea997a..5cedb8d8b1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ExportSkillsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java index bb32ff4608..d2a3885e1c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetEnvironmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java index 88b09fee39..929f5d9d8a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetReleaseOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java index 6af67ec78c..8c8db0ec27 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GetSkillOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java index 2860b823c3..1247413eb2 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java index 4f619ccbae..1622185d1b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ImportSkillsStatusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java index 59140411c5..d2fa6f8874 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/IntegrationReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java index dcdd28a959..5eabe3c0a6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListAssistantsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java index 53cc2b9137..1037229a83 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListEnvironmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java index 12d20a2ca0..ef7a3514dd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java index 06d12fb984..09a334cc41 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListReleasesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java index 847a14c60a..167d3c5799 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java index bf62b20686..ff6347d16d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java index 3800d8e619..94fdb6326d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java index 1e46248d1c..48abb2199d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java index 6c1faa9e34..b9d86634e1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceDialogNode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java index 683208bfbe..ee56151819 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceHandler.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java index dd6fa094a9..0d9f650e2d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogMessageSourceStep.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java index dd0e1cd911..139dfe1a7f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java index ca38764c6f..9554af80fa 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java index 725fbf45a1..66d65e00a1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobal.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java index 938bbc57cb..97b18271d4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextGlobalSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java index 9e6279075c..8c9d6d467e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkillSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java index d1828a9400..659eaba8ab 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkills.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java index b460f82eab..eb816d5fb9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java index d86d48c8ed..6a3e4017b1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java index 16646695c4..99c897864e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java index b839f77392..a8c8206ed6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputOptionsSpelling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java index 016667e78e..69c6ea59bc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java index 82084abf24..a76c7ce378 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutput.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java index a4ee67d561..b32857b7da 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebug.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java index 4c596e63c1..97057b4dd9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java index 8f226d7427..57efba8589 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionFinished.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java index 4cd680d5ea..1ed5d4579e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java index 0e8a636d6b..d4ec6acead 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java index d5adb0fc76..5831188a20 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventHandlerVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java index 7724ed9854..bc2ddd7945 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventNodeVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java index 065a74acc3..fd22e5dc74 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSearch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java index a81967cbe5..a06536a001 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepAnswered.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java index 82e2c19c51..0fd3eb34fc 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventStepVisited.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java index f84f298269..170d501947 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputSpelling.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java index 67b8d6fa14..736a6fe637 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java index 0d04d03586..e2d5eb3153 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Pagination.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java index 45b04785c6..38c3a47b64 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Release.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java index 910ce0223e..e9b6d0c371 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java index 2f67af3ad2..fd66154370 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseContent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java index 4821906e6c..7901a0fb2a 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ReleaseSkill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java index 2031820985..0cc31f7a05 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RequestAnalytics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java index f790528b7e..8200a08ab3 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericChannel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java index 6f6ebf2d7c..cd67fed6fe 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java index 8beca95d21..ea779fbe19 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java index cfd8742c3d..7b3c2ad64e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityInterpretation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java index 2ca6b1b3de..315978c8fd 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntityRole.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java index dbe7cb4f74..70a9bf87a9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeIntent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java index 75ef4ad8de..a4d74921f5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java index d60556cd92..56bfaee887 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java index 820b142668..148895299f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java index 4949ac3eed..51af855df0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java index e204b3bf4d..74c2386502 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeDate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java index 31733278c8..f2833c6a2e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeIframe.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java index cb089838d3..0afb76fe2e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java index 032cc2433b..5602a52ed5 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeOption.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java index c8092a6a30..979e3f8825 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypePause.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java index 41d11a2514..a60d12fedf 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSearch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java index bf70de0a0b..c00057637e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeSuggestion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java index 03ea626c45..7785b5a164 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java index f13c10629d..ad4276e0ac 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeUserDefined.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java index 32a0d8eeed..55b448e00f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeVideo.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java index 60bffed05e..1009c16433 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java index 08fccd63a1..434299302d 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultAnswer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java index 67e641c2e7..5159b13fb6 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultHighlight.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java index 4aa7b72b85..065bc768b9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java index 9d1a58451b..4d0da896db 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettings.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java index 6a132eab83..0aa11cdbde 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscovery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java index b62faaab35..0c7b498b39 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsDiscoveryAuthentication.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java index 8e5cb77a89..6b85b69aa9 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsMessages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java index 0a31588b2c..27b1d47814 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSettingsSchemaMapping.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java index 8f77d59b3a..b569c9bdce 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchSkillWarning.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java index 3e207f6aa1..63817af86f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SessionResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java index 08c22e57bc..b3c5ae2dae 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Skill.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java index c696baf66e..67f4332635 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillImport.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java index dc7806f2d6..a1c8e51534 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsAsyncRequestStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java index 8de8756860..45c0b1c310 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SkillsExport.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java index 70656c0f20..a203cc6c46 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/StatusError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java index 937754f2ab..166b72776e 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventActionSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java index 749da57752..287ab6d477 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCallout.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java index e5a72c0ded..675d9a3be0 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java index 96c42d5721..1bbb39ea9c 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventNodeSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java index c15aa3f62b..a32726575f 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventSearchError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java index 2afc2a663c..d510469298 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java index b7e023f4e4..d4e011938b 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java b/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java index 3963cbad75..d6fbde1a6b 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java index 36dbfa46d4..967107c000 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java index 1a22f5c674..ee3e0eeb93 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentOrchestrationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java index d78b6a7272..e38bd36b50 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/BaseEnvironmentReleaseReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java index d5e3f2aa3b..2ac8d5ed15 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ImportSkillsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java index 7094b8bef8..1a409310be 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java index 9940451858..10a5b1d8f6 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageStatelessOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java index 8da1cc6244..f74c1dd992 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchSettingsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java index 79bfdcb16b..6b1c12b14d 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SkillImportTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java index a189d0f97e..647b33926e 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventCalloutCalloutTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java index 2882a05474..e7e8316e9b 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateEnvironmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java index fe007f3452..c2160d2bdc 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/UpdateSkillOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java index 26cf9a9487..e1ad03c5a1 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/common/src/test/java/com/ibm/watson/common/RetryRunner.java b/common/src/test/java/com/ibm/watson/common/RetryRunner.java index 03dcd2e6f7..bb6e734a08 100644 --- a/common/src/test/java/com/ibm/watson/common/RetryRunner.java +++ b/common/src/test/java/com/ibm/watson/common/RetryRunner.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java index 3de39048d6..82086ad052 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java index 02ef1ebd0a..afcb38314b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java index 55a200d05b..4521bf9b87 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java index c734dc6f08..b3fa0c2a06 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java index 8d234d25ae..453556352c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java index 5865eac0e0..7ac681b28f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java index 92a9227a6d..e437c863f7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java index a3779de09e..a3a7936f90 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java index 193e8308a3..41b497b415 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java index 1446e066a3..d7ec6be5a9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java index 2e01a8ee25..0e1594f598 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java index bf6bad2538..02b0875110 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java index 89eddcd124..ffda748e93 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java index fe4f1b1d8a..b9378decc5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java index b366485525..5a682eaca6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java index fbc977733c..420e7c446a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java index c21c3783d3..534b99a264 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java index fed83d946d..73da104b1d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java index e90ea3f7be..ee89ce5dc8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java index e8e21ecd79..92b28a99d6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java index 0e98849ac6..be01402808 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java index 7c7b97e08b..976db59516 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java index a89934518f..83174d4842 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java index 5dacff5fe3..b35a2a8f39 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java index cf83287016..0dd0b2009b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java index 50699a9a9f..92ee165a1a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java index d216315bf2..fe478dd98a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java index 9e420586d8..806a5a782e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java index eb4545db71..955824fffe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java index 3ce9869fe4..30e48c9cf6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java index 3fe8d69e96..b3bfcb785a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java index 86f5d13eef..39a6887050 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java index 79b77163f8..f5f5ff19fa 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java index eb2a7c8394..c4b6dc0380 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java index 618d53c0ad..dc658ceb97 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java index 264b7f169f..2173a907a5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java index f8d12be054..c9fd4638d1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java index 462c8cb332..d108f655ff 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java index e807646f1f..ffe8b80813 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java index 4e0335979c..a7c9d4098e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java index cf8c2d6ba0..56574dda1c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java index 92c8e0a2fe..cc0520b746 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java index 29b4426aec..6561cc7905 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java index ab35efd6d0..5e0ce17672 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java index 9d13c2e62d..db50d4be52 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java index c399f2b7fc..1fcd6dfcc5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java index 927291cf35..8f48212084 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java index 7b745dc5a6..559257d50b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java index acbc2a42b6..97cf7d2afd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java index 237eda2774..4440830478 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java index bb1d3b03c7..a0ca90dfed 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java index accbf48101..5070dd1972 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java index 5c9c12717b..966661ed58 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java index ec6c28298d..ed8de108bb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java index 5cb8469dfe..41fc7d7c1b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java index 18d6051f9e..9b1fed43e1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java index 774ce497d2..7b774eebf8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java index 8bd496d57b..72528d5973 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java index be4d6f8f94..35f76d8713 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java index 8c4374a833..2be55eef73 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java index b6c99c511a..1eb988d99f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java index f7eb9cdc66..0dcdc3798a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java index 20d925b457..bc13de61ae 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java index d9a0aa5cfc..95c34a281e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java index 82acf8cefe..30e1be711d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java index a42f183c2f..1e0bdb40e0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java index 5366ee019d..7b3395b73d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java index 5526aa60a8..d1d4277b57 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java index 9a22eb75a6..ce6cd25208 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java index 8f5d2307d0..ad5302611e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java index 5cd98c8758..4184363c2a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java index d8014479f3..a4881ab044 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java index 649c6be5d5..37fc80d0d2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java index d6f60488e9..1134fcf62b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java index b81a52bea2..35d8a20b40 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java index 147ca005d2..6de91251c1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java index d32acf9d5d..f2ab4f5eb5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java index 7500274ae4..c561ddbbaa 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java index 99599df08a..d80dbaa4f2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java index c548eef9ee..2fab873f4d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java index 3b90f5059a..35a230e881 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java index 8205f1c41b..48fb2c4cdb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java index 77d54aa647..743f2aed93 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java index 22ce86ae68..2112aef7fb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java index 445c8d1447..86d08058bf 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java index 9e539ef2be..75f708329d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java index b1a4f7a2d5..4ff60c983c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java index e8391aa71a..7cabf8636d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java index 701be13935..26a0effdb9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java index 71080fec1c..a6919f70e7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java index 6845a1e646..bbd2f0bf2e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java index e4b11a8f28..198c555edf 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java index 9d96beffba..12c0a9c580 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java index 94c40a5f0b..a4da517ff8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java index 0c8ddfa3ca..d512af8f6e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java index 0bc9da2f8e..34cfd56179 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java index 1d9e0f8a1d..0a147fc2ec 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java index 76e9cc7d6f..4e0109c6f9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java index 80d0b348c0..ee38b65ec9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java index 0c99e3f763..6c9859786f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java index abc4393f1b..6dc6e6b127 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java index 85f8ad4d1a..e7e9327eaf 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java index b593d4f326..804e9c86a5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java index 0117f2f941..dd81cf096f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java index 8c0e4a4102..03fd2e0a0b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java index 1dd43db122..4510f6ac52 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java index 513cf067dc..e4072f6688 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java index b7e576d89e..874b6aabc8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java index 15cb9daf76..03c409deb1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java index 9a2f6367d8..d3da1992d6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java index af85e32af7..d3840a7058 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java index ddfbb2fe97..bd8295bee9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java index 3add5caf2e..a126a24114 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java index 58db1a6b8e..b8225b35dd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java index f527ab8eb7..9c9e82588b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java index db63d21646..7881309749 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java index 67418f8267..6f79b5367c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java index aa69c3d07f..3dc53751d3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java index d22ddc44b6..a35b541d1f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java index fdcd4b2db0..3b0a65566d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java index f5c6a28076..35c4b4cdcd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java index 35aa02bded..ae89e655a3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2023, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java index b0196f1238..481fbdf12b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java index 04547f9c56..cbb2dbf140 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java index a005e1f393..a42dc874f6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java index 363ed3b527..2274a56e4d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java index eadcb28576..999e4244d5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java index 3e6665d59b..7dabdd2582 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java index 438007b374..2c48b7d340 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java index bf9a5393dc..64dd5f2c67 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java index 5443415f36..41f62d2fba 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java index 1cb9bd411b..1b93fd28d4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java index 5de18b4691..718d00f56e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java index aa8706ee44..23f990bd81 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java index 376d2ce8c0..b1308b4e16 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java index 0c01555b4a..c2d02cf1c2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java index a5ff56b650..8a2d95bfd3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java index eb3ab11c8c..77f2e94e23 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java index eb5fcd27e3..baae8079b0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java index cf38d04219..330258583f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java index 2314bd64b6..a9f7616eff 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java index b837f3fba4..b97ac9c808 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2022, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java index 255a0b4f41..fc7282a162 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java index d7f7d2b2ff..0a2adf5ac9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java index f7eb31d73d..8736c708cb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java index 40a5d0c414..70c52b8a75 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java index f699afd217..a93b9daa2e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java index 41cd9f9931..f244f670ad 100644 --- a/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/DiscoveryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java b/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java index 5fb30f6649..7cecabfd8f 100644 --- a/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java +++ b/discovery/src/test/java/com/ibm/watson/discovery/v2/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java index 58b4e694a2..e4b316cbc9 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java index 4e7f0e288f..3c4cf150b8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java index b68d47ed5c..81dfdf516d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java index c48f54e426..3fdded026e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java index 910c2763bc..d302ff9f43 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java index b592235d5b..624b969f57 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java index aba6752f2f..5a0f176784 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java index 76840a9439..b8ed50e4b5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AddWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java index 74d8bf5bf8..b51fe9da57 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java index fe87636370..0cbaf3a2f2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioListing.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java index 57c6971d62..8d5215cce8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetrics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java index 9e8d0b6bb5..da9a1d6e18 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java index ccd26638f5..9c277eeca7 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioMetricsHistogramBin.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java index 70ffefaf7f..cd57804215 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java index c2bf787556..f9f2cf1023 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AudioResources.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java index a05b617cc3..f8f6e57fb3 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java index 24e0d47bbd..6fb9c6211b 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CheckJobsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java index dd8b124260..2e6d64cd4d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpora.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java index ebe95e5ed9..6dba06236a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Corpus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java index 55e8918013..c2105ed97d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java index 6fbaca0932..bafdfe5340 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java index 0b05f0a6c4..91228c8cc6 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java index 12f5682ca3..ced6c0ff1f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java index 6fe946d909..0ae5fa6aa4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java index 5cd532a02c..3000e4b7fd 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java index 099bdfdb42..38da85caf5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java index 1d350f1b50..d0ea19aae0 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java index 651d0b70e4..5c8b627c4d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java index 075c47e211..4b62168fa7 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java index a563019be9..5ec4a6e2f8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java index 130c7d5125..66a0551639 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java index 62ffa7ffc4..db822dc80d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java index 65c9bd5eb2..a729388fa7 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java index dc6df1f693..90c113454a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetCorpusOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java index c088c4e07e..b401ae6561 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetGrammarOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java index 0f329ddb37..900ac96b2e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java index ff79fd634e..c5ea73ef0d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java index 9dc767eba4..524cd1a855 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java index bd74114aab..8a25e68554 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java index ce5d6a6aca..7422e9a85e 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java index ccc72efbea..fe90e3cd12 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/KeywordResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java index 76b15e5da4..ab0193e50c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java index 35ed2ecab1..c26a36ca84 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/LanguageModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java index 4bc8224b06..75b5d54c6f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAcousticModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java index a6f9036883..46a7039e15 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java index 42c8c855ef..16c14e53d8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java index e36043eb75..e60400e45b 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java index 57d5a0de13..0351b5fa6c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java index cdef9106d1..e85ed232e1 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java index a31f25bad8..189430c56c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java index 58dc6c4f2f..13909777a8 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java index b7fec9f473..f67da21525 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java index 30c3e7e0a4..08ac9875f2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java index 53dc645527..89280df2bc 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJobs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java index 4c1afd9fb8..ce7689934b 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java index 6399ab93ce..ed05bba31c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java index 53d0a65a32..c9fe53a67a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java index 606979e3db..041a3d3688 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java index f1ba982a6a..99459ac492 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java index ce5d05138b..e362991b47 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java index 2cf825a6cc..9224f2242a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java index c2bdc50eb4..67892178f4 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java index e80b24b270..419433566a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionAlternative.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java index 4311d956d7..79c7e0e3cd 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java index f2f3b06fd4..b9f3be382a 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechRecognitionResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java index f0e05edb9f..61225ffbbd 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SupportedFeatures.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java index bac74dbcec..00d5dce54f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java index bce52bd609..2aaaf3f2c1 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java index e58448de5e..20696e168c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java index 11b70b1a31..3eea674224 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingWarning.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java index 9bd69be788..b4f454b112 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UnregisterCallbackOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java index f75b132d73..3ccf0004db 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeAcousticModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java index 946cc23b0a..290c36e1aa 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/UpgradeLanguageModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java index 66932e21c2..64caa9b77c 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Word.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java index 98f22aab0e..038ebde53d 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java index 776f5daf1e..6654d4ffd5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordAlternativeResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java index 44cfc2af71..2bcc38ad3f 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/WordError.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java index 77dfea159d..faa1e435f0 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Words.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java index a52ea6d163..5d4cd287ed 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java index 56068190a6..1d612850ce 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextIT.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java index dc3af3002e..64e1dcbd1e 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java index 2041395f6a..5769590871 100644 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java index 63eedd760d..17fad790a9 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java index 1d4542831d..2019a77f48 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java index 58ab8e68e4..53407fc0c9 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java index 6f66cb934e..694c69c911 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java index 0ee54a37b4..4309b4911d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CreateSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java index cdfd7d8b9e..20d9c97161 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java index 79ca90caed..a4d6639a5b 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/CustomModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java index 3d6f396779..f42a289a06 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java index 157214ddc4..2f78478204 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java index 907426c1b7..0c0d92ccf7 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java index 6adbc2c25a..fa61d47dce 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java index c21e21e06e..59e067532a 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/DeleteWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java index 25fa92bb6d..7dc78c7533 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java index 4abde5177c..8bb49f1e94 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetCustomPromptOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java index ef102e94e3..1ba747a45d 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetPronunciationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java index 8a1e5e52ae..bb8402d2b6 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetSpeakerModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java index 081103940d..94386e13f8 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetVoiceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java index 21f13b8ed2..e81545b6ff 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/GetWordOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java index a40ecd4480..643feba2c7 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java index 4ca5f0f82e..a4cfca8f04 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListCustomPromptsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java index 5b727e7929..6901eaa50f 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListSpeakerModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java index bb1a70661c..137036c253 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListVoicesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java index b03b7d6581..83e345099e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/ListWordsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java index f9d8bc27b7..1eb893e17e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompt.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java index 2bd3b3321c..5c7988a096 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/PromptMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java index 75d0b5fb5b..f782e207a5 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Prompts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java index 4567fd8717..8d57c9c8de 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Pronunciation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java index 124a2acb4b..7007445894 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speaker.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java index 27661ad6a0..e4216bd859 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java index 436a8c7216..1895460def 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerCustomModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java index 0fc013a293..e2492ded6f 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java index a83396c962..504e5bad58 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SpeakerPrompt.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java index 69b2bdcc7e..a12dae5de1 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Speakers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2021, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java index b04b735fb6..f947ee3e8c 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SupportedFeatures.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java index 2b19f3088f..bd2b05e141 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java index 4306f29692..a2cc889579 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Translation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java index 6f4e59e4dc..2951101324 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/UpdateCustomModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java index 0ec0a18e20..83c6966203 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2016, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java index 9752529be1..0d8d23cddc 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Voices.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java index 900ea4831e..122155a54b 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Word.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java index 7c135fbf79..2ad5203001 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/Words.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2018, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java index 44b4f3858d..276bcf449e 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java +++ b/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java index 7cd4260319..856b34c6f7 100644 --- a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java +++ b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/TextToSpeechTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2019, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java index e72dac7aee..2bef2503eb 100644 --- a/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java +++ b/text-to-speech/src/test/java/com/ibm/watson/text_to_speech/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2020, 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at From d7650d7440671a191f787b06d79147a90b123e6b Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Wed, 4 Dec 2024 14:55:37 -0600 Subject: [PATCH 12/12] chore: java 8 compatibility --- assistant/pom.xml | 12 ------- .../v2/model/MessageEventDeserializer.java | 12 +++---- .../assistant/v2/AssistantServiceIT.java | 34 +++++++++---------- 3 files changed, 23 insertions(+), 35 deletions(-) diff --git a/assistant/pom.xml b/assistant/pom.xml index d3630854ce..5450d34449 100644 --- a/assistant/pom.xml +++ b/assistant/pom.xml @@ -2,18 +2,6 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - - - - org.apache.maven.plugins - maven-compiler-plugin - - 11 - 11 - - - - ibm-watson-parent diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java index 3c02ccda36..48c0fd7777 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageEventDeserializer.java @@ -45,7 +45,7 @@ public Builder() {} * @param inputStream the inputStream */ public Builder(InputStream inputStream) { - var inputStreamConnectStrategy = + InputStreamConnectStrategy inputStreamConnectStrategy = new InputStreamConnectStrategy.Builder().inputStream(inputStream).build(); this.eventSource = new EventSource.Builder(inputStreamConnectStrategy).build(); } @@ -66,7 +66,7 @@ public MessageEventDeserializer build() { * @return the MessageEventDeserializer builder */ public MessageEventDeserializer.Builder inputStream(InputStream inputStream) { - var inputStreamConnectStrategy = + InputStreamConnectStrategy inputStreamConnectStrategy = new InputStreamConnectStrategy.Builder().inputStream(inputStream).build(); this.eventSource = new EventSource.Builder(inputStreamConnectStrategy).build(); return this; @@ -109,8 +109,8 @@ public boolean hasNext() { } public T next() { - var gson = new Gson(); - var messageEvent = messageEvents.iterator().next(); + Gson gson = new Gson(); + MessageEvent messageEvent = messageEvents.iterator().next(); T item = (T) gson.fromJson(messageEvent.getData(), MessageStreamResponse.class); return item; } @@ -128,8 +128,8 @@ public boolean hasNext() { } public T next() { - var gson = new Gson(); - var messageEvent = messageEvents.iterator().next(); + Gson gson = new Gson(); + MessageEvent messageEvent = messageEvents.iterator().next(); T item = (T) gson.fromJson(messageEvent.getData(), StatelessMessageStreamResponse.class); return item; } diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java index dcc7118f37..6984d962f9 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/AssistantServiceIT.java @@ -296,9 +296,9 @@ public void testGettingReleases() { /** Test Provider API */ @Test public void testProviders() { - var listProviderOptions = new ListProvidersOptions.Builder().build(); - var listProvidersResponse = service.listProviders(listProviderOptions).execute().getResult(); - var providerId = listProvidersResponse.getConversationalSkillProviders().get(0).getProviderId(); + ListProvidersOptions listProviderOptions = new ListProvidersOptions.Builder().build(); + ProviderCollection listProvidersResponse = service.listProviders(listProviderOptions).execute().getResult(); + String providerId = listProvidersResponse.getConversationalSkillProviders().get(0).getProviderId(); assertNotNull(listProvidersResponse); assertNotNull(providerId); @@ -311,19 +311,19 @@ public void testProviders() { ProviderSpecification providerSpecification = new ProviderSpecification.Builder().servers(serverList).build(); - var password = new ProviderAuthenticationTypeAndValue.Builder().type("value").value("test").build(); - var basicFlow = new ProviderPrivateAuthenticationBasicFlow.Builder().password(password).build(); - var providerPrivate = new ProviderPrivate.Builder().authentication(basicFlow).build(); + ProviderAuthenticationTypeAndValue password = new ProviderAuthenticationTypeAndValue.Builder().type("value").value("test").build(); + ProviderPrivateAuthenticationBasicFlow basicFlow = new ProviderPrivateAuthenticationBasicFlow.Builder().password(password).build(); + ProviderPrivate providerPrivate = new ProviderPrivate.Builder().authentication(basicFlow).build(); // service.setServiceUrl("http://localhost:9001"); - var updateProvidersOptions = + UpdateProviderOptions updateProvidersOptions = new UpdateProviderOptions.Builder() .providerId(providerId) .specification(providerSpecification) .xPrivate(providerPrivate) .build(); - var updateProvidersResponse = + ProviderResponse updateProvidersResponse = service.updateProvider(updateProvidersOptions).execute().getResult(); assertNotNull(updateProvidersResponse); } @@ -332,37 +332,37 @@ public void testProviders() { @Test public void testImportRelease() throws IOException { InputStream testFile = new FileInputStream(RESOURCE + "demo_wa_V4.zip"); - var importOptions = + CreateReleaseImportOptions importOptions = new CreateReleaseImportOptions.Builder().assistantId(assistantId).body(testFile).build(); - var importResponse = service.createReleaseImport(importOptions).execute().getResult(); + CreateAssistantReleaseImportResponse importResponse = service.createReleaseImport(importOptions).execute().getResult(); assertNotNull(importResponse); } @Test public void testDownloadExportRelease() throws IOException { - var exportOptions = + DownloadReleaseExportOptions exportOptions = new DownloadReleaseExportOptions.Builder().assistantId(assistantId).release("1").build(); - var exportResponse = service.downloadReleaseExport(exportOptions).execute().getResult(); + CreateReleaseExportWithStatusErrors exportResponse = service.downloadReleaseExport(exportOptions).execute().getResult(); assertNotNull(exportResponse); } @Test public void testDownloadExportReleaseStream() throws IOException { - var exportOptions = + DownloadReleaseExportOptions exportOptions = new DownloadReleaseExportOptions.Builder().assistantId(assistantId).release("1").build(); - var exportReleaseStream = + InputStream exportReleaseStream = service.downloadReleaseExportAsStream(exportOptions).execute().getResult(); assertNotNull(exportReleaseStream); } @Test public void testMessageStreamStateless() throws IOException, StreamException { - var messageInput = + MessageInput messageInput = new MessageInput.Builder() .messageType("text") .text("can you list the steps to create a custom extension?") .build(); - var messageStreamStatelessOptions = + MessageStreamStatelessOptions messageStreamStatelessOptions = new MessageStreamStatelessOptions.Builder() .assistantId("99a74576-47de-42a9-ab05-9dd98978809b") .environmentId("03dce212-1aa3-436a-a747-8717a96ded5a") @@ -372,7 +372,7 @@ public void testMessageStreamStateless() throws IOException, StreamException { InputStream inputStream = service.messageStreamStateless(messageStreamStatelessOptions).execute().getResult(); - var messageDeserializer = new MessageEventDeserializer.Builder(inputStream).build(); + MessageEventDeserializer messageDeserializer = new MessageEventDeserializer.Builder(inputStream).build(); for (StatelessMessageStreamResponse message : messageDeserializer.statelessMessages()) { if (message.getPartialItem() != null) { assertNotNull(message.getPartialItem().getText());