Package com.collibra.dgc.core.api.dto.instance.attachment

# Class AddAttachmentRequest.Builder

Object
Builder

Enclosing class:
  `AddAttachmentRequest`

public static final class AddAttachmentRequest.Builder extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AddAttachmentRequest.Builder`
  `baseResource(ResourceReference baseResource)`
  Required. The reference to the resource new attachment should be attached to.
  `AddAttachmentRequest.Builder`
  `baseResourceDiscriminator(String baseResourceDiscriminator)`
  Sets the resource discriminator of the resource which the new attachment should be attached to.
  `AddAttachmentRequest.Builder`
  `baseResourceId(UUID baseResourceId)`
  Sets the ID of the resource which the new attachment should be attached to.
  `AddAttachmentRequest.Builder`
  `baseResourceType(ResourceType baseResourceType)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Please use `AddAttachmentRequest.setBaseResourceDiscriminator(String)` instead.
  `AddAttachmentRequest`
  `build()`
  `AddAttachmentRequest.Builder`
  `but()`
  Deprecated.
  This method will be removed in the future.
  `AddAttachmentRequest.Builder`
  `file(AddAttachmentRequest.FileReference file)`
  Required. The reference to the file representing new attachment.
  `AddAttachmentRequest.Builder`
  `fileId(UUID fileId)`
  `AddAttachmentRequest.Builder`
  `fileName(String fileName)`
  `AddAttachmentRequest.Builder`
  `fileStream(InputStream fileStream)`
  `String`
  `toString()`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### baseResourceId

    public AddAttachmentRequest.Builder baseResourceId(UUID baseResourceId)
    Sets the ID of the resource which the new attachment should be attached to. This is a convenience method for setting base resource ID.
    Parameters:
      `baseResourceId` - the ID of the resource which the new attachment should be attached to

  - ### baseResourceType

    @Deprecated(since="2025.01", forRemoval=true) public AddAttachmentRequest.Builder baseResourceType(ResourceType baseResourceType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use `AddAttachmentRequest.setBaseResourceDiscriminator(String)` instead.
    Sets the type of the resource which the new attachment should be attached to. This is a convenience method for setting base resource type.
    Parameters:
      `baseResourceType` - the type of the resource which the new attachment should be attached to

  - ### baseResourceDiscriminator

    public AddAttachmentRequest.Builder baseResourceDiscriminator(String baseResourceDiscriminator)
    Sets the resource discriminator of the resource which the new attachment should be attached to. This is a convenience method for setting the base resource discriminator. Following discriminators are allowed for attachments: User, Community, Domain, Asset.
    Parameters:
      `baseResourceDiscriminator` - the discriminator of the resource which the new attachment should be attached to

  - ### fileName

    public AddAttachmentRequest.Builder fileName(String fileName)

  - ### fileStream

    public AddAttachmentRequest.Builder fileStream(InputStream fileStream)

  - ### fileId

    public AddAttachmentRequest.Builder fileId(UUID fileId)

  - ### but

    @Deprecated public AddAttachmentRequest.Builder but()
    Deprecated.
    This method will be removed in the future. Please, use `AddAttachmentRequest.builder()`
    Clone method for this Builder.

  - ### baseResource

    public AddAttachmentRequest.Builder baseResource(ResourceReference baseResource)
    Required. The reference to the resource new attachment should be attached to. An attachment can be added on those resource types: User, Community, Domain, Asset.
    Returns:
      `this`.

  - ### file

    public AddAttachmentRequest.Builder file(AddAttachmentRequest.FileReference file)
    Required. The reference to the file representing new attachment.
    Returns:
      `this`.

  - ### build

    public AddAttachmentRequest build()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`