ibm_watson 1.5.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +42 -4
- data/lib/ibm_watson/assistant_v1.rb +213 -195
- data/lib/ibm_watson/assistant_v2.rb +161 -17
- data/lib/ibm_watson/compare_comply_v1.rb +35 -21
- data/lib/ibm_watson/discovery_v1.rb +132 -13
- data/lib/ibm_watson/discovery_v2.rb +728 -21
- data/lib/ibm_watson/language_translator_v3.rb +205 -67
- data/lib/ibm_watson/natural_language_classifier_v1.rb +4 -2
- data/lib/ibm_watson/natural_language_understanding_v1.rb +21 -21
- data/lib/ibm_watson/personality_insights_v3.rb +27 -18
- data/lib/ibm_watson/speech_to_text_v1.rb +58 -46
- data/lib/ibm_watson/text_to_speech_v1.rb +113 -129
- data/lib/ibm_watson/tone_analyzer_v3.rb +12 -13
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +33 -16
- data/lib/ibm_watson/visual_recognition_v4.rb +58 -17
- data/test/integration/test_assistant_v1.rb +9 -0
- data/test/integration/test_assistant_v2.rb +27 -0
- data/test/integration/test_discovery_v2.rb +132 -6
- data/test/integration/test_language_translator_v3.rb +5 -0
- data/test/integration/test_text_to_speech_v1.rb +3 -3
- data/test/unit/test_assistant_v1.rb +150 -99
- data/test/unit/test_assistant_v2.rb +91 -12
- data/test/unit/test_compare_comply_v1.rb +20 -20
- data/test/unit/test_discovery_v1.rb +125 -125
- data/test/unit/test_discovery_v2.rb +262 -29
- data/test/unit/test_language_translator_v3.rb +85 -24
- data/test/unit/test_natural_language_classifier_v1.rb +17 -17
- data/test/unit/test_natural_language_understanding_v1.rb +10 -10
- data/test/unit/test_personality_insights_v3.rb +14 -14
- data/test/unit/test_speech_to_text_v1.rb +97 -97
- data/test/unit/test_text_to_speech_v1.rb +48 -48
- data/test/unit/test_tone_analyzer_v3.rb +12 -12
- data/test/unit/test_visual_recognition_v3.rb +16 -16
- data/test/unit/test_visual_recognition_v4.rb +40 -40
- metadata +12 -11
| @@ -13,7 +13,9 @@ | |
| 13 13 | 
             
            # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 14 14 | 
             
            # See the License for the specific language governing permissions and
         | 
| 15 15 | 
             
            # limitations under the License.
         | 
| 16 | 
            -
             | 
| 16 | 
            +
            #
         | 
| 17 | 
            +
            # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # The IBM Watson™ Assistant service combines machine learning, natural language
         | 
| 18 20 | 
             
            # understanding, and an integrated dialog editor to create conversation flows between your
         | 
| 19 21 | 
             
            # apps and your users.
         | 
| @@ -34,22 +36,15 @@ module IBMWatson | |
| 34 36 | 
             
              class AssistantV2 < IBMCloudSdkCore::BaseService
         | 
| 35 37 | 
             
                include Concurrent::Async
         | 
| 36 38 | 
             
                DEFAULT_SERVICE_NAME = "assistant"
         | 
| 37 | 
            -
                DEFAULT_SERVICE_URL = "https:// | 
| 39 | 
            +
                DEFAULT_SERVICE_URL = "https://api.us-south.assistant.watson.cloud.ibm.com"
         | 
| 40 | 
            +
                attr_accessor :version
         | 
| 38 41 | 
             
                ##
         | 
| 39 42 | 
             
                # @!method initialize(args)
         | 
| 40 43 | 
             
                # Construct a new client for the Assistant service.
         | 
| 41 44 | 
             
                #
         | 
| 42 45 | 
             
                # @param args [Hash] The args to initialize with
         | 
| 43 | 
            -
                # @option args version [String]  | 
| 44 | 
            -
                #    | 
| 45 | 
            -
                #   incompatible way, a new minor version of the API is released.
         | 
| 46 | 
            -
                #   The service uses the API version for the date you specify, or
         | 
| 47 | 
            -
                #   the most recent version before that date. Note that you should
         | 
| 48 | 
            -
                #   not programmatically specify the current date at runtime, in
         | 
| 49 | 
            -
                #   case the API has been updated since your application's release.
         | 
| 50 | 
            -
                #   Instead, specify a version date that is compatible with your
         | 
| 51 | 
            -
                #   application, and don't change it until your application is
         | 
| 52 | 
            -
                #   ready for a later version.
         | 
| 46 | 
            +
                # @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
         | 
| 47 | 
            +
                #   format. The current version is `2020-04-01`.
         | 
| 53 48 | 
             
                # @option args service_url [String] The base service URL to use when contacting the service.
         | 
| 54 49 | 
             
                #   The base service_url may differ between IBM Cloud regions.
         | 
| 55 50 | 
             
                # @option args authenticator [Object] The Authenticator instance to be configured for this service.
         | 
| @@ -58,10 +53,10 @@ module IBMWatson | |
| 58 53 | 
             
                def initialize(args = {})
         | 
| 59 54 | 
             
                  @__async_initialized__ = false
         | 
| 60 55 | 
             
                  defaults = {}
         | 
| 61 | 
            -
                  defaults[:version] = nil
         | 
| 62 56 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 63 57 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 64 58 | 
             
                  defaults[:authenticator] = nil
         | 
| 59 | 
            +
                  defaults[:version] = nil
         | 
| 65 60 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 66 61 | 
             
                  args = defaults.merge(args)
         | 
| 67 62 | 
             
                  @version = args[:version]
         | 
| @@ -94,6 +89,8 @@ module IBMWatson | |
| 94 89 | 
             
                def create_session(assistant_id:)
         | 
| 95 90 | 
             
                  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
         | 
| 96 91 |  | 
| 92 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 93 | 
            +
             | 
| 97 94 | 
             
                  headers = {
         | 
| 98 95 | 
             
                  }
         | 
| 99 96 | 
             
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "create_session")
         | 
| @@ -132,6 +129,8 @@ module IBMWatson | |
| 132 129 | 
             
                def delete_session(assistant_id:, session_id:)
         | 
| 133 130 | 
             
                  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
         | 
| 134 131 |  | 
| 132 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 133 | 
            +
             | 
| 135 134 | 
             
                  raise ArgumentError.new("session_id must be provided") if session_id.nil?
         | 
| 136 135 |  | 
| 137 136 | 
             
                  headers = {
         | 
| @@ -164,8 +163,6 @@ module IBMWatson | |
| 164 163 | 
             
                # Send user input to an assistant and receive a response, with conversation state
         | 
| 165 164 | 
             
                #   (including context data) stored by Watson Assistant for the duration of the
         | 
| 166 165 | 
             
                #   session.
         | 
| 167 | 
            -
                #
         | 
| 168 | 
            -
                #   There is no rate limit for this operation.
         | 
| 169 166 | 
             
                # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
         | 
| 170 167 | 
             
                #   Assistant user interface, open the assistant settings and click **API Details**.
         | 
| 171 168 | 
             
                #   For information about creating assistants, see the
         | 
| @@ -186,6 +183,8 @@ module IBMWatson | |
| 186 183 |  | 
| 187 184 | 
             
                  raise ArgumentError.new("session_id must be provided") if session_id.nil?
         | 
| 188 185 |  | 
| 186 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 187 | 
            +
             | 
| 189 188 | 
             
                  headers = {
         | 
| 190 189 | 
             
                  }
         | 
| 191 190 | 
             
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "message")
         | 
