def create_batch(function:, input_credentials_file:, input_bucket_location:, input_bucket_name:, output_credentials_file:, output_bucket_location:, output_bucket_name:, model: nil)
      raise ArgumentError.new("function must be provided") if function.nil?

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

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

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

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

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

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

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

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

      form_data = {}

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

      form_data[:input_bucket_location] = HTTP::FormData::Part.new(input_bucket_location.to_s, content_type: "text/plain")

      form_data[:input_bucket_name] = HTTP::FormData::Part.new(input_bucket_name.to_s, content_type: "text/plain")

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

      form_data[:output_bucket_location] = HTTP::FormData::Part.new(output_bucket_location.to_s, content_type: "text/plain")

      form_data[:output_bucket_name] = HTTP::FormData::Part.new(output_bucket_name.to_s, content_type: "text/plain")

      method_url = "/v1/batches"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        form: form_data,
        accept_json: true
      )
      response
    end
def create_batch(function:, input_credentials_file:, input_bucket_location:, input_bucket_name:, output_credentials_file:, output_bucket_location:, output_bucket_name:, model: nil)
      raise ArgumentError.new("function must be provided") if function.nil?

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

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

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

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

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

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

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

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

      form_data = {}

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

      form_data[:input_bucket_location] = HTTP::FormData::Part.new(input_bucket_location.to_s, content_type: "text/plain")

      form_data[:input_bucket_name] = HTTP::FormData::Part.new(input_bucket_name.to_s, content_type: "text/plain")

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

      form_data[:output_bucket_location] = HTTP::FormData::Part.new(output_bucket_location.to_s, content_type: "text/plain")

      form_data[:output_bucket_name] = HTTP::FormData::Part.new(output_bucket_name.to_s, content_type: "text/plain")

      method_url = "/v1/batches"

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


 @!method create_batch(function:, input_credentials_file:, input_bucket_location:, input_bucket_name:, output_credentials_file:, output_bucket_location:, output_bucket_name:, model: nil)
 Submit a batch-processing request.
 Run Compare and Comply methods over a collection of input documents.
   **Important:** Batch processing requires the use of the [IBM Cloud Object Storage
   service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage).
   The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using
   batch
   processing](https://cloud.ibm.com/docs/services/compare-comply/batching.html#before-you-batch).
 @param function [String] The Compare and Comply method to run across the submitted input documents.
 @param input_credentials_file [File] A JSON file containing the input Cloud Object Storage credentials. At a minimum,
   the credentials must enable `READ` permissions on the bucket defined by the
   `input_bucket_name` parameter.
 @param input_bucket_location [String] The geographical location of the Cloud Object Storage input bucket as listed on
   the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`,
   `eu-geo`, or `ap-geo`.
 @param input_bucket_name [String] The name of the Cloud Object Storage input bucket.
 @param output_credentials_file [File] A JSON file that lists the Cloud Object Storage output credentials. At a minimum,
   the credentials must enable `READ` and `WRITE` permissions on the bucket defined
   by the `output_bucket_name` parameter.
 @param output_bucket_location [String] The geographical location of the Cloud Object Storage output bucket as listed on
   the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`,
   `eu-geo`, or `ap-geo`.
 @param output_bucket_name [String] The name of the Cloud Object Storage output bucket.
 @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.