Package org.pgpainless.key.util

# Class RevocationAttributes.WithReason

java.lang.Object
org.pgpainless.key.util.RevocationAttributes.WithReason

Enclosing class:
  `RevocationAttributes`

public static final class RevocationAttributes.WithReason extends Object

## Method Summary

Modifier and Type
Method
Description
`RevocationAttributes.WithDescription`
`withReason(RevocationAttributes.Reason reason)`
Set the machine-readable reason.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### withReason

public RevocationAttributes.WithDescription withReason(RevocationAttributes.Reason reason)
Set the machine-readable reason. Note that depending on whether this is a key-revocation or certification-revocation, only certain reason codes are valid. Invalid input will result in an `IllegalArgumentException` to be thrown.

Parameters:
  `reason` - reason
Returns:
  builder
Throws:
  `IllegalArgumentException` - in case of an invalid revocation reason