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

# Class AddCommentRequest

Object
AddCommentRequest

All Implemented Interfaces:
  `Serializable`

public class AddCommentRequest extends Object implements Serializable
The properties of the comment to be added.

See Also:
  - Serialized Form

- ## Nested Class Summary

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddCommentRequest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static AddCommentRequest.Builder`
  `builder()`
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `ResourceReference`
  `getBaseResource()`
  Deprecated.
  Please use the combination of `commentableResourceId` and `commentableResourceDiscriminator`
  `String`
  `getCommentableResourceDiscriminator()`
  The discriminator of the resource to which the new comment should be attached to.
  `UUID`
  `getCommentableResourceId()`
  The identifier of the resource to which the new comment should be attached to.
  `String`
  `getContent()`
  Required. The actual HTML content of the comment to be added.
  `UUID`
  `getParentId()`
  The id of the parent comment.
  `int`
  `hashCode()`
  `void`
  `setBaseResource(ResourceReference baseResource)`
  Deprecated.
  Please use the combination of `commentableResourceId` and `commentableResourceDiscriminator`
  `void`
  `setBaseResourceDiscriminator(String baseResourceDiscriminator)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Please use `commentableResourceDiscriminator` instead.
  `void`
  `setBaseResourceId(UUID baseResourceId)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Please use `commentableResourceId` instead.
  `void`
  `setBaseResourceType(ResourceType baseResourceType)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Please use `commentableResourceDiscriminator` instead.
  `void`
  `setCommentableResourceDiscriminator(String commentableResourceDiscriminator)`
  The discriminator of the resource to which the new comment should be attached to.
  `void`
  `setCommentableResourceId(UUID commentableResourceId)`
  The identifier of the resource to which the new comment should be attached to.
  `void`
  `setContent(String content)`
  Required. The actual HTML content of the comment to be added.
  `void`
  `setParentId(UUID parentId)`
  The id of the parent comment.
  `String`
  `toString()`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### AddCommentRequest

    public AddCommentRequest()

- ## Method Details

  - ### setBaseResourceId

    @Deprecated(since="2025.03", forRemoval=true) public void setBaseResourceId(UUID baseResourceId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use `commentableResourceId` instead.
    Sets the ID of the resource which the new comment should be attached to. This is a convenience method for setting base resource ID.
    Parameters:
      `baseResourceId` - the ID of the resource which the new comment 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 `commentableResourceDiscriminator` instead.
    Sets the type of the resource which the new comment should be attached to. This is a convenience method for setting base resource type.
    Parameters:
      `baseResourceType` - the type of the resource which the new comment should be attached to

  - ### setBaseResourceDiscriminator

    @Deprecated(since="2025.03", forRemoval=true) public void setBaseResourceDiscriminator(String baseResourceDiscriminator)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use `commentableResourceDiscriminator` instead.
    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: `Asset`, `Domain`, `Community`, `Rating`.
    Parameters:
      `baseResourceDiscriminator` - the discriminator of the resource which the new attachment should be attached to

  - ### builder

    public static AddCommentRequest.Builder builder()

  - ### getContent

    public String getContent()
    Required. The actual HTML content of the comment to be added. Can contain user mentions using syntax `[@User:$userId]` where $userId is the ID of mentioned user. For example: `[@User:00000000-0000-0000-0000-000000900002]`.

  - ### getBaseResource

    @Deprecated public ResourceReference getBaseResource()
    Deprecated.
    Please use the combination of `commentableResourceId` and `commentableResourceDiscriminator`
    The resource which the new comment should be attached to. For a Comment, the resourceType/resourceDiscriminator of a baseResource can be: `Asset`, `Domain`, `Community`, `Rating`

  - ### getCommentableResourceId

    public UUID getCommentableResourceId()
    The identifier of the resource to which the new comment should be attached to. The combination of `commentableResourceId` and `commentableResourceDiscriminator` replaces the `baseResource` field. These should not be used together.

  - ### getCommentableResourceDiscriminator

    public String getCommentableResourceDiscriminator()
    The discriminator of the resource to which the new comment should be attached to. The combination of `commentableResourceId` and `commentableResourceDiscriminator` replaces the `baseResource` field. These should not be used together.Possible values for a discriminator of a Commentable Resource are: `Asset`, `Domain`, `Community`, `Rating`

  - ### getParentId

    public UUID getParentId()
    The id of the parent comment. If not null - the comment is the reply for the parent comment. Comment threads are not supported, replying to a reply will cause an illegal argument exception.

  - ### setContent

    public void setContent(String content)
    Required. The actual HTML content of the comment to be added. Can contain user mentions using syntax `[@User:$userId]` where $userId is the ID of mentioned user. For example: `[@User:00000000-0000-0000-0000-000000900002]`.

  - ### setBaseResource

    @Deprecated public void setBaseResource(ResourceReference baseResource)
    Deprecated.
    Please use the combination of `commentableResourceId` and `commentableResourceDiscriminator`
    The resource which the new comment should be attached to. For a Comment, the resourceType/resourceDiscriminator of a baseResource can be: `Asset`, `Domain`, `Community`, `Rating`

  - ### setCommentableResourceId

    public void setCommentableResourceId(UUID commentableResourceId)
    The identifier of the resource to which the new comment should be attached to. The combination of `commentableResourceId` and `commentableResourceDiscriminator` replaces the `baseResource` field. These should not be used together.

  - ### setCommentableResourceDiscriminator

    public void setCommentableResourceDiscriminator(String commentableResourceDiscriminator)
    The discriminator of the resource to which the new comment should be attached to. The combination of `commentableResourceId` and `commentableResourceDiscriminator` replaces the `baseResource` field. These should not be used together.Possible values for a discriminator of a Commentable Resource are: `Asset`, `Domain`, `Community`, `Rating`

  - ### setParentId

    public void setParentId(UUID parentId)
    The id of the parent comment. If not null - the comment is the reply for the parent comment. Comment threads are not supported, replying to a reply will cause an illegal argument exception.

  - ### 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`