use of com.hederahashgraph.api.proto.java.FileGetContentsQuery in project hedera-services by hashgraph.
the class RequestBuilder method getFileGetContentBuilder.
public static Query getFileGetContentBuilder(Transaction payment, FileID fileID, ResponseType responseType) {
QueryHeader queryHeader = QueryHeader.newBuilder().setPayment(payment).setResponseType(responseType).build();
FileGetContentsQuery fileGetContentsQuery = FileGetContentsQuery.newBuilder().setHeader(queryHeader).setFileID(fileID).build();
return Query.newBuilder().setFileGetContents(fileGetContentsQuery).build();
}
use of com.hederahashgraph.api.proto.java.FileGetContentsQuery in project hedera-services by hashgraph.
the class HapiGetFileContents method getFileContentQuery.
private Query getFileContentQuery(HapiApiSpec spec, Transaction payment, boolean costOnly) {
fileId = TxnUtils.asFileId(fileName, spec);
FileGetContentsQuery query = FileGetContentsQuery.newBuilder().setHeader(costOnly ? answerCostHeader(payment) : answerHeader(payment)).setFileID(TxnUtils.asFileId(fileName, spec)).build();
return Query.newBuilder().setFileGetContents(query).build();
}
Aggregations