ibm_watson 1.6.0 → 2.0.0.rc1
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 +23 -1
- data/lib/ibm_watson/assistant_v1.rb +212 -50
- data/lib/ibm_watson/assistant_v2.rb +66 -12
- data/lib/ibm_watson/compare_comply_v1.rb +33 -20
- data/lib/ibm_watson/discovery_v1.rb +131 -12
- data/lib/ibm_watson/discovery_v2.rb +138 -12
- data/lib/ibm_watson/language_translator_v3.rb +59 -26
- data/lib/ibm_watson/natural_language_classifier_v1.rb +3 -1
- data/lib/ibm_watson/natural_language_understanding_v1.rb +15 -13
- data/lib/ibm_watson/personality_insights_v3.rb +14 -12
- data/lib/ibm_watson/speech_to_text_v1.rb +24 -18
- data/lib/ibm_watson/text_to_speech_v1.rb +96 -119
- data/lib/ibm_watson/tone_analyzer_v3.rb +11 -12
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +23 -12
- data/lib/ibm_watson/visual_recognition_v4.rb +59 -20
- data/test/integration/test_assistant_v1.rb +9 -0
- data/test/integration/test_assistant_v2.rb +9 -0
- data/test/integration/test_text_to_speech_v1.rb +3 -3
- data/test/unit/test_assistant_v1.rb +51 -0
- data/test/unit/test_assistant_v2.rb +51 -0
- data/test/unit/test_discovery_v2.rb +1 -1
- data/test/unit/test_text_to_speech_v1.rb +7 -7
- metadata +5 -5
| @@ -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.17.0-8d569e8f-20201030-142059
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # The IBM Watson™ Tone Analyzer service uses linguistic analysis to detect
         | 
| 18 20 | 
             
            # emotional and language tones in written text. The service can analyze tone at both the
         | 
| 19 21 | 
             
            # document and sentence levels. You can use the service to understand how your written
         | 
| @@ -40,21 +42,14 @@ module IBMWatson | |
| 40 42 | 
             
                include Concurrent::Async
         | 
| 41 43 | 
             
                DEFAULT_SERVICE_NAME = "tone_analyzer"
         | 
| 42 44 | 
             
                DEFAULT_SERVICE_URL = "https://api.us-south.tone-analyzer.watson.cloud.ibm.com"
         | 
| 45 | 
            +
                attr_accessor :version
         | 
| 43 46 | 
             
                ##
         | 
| 44 47 | 
             
                # @!method initialize(args)
         | 
| 45 48 | 
             
                # Construct a new client for the Tone Analyzer service.
         | 
| 46 49 | 
             
                #
         | 
| 47 50 | 
             
                # @param args [Hash] The args to initialize with
         | 
| 48 | 
            -
                # @option args version [String]  | 
| 49 | 
            -
                #    | 
| 50 | 
            -
                #   incompatible way, a new minor version of the API is released.
         | 
| 51 | 
            -
                #   The service uses the API version for the date you specify, or
         | 
| 52 | 
            -
                #   the most recent version before that date. Note that you should
         | 
| 53 | 
            -
                #   not programmatically specify the current date at runtime, in
         | 
| 54 | 
            -
                #   case the API has been updated since your application's release.
         | 
| 55 | 
            -
                #   Instead, specify a version date that is compatible with your
         | 
| 56 | 
            -
                #   application, and don't change it until your application is
         | 
| 57 | 
            -
                #   ready for a later version.
         | 
| 51 | 
            +
                # @option args version [String] Release date of the version of the API you want to use. Specify dates in
         | 
| 52 | 
            +
                #   YYYY-MM-DD format. The current version is `2017-09-21`.
         | 
| 58 53 | 
             
                # @option args service_url [String] The base service URL to use when contacting the service.
         | 
| 59 54 | 
             
                #   The base service_url may differ between IBM Cloud regions.
         | 
| 60 55 | 
             
                # @option args authenticator [Object] The Authenticator instance to be configured for this service.
         | 
| @@ -63,10 +58,10 @@ module IBMWatson | |
| 63 58 | 
             
                def initialize(args = {})
         | 
