> + private final Date startTime;
> +
> + @ConstructorProperties({
> + "amount", "discount_amount", "discount_percent", "end_time",
> "period", "price"
> + ,"resource", "start_time", "status", "subscribed_object", "uuid"
> + })
> + public CalcSubscription(String amount, double discountAmount, double
> discountPercent, Date endTime, String period
> + , double price, SubscriptionResource resource, Date startTime) {
> + this.amount = amount;
> + this.discountAmount = discountAmount;
> + this.discountPercent = discountPercent;
> + this.endTime = endTime;
> + this.period = period;
> + this.price = price;
> + this.resource = resource;
> + this.startTime = startTime;
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");
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/41/files#r7980669