| @@ -218,8 +217,6 @@ module IBMWatson | |
| 218 217 | 
             
                # Send user input to assistant (stateless).
         | 
| 219 218 | 
             
                # Send user input to an assistant and receive a response, with conversation state
         | 
| 220 219 | 
             
                #   (including context data) managed by your application.
         | 
| 221 | 
            -
                #
         | 
| 222 | 
            -
                #   There is no rate limit for this operation.
         | 
| 223 220 | 
             
                # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
         | 
| 224 221 | 
             
                #   Assistant user interface, open the assistant settings and click **API Details**.
         | 
| 225 222 | 
             
                #   For information about creating assistants, see the
         | 
| @@ -238,6 +235,8 @@ module IBMWatson | |
| 238 235 | 
             
                def message_stateless(assistant_id:, input: nil, context: nil)
         | 
| 239 236 | 
             
                  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
         | 
| 240 237 |  | 
| 238 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 239 | 
            +
             | 
| 241 240 | 
             
                  headers = {
         | 
| 242 241 | 
             
                  }
         | 
| 243 242 | 
             
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "message_stateless")
         | 
| @@ -254,6 +253,151 @@ module IBMWatson | |
| 254 253 |  | 
| 255 254 | 
             
                  method_url = "/v2/assistants/%s/message" % [ERB::Util.url_encode(assistant_id)]
         | 
| 256 255 |  | 
| 256 | 
            +
                  response = request(
         | 
| 257 | 
            +
                    method: "POST",
         | 
| 258 | 
            +
                    url: method_url,
         | 
| 259 | 
            +
                    headers: headers,
         | 
| 260 | 
            +
                    params: params,
         | 
| 261 | 
            +
                    json: data,
         | 
| 262 | 
            +
                    accept_json: true
         | 
| 263 | 
            +
                  )
         | 
| 264 | 
            +
                  response
         | 
| 265 | 
            +
                end
         | 
| 266 | 
            +
                #########################
         | 
| 267 | 
            +
                # Logs
         | 
| 268 | 
            +
                #########################
         | 
| 269 | 
            +
             | 
| 270 | 
            +
                ##
         | 
| 271 | 
            +
                # @!method list_logs(assistant_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
         | 
| 272 | 
            +
                # List log events for an assistant.
         | 
| 273 | 
            +
                # List the events from the log of an assistant.
         | 
| 274 | 
            +
                #
         | 
| 275 | 
            +
                #   This method is available only with Premium plans.
         | 
| 276 | 
            +
                # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
         | 
| 277 | 
            +
                #   Assistant user interface, open the assistant settings and click **API Details**.
         | 
| 278 | 
            +
                #   For information about creating assistants, see the
         | 
| 279 | 
            +
                #   [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
         | 
| 280 | 
            +
                #
         | 
| 281 | 
            +
                #   **Note:** Currently, the v2 API does not support creating assistants.
         | 
| 282 | 
            +
                # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
         | 
| 283 | 
            +
                #   reverse the sort order, prefix the parameter value with a minus sign (`-`).
         | 
| 284 | 
            +
                # @param filter [String] A cacheable parameter that limits the results to those matching the specified
         | 
| 285 | 
            +
                #   filter. For more information, see the
         | 
| 286 | 
            +
                #   [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
         | 
| 287 | 
            +
                # @param page_limit [Fixnum] The number of records to return in each page of results.
         | 
| 288 | 
            +
                # @param cursor [String] A token identifying the page of results to retrieve.
         | 
| 289 | 
            +
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 290 | 
            +
                def list_logs(assistant_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
         | 
| 291 | 
            +
                  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
         | 
| 292 | 
            +
             | 
| 293 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 294 | 
            +
             | 
| 295 | 
            +
                  headers = {
         | 
| 296 | 
            +
                  }
         | 
| 297 | 
            +
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "list_logs")
         | 
| 298 | 
            +
                  headers.merge!(sdk_headers)
         | 
| 299 | 
            +
             | 
| 300 | 
            +
                  params = {
         | 
| 301 | 
            +
                    "version" => @version,
         | 
| 302 | 
            +
                    "sort" => sort,
         | 
| 303 | 
            +
                    "filter" => filter,
         | 
| 304 | 
            +
                    "page_limit" => page_limit,
         | 
| 305 | 
            +
                    "cursor" => cursor
         | 
| 306 | 
            +
                  }
         | 
| 307 | 
            +
             | 
| 308 | 
            +
                  method_url = "/v2/assistants/%s/logs" % [ERB::Util.url_encode(assistant_id)]
         | 
| 309 | 
            +
             | 
| 310 | 
            +
                  response = request(
         | 
| 311 | 
            +
                    method: "GET",
         | 
| 312 | 
            +
                    url: method_url,
         | 
| 313 | 
            +
                    headers: headers,
         | 
| 314 | 
            +
                    params: params,
         | 
| 315 | 
            +
                    accept_json: true
         | 
| 316 | 
            +
                  )
         | 
| 317 | 
            +
                  response
         | 
| 318 | 
            +
                end
         | 
| 319 | 
            +
                #########################
         | 
| 320 | 
            +
                # User data
         | 
| 321 | 
            +
                #########################
         | 
| 322 | 
            +
             | 
| 323 | 
            +
                ##
         | 
| 324 | 
            +
                # @!method delete_user_data(customer_id:)
         | 
| 325 | 
            +
                # Delete labeled data.
         | 
| 326 | 
            +
                # Deletes all data associated with a specified customer ID. The method has no effect
         | 
| 327 | 
            +
                #   if no data is associated with the customer ID.
         | 
| 328 | 
            +
                #
         | 
| 329 | 
            +
                #   You associate a customer ID with data by passing the `X-Watson-Metadata` header
         | 
| 330 | 
            +
                #   with a request that passes data. For more information about personal data and
         | 
| 331 | 
            +
                #   customer IDs, see [Information
         | 
| 332 | 
            +
                #   security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
         | 
| 333 | 
            +
                #
         | 
| 334 | 
            +
                #   This operation is limited to 4 requests per minute. For more information, see
         | 
| 335 | 
            +
                #   **Rate limiting**.
         | 
| 336 | 
            +
                # @param customer_id [String] The customer ID for which all data is to be deleted.
         | 
| 337 | 
            +
                # @return [nil]
         | 
| 338 | 
            +
                def delete_user_data(customer_id:)
         | 
| 339 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 340 | 
            +
             | 
| 341 | 
            +
                  raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
         | 
| 342 | 
            +
             | 
| 343 | 
            +
                  headers = {
         | 
| 344 | 
            +
                  }
         | 
| 345 | 
            +
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "delete_user_data")
         | 
| 346 | 
            +
                  headers.merge!(sdk_headers)
         | 
| 347 | 
            +
             | 
| 348 | 
            +
                  params = {
         | 
| 349 | 
            +
                    "version" => @version,
         | 
| 350 | 
            +
                    "customer_id" => customer_id
         | 
| 351 | 
            +
                  }
         | 
| 352 | 
            +
             | 
| 353 | 
            +
                  method_url = "/v2/user_data"
         | 
| 354 | 
            +
             | 
| 355 | 
            +
                  request(
         | 
| 356 | 
            +
                    method: "DELETE",
         | 
| 357 | 
            +
                    url: method_url,
         | 
| 358 | 
            +
                    headers: headers,
         | 
| 359 | 
            +
                    params: params,
         | 
| 360 | 
            +
                    accept_json: true
         | 
| 361 | 
            +
                  )
         | 
