Class DeleteFileOptions

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

@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 DeleteFileOptions extends Object
DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
  • Field Details

  • Constructor Details

    • DeleteFileOptions

      public DeleteFileOptions()
  • Method Details

    • author

      public DeleteFileOptions author(@Nullable Identity author)
    • getAuthor

      @Nullable public Identity getAuthor()
      Get author
      Returns:
      author
    • setAuthor

      public void setAuthor(@Nullable Identity author)
    • branch

      public DeleteFileOptions branch(@Nullable String branch)
    • getBranch

      @Nullable public String getBranch()
      branch (optional) to base this file from. if not given, the default branch is used
      Returns:
      branch
    • setBranch

      public void setBranch(@Nullable String branch)
    • committer

      public DeleteFileOptions committer(@Nullable Identity committer)
    • getCommitter

      @Nullable public Identity getCommitter()
      Get committer
      Returns:
      committer
    • setCommitter

      public void setCommitter(@Nullable Identity committer)
    • dates

      public DeleteFileOptions dates(@Nullable CommitDateOptions dates)
    • getDates

      @Nullable public CommitDateOptions getDates()
      Get dates
      Returns:
      dates
    • setDates

      public void setDates(@Nullable CommitDateOptions dates)
    • message

      public DeleteFileOptions message(@Nullable String message)
    • getMessage

      @Nullable public String getMessage()
      message (optional) for the commit of this file. if not supplied, a default message will be used
      Returns:
      message
    • setMessage

      public void setMessage(@Nullable String message)
    • newBranch

      public DeleteFileOptions newBranch(@Nullable String newBranch)
    • getNewBranch

      @Nullable public String getNewBranch()
      new_branch (optional) will make a new branch from `branch` before creating the file
      Returns:
      newBranch
    • setNewBranch

      public void setNewBranch(@Nullable String newBranch)
    • sha

      public DeleteFileOptions sha(@Nonnull String sha)
    • getSha

      @Nonnull public String getSha()
      sha is the SHA for the file that already exists
      Returns:
      sha
    • setSha

      public void setSha(@Nonnull String sha)
    • signoff

      public DeleteFileOptions signoff(@Nullable Boolean signoff)
    • getSignoff

      @Nullable public Boolean getSignoff()
      Add a Signed-off-by trailer by the committer at the end of the commit log message.
      Returns:
      signoff
    • setSignoff

      public void setSignoff(@Nullable Boolean signoff)
    • 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 DeleteFileOptions
    • fromJson

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

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