Since Java 21 it's possible to use pattern matching for records. For API users it would be nice if they could use this feature to destructure SpectateResponse and OpenResponse.
We can make publicly visible records (Open, Closed, Fail, Succeed) that implement the sealed interfaces OpenResponse and SpectateResponse in a Java-21 specific package. Implementations of NotOpenedReason and NotCreatedReason can also become records. These interfaces will not become sealed as to allow for more error reasons in the future.
Since Java 21 it's possible to use pattern matching for records. For API users it would be nice if they could use this feature to destructure SpectateResponse and OpenResponse.
We can make publicly visible records (Open, Closed, Fail, Succeed) that implement the sealed interfaces OpenResponse and SpectateResponse in a Java-21 specific package. Implementations of NotOpenedReason and NotCreatedReason can also become records. These interfaces will not become sealed as to allow for more error reasons in the future.