| 362 | 
            +
                  nil
         | 
| 363 | 
            +
                end
         | 
| 364 | 
            +
                #########################
         | 
| 365 | 
            +
                # bulkClassify
         | 
| 366 | 
            +
                #########################
         | 
| 367 | 
            +
             | 
| 368 | 
            +
                ##
         | 
| 369 | 
            +
                # @!method bulk_classify(skill_id:, input: nil)
         | 
| 370 | 
            +
                # Identify intents and entities in multiple user utterances.
         | 
| 371 | 
            +
                # Send multiple user inputs to a dialog skill in a single request and receive
         | 
| 372 | 
            +
                #   information about the intents and entities recognized in each input. This method
         | 
| 373 | 
            +
                #   is useful for testing and comparing the performance of different skills or skill
         | 
| 374 | 
            +
                #   versions.
         | 
| 375 | 
            +
                #
         | 
| 376 | 
            +
                #   This method is available only with Premium plans.
         | 
| 377 | 
            +
                # @param skill_id [String] Unique identifier of the skill. To find the skill ID in the Watson Assistant user
         | 
| 378 | 
            +
                #   interface, open the skill settings and click **API Details**.
         | 
| 379 | 
            +
                # @param input [Array[BulkClassifyUtterance]] An array of input utterances to classify.
         | 
| 380 | 
            +
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 381 | 
            +
                def bulk_classify(skill_id:, input: nil)
         | 
| 382 | 
            +
                  raise ArgumentError.new("skill_id must be provided") if skill_id.nil?
         | 
| 383 | 
            +
             | 
| 384 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 385 | 
            +
             | 
| 386 | 
            +
                  headers = {
         | 
| 387 | 
            +
                  }
         | 
| 388 | 
            +
                  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "bulk_classify")
         | 
| 389 | 
            +
                  headers.merge!(sdk_headers)
         | 
| 390 | 
            +
             | 
| 391 | 
            +
                  params = {
         | 
| 392 | 
            +
                    "version" => @version
         | 
| 393 | 
            +
                  }
         | 
| 394 | 
            +
             | 
| 395 | 
            +
                  data = {
         | 
| 396 | 
            +
                    "input" => input
         | 
| 397 | 
            +
                  }
         | 
| 398 | 
            +
             | 
| 399 | 
            +
                  method_url = "/v2/skills/%s/workspace/bulk_classify" % [ERB::Util.url_encode(skill_id)]
         | 
| 400 | 
            +
             | 
