Given the following object
@Getter
@Builder
@RequiredArgsConstructor
class Example {
private final String maybeA;
private final String maybeB;
}
Is it possible to add a constraint where one of these fields has to exist?
So we can have A and B, A or B, but not A nor B.