Search in sources :

Example 1 with GetBySolidityIDQuery

use of com.hederahashgraph.api.proto.java.GetBySolidityIDQuery in project hedera-services by hashgraph.

the class GetBySolidityIdAnswer method responseGiven.

@Override
public Response responseGiven(Query query, StateView view, ResponseCodeEnum validity, long cost) {
    GetBySolidityIDQuery op = query.getGetBySolidityID();
    ResponseType type = op.getHeader().getResponseType();
    GetBySolidityIDResponse.Builder response = GetBySolidityIDResponse.newBuilder();
    if (type == COST_ANSWER) {
        response.setHeader(costAnswerHeader(NOT_SUPPORTED, 0L));
    } else {
        response.setHeader(answerOnlyHeader(NOT_SUPPORTED));
    }
    return Response.newBuilder().setGetBySolidityID(response).build();
}
Also used : GetBySolidityIDResponse(com.hederahashgraph.api.proto.java.GetBySolidityIDResponse) GetBySolidityIDQuery(com.hederahashgraph.api.proto.java.GetBySolidityIDQuery) ResponseType(com.hederahashgraph.api.proto.java.ResponseType)

Aggregations

GetBySolidityIDQuery (com.hederahashgraph.api.proto.java.GetBySolidityIDQuery)1 GetBySolidityIDResponse (com.hederahashgraph.api.proto.java.GetBySolidityIDResponse)1 ResponseType (com.hederahashgraph.api.proto.java.ResponseType)1