Search in sources :

Example 1 with FileGetContentsQuery

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();
}
Also used : FileGetContentsQuery(com.hederahashgraph.api.proto.java.FileGetContentsQuery) QueryHeader(com.hederahashgraph.api.proto.java.QueryHeader)

Example 2 with FileGetContentsQuery

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();
}
Also used : FileGetContentsQuery(com.hederahashgraph.api.proto.java.FileGetContentsQuery)

Aggregations

FileGetContentsQuery (com.hederahashgraph.api.proto.java.FileGetContentsQuery)2 QueryHeader (com.hederahashgraph.api.proto.java.QueryHeader)1