I assume they should be exclusive, right? In that case, something like this should properly validate the fields:
```java
checkArgument(endTime == null ^ period == null, "Subscription period should be configured with endTime or period");
```