Class Branch

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

@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 Branch extends Object
Branch represents a repository branch
  • Field Details

  • Constructor Details

    • Branch

      public Branch()
  • Method Details

    • commit

      public Branch commit(@Nullable PayloadCommit commit)
    • getCommit

      @Nullable public PayloadCommit getCommit()
      Get commit
      Returns:
      commit
    • setCommit

      public void setCommit(@Nullable PayloadCommit commit)
    • effectiveBranchProtectionName

      public Branch effectiveBranchProtectionName(@Nullable String effectiveBranchProtectionName)
    • getEffectiveBranchProtectionName

      @Nullable public String getEffectiveBranchProtectionName()
      Get effectiveBranchProtectionName
      Returns:
      effectiveBranchProtectionName
    • setEffectiveBranchProtectionName

      public void setEffectiveBranchProtectionName(@Nullable String effectiveBranchProtectionName)
    • enableStatusCheck

      public Branch enableStatusCheck(@Nullable Boolean enableStatusCheck)
    • getEnableStatusCheck

      @Nullable public Boolean getEnableStatusCheck()
      Get enableStatusCheck
      Returns:
      enableStatusCheck
    • setEnableStatusCheck

      public void setEnableStatusCheck(@Nullable Boolean enableStatusCheck)
    • name

      public Branch name(@Nullable String name)
    • getName

      @Nullable public String getName()
      Get name
      Returns:
      name
    • setName

      public void setName(@Nullable String name)
    • _protected

      public Branch _protected(@Nullable Boolean _protected)
    • getProtected

      @Nullable public Boolean getProtected()
      Get _protected
      Returns:
      _protected
    • setProtected

      public void setProtected(@Nullable Boolean _protected)
    • requiredApprovals

      public Branch requiredApprovals(@Nullable Long requiredApprovals)
    • getRequiredApprovals

      @Nullable public Long getRequiredApprovals()
      Get requiredApprovals
      Returns:
      requiredApprovals
    • setRequiredApprovals

      public void setRequiredApprovals(@Nullable Long requiredApprovals)
    • statusCheckContexts

      public Branch statusCheckContexts(@Nullable List<String> statusCheckContexts)
    • addStatusCheckContextsItem

      public Branch addStatusCheckContextsItem(String statusCheckContextsItem)
    • getStatusCheckContexts

      @Nullable public List<String> getStatusCheckContexts()
      Get statusCheckContexts
      Returns:
      statusCheckContexts
    • setStatusCheckContexts

      public void setStatusCheckContexts(@Nullable List<String> statusCheckContexts)
    • userCanMerge

      public Branch userCanMerge(@Nullable Boolean userCanMerge)
    • getUserCanMerge

      @Nullable public Boolean getUserCanMerge()
      Get userCanMerge
      Returns:
      userCanMerge
    • setUserCanMerge

      public void setUserCanMerge(@Nullable Boolean userCanMerge)
    • userCanPush

      public Branch userCanPush(@Nullable Boolean userCanPush)
    • getUserCanPush

      @Nullable public Boolean getUserCanPush()
      Get userCanPush
      Returns:
      userCanPush
    • setUserCanPush

      public void setUserCanPush(@Nullable Boolean userCanPush)
    • 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 Branch
    • fromJson

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

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