1313# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414# See the License for the specific language governing permissions and
1515# limitations under the License.
16-
16+ #
17+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18+ #
1719# IBM Watson™ Compare and Comply analyzes governing documents to provide details
1820# about critical aspects of the documents.
1921
@@ -31,21 +33,14 @@ class CompareComplyV1 < IBMCloudSdkCore::BaseService
3133 include Concurrent ::Async
3234 DEFAULT_SERVICE_NAME = "compare_comply"
3335 DEFAULT_SERVICE_URL = "https://api.us-south.compare-comply.watson.cloud.ibm.com"
36+ attr_accessor :version
3437 ##
3538 # @!method initialize(args)
3639 # Construct a new client for the Compare Comply service.
3740 #
3841 # @param args [Hash] The args to initialize with
39- # @option args version [String] The API version date to use with the service, in
40- # "YYYY-MM-DD" format. Whenever the API is changed in a backwards
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`.
4944 # @option args service_url [String] The base service URL to use when contacting the service.
5045 # The base service_url may differ between IBM Cloud regions.
5146 # @option args authenticator [Object] The Authenticator instance to be configured for this service.
@@ -54,10 +49,10 @@ class CompareComplyV1 < IBMCloudSdkCore::BaseService
5449 def initialize ( args = { } )
5550 @__async_initialized__ = false
5651 defaults = { }
57- defaults [ :version ] = nil
5852 defaults [ :service_url ] = DEFAULT_SERVICE_URL
5953 defaults [ :service_name ] = DEFAULT_SERVICE_NAME
6054 defaults [ :authenticator ] = nil
55+ defaults [ :version ] = nil
6156 user_service_url = args [ :service_url ] unless args [ :service_url ] . nil?
6257 args = defaults . merge ( args )
6358 @version = args [ :version ]
@@ -84,6 +79,8 @@ def initialize(args = {})
8479 # standalone methods as well as to the methods' use in batch-processing requests.
8580 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
8681 def convert_to_html ( file :, file_content_type : nil , model : nil )
82+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
83+
8784 raise ArgumentError . new ( "file must be provided" ) if file . nil?
8885
8986 headers = {
@@ -131,6 +128,8 @@ def convert_to_html(file:, file_content_type: nil, model: nil)
131128 # standalone methods as well as to the methods' use in batch-processing requests.
132129 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
133130 def classify_elements ( file :, file_content_type : nil , model : nil )
131+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
132+
134133 raise ArgumentError . new ( "file must be provided" ) if file . nil?
135134
136135 headers = {
@@ -178,6 +177,8 @@ def classify_elements(file:, file_content_type: nil, model: nil)
178177 # standalone methods as well as to the methods' use in batch-processing requests.
179178 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
180179 def extract_tables ( file :, file_content_type : nil , model : nil )
180+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
181+
181182 raise ArgumentError . new ( "file must be provided" ) if file . nil?
182183
183184 headers = {
@@ -229,6 +230,8 @@ def extract_tables(file:, file_content_type: nil, model: nil)
229230 # standalone methods as well as to the methods' use in batch-processing requests.
230231 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
231232 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 )
233+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
234+
232235 raise ArgumentError . new ( "file_1 must be provided" ) if file_1 . nil?
233236
234237 raise ArgumentError . new ( "file_2 must be provided" ) if file_2 . nil?
@@ -286,6 +289,8 @@ def compare_documents(file_1:, file_2:, file_1_content_type: nil, file_2_content
286289 # @param comment [String] An optional comment on or description of the feedback.
287290 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
288291 def add_feedback ( feedback_data :, user_id : nil , comment : nil )
292+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
293+
289294 raise ArgumentError . new ( "feedback_data must be provided" ) if feedback_data . nil?
290295
291296 headers = {
@@ -317,15 +322,11 @@ def add_feedback(feedback_data:, user_id: nil, comment: nil)
317322 end
318323
319324 ##
320- # @!method list_feedback(feedback_type: nil, before: nil, after: 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)
325+ # @!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)
321326 # List the feedback in a document.
322327 # Lists the feedback in a document.
323328 # @param feedback_type [String] An optional string that filters the output to include only feedback with the
324329 # 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.
329330 # @param document_title [String] An optional string that filters the output to include only feedback from the
330331 # document with the specified `document_title`.
331332 # @param model_id [String] An optional string that filters the output to include only feedback with the
@@ -362,7 +363,9 @@ def add_feedback(feedback_data:, user_id: nil, comment: nil)
362363 # output includes a value called `total` that gives the total count of feedback
363364 # created.
364365 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
365- def list_feedback ( feedback_type : nil , before : nil , after : 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 )
366+ 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 )
367+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
368+
366369 headers = {
367370 }
368371 sdk_headers = Common . new . get_sdk_headers ( "compare-comply" , "V1" , "list_feedback" )
@@ -371,8 +374,6 @@ def list_feedback(feedback_type: nil, before: nil, after: nil, document_title: n
371374 params = {
372375 "version" => @version ,
373376 "feedback_type" => feedback_type ,
374- "before" => before ,
375- "after" => after ,
376377 "document_title" => document_title ,
377378 "model_id" => model_id ,
378379 "model_version" => model_version ,
@@ -411,6 +412,8 @@ def list_feedback(feedback_type: nil, before: nil, after: nil, document_title: n
411412 # standalone methods as well as to the methods' use in batch-processing requests.
412413 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
413414 def get_feedback ( feedback_id :, model : nil )
415+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
416+
414417 raise ArgumentError . new ( "feedback_id must be provided" ) if feedback_id . nil?
415418
416419 headers = {
@@ -446,6 +449,8 @@ def get_feedback(feedback_id:, model: nil)
446449 # standalone methods as well as to the methods' use in batch-processing requests.
447450 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
448451 def delete_feedback ( feedback_id :, model : nil )
452+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
453+
449454 raise ArgumentError . new ( "feedback_id must be provided" ) if feedback_id . nil?
450455
451456 headers = {
@@ -504,6 +509,8 @@ def delete_feedback(feedback_id:, model: nil)
504509 # standalone methods as well as to the methods' use in batch-processing requests.
505510 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
506511 def create_batch ( function :, input_credentials_file :, input_bucket_location :, input_bucket_name :, output_credentials_file :, output_bucket_location :, output_bucket_name :, model : nil )
512+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
513+
507514 raise ArgumentError . new ( "function must be provided" ) if function . nil?
508515
509516 raise ArgumentError . new ( "input_credentials_file must be provided" ) if input_credentials_file . nil?
@@ -568,6 +575,8 @@ def create_batch(function:, input_credentials_file:, input_bucket_location:, inp
568575 # Lists batch-processing jobs submitted by users.
569576 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
570577 def list_batches
578+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
579+
571580 headers = {
572581 }
573582 sdk_headers = Common . new . get_sdk_headers ( "compare-comply" , "V1" , "list_batches" )
@@ -596,6 +605,8 @@ def list_batches
596605 # @param batch_id [String] The ID of the batch-processing job whose information you want to retrieve.
597606 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
598607 def get_batch ( batch_id :)
608+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
609+
599610 raise ArgumentError . new ( "batch_id must be provided" ) if batch_id . nil?
600611
601612 headers = {
@@ -632,6 +643,8 @@ def get_batch(batch_id:)
632643 # standalone methods as well as to the methods' use in batch-processing requests.
633644 # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
634645 def update_batch ( batch_id :, action :, model : nil )
646+ raise ArgumentError . new ( "version must be provided" ) if version . nil?
647+
635648 raise ArgumentError . new ( "batch_id must be provided" ) if batch_id . nil?
636649
637650 raise ArgumentError . new ( "action must be provided" ) if action . nil?
0 commit comments