| 257 401 | 
             
                  response = request(
         | 
| 258 402 | 
             
                    method: "POST",
         | 
| 259 403 | 
             
                    url: method_url,
         | 
| @@ -13,7 +13,9 @@ | |
| 13 13 | 
             
            # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 14 14 | 
             
            # See the License for the specific language governing permissions and
         | 
| 15 15 | 
             
            # limitations under the License.
         | 
| 16 | 
            -
             | 
| 16 | 
            +
            #
         | 
| 17 | 
            +
            # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # IBM Watson™ Compare and Comply analyzes governing documents to provide details
         | 
| 18 20 | 
             
            # about critical aspects of the documents.
         | 
| 19 21 |  | 
| @@ -30,34 +32,28 @@ module IBMWatson | |
| 30 32 | 
             
              class CompareComplyV1 < IBMCloudSdkCore::BaseService
         | 
| 31 33 | 
             
                include Concurrent::Async
         | 
| 32 34 | 
             
                DEFAULT_SERVICE_NAME = "compare_comply"
         | 
| 33 | 
            -
                DEFAULT_SERVICE_URL = "https:// | 
| 35 | 
            +
                DEFAULT_SERVICE_URL = "https://api.us-south.compare-comply.watson.cloud.ibm.com"
         | 
| 36 | 
            +
                attr_accessor :version
         | 
| 34 37 | 
             
                ##
         | 
| 35 38 | 
             
                # @!method initialize(args)
         | 
| 36 39 | 
             
                # Construct a new client for the Compare Comply service.
         | 
| 37 40 | 
             
                #
         | 
| 38 41 | 
             
                # @param args [Hash] The args to initialize with
         | 
| 39 | 
            -
                # @option args version [String]  | 
| 40 | 
            -
                #    | 
| 41 | 
            -
                #   incompatible way, a new minor version of the API is released.
         | 
| 42 | 
            -
                #   The service uses the API version for the date you specify, or
         | 
| 43 | 
            -
                #   the most recent version before that date. Note that you should
         | 
| 44 | 
            -
                #   not programmatically specify the current date at runtime, in
         | 
| 45 | 
            -
                #   case the API has been updated since your application's release.
         | 
| 46 | 
            -
                #   Instead, specify a version date that is compatible with your
         | 
| 47 | 
            -
                #   application, and don't change it until your application is
         | 
| 48 | 
            -
                #   ready for a later version.
         | 
| 42 | 
            +
                # @option args version [String] Release date of the version of the API you want to use. Specify dates in
         | 
| 43 | 
            +
                #   YYYY-MM-DD format. The current version is `2018-10-15`.
         | 
| 49 44 | 
             
                # @option args service_url [String] The base service URL to use when contacting the service.
         | 
| 50 45 | 
             
                #   The base service_url may differ between IBM Cloud regions.
         | 
| 51 46 | 
             
                # @option args authenticator [Object] The Authenticator instance to be configured for this service.
         | 
| 52 47 | 
             
                # @option args service_name [String] The name of the service to configure. Will be used as the key to load
         | 
| 53 48 | 
             
                #   any external configuration, if applicable.
         | 
| 54 49 | 
             
                def initialize(args = {})
         | 
| 50 | 
            +
                  warn "On 30 November 2021, Compare and Comply will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk#compare-and-comply-deprecation."
         | 
| 55 51 | 
             
                  @__async_initialized__ = false
         | 
| 56 52 | 
             
                  defaults = {}
         | 
| 57 | 
            -
                  defaults[:version] = nil
         | 
| 58 53 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 59 54 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 60 55 | 
             
                  defaults[:authenticator] = nil
         | 
| 56 | 
            +
                  defaults[:version] = nil
         | 
| 61 57 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 62 58 | 
             
                  args = defaults.merge(args)
         | 
| 63 59 | 
             
                  @version = args[:version]
         | 
| @@ -84,6 +80,8 @@ module IBMWatson | |
| 84 80 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 85 81 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 86 82 | 
             
                def convert_to_html(file:, file_content_type: nil, model: nil)
         | 
| 83 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 84 | 
            +
             | 
| 87 85 | 
             
                  raise ArgumentError.new("file must be provided") if file.nil?
         | 
| 88 86 |  | 
| 89 87 | 
             
                  headers = {
         | 
| @@ -131,6 +129,8 @@ module IBMWatson | |
| 131 129 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 132 130 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 133 131 | 
             
                def classify_elements(file:, file_content_type: nil, model: nil)
         | 
| 132 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 133 | 
            +
             | 
| 134 134 | 
             
                  raise ArgumentError.new("file must be provided") if file.nil?
         | 
| 135 135 |  | 
| 136 136 | 
             
                  headers = {
         | 
| @@ -178,6 +178,8 @@ module IBMWatson | |
| 178 178 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 179 179 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 180 180 | 
             
                def extract_tables(file:, file_content_type: nil, model: nil)
         | 
| 181 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 182 | 
            +
             | 
| 181 183 | 
             
                  raise ArgumentError.new("file must be provided") if file.nil?
         | 
| 182 184 |  | 
| 183 185 | 
             
                  headers = {
         | 
| @@ -229,6 +231,8 @@ module IBMWatson | |
| 229 231 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 230 232 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 231 233 | 
             
                def compare_documents(file_1:, file_2:, file_1_content_type: nil, file_2_content_type: nil, file_1_label: nil, file_2_label: nil, model: nil)
         | 
| 234 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 235 | 
            +
             | 
| 232 236 | 
             
                  raise ArgumentError.new("file_1 must be provided") if file_1.nil?
         | 
| 233 237 |  | 
| 234 238 | 
             
                  raise ArgumentError.new("file_2 must be provided") if file_2.nil?
         | 
| @@ -286,6 +290,8 @@ module IBMWatson | |
| 286 290 | 
             
                # @param comment [String] An optional comment on or description of the feedback.
         | 
| 287 291 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 288 292 | 
             
                def add_feedback(feedback_data:, user_id: nil, comment: nil)
         | 
| 293 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 294 | 
            +
             | 
| 289 295 | 
             
                  raise ArgumentError.new("feedback_data must be provided") if feedback_data.nil?
         | 
| 290 296 |  | 
| 291 297 | 
             
                  headers = {
         | 
| @@ -317,15 +323,11 @@ module IBMWatson | |
| 317 323 | 
             
                end
         | 
| 318 324 |  | 
| 319 325 | 
             
                ##
         | 
| 320 | 
            -
                # @!method list_feedback(feedback_type: nil,  | 
| 326 | 
            +
                # @!method list_feedback(feedback_type: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
         | 
| 321 327 | 
             
                # List the feedback in a document.
         | 
| 322 328 | 
             
                # Lists the feedback in a document.
         | 
| 323 329 | 
             
                # @param feedback_type [String] An optional string that filters the output to include only feedback with the
         | 
| 324 330 | 
             
                #   specified feedback type. The only permitted value is `element_classification`.
         | 
| 325 | 
            -
                # @param before [Time] An optional string in the format `YYYY-MM-DD` that filters the output to include
         | 
| 326 | 
            -
                #   only feedback that was added before the specified date.
         | 
| 327 | 
            -
                # @param after [Time] An optional string in the format `YYYY-MM-DD` that filters the output to include
         | 
| 328 | 
            -
                #   only feedback that was added after the specified date.
         | 
| 329 331 | 
             
                # @param document_title [String] An optional string that filters the output to include only feedback from the
         | 
| 330 332 | 
             
                #   document with the specified `document_title`.
         | 
| 331 333 | 
             
                # @param model_id [String] An optional string that filters the output to include only feedback with the
         | 
| @@ -362,7 +364,9 @@ module IBMWatson | |
| 362 364 | 
             
                #   output includes a value called `total` that gives the total count of feedback
         | 
| 363 365 | 
             
                #   created.
         | 
| 364 366 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 365 | 
            -
                def list_feedback(feedback_type: nil,  | 
| 367 | 
            +
                def list_feedback(feedback_type: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
         | 
| 368 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 369 | 
            +
             | 
| 366 370 | 
             
                  headers = {
         | 
| 367 371 | 
             
                  }
         | 
| 368 372 | 
             
                  sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "list_feedback")
         | 
| @@ -371,8 +375,6 @@ module IBMWatson | |
| 371 375 | 
             
                  params = {
         | 
| 372 376 | 
             
                    "version" => @version,
         | 
| 373 377 | 
             
                    "feedback_type" => feedback_type,
         | 
| 374 | 
            -
                    "before" => before,
         | 
| 375 | 
            -
                    "after" => after,
         | 
| 376 378 | 
             
                    "document_title" => document_title,
         | 
| 377 379 | 
             
                    "model_id" => model_id,
         | 
| 378 380 | 
             
                    "model_version" => model_version,
         | 
| @@ -411,6 +413,8 @@ module IBMWatson | |
| 411 413 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 412 414 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 413 415 | 
             
                def get_feedback(feedback_id:, model: nil)
         | 
| 416 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 417 | 
            +
             | 
| 414 418 | 
             
                  raise ArgumentError.new("feedback_id must be provided") if feedback_id.nil?
         | 
| 415 419 |  | 
| 416 420 | 
             
                  headers = {
         | 
| @@ -446,6 +450,8 @@ module IBMWatson | |
| 446 450 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 447 451 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 448 452 | 
             
                def delete_feedback(feedback_id:, model: nil)
         | 
| 453 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 454 | 
            +
             | 
| 449 455 | 
             
                  raise ArgumentError.new("feedback_id must be provided") if feedback_id.nil?
         | 
| 450 456 |  | 
| 451 457 | 
             
                  headers = {
         | 
| @@ -504,6 +510,8 @@ module IBMWatson | |
| 504 510 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 505 511 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 506 512 | 
             
                def create_batch(function:, input_credentials_file:, input_bucket_location:, input_bucket_name:, output_credentials_file:, output_bucket_location:, output_bucket_name:, model: nil)
         | 
| 513 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 514 | 
            +
             | 
| 507 515 | 
             
                  raise ArgumentError.new("function must be provided") if function.nil?
         | 
| 508 516 |  | 
| 509 517 | 
             
                  raise ArgumentError.new("input_credentials_file must be provided") if input_credentials_file.nil?
         | 
| @@ -568,6 +576,8 @@ module IBMWatson | |
| 568 576 | 
             
                # Lists batch-processing jobs submitted by users.
         | 
| 569 577 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 570 578 | 
             
                def list_batches
         | 
| 579 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 580 | 
            +
             | 
| 571 581 | 
             
                  headers = {
         | 
| 572 582 | 
             
                  }
         | 
| 573 583 | 
             
                  sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "list_batches")
         | 
| @@ -596,6 +606,8 @@ module IBMWatson | |
| 596 606 | 
             
                # @param batch_id [String] The ID of the batch-processing job whose information you want to retrieve.
         | 
| 597 607 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 598 608 | 
             
                def get_batch(batch_id:)
         | 
| 609 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 610 | 
            +
             | 
| 599 611 | 
             
                  raise ArgumentError.new("batch_id must be provided") if batch_id.nil?
         | 
| 600 612 |  | 
| 601 613 | 
             
                  headers = {
         | 
| @@ -632,6 +644,8 @@ module IBMWatson | |
| 632 644 | 
             
                #   standalone methods as well as to the methods' use in batch-processing requests.
         | 
| 633 645 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 634 646 | 
             
                def update_batch(batch_id:, action:, model: nil)
         | 
| 647 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 648 | 
            +
             | 
| 635 649 | 
             
                  raise ArgumentError.new("batch_id must be provided") if batch_id.nil?
         | 
| 636 650 |  | 
| 637 651 | 
             
                  raise ArgumentError.new("action must be provided") if action.nil?
         | 
| @@ -13,7 +13,9 @@ | |
| 13 13 | 
             
            # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 14 14 | 
             
            # See the License for the specific language governing permissions and
         | 
| 15 15 | 
             
            # limitations under the License.
         | 
| 16 | 
            -
             | 
| 16 | 
            +
            #
         | 
| 17 | 
            +
            # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # IBM Watson™ Discovery is a cognitive search and content analytics engine that
         | 
| 18 20 | 
             
            # you can add to applications to identify patterns, trends and actionable insights to
         | 
| 19 21 | 
             
            # drive better decision-making. Securely unify structured and unstructured data with
         | 
| @@ -33,22 +35,15 @@ module IBMWatson | |
| 33 35 | 
             
              class DiscoveryV1 < IBMCloudSdkCore::BaseService
         | 
| 34 36 | 
             
                include Concurrent::Async
         | 
| 35 37 | 
             
                DEFAULT_SERVICE_NAME = "discovery"
         | 
| 36 | 
            -
                DEFAULT_SERVICE_URL = "https:// | 
| 38 | 
            +
                DEFAULT_SERVICE_URL = "https://api.us-south.discovery.watson.cloud.ibm.com"
         | 
| 39 | 
            +
                attr_accessor :version
         | 
| 37 40 | 
             
                ##
         | 
| 38 41 | 
             
                # @!method initialize(args)
         | 
| 39 42 | 
             
                # Construct a new client for the Discovery service.
         | 
| 40 43 | 
             
                #
         | 
| 41 44 | 
             
                # @param args [Hash] The args to initialize with
         | 
| 42 | 
            -
                # @option args version [String]  | 
| 43 | 
            -
                #    | 
| 44 | 
            -
                #   incompatible way, a new minor version of the API is released.
         | 
| 45 | 
            -
                #   The service uses the API version for the date you specify, or
         | 
| 46 | 
            -
                #   the most recent version before that date. Note that you should
         | 
| 47 | 
            -
                #   not programmatically specify the current date at runtime, in
         | 
| 48 | 
            -
                #   case the API has been updated since your application's release.
         | 
| 49 | 
            -
                #   Instead, specify a version date that is compatible with your
         | 
| 50 | 
            -
                #   application, and don't change it until your application is
         | 
| 51 | 
            -
                #   ready for a later version.
         | 
| 45 | 
            +
                # @option args version [String] Release date of the version of the API you want to use. Specify dates in
         | 
| 46 | 
            +
                #   YYYY-MM-DD format. The current version is `2019-04-30`.
         | 
| 52 47 | 
             
                # @option args service_url [String] The base service URL to use when contacting the service.
         | 
| 53 48 | 
             
                #   The base service_url may differ between IBM Cloud regions.
         | 
| 54 49 | 
             
                # @option args authenticator [Object] The Authenticator instance to be configured for this service.
         | 
| @@ -57,10 +52,10 @@ module IBMWatson | |
| 57 52 | 
             
                def initialize(args = {})
         | 
| 58 53 | 
             
                  @__async_initialized__ = false
         | 
| 59 54 | 
             
                  defaults = {}
         | 
| 60 | 
            -
                  defaults[:version] = nil
         | 
| 61 55 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 62 56 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 63 57 | 
             
                  defaults[:authenticator] = nil
         | 
| 58 | 
            +
                  defaults[:version] = nil
         | 
| 64 59 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 65 60 | 
             
                  args = defaults.merge(args)
         | 
| 66 61 | 
             
                  @version = args[:version]
         | 
| @@ -89,6 +84,8 @@ module IBMWatson | |
| 89 84 | 
             
                #   `LT`, in all other plans the default is `S`.
         | 
| 90 85 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 91 86 | 
             
                def create_environment(name:, description: nil, size: nil)
         | 
| 87 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 88 | 
            +
             | 
| 92 89 | 
             
                  raise ArgumentError.new("name must be provided") if name.nil?
         | 
| 93 90 |  | 
| 94 91 | 
             
                  headers = {
         | 
| @@ -126,6 +123,8 @@ module IBMWatson | |
| 126 123 | 
             
                # @param name [String] Show only the environment with the given name.
         | 
| 127 124 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 128 125 | 
             
                def list_environments(name: nil)
         | 
| 126 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 127 | 
            +
             | 
| 129 128 | 
             
                  headers = {
         | 
| 130 129 | 
             
                  }
         | 
| 131 130 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "list_environments")
         | 
| @@ -154,6 +153,8 @@ module IBMWatson | |
| 154 153 | 
             
                # @param environment_id [String] The ID of the environment.
         | 
| 155 154 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 156 155 | 
             
                def get_environment(environment_id:)
         | 
| 156 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 157 | 
            +
             | 
| 157 158 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 158 159 |  | 
| 159 160 | 
             
                  headers = {
         | 
| @@ -190,6 +191,8 @@ module IBMWatson | |
| 190 191 | 
             
                #   decreased.
         | 
| 191 192 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 192 193 | 
             
                def update_environment(environment_id:, name: nil, description: nil, size: nil)
         | 
| 194 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 195 | 
            +
             | 
| 193 196 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 194 197 |  | 
| 195 198 | 
             
                  headers = {
         | 
| @@ -226,6 +229,8 @@ module IBMWatson | |
| 226 229 | 
             
                # @param environment_id [String] The ID of the environment.
         | 
| 227 230 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 228 231 | 
             
                def delete_environment(environment_id:)
         | 
| 232 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 233 | 
            +
             | 
| 229 234 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 230 235 |  | 
| 231 236 | 
             
                  headers = {
         | 
| @@ -258,6 +263,8 @@ module IBMWatson | |
| 258 263 | 
             
                # @param collection_ids [Array[String]] A comma-separated list of collection IDs to be queried against.
         | 
| 259 264 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 260 265 | 
             
                def list_fields(environment_id:, collection_ids:)
         | 
| 266 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 267 | 
            +
             | 
| 261 268 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 262 269 |  | 
| 263 270 | 
             
                  raise ArgumentError.new("collection_ids must be provided") if collection_ids.nil?
         | 
| @@ -314,6 +321,8 @@ module IBMWatson | |
| 314 321 | 
             
                # @param source [Source] Object containing source parameters for the configuration.
         | 
| 315 322 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 316 323 | 
             
                def create_configuration(environment_id:, name:, description: nil, conversions: nil, enrichments: nil, normalizations: nil, source: nil)
         | 
| 324 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 325 | 
            +
             | 
| 317 326 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 318 327 |  | 
| 319 328 | 
             
                  raise ArgumentError.new("name must be provided") if name.nil?
         | 
| @@ -357,6 +366,8 @@ module IBMWatson | |
| 357 366 | 
             
                # @param name [String] Find configurations with the given name.
         | 
| 358 367 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 359 368 | 
             
                def list_configurations(environment_id:, name: nil)
         | 
| 369 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 370 | 
            +
             | 
| 360 371 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 361 372 |  | 
| 362 373 | 
             
                  headers = {
         | 
| @@ -388,6 +399,8 @@ module IBMWatson | |
| 388 399 | 
             
                # @param configuration_id [String] The ID of the configuration.
         | 
| 389 400 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 390 401 | 
             
                def get_configuration(environment_id:, configuration_id:)
         | 
| 402 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 403 | 
            +
             | 
| 391 404 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 392 405 |  | 
| 393 406 | 
             
                  raise ArgumentError.new("configuration_id must be provided") if configuration_id.nil?
         | 
| @@ -437,6 +450,8 @@ module IBMWatson | |
| 437 450 | 
             
                # @param source [Source] Object containing source parameters for the configuration.
         | 
| 438 451 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 439 452 | 
             
                def update_configuration(environment_id:, configuration_id:, name:, description: nil, conversions: nil, enrichments: nil, normalizations: nil, source: nil)
         | 
| 453 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 454 | 
            +
             | 
| 440 455 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 441 456 |  | 
| 442 457 | 
             
                  raise ArgumentError.new("configuration_id must be provided") if configuration_id.nil?
         | 
| @@ -487,6 +502,8 @@ module IBMWatson | |
| 487 502 | 
             
                # @param configuration_id [String] The ID of the configuration.
         | 
| 488 503 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 489 504 | 
             
                def delete_configuration(environment_id:, configuration_id:)
         | 
| 505 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 506 | 
            +
             | 
| 490 507 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 491 508 |  | 
| 492 509 | 
             
                  raise ArgumentError.new("configuration_id must be provided") if configuration_id.nil?
         | 
| @@ -526,6 +543,8 @@ module IBMWatson | |
| 526 543 | 
             
                #   639-1 language code.
         | 
| 527 544 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 528 545 | 
             
                def create_collection(environment_id:, name:, description: nil, configuration_id: nil, language: nil)
         | 
| 546 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 547 | 
            +
             | 
| 529 548 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 530 549 |  | 
| 531 550 | 
             
                  raise ArgumentError.new("name must be provided") if name.nil?
         | 
| @@ -567,6 +586,8 @@ module IBMWatson | |
| 567 586 | 
             
                # @param name [String] Find collections with the given name.
         | 
| 568 587 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 569 588 | 
             
                def list_collections(environment_id:, name: nil)
         | 
| 589 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 590 | 
            +
             | 
| 570 591 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 571 592 |  | 
| 572 593 | 
             
                  headers = {
         | 
| @@ -598,6 +619,8 @@ module IBMWatson | |
| 598 619 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 599 620 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 600 621 | 
             
                def get_collection(environment_id:, collection_id:)
         | 
| 622 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 623 | 
            +
             | 
| 601 624 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 602 625 |  | 
| 603 626 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -633,6 +656,8 @@ module IBMWatson | |
| 633 656 | 
             
                # @param configuration_id [String] The ID of the configuration in which the collection is to be updated.
         | 
| 634 657 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 635 658 | 
             
                def update_collection(environment_id:, collection_id:, name:, description: nil, configuration_id: nil)
         | 
| 659 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 660 | 
            +
             | 
| 636 661 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 637 662 |  | 
| 638 663 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -674,6 +699,8 @@ module IBMWatson | |
| 674 699 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 675 700 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 676 701 | 
             
                def delete_collection(environment_id:, collection_id:)
         | 
| 702 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 703 | 
            +
             | 
| 677 704 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 678 705 |  | 
| 679 706 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -707,6 +734,8 @@ module IBMWatson | |
| 707 734 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 708 735 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 709 736 | 
             
                def list_collection_fields(environment_id:, collection_id:)
         | 
| 737 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 738 | 
            +
             | 
| 710 739 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 711 740 |  | 
| 712 741 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -744,6 +773,8 @@ module IBMWatson | |
| 744 773 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 745 774 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 746 775 | 
             
                def list_expansions(environment_id:, collection_id:)
         | 
| 776 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 777 | 
            +
             | 
| 747 778 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 748 779 |  | 
| 749 780 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -795,6 +826,8 @@ module IBMWatson | |
| 795 826 | 
             
                #   **expanded_terms** array.
         | 
| 796 827 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 797 828 | 
             
                def create_expansions(environment_id:, collection_id:, expansions:)
         | 
| 829 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 830 | 
            +
             | 
| 798 831 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 799 832 |  | 
| 800 833 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -836,6 +869,8 @@ module IBMWatson | |
| 836 869 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 837 870 | 
             
                # @return [nil]
         | 
| 838 871 | 
             
                def delete_expansions(environment_id:, collection_id:)
         | 
| 872 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 873 | 
            +
             | 
| 839 874 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 840 875 |  | 
| 841 876 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -870,6 +905,8 @@ module IBMWatson | |
| 870 905 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 871 906 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 872 907 | 
             
                def get_tokenization_dictionary_status(environment_id:, collection_id:)
         | 
| 908 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 909 | 
            +
             | 
| 873 910 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 874 911 |  | 
| 875 912 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -906,6 +943,8 @@ module IBMWatson | |
| 906 943 | 
             
                #   `part_of_speech` the text is from.
         | 
| 907 944 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 908 945 | 
             
                def create_tokenization_dictionary(environment_id:, collection_id:, tokenization_rules: nil)
         | 
| 946 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 947 | 
            +
             | 
| 909 948 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 910 949 |  | 
| 911 950 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -944,6 +983,8 @@ module IBMWatson | |
| 944 983 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 945 984 | 
             
                # @return [nil]
         | 
| 946 985 | 
             
                def delete_tokenization_dictionary(environment_id:, collection_id:)
         | 
| 986 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 987 | 
            +
             | 
| 947 988 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 948 989 |  | 
| 949 990 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -977,6 +1018,8 @@ module IBMWatson | |
| 977 1018 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 978 1019 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 979 1020 | 
             
                def get_stopword_list_status(environment_id:, collection_id:)
         | 
| 1021 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1022 | 
            +
             | 
| 980 1023 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 981 1024 |  | 
| 982 1025 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1012,6 +1055,8 @@ module IBMWatson | |
| 1012 1055 | 
             
                # @param stopword_filename [String] The filename for stopword_file.
         | 
| 1013 1056 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1014 1057 | 
             
                def create_stopword_list(environment_id:, collection_id:, stopword_file:, stopword_filename: nil)
         | 
| 1058 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1059 | 
            +
             | 
| 1015 1060 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1016 1061 |  | 
| 1017 1062 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1057,6 +1102,8 @@ module IBMWatson | |
| 1057 1102 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 1058 1103 | 
             
                # @return [nil]
         | 
| 1059 1104 | 
             
                def delete_stopword_list(environment_id:, collection_id:)
         | 
| 1105 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1106 | 
            +
             | 
| 1060 1107 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1061 1108 |  | 
| 1062 1109 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1131,6 +1178,8 @@ module IBMWatson | |
| 1131 1178 | 
             
                #   } ```.
         | 
| 1132 1179 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1133 1180 | 
             
                def add_document(environment_id:, collection_id:, file: nil, filename: nil, file_content_type: nil, metadata: nil)
         | 
| 1181 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1182 | 
            +
             | 
| 1134 1183 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1135 1184 |  | 
| 1136 1185 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1181,6 +1230,8 @@ module IBMWatson | |
| 1181 1230 | 
             
                # @param document_id [String] The ID of the document.
         | 
| 1182 1231 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1183 1232 | 
             
                def get_document_status(environment_id:, collection_id:, document_id:)
         | 
| 1233 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1234 | 
            +
             | 
| 1184 1235 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1185 1236 |  | 
| 1186 1237 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1232,6 +1283,8 @@ module IBMWatson | |
| 1232 1283 | 
             
                #   } ```.
         | 
| 1233 1284 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1234 1285 | 
             
                def update_document(environment_id:, collection_id:, document_id:, file: nil, filename: nil, file_content_type: nil, metadata: nil)
         | 
| 1286 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1287 | 
            +
             | 
| 1235 1288 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1236 1289 |  | 
| 1237 1290 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1283,6 +1336,8 @@ module IBMWatson | |
| 1283 1336 | 
             
                # @param document_id [String] The ID of the document.
         | 
| 1284 1337 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1285 1338 | 
             
                def delete_document(environment_id:, collection_id:, document_id:)
         | 
| 1339 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1340 | 
            +
             | 
| 1286 1341 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1287 1342 |  | 
| 1288 1343 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1382,6 +1437,8 @@ module IBMWatson | |
| 1382 1437 | 
             
                # @param x_watson_logging_opt_out [Boolean] If `true`, queries are not stored in the Discovery **Logs** endpoint.
         | 
| 1383 1438 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1384 1439 | 
             
                def query(environment_id:, collection_id:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, _return: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil, bias: nil, spelling_suggestions: nil, x_watson_logging_opt_out: nil)
         | 
| 1440 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1441 | 
            +
             | 
| 1385 1442 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1386 1443 |  | 
| 1387 1444 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1486,6 +1543,8 @@ module IBMWatson | |
| 1486 1543 | 
             
                #   comparison.
         | 
| 1487 1544 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1488 1545 | 
             
                def query_notices(environment_id:, collection_id:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, _return: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil)
         | 
| 1546 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1547 | 
            +
             | 
| 1489 1548 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1490 1549 |  | 
| 1491 1550 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1596,6 +1655,8 @@ module IBMWatson | |
| 1596 1655 | 
             
                # @param x_watson_logging_opt_out [Boolean] If `true`, queries are not stored in the Discovery **Logs** endpoint.
         | 
| 1597 1656 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1598 1657 | 
             
                def federated_query(environment_id:, collection_ids:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, _return: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil, bias: nil, x_watson_logging_opt_out: nil)
         | 
| 1658 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1659 | 
            +
             | 
| 1599 1660 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1600 1661 |  | 
| 1601 1662 | 
             
                  raise ArgumentError.new("collection_ids must be provided") if collection_ids.nil?
         | 
| @@ -1694,6 +1755,8 @@ module IBMWatson | |
| 1694 1755 | 
             
                #   comparison.
         | 
| 1695 1756 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1696 1757 | 
             
                def federated_query_notices(environment_id:, collection_ids:, filter: nil, query: nil, natural_language_query: nil, aggregation: nil, count: nil, _return: nil, offset: nil, sort: nil, highlight: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil)
         | 
| 1758 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1759 | 
            +
             | 
| 1697 1760 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1698 1761 |  | 
| 1699 1762 | 
             
                  raise ArgumentError.new("collection_ids must be provided") if collection_ids.nil?
         | 
| @@ -1753,6 +1816,8 @@ module IBMWatson | |
| 1753 1816 | 
             
                # @param count [Fixnum] The number of autocompletion suggestions to return.
         | 
| 1754 1817 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1755 1818 | 
             
                def get_autocompletion(environment_id:, collection_id:, prefix:, field: nil, count: nil)
         | 
| 1819 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1820 | 
            +
             | 
| 1756 1821 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1757 1822 |  | 
| 1758 1823 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1794,6 +1859,8 @@ module IBMWatson | |
| 1794 1859 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 1795 1860 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1796 1861 | 
             
                def list_training_data(environment_id:, collection_id:)
         | 
| 1862 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1863 | 
            +
             | 
| 1797 1864 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1798 1865 |  | 
| 1799 1866 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1832,6 +1899,8 @@ module IBMWatson | |
| 1832 1899 | 
             
                # @param examples [Array[TrainingExample]] Array of training examples.
         | 
| 1833 1900 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1834 1901 | 
             
                def add_training_data(environment_id:, collection_id:, natural_language_query: nil, filter: nil, examples: nil)
         | 
| 1902 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1903 | 
            +
             | 
| 1835 1904 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1836 1905 |  | 
| 1837 1906 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1872,6 +1941,8 @@ module IBMWatson | |
| 1872 1941 | 
             
                # @param collection_id [String] The ID of the collection.
         | 
| 1873 1942 | 
             
                # @return [nil]
         | 
| 1874 1943 | 
             
                def delete_all_training_data(environment_id:, collection_id:)
         | 
| 1944 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1945 | 
            +
             | 
| 1875 1946 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1876 1947 |  | 
| 1877 1948 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1907,6 +1978,8 @@ module IBMWatson | |
| 1907 1978 | 
             
                # @param query_id [String] The ID of the query used for training.
         | 
| 1908 1979 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1909 1980 | 
             
                def get_training_data(environment_id:, collection_id:, query_id:)
         | 
| 1981 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 1982 | 
            +
             | 
| 1910 1983 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1911 1984 |  | 
| 1912 1985 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1944,6 +2017,8 @@ module IBMWatson | |
| 1944 2017 | 
             
                # @param query_id [String] The ID of the query used for training.
         | 
| 1945 2018 | 
             
                # @return [nil]
         | 
| 1946 2019 | 
             
                def delete_training_data(environment_id:, collection_id:, query_id:)
         | 
| 2020 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2021 | 
            +
             | 
| 1947 2022 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1948 2023 |  | 
| 1949 2024 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -1980,6 +2055,8 @@ module IBMWatson | |
| 1980 2055 | 
             
                # @param query_id [String] The ID of the query used for training.
         | 
| 1981 2056 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 1982 2057 | 
             
                def list_training_examples(environment_id:, collection_id:, query_id:)
         | 
| 2058 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2059 | 
            +
             | 
| 1983 2060 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 1984 2061 |  | 
| 1985 2062 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -2019,6 +2096,8 @@ module IBMWatson | |
| 2019 2096 | 
             
                # @param relevance [Fixnum] The relevance of the training example.
         | 
| 2020 2097 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2021 2098 | 
             
                def create_training_example(environment_id:, collection_id:, query_id:, document_id: nil, cross_reference: nil, relevance: nil)
         | 
| 2099 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2100 | 
            +
             | 
| 2022 2101 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2023 2102 |  | 
| 2024 2103 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -2063,6 +2142,8 @@ module IBMWatson | |
| 2063 2142 | 
             
                # @param example_id [String] The ID of the document as it is indexed.
         | 
| 2064 2143 | 
             
                # @return [nil]
         | 
| 2065 2144 | 
             
                def delete_training_example(environment_id:, collection_id:, query_id:, example_id:)
         | 
| 2145 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2146 | 
            +
             | 
| 2066 2147 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2067 2148 |  | 
| 2068 2149 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -2104,6 +2185,8 @@ module IBMWatson | |
| 2104 2185 | 
             
                # @param relevance [Fixnum] The relevance value for this example.
         | 
| 2105 2186 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2106 2187 | 
             
                def update_training_example(environment_id:, collection_id:, query_id:, example_id:, cross_reference: nil, relevance: nil)
         | 
| 2188 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2189 | 
            +
             | 
| 2107 2190 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2108 2191 |  | 
| 2109 2192 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -2149,6 +2232,8 @@ module IBMWatson | |
| 2149 2232 | 
             
                # @param example_id [String] The ID of the document as it is indexed.
         | 
| 2150 2233 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2151 2234 | 
             
                def get_training_example(environment_id:, collection_id:, query_id:, example_id:)
         | 
| 2235 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2236 | 
            +
             | 
| 2152 2237 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2153 2238 |  | 
| 2154 2239 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| @@ -2194,6 +2279,8 @@ module IBMWatson | |
| 2194 2279 | 
             
                # @param customer_id [String] The customer ID for which all data is to be deleted.
         | 
| 2195 2280 | 
             
                # @return [nil]
         | 
| 2196 2281 | 
             
                def delete_user_data(customer_id:)
         | 
| 2282 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2283 | 
            +
             | 
| 2197 2284 | 
             
                  raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
         | 
| 2198 2285 |  | 
| 2199 2286 | 
             
                  headers = {
         | 
| @@ -2231,6 +2318,8 @@ module IBMWatson | |
| 2231 2318 | 
             
                # @param data [EventData] Query event data object.
         | 
| 2232 2319 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2233 2320 | 
             
                def create_event(type:, data:)
         | 
| 2321 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2322 | 
            +
             | 
| 2234 2323 | 
             
                  raise ArgumentError.new("type must be provided") if type.nil?
         | 
| 2235 2324 |  | 
| 2236 2325 | 
             
                  raise ArgumentError.new("data must be provided") if data.nil?
         | 
| @@ -2284,6 +2373,8 @@ module IBMWatson | |
| 2284 2373 | 
             
                #   ascending. Ascending is the default sort direction if no prefix is specified.
         | 
| 2285 2374 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2286 2375 | 
             
                def query_log(filter: nil, query: nil, count: nil, offset: nil, sort: nil)
         | 
| 2376 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2377 | 
            +
             | 
| 2287 2378 | 
             
                  headers = {
         | 
| 2288 2379 | 
             
                  }
         | 
| 2289 2380 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "query_log")
         | 
| @@ -2323,6 +2414,8 @@ module IBMWatson | |
| 2323 2414 | 
             
                # @param result_type [String] The type of result to consider when calculating the metric.
         | 
| 2324 2415 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2325 2416 | 
             
                def get_metrics_query(start_time: nil, end_time: nil, result_type: nil)
         | 
| 2417 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2418 | 
            +
             | 
| 2326 2419 | 
             
                  headers = {
         | 
| 2327 2420 | 
             
                  }
         | 
| 2328 2421 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "get_metrics_query")
         | 
| @@ -2360,6 +2453,8 @@ module IBMWatson | |
| 2360 2453 | 
             
                # @param result_type [String] The type of result to consider when calculating the metric.
         | 
| 2361 2454 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2362 2455 | 
             
                def get_metrics_query_event(start_time: nil, end_time: nil, result_type: nil)
         | 
| 2456 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2457 | 
            +
             | 
| 2363 2458 | 
             
                  headers = {
         | 
| 2364 2459 | 
             
                  }
         | 
| 2365 2460 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "get_metrics_query_event")
         | 
| @@ -2396,6 +2491,8 @@ module IBMWatson | |
| 2396 2491 | 
             
                # @param result_type [String] The type of result to consider when calculating the metric.
         | 
| 2397 2492 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2398 2493 | 
             
                def get_metrics_query_no_results(start_time: nil, end_time: nil, result_type: nil)
         | 
| 2494 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2495 | 
            +
             | 
| 2399 2496 | 
             
                  headers = {
         | 
| 2400 2497 | 
             
                  }
         | 
| 2401 2498 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "get_metrics_query_no_results")
         | 
| @@ -2433,6 +2530,8 @@ module IBMWatson | |
| 2433 2530 | 
             
                # @param result_type [String] The type of result to consider when calculating the metric.
         | 
| 2434 2531 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2435 2532 | 
             
                def get_metrics_event_rate(start_time: nil, end_time: nil, result_type: nil)
         | 
| 2533 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2534 | 
            +
             | 
| 2436 2535 | 
             
                  headers = {
         | 
| 2437 2536 | 
             
                  }
         | 
| 2438 2537 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "get_metrics_event_rate")
         | 
| @@ -2468,6 +2567,8 @@ module IBMWatson | |
| 2468 2567 | 
             
                #   together in any one query is **10000**.
         | 
| 2469 2568 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2470 2569 | 
             
                def get_metrics_query_token_event(count: nil)
         | 
| 2570 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2571 | 
            +
             | 
| 2471 2572 | 
             
                  headers = {
         | 
| 2472 2573 | 
             
                  }
         | 
| 2473 2574 | 
             
                  sdk_headers = Common.new.get_sdk_headers("discovery", "V1", "get_metrics_query_token_event")
         | 
| @@ -2503,6 +2604,8 @@ module IBMWatson | |
| 2503 2604 | 
             
                # @param environment_id [String] The ID of the environment.
         | 
| 2504 2605 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2505 2606 | 
             
                def list_credentials(environment_id:)
         | 
| 2607 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2608 | 
            +
             | 
| 2506 2609 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2507 2610 |  | 
| 2508 2611 | 
             
                  headers = {
         | 
| @@ -2553,6 +2656,8 @@ module IBMWatson | |
| 2553 2656 | 
             
                #   expired) and must be corrected before they can be used with a collection.
         | 
| 2554 2657 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2555 2658 | 
             
                def create_credentials(environment_id:, source_type: nil, credential_details: nil, status: nil)
         | 
| 2659 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2660 | 
            +
             | 
| 2556 2661 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2557 2662 |  | 
| 2558 2663 | 
             
                  headers = {
         | 
| @@ -2594,6 +2699,8 @@ module IBMWatson | |
| 2594 2699 | 
             
                # @param credential_id [String] The unique identifier for a set of source credentials.
         | 
| 2595 2700 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2596 2701 | 
             
                def get_credentials(environment_id:, credential_id:)
         | 
| 2702 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2703 | 
            +
             | 
| 2597 2704 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2598 2705 |  | 
| 2599 2706 | 
             
                  raise ArgumentError.new("credential_id must be provided") if credential_id.nil?
         | 
| @@ -2646,6 +2753,8 @@ module IBMWatson | |
| 2646 2753 | 
             
                #   expired) and must be corrected before they can be used with a collection.
         | 
| 2647 2754 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2648 2755 | 
             
                def update_credentials(environment_id:, credential_id:, source_type: nil, credential_details: nil, status: nil)
         | 
| 2756 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2757 | 
            +
             | 
| 2649 2758 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2650 2759 |  | 
| 2651 2760 | 
             
                  raise ArgumentError.new("credential_id must be provided") if credential_id.nil?
         | 
| @@ -2686,6 +2795,8 @@ module IBMWatson | |
| 2686 2795 | 
             
                # @param credential_id [String] The unique identifier for a set of source credentials.
         | 
| 2687 2796 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2688 2797 | 
             
                def delete_credentials(environment_id:, credential_id:)
         | 
| 2798 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2799 | 
            +
             | 
| 2689 2800 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2690 2801 |  | 
| 2691 2802 | 
             
                  raise ArgumentError.new("credential_id must be provided") if credential_id.nil?
         | 
| @@ -2721,6 +2832,8 @@ module IBMWatson | |
| 2721 2832 | 
             
                # @param environment_id [String] The ID of the environment.
         | 
| 2722 2833 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2723 2834 | 
             
                def list_gateways(environment_id:)
         | 
| 2835 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2836 | 
            +
             | 
| 2724 2837 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2725 2838 |  | 
| 2726 2839 | 
             
                  headers = {
         | 
| @@ -2752,6 +2865,8 @@ module IBMWatson | |
| 2752 2865 | 
             
                # @param name [String] User-defined name.
         | 
| 2753 2866 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2754 2867 | 
             
                def create_gateway(environment_id:, name: nil)
         | 
| 2868 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2869 | 
            +
             | 
| 2755 2870 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2756 2871 |  | 
| 2757 2872 | 
             
                  headers = {
         | 
| @@ -2788,6 +2903,8 @@ module IBMWatson | |
| 2788 2903 | 
             
                # @param gateway_id [String] The requested gateway ID.
         | 
| 2789 2904 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2790 2905 | 
             
                def get_gateway(environment_id:, gateway_id:)
         | 
| 2906 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2907 | 
            +
             | 
| 2791 2908 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2792 2909 |  | 
| 2793 2910 | 
             
                  raise ArgumentError.new("gateway_id must be provided") if gateway_id.nil?
         | 
| @@ -2821,6 +2938,8 @@ module IBMWatson | |
| 2821 2938 | 
             
                # @param gateway_id [String] The requested gateway ID.
         | 
| 2822 2939 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 2823 2940 | 
             
                def delete_gateway(environment_id:, gateway_id:)
         | 
| 2941 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 2942 | 
            +
             | 
| 2824 2943 | 
             
                  raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
         | 
| 2825 2944 |  | 
| 2826 2945 | 
             
                  raise ArgumentError.new("gateway_id must be provided") if gateway_id.nil?
         |