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)
      raise ArgumentError.new("file_1 must be provided") if file_1.nil?

      raise ArgumentError.new("file_2 must be provided") if file_2.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "compare_documents")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version,
        "file_1_label" => file_1_label,
        "file_2_label" => file_2_label,
        "model" => model
      }

      form_data = {}

      unless file_1.instance_of?(StringIO) || file_1.instance_of?(File)
        file_1 = file_1.respond_to?(:to_json) ? StringIO.new(file_1.to_json) : StringIO.new(file_1)
      end
      form_data[:file_1] = HTTP::FormData::File.new(file_1, content_type: file_1_content_type.nil? ? "application/octet-stream" : file_1_content_type, filename: file_1.respond_to?(:path) ? file_1.path : nil)

      unless file_2.instance_of?(StringIO) || file_2.instance_of?(File)
        file_2 = file_2.respond_to?(:to_json) ? StringIO.new(file_2.to_json) : StringIO.new(file_2)
      end
      form_data[:file_2] = HTTP::FormData::File.new(file_2, content_type: file_2_content_type.nil? ? "application/octet-stream" : file_2_content_type, filename: file_2.respond_to?(:path) ? file_2.path : nil)

      method_url = "/v1/comparison"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        form: form_data,
        accept_json: true
      )
      response
    end
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)
      raise ArgumentError.new("file_1 must be provided") if file_1.nil?

      raise ArgumentError.new("file_2 must be provided") if file_2.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "compare_documents")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version,
        "file_1_label" => file_1_label,
        "file_2_label" => file_2_label,
        "model" => model
      }

      form_data = {}

      unless file_1.instance_of?(StringIO) || file_1.instance_of?(File)
        file_1 = file_1.respond_to?(:to_json) ? StringIO.new(file_1.to_json) : StringIO.new(file_1)
      end
      form_data[:file_1] = HTTP::FormData::File.new(file_1, content_type: file_1_content_type.nil? ? "application/octet-stream" : file_1_content_type, filename: file_1.respond_to?(:path) ? file_1.path : nil)

      unless file_2.instance_of?(StringIO) || file_2.instance_of?(File)
        file_2 = file_2.respond_to?(:to_json) ? StringIO.new(file_2.to_json) : StringIO.new(file_2)
      end
      form_data[:file_2] = HTTP::FormData::File.new(file_2, content_type: file_2_content_type.nil? ? "application/octet-stream" : file_2_content_type, filename: file_2.respond_to?(:path) ? file_2.path : nil)

      method_url = "/v1/comparison"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        form: form_data,
        accept_json: true
      )
      response
    end
Comparison


 @!method 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)
 Compare two documents.
 Compares two input documents. Documents must be in the same format.
 @param file_1 [File] The first document to compare.
 @param file_2 [File] The second document to compare.
 @param file_1_content_type [String] The content type of file_1.
 @param file_2_content_type [String] The content type of file_2.
 @param file_1_label [String] A text label for the first document.
 @param file_2_label [String] A text label for the second document.
 @param model [String] The analysis model to be used by the service. For the **Element classification**
   and **Compare two documents** methods, the default is `contracts`. For the
   **Extract tables** method, the default is `tables`. These defaults apply to the
   standalone methods as well as to the methods' use in batch-processing requests.
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.