Class AddCommentRequest.Builder

Object
Builder
Enclosing class:
AddCommentRequest

public static final class AddCommentRequest.Builder extends Object
  • Method Details

    • baseResourceId

      @Deprecated(since="2025.03", forRemoval=true) public AddCommentRequest.Builder baseResourceId(UUID baseResourceId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use commentableResourceId(UUID) instead.
      (required) 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
    • baseResourceType

      @Deprecated(since="2025.01", forRemoval=true) public AddCommentRequest.Builder baseResourceType(ResourceType baseResourceType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      (required) 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
    • baseResourceDiscriminator

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

      Deprecated.
      This method will be removed in the future. Please, use AddCommentRequest.builder()
      Clone method for this Builder.
    • content

      public AddCommentRequest.Builder content(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].
      Returns:
      this.
    • baseResource

      @Deprecated public AddCommentRequest.Builder baseResource(ResourceReference baseResource)
      Deprecated.
      Please use the combination of AddCommentRequest.commentableResourceId and AddCommentRequest.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
      Returns:
      this.
    • commentableResourceId

      public AddCommentRequest.Builder commentableResourceId(UUID commentableResourceId)
      The identifier of the resource to which the new comment should be attached to. The combination of AddCommentRequest.commentableResourceId and AddCommentRequest.commentableResourceDiscriminator replaces the AddCommentRequest.baseResource field. These should not be used together.
      Returns:
      this.
    • commentableResourceDiscriminator

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

      public AddCommentRequest.Builder parentId(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.
      Returns:
      this.
    • build

      public AddCommentRequest build()
    • toString

      public String toString()
      Overrides:
      toString in class Object