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

# Class AddAttachmentRequest

Object
AddAttachmentRequest

All Implemented Interfaces:
  `Serializable`

public class AddAttachmentRequest extends Object implements Serializable
The properties of the attachment to be added.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `AddAttachmentRequest.Builder`
  `static class`
  `AddAttachmentRequest.FileReference`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddAttachmentRequest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static AddAttachmentRequest.Builder`
  `builder()`
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `ResourceReference`
  `getBaseResource()`
  Required. The reference to the resource new attachment should be attached to.
  `AddAttachmentRequest.FileReference`
  `getFile()`
  Required. The reference to the file representing new attachment.
  `int`
  `hashCode()`
  `void`
  `setBaseResource(ResourceReference baseResource)`
  Required. The reference to the resource new attachment should be attached to.
  `void`
  `setBaseResourceDiscriminator(String baseResourceDiscriminator)`
  Sets the resource discriminator of the resource which the new attachment should be attached to.
  `void`
  `setBaseResourceId(UUID baseResourceId)`
  Sets the ID of the resource which the new attachment should be attached to.
  `void`
  `setBaseResourceType(ResourceType baseResourceType)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Please use `setBaseResourceDiscriminator(String)` instead.
  `void`
  `setFile(AddAttachmentRequest.FileReference file)`
  Required. The reference to the file representing new attachment.
  `String`
  `toString()`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### AddAttachmentRequest

    public AddAttachmentRequest()

- ## Method Details

  - ### setBaseResourceId

    public void setBaseResourceId(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

  - ### setBaseResourceType

    @Deprecated(since="2025.01", forRemoval=true) public void setBaseResourceType(ResourceType baseResourceType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use `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. An attachment can be added on those resource types: User, Community, Domain, Asset.
    Parameters:
      `baseResourceType` - the type of the resource which the new attachment should be attached to

  - ### setBaseResourceDiscriminator

    public void setBaseResourceDiscriminator(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

  - ### builder

    public static AddAttachmentRequest.Builder builder()

  - ### getBaseResource

    public ResourceReference getBaseResource()
    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.

  - ### getFile

    public AddAttachmentRequest.FileReference getFile()
    Required. The reference to the file representing new attachment.

  - ### setBaseResource

    public void setBaseResource(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.

  - ### setFile

    public void setFile(AddAttachmentRequest.FileReference file)
    Required. The reference to the file representing new attachment.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

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