java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ResponseHeader,ResponseHeader.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ResponseHeader,ResponseHeader.Builder>
com.hedera.hashgraph.sdk.proto.ResponseHeader.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ResponseHeaderOrBuilder,Cloneable
- Enclosing class:
ResponseHeader
public static final class ResponseHeader.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ResponseHeader,ResponseHeader.Builder>
implements ResponseHeaderOrBuilder
* A standard header returned with every query response. The fields for `cost` or `stateProof` MAY be unset if the requested `ResponseType` does not request those values.<br/> The `responseType` SHALL match the request response type.<br/> The `nodeTransactionPrecheckCode` field SHALL contain the result code for the query.Protobuf type
proto.ResponseHeader-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed.* The result code for this query.* The response type requested for this query.* A state proof for the information requested.longgetCost()* Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed.* The result code for this query.int* The result code for this query.* The response type requested for this query.int* The response type requested for this query.com.google.protobuf.ByteString* A state proof for the information requested.setCost(long value) * Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed.* The result code for this query.setNodeTransactionPrecheckCodeValue(int value) * The result code for this query.setResponseType(ResponseType value) * The response type requested for this query.setResponseTypeValue(int value) * The response type requested for this query.setStateProof(com.google.protobuf.ByteString value) * A state proof for the information requested.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getNodeTransactionPrecheckCodeValue
public int getNodeTransactionPrecheckCodeValue()* The result code for this query. <p> This value SHALL indicate either success or the reason for failure.
.proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;- Specified by:
getNodeTransactionPrecheckCodeValuein interfaceResponseHeaderOrBuilder- Returns:
- The enum numeric value on the wire for nodeTransactionPrecheckCode.
-
setNodeTransactionPrecheckCodeValue
* The result code for this query. <p> This value SHALL indicate either success or the reason for failure.
.proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;- Parameters:
value- The nodeTransactionPrecheckCode to set.- Returns:
- This builder for chaining.
- Throws:
IllegalArgumentException- if UNRECOGNIZED is provided.
-
getNodeTransactionPrecheckCode
* The result code for this query. <p> This value SHALL indicate either success or the reason for failure.
.proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;- Specified by:
getNodeTransactionPrecheckCodein interfaceResponseHeaderOrBuilder- Returns:
- The nodeTransactionPrecheckCode.
-
setNodeTransactionPrecheckCode
* The result code for this query. <p> This value SHALL indicate either success or the reason for failure.
.proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;- Parameters:
value- The enum numeric value on the wire for nodeTransactionPrecheckCode to set.- Returns:
- This builder for chaining.
-
clearNodeTransactionPrecheckCode
* The result code for this query. <p> This value SHALL indicate either success or the reason for failure.
.proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;- Returns:
- This builder for chaining.
-
getResponseTypeValue
public int getResponseTypeValue()* The response type requested for this query. <p> This SHALL be the response type requested in the query header.
.proto.ResponseType responseType = 2;- Specified by:
getResponseTypeValuein interfaceResponseHeaderOrBuilder- Returns:
- The enum numeric value on the wire for responseType.
-
setResponseTypeValue
* The response type requested for this query. <p> This SHALL be the response type requested in the query header.
.proto.ResponseType responseType = 2;- Parameters:
value- The responseType to set.- Returns:
- This builder for chaining.
- Throws:
IllegalArgumentException- if UNRECOGNIZED is provided.
-
getResponseType
* The response type requested for this query. <p> This SHALL be the response type requested in the query header.
.proto.ResponseType responseType = 2;- Specified by:
getResponseTypein interfaceResponseHeaderOrBuilder- Returns:
- The responseType.
-
setResponseType
* The response type requested for this query. <p> This SHALL be the response type requested in the query header.
.proto.ResponseType responseType = 2;- Parameters:
value- The enum numeric value on the wire for responseType to set.- Returns:
- This builder for chaining.
-
clearResponseType
* The response type requested for this query. <p> This SHALL be the response type requested in the query header.
.proto.ResponseType responseType = 2;- Returns:
- This builder for chaining.
-
getCost
public long getCost()* Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed. <p> This value SHALL be set if the response type requested requires cost information, and SHALL NOT be set otherwise.<br/> This value SHALL include the query fee, but SHALL NOT include the transfer fee required to execute the fee payment transaction.
uint64 cost = 3;- Specified by:
getCostin interfaceResponseHeaderOrBuilder- Returns:
- The cost.
-
setCost
* Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed. <p> This value SHALL be set if the response type requested requires cost information, and SHALL NOT be set otherwise.<br/> This value SHALL include the query fee, but SHALL NOT include the transfer fee required to execute the fee payment transaction.
uint64 cost = 3;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
* Requested cost estimate.<br/> This is the fee that _would be_ charged if the query was executed. <p> This value SHALL be set if the response type requested requires cost information, and SHALL NOT be set otherwise.<br/> This value SHALL include the query fee, but SHALL NOT include the transfer fee required to execute the fee payment transaction.
uint64 cost = 3;- Returns:
- This builder for chaining.
-
getStateProof
public com.google.protobuf.ByteString getStateProof()* A state proof for the information requested. This field SHALL NOT be set if the response type does not require a state proof.<br/> This field SHALL NOT be set if a state proof is not available for the query type.<br/> This field SHALL be set if the response type requested a state proof and a state proof is available.
bytes stateProof = 4;- Specified by:
getStateProofin interfaceResponseHeaderOrBuilder- Returns:
- The stateProof.
-
setStateProof
* A state proof for the information requested. This field SHALL NOT be set if the response type does not require a state proof.<br/> This field SHALL NOT be set if a state proof is not available for the query type.<br/> This field SHALL be set if the response type requested a state proof and a state proof is available.
bytes stateProof = 4;- Parameters:
value- The stateProof to set.- Returns:
- This builder for chaining.
-
clearStateProof
* A state proof for the information requested. This field SHALL NOT be set if the response type does not require a state proof.<br/> This field SHALL NOT be set if a state proof is not available for the query type.<br/> This field SHALL be set if the response type requested a state proof and a state proof is available.
bytes stateProof = 4;- Returns:
- This builder for chaining.
-