use of com.hederahashgraph.api.proto.java.FileGetInfoQuery in project hedera-services by hashgraph.
the class RequestBuilder method getFileGetInfoBuilder.
/**
* Get file get info builder
*
* @param payment
* payment
* @param fileID
* file ID
* @param responseType
* response type
* @return query
*/
public static Query getFileGetInfoBuilder(Transaction payment, FileID fileID, ResponseType responseType) {
QueryHeader queryHeader = QueryHeader.newBuilder().setPayment(payment).setResponseType(responseType).build();
FileGetInfoQuery fileGetInfoQuery = FileGetInfoQuery.newBuilder().setHeader(queryHeader).setFileID(fileID).build();
return Query.newBuilder().setFileGetInfo(fileGetInfoQuery).build();
}
use of com.hederahashgraph.api.proto.java.FileGetInfoQuery in project hedera-services by hashgraph.
the class HapiGetFileInfo method getFileInfoQuery.
private Query getFileInfoQuery(HapiApiSpec spec, Transaction payment, boolean costOnly) {
file = fileSupplier.isPresent() ? fileSupplier.get().get() : file;
var id = TxnUtils.asFileId(file, spec);
fileId = id;
FileGetInfoQuery infoQuery = FileGetInfoQuery.newBuilder().setHeader(costOnly ? answerCostHeader(payment) : answerHeader(payment)).setFileID(id).build();
return Query.newBuilder().setFileGetInfo(infoQuery).build();
}
Aggregations