Class Comment

java.lang.Object
build.cursed.genapi.forgejo.model.Comment

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-09-28T10:48:29.723777+02:00[Europe/Stockholm]", comments="Generator version: 7.21.0") public class Comment extends Object
Comment represents a comment on a commit or issue
  • Field Details

  • Constructor Details

    • Comment

      public Comment()
  • Method Details

    • assets

      public Comment assets(@Nullable List<Attachment> assets)
    • addAssetsItem

      public Comment addAssetsItem(Attachment assetsItem)
    • getAssets

      @Nullable public List<Attachment> getAssets()
      The attachments to the comment
      Returns:
      assets
    • setAssets

      public void setAssets(@Nullable List<Attachment> assets)
    • body

      public Comment body(@Nullable String body)
    • getBody

      @Nullable public String getBody()
      The body of the comment
      Returns:
      body
    • setBody

      public void setBody(@Nullable String body)
    • createdAt

      public Comment createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      The time of the comment's creation
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • htmlUrl

      public Comment htmlUrl(@Nullable String htmlUrl)
    • getHtmlUrl

      @Nullable public String getHtmlUrl()
      The HTML URL of the comment
      Returns:
      htmlUrl
    • setHtmlUrl

      public void setHtmlUrl(@Nullable String htmlUrl)
    • id

      public Comment id(@Nullable Long id)
    • getId

      @Nullable public Long getId()
      The identifier of the comment
      Returns:
      id
    • setId

      public void setId(@Nullable Long id)
    • issueUrl

      public Comment issueUrl(@Nullable String issueUrl)
    • getIssueUrl

      @Nullable public String getIssueUrl()
      The HTML URL of the issue if the comment is posted on an issue, else empty string
      Returns:
      issueUrl
    • setIssueUrl

      public void setIssueUrl(@Nullable String issueUrl)
    • originalAuthor

      public Comment originalAuthor(@Nullable String originalAuthor)
    • getOriginalAuthor

      @Nullable public String getOriginalAuthor()
      The original author that posted the comment if it was not posted locally, else empty string
      Returns:
      originalAuthor
    • setOriginalAuthor

      public void setOriginalAuthor(@Nullable String originalAuthor)
    • originalAuthorId

      public Comment originalAuthorId(@Nullable Long originalAuthorId)
    • getOriginalAuthorId

      @Nullable public Long getOriginalAuthorId()
      The ID of the original author that posted the comment if it was not posted locally, else 0
      Returns:
      originalAuthorId
    • setOriginalAuthorId

      public void setOriginalAuthorId(@Nullable Long originalAuthorId)
    • pullRequestUrl

      public Comment pullRequestUrl(@Nullable String pullRequestUrl)
    • getPullRequestUrl

      @Nullable public String getPullRequestUrl()
      The HTML URL of the pull request if the comment is posted on a pull request, else empty string
      Returns:
      pullRequestUrl
    • setPullRequestUrl

      public void setPullRequestUrl(@Nullable String pullRequestUrl)
    • updatedAt

      public Comment updatedAt(@Nullable OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      The time of the comment's update
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable OffsetDateTime updatedAt)
    • user

      public Comment user(@Nullable User user)
    • getUser

      @Nullable public User getUser()
      Get user
      Returns:
      user
    • setUser

      public void setUser(@Nullable User user)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Comment
    • fromJson

      public static Comment fromJson(String jsonString) throws IOException
      Create an instance of Comment given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Comment
      Throws:
      IOException - if the JSON string is invalid with respect to Comment
    • toJson

      public String toJson()
      Convert an instance of Comment to an JSON string
      Returns:
      JSON string