Class PermissionRequestResultKind

java.lang.Object
com.github.copilot.sdk.json.PermissionRequestResultKind

public final class PermissionRequestResultKind extends Object
Describes the outcome kind of a permission request result.

This is a string-backed value type that can hold both well-known kinds (via the static constants) and arbitrary extension values forwarded by the server. Comparisons are case-insensitive to match server behaviour.

Well-known kinds

Since:
1.1.0
See Also:
  • Field Details

    • APPROVED

      public static final PermissionRequestResultKind APPROVED
      The permission was approved.
    • DENIED_BY_RULES

      public static final PermissionRequestResultKind DENIED_BY_RULES
      The permission was denied by policy rules.
    • DENIED_COULD_NOT_REQUEST_FROM_USER

      public static final PermissionRequestResultKind DENIED_COULD_NOT_REQUEST_FROM_USER
      The permission was denied because no approval rule was found and the user could not be prompted.
    • DENIED_INTERACTIVELY_BY_USER

      public static final PermissionRequestResultKind DENIED_INTERACTIVELY_BY_USER
      The permission was denied interactively by the user.
  • Constructor Details

    • PermissionRequestResultKind

      public PermissionRequestResultKind(String value)
      Creates a new PermissionRequestResultKind with the given string value. Useful for extension kinds not covered by the well-known constants.
      Parameters:
      value - the string value; null is treated as an empty string
  • Method Details

    • getValue

      public String getValue()
      Returns the underlying string value of this kind.
      Returns:
      the string value, never null
    • toString

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object