use of com.hederahashgraph.api.proto.java.HederaFunctionality.SystemUndelete in project hedera-services by hashgraph.
the class HapiSysUndelete method opBodyDef.
@Override
protected Consumer<TransactionBody.Builder> opBodyDef(HapiApiSpec spec) throws Throwable {
if (file.isPresent() && contract.isPresent()) {
Assertions.fail("Ambiguous SystemUndelete---both file and contract present!");
}
SystemUndeleteTransactionBody opBody = spec.txns().<SystemUndeleteTransactionBody, SystemUndeleteTransactionBody.Builder>body(SystemUndeleteTransactionBody.class, b -> {
file.ifPresent(n -> b.setFileID(asFileId(n, spec)));
contract.ifPresent(n -> b.setContractID(asContractId(n, spec)));
});
return b -> b.setSystemUndelete(opBody);
}
Aggregations