def convert_to_html(file:, filename: nil, file_content_type: nil, model: nil)
      raise ArgumentError.new("file must be provided") if file.nil?

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

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

      form_data = {}

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

      method_url = "/v1/html_conversion"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        form: form_data,
        accept_json: true
      )
      response
    end
def convert_to_html(file:, filename: nil, file_content_type: nil, model: nil)
      raise ArgumentError.new("file must be provided") if file.nil?

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

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

      form_data = {}

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

      method_url = "/v1/html_conversion"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        form: form_data,
        accept_json: true
      )
      response
    end
@!method initialize(args)
 Construct a new client for the Compare Comply service.

 @param args [Hash] The args to initialize with
 @option args version [String] The API version date to use with the service, in
   "YYYY-MM-DD" format. Whenever the API is changed in a backwards
   incompatible way, a new minor version of the API is released.
   The service uses the API version for the date you specify, or
   the most recent version before that date. Note that you should
   not programmatically specify the current date at runtime, in
   case the API has been updated since your application's release.
   Instead, specify a version date that is compatible with your
   application, and don't change it until your application is
   ready for a later version.
 @option args url [String] The base url to use when contacting the service (e.g.
   "https://gateway.watsonplatform.net/compare-comply/api").
   The base url may differ between Bluemix regions.
 @option args iam_apikey [String] An API key that can be used to request IAM tokens. If
   this API key is provided, the SDK will manage the token and handle the
   refreshing.
 @option args iam_access_token [String] An IAM access token is fully managed by the application.
   Responsibility falls on the application to refresh the token, either before
   it expires or reactively upon receiving a 401 from the service as any requests
   made with an expired token will fail.
 @option args iam_url [String] An optional URL for the IAM service API. Defaults to
   'https://iam.ng.bluemix.net/identity/token'.

 HTML conversion


 @!method convert_to_html(file:, filename: nil, file_content_type: nil, model: nil)
 Convert document to HTML.
 Converts a document to HTML.
 @param file [File] The document to convert.
 @param filename [String] The filename for file.
 @param file_content_type [String] The content type of file.
 @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.