com.casper.sdk.model.bid.VestingSchedule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.
The newest version!
package com.casper.sdk.model.bid;
import com.casper.sdk.annotation.ExcludeFromJacocoGeneratedReport;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import java.math.BigInteger;
import java.util.LinkedList;
import java.util.List;
/**
* Vesting schedule.
*
* @author Alexandre Carvalho
* @author Andre Bertolace
* @since 0.0.1
*/
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class VestingSchedule {
/**
* release time in milliseconds
*/
@JsonProperty("initial_release_timestamp_millis")
private BigInteger initialReleaseTimeStampMillis;
/**
* amount locked
*/
@JsonIgnore
private List lockedAmounts;
@JsonProperty("locked_amounts")
@ExcludeFromJacocoGeneratedReport
protected void setJsonLockedAmounts(final List lockedAmounts) {
List list = new LinkedList<>();
if (lockedAmounts != null) {
for (String string : lockedAmounts) {
list.add(new BigInteger(string, 10));
}
}
this.lockedAmounts = list;
}
@JsonProperty("locked_amounts")
@ExcludeFromJacocoGeneratedReport
protected List getJsonLockedAmounts() {
List list = new LinkedList<>();
for (BigInteger bi : lockedAmounts) {
list.add(bi.toString(10));
}
return list;
}
}