| 64 59 | 
             
                  @__async_initialized__ = false
         | 
| 65 60 | 
             
                  defaults = {}
         | 
| 66 | 
            -
                  defaults[:version] = nil
         | 
| 67 61 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 68 62 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 69 63 | 
             
                  defaults[:authenticator] = nil
         | 
| 64 | 
            +
                  defaults[:version] = nil
         | 
| 70 65 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 71 66 | 
             
                  args = defaults.merge(args)
         | 
| 72 67 | 
             
                  @version = args[:version]
         | 
| @@ -131,6 +126,8 @@ module IBMWatson | |
| 131 126 | 
             
                #   **Accept-Language**.
         | 
| 132 127 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 133 128 | 
             
                def tone(tone_input:, content_type: nil, sentences: nil, tones: nil, content_language: nil, accept_language: nil)
         | 
| 129 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 130 | 
            +
             | 
| 134 131 | 
             
                  raise ArgumentError.new("tone_input must be provided") if tone_input.nil?
         | 
| 135 132 |  | 
| 136 133 | 
             
                  headers = {
         | 
| @@ -199,6 +196,8 @@ module IBMWatson | |
| 199 196 | 
             
                #   **Accept-Language**.
         | 
| 200 197 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 201 198 | 
             
                def tone_chat(utterances:, content_language: nil, accept_language: nil)
         | 
| 199 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 200 | 
            +
             | 
| 202 201 | 
             
                  raise ArgumentError.new("utterances must be provided") if utterances.nil?
         | 
| 203 202 |  | 
| 204 203 | 
             
                  headers = {
         | 
    
        data/lib/ibm_watson/version.rb
    CHANGED
    
    
| @@ -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.17.0-8d569e8f-20201030-142059
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # The IBM Watson™ Visual Recognition service uses deep learning algorithms to
         | 
| 18 20 | 
             
            # identify scenes and objects in images that you upload to the service. You can create and
         | 
| 19 21 | 
             
            # train a custom classifier to identify subjects that suit your needs.
         | 
| @@ -32,21 +34,14 @@ module IBMWatson | |
| 32 34 | 
             
                include Concurrent::Async
         | 
| 33 35 | 
             
                DEFAULT_SERVICE_NAME = "visual_recognition"
         | 
| 34 36 | 
             
                DEFAULT_SERVICE_URL = "https://api.us-south.visual-recognition.watson.cloud.ibm.com"
         | 
| 37 | 
            +
                attr_accessor :version
         | 
| 35 38 | 
             
                ##
         | 
| 36 39 | 
             
                # @!method initialize(args)
         | 
| 37 40 | 
             
                # Construct a new client for the Visual Recognition service.
         | 
| 38 41 | 
             
                #
         | 
| 39 42 | 
             
                # @param args [Hash] The args to initialize with
         | 
| 40 | 
            -
                # @option args version [String]  | 
| 41 | 
            -
                #    | 
| 42 | 
            -
                #   incompatible way, a new minor version of the API is released.
         | 
| 43 | 
            -
                #   The service uses the API version for the date you specify, or
         | 
| 44 | 
            -
                #   the most recent version before that date. Note that you should
         | 
| 45 | 
            -
                #   not programmatically specify the current date at runtime, in
         | 
| 46 | 
            -
                #   case the API has been updated since your application's release.
         | 
| 47 | 
            -
                #   Instead, specify a version date that is compatible with your
         | 
| 48 | 
            -
                #   application, and don't change it until your application is
         | 
| 49 | 
            -
                #   ready for a later version.
         | 
| 43 | 
            +
                # @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
         | 
| 44 | 
            +
                #   format. The current version is `2018-03-19`.
         | 
| 50 45 | 
             
                # @option args service_url [String] The base service URL to use when contacting the service.
         | 
| 51 46 | 
             
                #   The base service_url may differ between IBM Cloud regions.
         | 
| 52 47 | 
             
                # @option args authenticator [Object] The Authenticator instance to be configured for this service.
         | 
| @@ -55,10 +50,10 @@ module IBMWatson | |
| 55 50 | 
             
                def initialize(args = {})
         | 
| 56 51 | 
             
                  @__async_initialized__ = false
         | 
| 57 52 | 
             
                  defaults = {}
         | 
| 58 | 
            -
                  defaults[:version] = nil
         | 
| 59 53 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 60 54 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 61 55 | 
             
                  defaults[:authenticator] = nil
         | 
| 56 | 
            +
                  defaults[:version] = nil
         | 
| 62 57 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 63 58 | 
             
                  args = defaults.merge(args)
         | 
| 64 59 | 
             
                  @version = args[:version]
         | 
| @@ -112,6 +107,8 @@ module IBMWatson | |
| 112 107 | 
             
                # @param accept_language [String] The desired language of parts of the response. See the response for details.
         | 
| 113 108 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 114 109 | 
             
                def classify(images_file: nil, images_filename: nil, images_file_content_type: nil, url: nil, threshold: nil, owners: nil, classifier_ids: nil, accept_language: nil)
         | 
| 110 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 111 | 
            +
             | 
| 115 112 | 
             
                  headers = {
         | 
| 116 113 | 
             
                    "Accept-Language" => accept_language
         | 
| 117 114 | 
             
                  }
         | 
| @@ -198,6 +195,8 @@ module IBMWatson | |
| 198 195 | 
             
                # @param negative_examples_filename [String] The filename for negative_examples.
         | 
| 199 196 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 200 197 | 
             
                def create_classifier(name:, positive_examples:, negative_examples: nil, negative_examples_filename: nil)
         | 
| 198 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 199 | 
            +
             | 
| 201 200 | 
             
                  raise ArgumentError.new("name must be provided") if name.nil?
         | 
| 202 201 |  | 
| 203 202 | 
             
                  raise ArgumentError.new("positive_examples must be a hash") unless positive_examples.is_a?(Hash)
         | 
| @@ -253,6 +252,8 @@ module IBMWatson | |
| 253 252 | 
             
                #   return a brief list of classifiers.
         | 
| 254 253 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 255 254 | 
             
                def list_classifiers(verbose: nil)
         | 
| 255 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 256 | 
            +
             | 
| 256 257 | 
             
                  headers = {
         | 
| 257 258 | 
             
                  }
         | 
| 258 259 | 
             
                  sdk_headers = Common.new.get_sdk_headers("watson_vision_combined", "V3", "list_classifiers")
         | 
| @@ -282,6 +283,8 @@ module IBMWatson | |
| 282 283 | 
             
                # @param classifier_id [String] The ID of the classifier.
         | 
| 283 284 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 284 285 | 
             
                def get_classifier(classifier_id:)
         | 
| 286 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 287 | 
            +
             | 
| 285 288 | 
             
                  raise ArgumentError.new("classifier_id must be provided") if classifier_id.nil?
         | 
| 286 289 |  | 
| 287 290 | 
             
                  headers = {
         | 
| @@ -350,6 +353,8 @@ module IBMWatson | |
| 350 353 | 
             
                # @param negative_examples_filename [String] The filename for negative_examples.
         | 
| 351 354 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 352 355 | 
             
                def update_classifier(classifier_id:, positive_examples: nil, negative_examples: nil, negative_examples_filename: nil)
         | 
| 356 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 357 | 
            +
             | 
| 353 358 | 
             
                  raise ArgumentError.new("classifier_id must be provided") if classifier_id.nil?
         | 
| 354 359 |  | 
| 355 360 | 
             
                  raise ArgumentError.new("positive_examples must be a hash") unless positive_examples.nil? || positive_examples.is_a?(Hash)
         | 
| @@ -401,6 +406,8 @@ module IBMWatson | |
| 401 406 | 
             
                # @param classifier_id [String] The ID of the classifier.
         | 
| 402 407 | 
             
                # @return [nil]
         | 
| 403 408 | 
             
                def delete_classifier(classifier_id:)
         | 
| 409 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 410 | 
            +
             | 
| 404 411 | 
             
                  raise ArgumentError.new("classifier_id must be provided") if classifier_id.nil?
         | 
| 405 412 |  | 
| 406 413 | 
             
                  headers = {
         | 
| @@ -435,6 +442,8 @@ module IBMWatson | |
| 435 442 | 
             
                # @param classifier_id [String] The ID of the classifier.
         | 
| 436 443 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 437 444 | 
             
                def get_core_ml_model(classifier_id:)
         | 
| 445 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 446 | 
            +
             | 
| 438 447 | 
             
                  raise ArgumentError.new("classifier_id must be provided") if classifier_id.nil?
         | 
| 439 448 |  | 
| 440 449 | 
             
                  headers = {
         | 
| @@ -474,6 +483,8 @@ module IBMWatson | |
| 474 483 | 
             
                # @param customer_id [String] The customer ID for which all data is to be deleted.
         | 
| 475 484 | 
             
                # @return [nil]
         | 
| 476 485 | 
             
                def delete_user_data(customer_id:)
         | 
| 486 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 487 | 
            +
             | 
| 477 488 | 
             
                  raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
         | 
| 478 489 |  | 
| 479 490 | 
             
                  headers = {
         | 
| @@ -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.17.0-8d569e8f-20201030-142059
         | 
| 18 | 
            +
            #
         | 
| 17 19 | 
             
            # Provide images to the IBM Watson™ Visual Recognition service for analysis. The
         | 
| 18 20 | 
             
            # service detects objects based on a set of images with training data.
         | 
| 19 21 |  | 
| @@ -31,21 +33,14 @@ module IBMWatson | |
| 31 33 | 
             
                include Concurrent::Async
         | 
| 32 34 | 
             
                DEFAULT_SERVICE_NAME = "visual_recognition"
         | 
| 33 35 | 
             
                DEFAULT_SERVICE_URL = "https://api.us-south.visual-recognition.watson.cloud.ibm.com"
         | 
| 36 | 
            +
                attr_accessor :version
         | 
| 34 37 | 
             
                ##
         | 
| 35 38 | 
             
                # @!method initialize(args)
         | 
| 36 39 | 
             
                # Construct a new client for the Visual Recognition 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 API version you want to use. Specify dates in YYYY-MM-DD
         | 
| 43 | 
            +
                #   format. The current version is `2019-02-11`.
         | 
| 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.
         | 
| @@ -54,10 +49,10 @@ module IBMWatson | |
| 54 49 | 
             
                def initialize(args = {})
         | 
| 55 50 | 
             
                  @__async_initialized__ = false
         | 
| 56 51 | 
             
                  defaults = {}
         | 
| 57 | 
            -
                  defaults[:version] = nil
         | 
| 58 52 | 
             
                  defaults[:service_url] = DEFAULT_SERVICE_URL
         | 
| 59 53 | 
             
                  defaults[:service_name] = DEFAULT_SERVICE_NAME
         | 
| 60 54 | 
             
                  defaults[:authenticator] = nil
         | 
| 55 | 
            +
                  defaults[:version] = nil
         | 
| 61 56 | 
             
                  user_service_url = args[:service_url] unless args[:service_url].nil?
         | 
| 62 57 | 
             
                  args = defaults.merge(args)
         | 
| 63 58 | 
             
                  @version = args[:version]
         | 
| @@ -101,6 +96,8 @@ module IBMWatson | |
| 101 96 | 
             
                # @param threshold [Float] The minimum score a feature must have to be returned.
         | 
| 102 97 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 103 98 | 
             
                def analyze(collection_ids:, features:, images_file: nil, image_url: nil, threshold: nil)
         | 
| 99 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 100 | 
            +
             | 
| 104 101 | 
             
                  raise ArgumentError.new("collection_ids must be provided") if collection_ids.nil?
         | 
| 105 102 |  | 
| 106 103 | 
             
                  raise ArgumentError.new("features must be provided") if features.nil?
         | 
| @@ -156,7 +153,7 @@ module IBMWatson | |
| 156 153 | 
             
                #########################
         | 
| 157 154 |  | 
| 158 155 | 
             
                ##
         | 
| 159 | 
            -
                # @!method create_collection(name: nil, description: nil)
         | 
| 156 | 
            +
                # @!method create_collection(name: nil, description: nil, training_status: nil)
         | 
| 160 157 | 
             
                # Create a collection.
         | 
| 161 158 | 
             
                # Create a collection that can be used to store images.
         | 
| 162 159 | 
             
                #
         | 
| @@ -168,8 +165,11 @@ module IBMWatson | |
| 168 165 | 
             
                # @param name [String] The name of the collection. The name can contain alphanumeric, underscore, hyphen,
         | 
| 169 166 | 
             
                #   and dot characters. It cannot begin with the reserved prefix `sys-`.
         | 
| 170 167 | 
             
                # @param description [String] The description of the collection.
         | 
| 168 | 
            +
                # @param training_status [TrainingStatus] Training status information for the collection.
         | 
| 171 169 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 172 | 
            -
                def create_collection(name: nil, description: nil)
         | 
| 170 | 
            +
                def create_collection(name: nil, description: nil, training_status: nil)
         | 
| 171 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 172 | 
            +
             | 
| 173 173 | 
             
                  headers = {
         | 
| 174 174 | 
             
                  }
         | 
| 175 175 | 
             
                  sdk_headers = Common.new.get_sdk_headers("watson_vision_combined", "V4", "create_collection")
         | 
| @@ -181,7 +181,8 @@ module IBMWatson | |
| 181 181 |  | 
| 182 182 | 
             
                  data = {
         | 
| 183 183 | 
             
                    "name" => name,
         | 
| 184 | 
            -
                    "description" => description
         | 
| 184 | 
            +
                    "description" => description,
         | 
| 185 | 
            +
                    "training_status" => training_status
         | 
| 185 186 | 
             
                  }
         | 
| 186 187 |  | 
| 187 188 | 
             
                  method_url = "/v4/collections"
         | 
| @@ -203,6 +204,8 @@ module IBMWatson | |
| 203 204 | 
             
                # Retrieves a list of collections for the service instance.
         | 
| 204 205 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 205 206 | 
             
                def list_collections
         | 
| 207 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 208 | 
            +
             | 
| 206 209 | 
             
                  headers = {
         | 
| 207 210 | 
             
                  }
         | 
| 208 211 | 
             
                  sdk_headers = Common.new.get_sdk_headers("watson_vision_combined", "V4", "list_collections")
         | 
| @@ -231,6 +234,8 @@ module IBMWatson | |
| 231 234 | 
             
                # @param collection_id [String] The identifier of the collection.
         | 
| 232 235 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 233 236 | 
             
                def get_collection(collection_id:)
         | 
| 237 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 238 | 
            +
             | 
| 234 239 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 235 240 |  | 
| 236 241 | 
             
                  headers = {
         | 
| @@ -255,7 +260,7 @@ module IBMWatson | |
| 255 260 | 
             
                end
         | 
| 256 261 |  | 
| 257 262 | 
             
                ##
         | 
| 258 | 
            -
                # @!method update_collection(collection_id:, name: nil, description: nil)
         | 
| 263 | 
            +
                # @!method update_collection(collection_id:, name: nil, description: nil, training_status: nil)
         | 
| 259 264 | 
             
                # Update a collection.
         | 
| 260 265 | 
             
                # Update the name or description of a collection.
         | 
| 261 266 | 
             
                #
         | 
| @@ -265,8 +270,11 @@ module IBMWatson | |
| 265 270 | 
             
                # @param name [String] The name of the collection. The name can contain alphanumeric, underscore, hyphen,
         | 
| 266 271 | 
             
                #   and dot characters. It cannot begin with the reserved prefix `sys-`.
         | 
| 267 272 | 
             
                # @param description [String] The description of the collection.
         | 
| 273 | 
            +
                # @param training_status [TrainingStatus] Training status information for the collection.
         | 
| 268 274 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 269 | 
            -
                def update_collection(collection_id:, name: nil, description: nil)
         | 
| 275 | 
            +
                def update_collection(collection_id:, name: nil, description: nil, training_status: nil)
         | 
| 276 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 277 | 
            +
             | 
| 270 278 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 271 279 |  | 
| 272 280 | 
             
                  headers = {
         | 
| @@ -280,7 +288,8 @@ module IBMWatson | |
| 280 288 |  | 
| 281 289 | 
             
                  data = {
         | 
| 282 290 | 
             
                    "name" => name,
         | 
| 283 | 
            -
                    "description" => description
         | 
| 291 | 
            +
                    "description" => description,
         | 
| 292 | 
            +
                    "training_status" => training_status
         | 
| 284 293 | 
             
                  }
         | 
| 285 294 |  | 
| 286 295 | 
             
                  method_url = "/v4/collections/%s" % [ERB::Util.url_encode(collection_id)]
         | 
| @@ -303,6 +312,8 @@ module IBMWatson | |
| 303 312 | 
             
                # @param collection_id [String] The identifier of the collection.
         | 
| 304 313 | 
             
                # @return [nil]
         | 
| 305 314 | 
             
                def delete_collection(collection_id:)
         | 
| 315 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 316 | 
            +
             | 
| 306 317 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 307 318 |  | 
| 308 319 | 
             
                  headers = {
         | 
| @@ -342,6 +353,8 @@ module IBMWatson | |
| 342 353 | 
             
                # @param model_format [String] The format of the returned model.
         | 
| 343 354 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 344 355 | 
             
                def get_model_file(collection_id:, feature:, model_format:)
         | 
| 356 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 357 | 
            +
             | 
| 345 358 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 346 359 |  | 
| 347 360 | 
             
                  raise ArgumentError.new("feature must be provided") if feature.nil?
         | 
| @@ -405,6 +418,8 @@ module IBMWatson | |
| 405 418 | 
             
                #   than 32 characters.
         | 
| 406 419 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 407 420 | 
             
                def add_images(collection_id:, images_file: nil, image_url: nil, training_data: nil)
         | 
| 421 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 422 | 
            +
             | 
| 408 423 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 409 424 |  | 
| 410 425 | 
             
                  headers = {
         | 
| @@ -454,6 +469,8 @@ module IBMWatson | |
| 454 469 | 
             
                # @param collection_id [String] The identifier of the collection.
         | 
| 455 470 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 456 471 | 
             
                def list_images(collection_id:)
         | 
| 472 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 473 | 
            +
             | 
| 457 474 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 458 475 |  | 
| 459 476 | 
             
                  headers = {
         | 
| @@ -485,6 +502,8 @@ module IBMWatson | |
| 485 502 | 
             
                # @param image_id [String] The identifier of the image.
         | 
| 486 503 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 487 504 | 
             
                def get_image_details(collection_id:, image_id:)
         | 
| 505 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 506 | 
            +
             | 
| 488 507 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 489 508 |  | 
| 490 509 | 
             
                  raise ArgumentError.new("image_id must be provided") if image_id.nil?
         | 
| @@ -518,6 +537,8 @@ module IBMWatson | |
| 518 537 | 
             
                # @param image_id [String] The identifier of the image.
         | 
| 519 538 | 
             
                # @return [nil]
         | 
| 520 539 | 
             
                def delete_image(collection_id:, image_id:)
         | 
| 540 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 541 | 
            +
             | 
| 521 542 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 522 543 |  | 
| 523 544 | 
             
                  raise ArgumentError.new("image_id must be provided") if image_id.nil?
         | 
| @@ -554,6 +575,8 @@ module IBMWatson | |
| 554 575 | 
             
                #   For example, an original 800 x 1000 image is resized to 160 x 200 pixels.
         | 
| 555 576 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 556 577 | 
             
                def get_jpeg_image(collection_id:, image_id:, size: nil)
         | 
| 578 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 579 | 
            +
             | 
| 557 580 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 558 581 |  | 
| 559 582 | 
             
                  raise ArgumentError.new("image_id must be provided") if image_id.nil?
         | 
| @@ -590,6 +613,8 @@ module IBMWatson | |
| 590 613 | 
             
                # @param collection_id [String] The identifier of the collection.
         | 
| 591 614 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 592 615 | 
             
                def list_object_metadata(collection_id:)
         | 
| 616 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 617 | 
            +
             | 
| 593 618 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 594 619 |  | 
| 595 620 | 
             
                  headers = {
         | 
| @@ -625,6 +650,8 @@ module IBMWatson | |
| 625 650 | 
             
                #   `sys-`.
         | 
| 626 651 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 627 652 | 
             
                def update_object_metadata(collection_id:, object:, new_object:)
         | 
| 653 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 654 | 
            +
             | 
| 628 655 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 629 656 |  | 
| 630 657 | 
             
                  raise ArgumentError.new("object must be provided") if object.nil?
         | 
| @@ -665,6 +692,8 @@ module IBMWatson | |
| 665 692 | 
             
                # @param object [String] The name of the object.
         | 
| 666 693 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 667 694 | 
             
                def get_object_metadata(collection_id:, object:)
         | 
| 695 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 696 | 
            +
             | 
| 668 697 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 669 698 |  | 
| 670 699 | 
             
                  raise ArgumentError.new("object must be provided") if object.nil?
         | 
| @@ -699,6 +728,8 @@ module IBMWatson | |
| 699 728 | 
             
                # @param object [String] The name of the object.
         | 
| 700 729 | 
             
                # @return [nil]
         | 
| 701 730 | 
             
                def delete_object(collection_id:, object:)
         | 
| 731 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 732 | 
            +
             | 
| 702 733 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 703 734 |  | 
| 704 735 | 
             
                  raise ArgumentError.new("object must be provided") if object.nil?
         | 
| @@ -736,6 +767,8 @@ module IBMWatson | |
| 736 767 | 
             
                # @param collection_id [String] The identifier of the collection.
         | 
| 737 768 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 738 769 | 
             
                def train(collection_id:)
         | 
| 770 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 771 | 
            +
             | 
| 739 772 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 740 773 |  | 
| 741 774 | 
             
                  headers = {
         | 
| @@ -777,6 +810,8 @@ module IBMWatson | |
| 777 810 | 
             
                # @param objects [Array[TrainingDataObject]] Training data for specific objects.
         | 
| 778 811 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 779 812 | 
             
                def add_image_training_data(collection_id:, image_id:, objects: nil)
         | 
| 813 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 814 | 
            +
             | 
| 780 815 | 
             
                  raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
         | 
| 781 816 |  | 
| 782 817 | 
             
                  raise ArgumentError.new("image_id must be provided") if image_id.nil?
         | 
| @@ -812,14 +847,16 @@ module IBMWatson | |
| 812 847 | 
             
                # Get training usage.
         | 
| 813 848 | 
             
                # Information about the completed training events. You can use this information to
         | 
| 814 849 | 
             
                #   determine how close you are to the training limits for the month.
         | 
| 815 | 
            -
                # @param start_time [ | 
| 850 | 
            +
                # @param start_time [Time] The earliest day to include training events. Specify dates in YYYY-MM-DD format.
         | 
| 816 851 | 
             
                #   If empty or not specified, the earliest training event is included.
         | 
| 817 | 
            -
                # @param end_time [ | 
| 852 | 
            +
                # @param end_time [Time] The most recent day to include training events. Specify dates in YYYY-MM-DD
         | 
| 818 853 | 
             
                #   format. All events for the day are included. If empty or not specified, the
         | 
| 819 854 | 
             
                #   current day is used. Specify the same value as `start_time` to request events for
         | 
| 820 855 | 
             
                #   a single day.
         | 
| 821 856 | 
             
                # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
         | 
| 822 857 | 
             
                def get_training_usage(start_time: nil, end_time: nil)
         | 
| 858 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 859 | 
            +
             | 
| 823 860 | 
             
                  headers = {
         | 
| 824 861 | 
             
                  }
         | 
| 825 862 | 
             
                  sdk_headers = Common.new.get_sdk_headers("watson_vision_combined", "V4", "get_training_usage")
         | 
| @@ -859,6 +896,8 @@ module IBMWatson | |
| 859 896 | 
             
                # @param customer_id [String] The customer ID for which all data is to be deleted.
         | 
| 860 897 | 
             
                # @return [nil]
         | 
| 861 898 | 
             
                def delete_user_data(customer_id:)
         | 
| 899 | 
            +
                  raise ArgumentError.new("version must be provided") if version.nil?
         | 
| 900 | 
            +
             | 
| 862 901 | 
             
                  raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
         | 
| 863 902 |  | 
| 864 903 | 
             
                  headers = {
         |