Class QueryHeader.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<QueryHeader,QueryHeader.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<QueryHeader,QueryHeader.Builder>
com.hedera.hashgraph.sdk.proto.QueryHeader.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, QueryHeaderOrBuilder, Cloneable
Enclosing class:
QueryHeader

public static final class QueryHeader.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<QueryHeader,QueryHeader.Builder> implements QueryHeaderOrBuilder
 *
 A standard query header.<br/>
 Each query from the client to the node must contain a QueryHeader, which
 specifies the desired response type, and includes a payment transaction
 that will compensate the network for responding to the query.
 The payment may be blank if the query is free.

 The payment transaction MUST be a `cryptoTransfer` from the payer account
 to the account of the node where the query is submitted.<br/>
 If the payment is sufficient, the network SHALL respond with the response
 type requested.<br/>
 If the response type is `COST_ANSWER` the payment MUST be unset.
 A state proof SHALL be available for some types of information.<br/>
 A state proof SHALL be available for a Record, but not a receipt, and the
 response entry for each supported "get info" query.
 
Protobuf type proto.QueryHeader
  • Method Details

    • hasPayment

      public boolean hasPayment()
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
      Specified by:
      hasPayment in interface QueryHeaderOrBuilder
      Returns:
      Whether the payment field is set.
    • getPayment

      public Transaction getPayment()
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
      Specified by:
      getPayment in interface QueryHeaderOrBuilder
      Returns:
      The payment.
    • setPayment

      public QueryHeader.Builder setPayment(Transaction value)
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
    • setPayment

      public QueryHeader.Builder setPayment(Transaction.Builder builderForValue)
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
    • mergePayment

      public QueryHeader.Builder mergePayment(Transaction value)
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
    • clearPayment

      public QueryHeader.Builder clearPayment()
       *
       A signed `CryptoTransferTransaction` to pay query fees.
       <p>
       This MUST transfer HBAR from the "payer" to the responding node account
       sufficient to pay the query fees.
       
      .proto.Transaction payment = 1;
    • getResponseTypeValue

      public int getResponseTypeValue()
       *
       A type of query response requested.
       
      .proto.ResponseType responseType = 2;
      Specified by:
      getResponseTypeValue in interface QueryHeaderOrBuilder
      Returns:
      The enum numeric value on the wire for responseType.
    • setResponseTypeValue

      public QueryHeader.Builder setResponseTypeValue(int value)
       *
       A type of query response requested.
       
      .proto.ResponseType responseType = 2;
      Parameters:
      value - The responseType to set.
      Returns:
      This builder for chaining.
      Throws:
      IllegalArgumentException - if UNRECOGNIZED is provided.
    • getResponseType

      public ResponseType getResponseType()
       *
       A type of query response requested.
       
      .proto.ResponseType responseType = 2;
      Specified by:
      getResponseType in interface QueryHeaderOrBuilder
      Returns:
      The responseType.
    • setResponseType

      public QueryHeader.Builder setResponseType(ResponseType value)
       *
       A type of query response requested.
       
      .proto.ResponseType responseType = 2;
      Parameters:
      value - The enum numeric value on the wire for responseType to set.
      Returns:
      This builder for chaining.
    • clearResponseType

      public QueryHeader.Builder clearResponseType()
       *
       A type of query response requested.
       
      .proto.ResponseType responseType = 2;
      Returns:
      This builder for chaining.