Package com.collibra.dgc.importer.api.request

# Class ImportJsonInJobRequest.ImportJsonInJobRequestBuilder

Object
ImportJsonInJobRequestBuilder

Enclosing class:
  `ImportJsonInJobRequest`

public static final class ImportJsonInJobRequest.ImportJsonInJobRequestBuilder extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `allowEmptyAttributeValues(boolean allowEmptyAttributeValues)`
  Sets whether empty attribute values should be allowed during import.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `batchSize(int batchSize)`
  Sets the size of the batch.
  `ImportJsonInJobRequest`
  `build()`
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `deleteFile(boolean deleteFile)`
  Sets whether the JSON file should be deleted after the import job is finished, regardless of the result.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `file(File file)`
  Sets the JSON file to upload.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `fileId(UUID fileId)`
  Sets the `id` of uploaded JSON file.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `fileName(String fileName)`
  Sets the name of the JSON file to upload.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `relationsAction(String relationsAction)`
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `saveResult(boolean saveResult)`
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `sendNotification(boolean sendNotification)`
  Sets whether job status notification should be sent.
  `ImportJsonInJobRequest.ImportJsonInJobRequestBuilder`
  `simulation(boolean simulation)`
  Sets whether the import should be triggered as a simulation.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### fileId

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder fileId(UUID fileId)
    Sets the `id` of uploaded JSON file.

    NOTE: if this field is used, `FileImportRequest.file` should not be set.

    Parameters:
      `fileId` - the `id` of uploaded JSON file

  - ### file

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder file(File file)
    Sets the JSON file to upload. If set, then also `FileImportRequest.fileName` should be provided.

    NOTE: if this field is used, `FileImportRequest.fileId` should not be set.

    Parameters:
      `file` - the JSON file to upload

  - ### fileName

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder fileName(String fileName)
    Sets the name of the JSON file to upload. If set, then also `FileImportRequest.file` should be provided.

    NOTE: if this field is used, `FileImportRequest.fileId` should not be set.

    Parameters:
      `fileName` - the name of the JSON file to upload

  - ### deleteFile

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder deleteFile(boolean deleteFile)
    Sets whether the JSON file should be deleted after the import job is finished, regardless of the result. The default value is `false`.

    NOTE: if the JSON file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.

    Parameters:
      `deleteFile` - whether the JSON file should be deleted after the import job is finished

  - ### sendNotification

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder sendNotification(boolean sendNotification)
    Sets whether job status notification should be sent. The default value is `false`.
    Parameters:
      `sendNotification` - whether job status notification should be sent

  - ### batchSize

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder batchSize(int batchSize)
    Sets the size of the batch. The default value is `1000`.
    Parameters:
      `batchSize` - the size of the batch

  - ### simulation

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder simulation(boolean simulation)
    Sets whether the import should be triggered as a simulation. The default value is `false`.

    If `true`, the result of the import simulation will be available at the end of the job but no change will be applied to the DGC.

    Parameters:
      `simulation` - whether the import should be triggered as a simulation

  - ### saveResult

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder saveResult(boolean saveResult)
    Parameters:
      `saveResult` - determine if we should save import result in jobs table in message column.

  - ### relationsAction

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder relationsAction(String relationsAction)
    Parameters:
      `relationsAction` - define the relations action during refresh to replace or add/update

  - ### allowEmptyAttributeValues

    public ImportJsonInJobRequest.ImportJsonInJobRequestBuilder allowEmptyAttributeValues(boolean allowEmptyAttributeValues)
    Sets whether empty attribute values should be allowed during import. The default value is `false`.

    When `false` (default), attribute values that are empty or blank are filtered out and not imported. When `true`, empty attribute values are preserved and imported as-is.

    Parameters:
      `allowEmptyAttributeValues` - whether empty attribute values should be allowed

  - ### build

    public ImportJsonInJobRequest build()