Class GHRepositoryRule

java.lang.Object
org.kohsuke.github.GHRepositoryRule

public class GHRepositoryRule extends Object
Represents a repository rule.
  • Constructor Details

    • GHRepositoryRule

      public GHRepositoryRule()
      Create default GHRepositoryRule instance
  • Method Details

    • getType

      public GHRepositoryRule.Type getType()
      Gets the type.
      Returns:
      the type
    • getRulesetSourceType

      public GHRepositoryRule.RulesetSourceType getRulesetSourceType()
      Gets the ruleset source type.
      Returns:
      the ruleset source type
    • getRulesetSource

      public String getRulesetSource()
      Gets the ruleset source.
      Returns:
      the ruleset source
    • getRulesetId

      public long getRulesetId()
      Gets the ruleset id.
      Returns:
      the ruleset id
    • getParameter

      public <T> Optional<T> getParameter(GHRepositoryRule.Parameter<T> parameter) throws IOException
      Gets a parameter. (Parameters provides a list of available parameters.)
      Type Parameters:
      T - the type of the parameter
      Parameters:
      parameter - the parameter
      Returns:
      the parameters
      Throws:
      IOException - if an I/O error occurs