Class CreateBranchRepoOption

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

@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 CreateBranchRepoOption extends Object
CreateBranchRepoOption options when creating a branch in a repository
  • Field Details

  • Constructor Details

    • CreateBranchRepoOption

      public CreateBranchRepoOption()
  • Method Details

    • newBranchName

      public CreateBranchRepoOption newBranchName(@Nonnull String newBranchName)
    • getNewBranchName

      @Nonnull public String getNewBranchName()
      Name of the branch to create
      Returns:
      newBranchName
    • setNewBranchName

      public void setNewBranchName(@Nonnull String newBranchName)
    • oldBranchName

      public CreateBranchRepoOption oldBranchName(@Nullable String oldBranchName)
    • getOldBranchName

      @Nullable public String getOldBranchName()
      Deprecated: true Name of the old branch to create from
      Returns:
      oldBranchName
    • setOldBranchName

      public void setOldBranchName(@Nullable String oldBranchName)
    • oldRefName

      public CreateBranchRepoOption oldRefName(@Nullable String oldRefName)
    • getOldRefName

      @Nullable public String getOldRefName()
      Name of the old branch/tag/commit to create from
      Returns:
      oldRefName
    • setOldRefName

      public void setOldRefName(@Nullable String oldRefName)
    • 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 CreateBranchRepoOption
    • fromJson

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

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