com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: crypto_get_account_balance.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Get the balance of a cryptocurrency account. This returns only the balance, so it is a smaller
* reply than CryptoGetInfo, which returns the balance plus additional information.
*
*
* Protobuf type {@code proto.CryptoGetAccountBalanceQuery}
*/
public final class CryptoGetAccountBalanceQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.CryptoGetAccountBalanceQuery)
CryptoGetAccountBalanceQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use CryptoGetAccountBalanceQuery.newBuilder() to construct.
private CryptoGetAccountBalanceQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CryptoGetAccountBalanceQuery() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CryptoGetAccountBalanceQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.class, com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.Builder.class);
}
private int bitField0_;
private int balanceSourceCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object balanceSource_;
public enum BalanceSourceCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ACCOUNTID(2),
CONTRACTID(3),
BALANCESOURCE_NOT_SET(0);
private final int value;
private BalanceSourceCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BalanceSourceCase valueOf(int value) {
return forNumber(value);
}
public static BalanceSourceCase forNumber(int value) {
switch (value) {
case 2: return ACCOUNTID;
case 3: return CONTRACTID;
case 0: return BALANCESOURCE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public BalanceSourceCase
getBalanceSourceCase() {
return BalanceSourceCase.forNumber(
balanceSourceCase_);
}
public static final int HEADER_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.QueryHeader header_;
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
* @return Whether the header field is set.
*/
@java.lang.Override
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
* @return The header.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.QueryHeader getHeader() {
return header_ == null ? com.hedera.hashgraph.sdk.proto.QueryHeader.getDefaultInstance() : header_;
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.QueryHeaderOrBuilder getHeaderOrBuilder() {
return header_ == null ? com.hedera.hashgraph.sdk.proto.QueryHeader.getDefaultInstance() : header_;
}
public static final int ACCOUNTID_FIELD_NUMBER = 2;
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
* @return Whether the accountID field is set.
*/
@java.lang.Override
public boolean hasAccountID() {
return balanceSourceCase_ == 2;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
* @return The accountID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getAccountID() {
if (balanceSourceCase_ == 2) {
return (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAccountIDOrBuilder() {
if (balanceSourceCase_ == 2) {
return (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
public static final int CONTRACTID_FIELD_NUMBER = 3;
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
* @return Whether the contractID field is set.
*/
@java.lang.Override
public boolean hasContractID() {
return balanceSourceCase_ == 3;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
* @return The contractID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getContractID() {
if (balanceSourceCase_ == 3) {
return (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder getContractIDOrBuilder() {
if (balanceSourceCase_ == 3) {
return (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getHeader());
}
if (balanceSourceCase_ == 2) {
output.writeMessage(2, (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_);
}
if (balanceSourceCase_ == 3) {
output.writeMessage(3, (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
if (balanceSourceCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_);
}
if (balanceSourceCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery other = (com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery) obj;
if (hasHeader() != other.hasHeader()) return false;
if (hasHeader()) {
if (!getHeader()
.equals(other.getHeader())) return false;
}
if (!getBalanceSourceCase().equals(other.getBalanceSourceCase())) return false;
switch (balanceSourceCase_) {
case 2:
if (!getAccountID()
.equals(other.getAccountID())) return false;
break;
case 3:
if (!getContractID()
.equals(other.getContractID())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
switch (balanceSourceCase_) {
case 2:
hash = (37 * hash) + ACCOUNTID_FIELD_NUMBER;
hash = (53 * hash) + getAccountID().hashCode();
break;
case 3:
hash = (37 * hash) + CONTRACTID_FIELD_NUMBER;
hash = (53 * hash) + getContractID().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
**
* Get the balance of a cryptocurrency account. This returns only the balance, so it is a smaller
* reply than CryptoGetInfo, which returns the balance plus additional information.
*
*
* Protobuf type {@code proto.CryptoGetAccountBalanceQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.CryptoGetAccountBalanceQuery)
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.class, com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHeaderFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
header_ = null;
if (headerBuilder_ != null) {
headerBuilder_.dispose();
headerBuilder_ = null;
}
if (accountIDBuilder_ != null) {
accountIDBuilder_.clear();
}
if (contractIDBuilder_ != null) {
contractIDBuilder_.clear();
}
balanceSourceCase_ = 0;
balanceSource_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceQuery_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery build() {
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery buildPartial() {
com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery result = new com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.header_ = headerBuilder_ == null
? header_
: headerBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery result) {
result.balanceSourceCase_ = balanceSourceCase_;
result.balanceSource_ = this.balanceSource_;
if (balanceSourceCase_ == 2 &&
accountIDBuilder_ != null) {
result.balanceSource_ = accountIDBuilder_.build();
}
if (balanceSourceCase_ == 3 &&
contractIDBuilder_ != null) {
result.balanceSource_ = contractIDBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery other) {
if (other == com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery.getDefaultInstance()) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
switch (other.getBalanceSourceCase()) {
case ACCOUNTID: {
mergeAccountID(other.getAccountID());
break;
}
case CONTRACTID: {
mergeContractID(other.getContractID());
break;
}
case BALANCESOURCE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getHeaderFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getAccountIDFieldBuilder().getBuilder(),
extensionRegistry);
balanceSourceCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getContractIDFieldBuilder().getBuilder(),
extensionRegistry);
balanceSourceCase_ = 3;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int balanceSourceCase_ = 0;
private java.lang.Object balanceSource_;
public BalanceSourceCase
getBalanceSourceCase() {
return BalanceSourceCase.forNumber(
balanceSourceCase_);
}
public Builder clearBalanceSource() {
balanceSourceCase_ = 0;
balanceSource_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.hedera.hashgraph.sdk.proto.QueryHeader header_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.QueryHeader, com.hedera.hashgraph.sdk.proto.QueryHeader.Builder, com.hedera.hashgraph.sdk.proto.QueryHeaderOrBuilder> headerBuilder_;
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
* @return Whether the header field is set.
*/
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
* @return The header.
*/
public com.hedera.hashgraph.sdk.proto.QueryHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? com.hedera.hashgraph.sdk.proto.QueryHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public Builder setHeader(com.hedera.hashgraph.sdk.proto.QueryHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
} else {
headerBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public Builder setHeader(
com.hedera.hashgraph.sdk.proto.QueryHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public Builder mergeHeader(com.hedera.hashgraph.sdk.proto.QueryHeader value) {
if (headerBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
header_ != null &&
header_ != com.hedera.hashgraph.sdk.proto.QueryHeader.getDefaultInstance()) {
getHeaderBuilder().mergeFrom(value);
} else {
header_ = value;
}
} else {
headerBuilder_.mergeFrom(value);
}
if (header_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public Builder clearHeader() {
bitField0_ = (bitField0_ & ~0x00000001);
header_ = null;
if (headerBuilder_ != null) {
headerBuilder_.dispose();
headerBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public com.hedera.hashgraph.sdk.proto.QueryHeader.Builder getHeaderBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
public com.hedera.hashgraph.sdk.proto.QueryHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
com.hedera.hashgraph.sdk.proto.QueryHeader.getDefaultInstance() : header_;
}
}
/**
*
**
* Standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*
*
* .proto.QueryHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.QueryHeader, com.hedera.hashgraph.sdk.proto.QueryHeader.Builder, com.hedera.hashgraph.sdk.proto.QueryHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.QueryHeader, com.hedera.hashgraph.sdk.proto.QueryHeader.Builder, com.hedera.hashgraph.sdk.proto.QueryHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> accountIDBuilder_;
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
* @return Whether the accountID field is set.
*/
@java.lang.Override
public boolean hasAccountID() {
return balanceSourceCase_ == 2;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
* @return The accountID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getAccountID() {
if (accountIDBuilder_ == null) {
if (balanceSourceCase_ == 2) {
return (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
} else {
if (balanceSourceCase_ == 2) {
return accountIDBuilder_.getMessage();
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
public Builder setAccountID(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (accountIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
balanceSource_ = value;
onChanged();
} else {
accountIDBuilder_.setMessage(value);
}
balanceSourceCase_ = 2;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
public Builder setAccountID(
com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) {
if (accountIDBuilder_ == null) {
balanceSource_ = builderForValue.build();
onChanged();
} else {
accountIDBuilder_.setMessage(builderForValue.build());
}
balanceSourceCase_ = 2;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
public Builder mergeAccountID(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (accountIDBuilder_ == null) {
if (balanceSourceCase_ == 2 &&
balanceSource_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) {
balanceSource_ = com.hedera.hashgraph.sdk.proto.AccountID.newBuilder((com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_)
.mergeFrom(value).buildPartial();
} else {
balanceSource_ = value;
}
onChanged();
} else {
if (balanceSourceCase_ == 2) {
accountIDBuilder_.mergeFrom(value);
} else {
accountIDBuilder_.setMessage(value);
}
}
balanceSourceCase_ = 2;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
public Builder clearAccountID() {
if (accountIDBuilder_ == null) {
if (balanceSourceCase_ == 2) {
balanceSourceCase_ = 0;
balanceSource_ = null;
onChanged();
}
} else {
if (balanceSourceCase_ == 2) {
balanceSourceCase_ = 0;
balanceSource_ = null;
}
accountIDBuilder_.clear();
}
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
public com.hedera.hashgraph.sdk.proto.AccountID.Builder getAccountIDBuilder() {
return getAccountIDFieldBuilder().getBuilder();
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAccountIDOrBuilder() {
if ((balanceSourceCase_ == 2) && (accountIDBuilder_ != null)) {
return accountIDBuilder_.getMessageOrBuilder();
} else {
if (balanceSourceCase_ == 2) {
return (com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.AccountID accountID = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>
getAccountIDFieldBuilder() {
if (accountIDBuilder_ == null) {
if (!(balanceSourceCase_ == 2)) {
balanceSource_ = com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
accountIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>(
(com.hedera.hashgraph.sdk.proto.AccountID) balanceSource_,
getParentForChildren(),
isClean());
balanceSource_ = null;
}
balanceSourceCase_ = 2;
onChanged();
return accountIDBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder> contractIDBuilder_;
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
* @return Whether the contractID field is set.
*/
@java.lang.Override
public boolean hasContractID() {
return balanceSourceCase_ == 3;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
* @return The contractID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getContractID() {
if (contractIDBuilder_ == null) {
if (balanceSourceCase_ == 3) {
return (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
} else {
if (balanceSourceCase_ == 3) {
return contractIDBuilder_.getMessage();
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
public Builder setContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
if (contractIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
balanceSource_ = value;
onChanged();
} else {
contractIDBuilder_.setMessage(value);
}
balanceSourceCase_ = 3;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
public Builder setContractID(
com.hedera.hashgraph.sdk.proto.ContractID.Builder builderForValue) {
if (contractIDBuilder_ == null) {
balanceSource_ = builderForValue.build();
onChanged();
} else {
contractIDBuilder_.setMessage(builderForValue.build());
}
balanceSourceCase_ = 3;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
public Builder mergeContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
if (contractIDBuilder_ == null) {
if (balanceSourceCase_ == 3 &&
balanceSource_ != com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance()) {
balanceSource_ = com.hedera.hashgraph.sdk.proto.ContractID.newBuilder((com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_)
.mergeFrom(value).buildPartial();
} else {
balanceSource_ = value;
}
onChanged();
} else {
if (balanceSourceCase_ == 3) {
contractIDBuilder_.mergeFrom(value);
} else {
contractIDBuilder_.setMessage(value);
}
}
balanceSourceCase_ = 3;
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
public Builder clearContractID() {
if (contractIDBuilder_ == null) {
if (balanceSourceCase_ == 3) {
balanceSourceCase_ = 0;
balanceSource_ = null;
onChanged();
}
} else {
if (balanceSourceCase_ == 3) {
balanceSourceCase_ = 0;
balanceSource_ = null;
}
contractIDBuilder_.clear();
}
return this;
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
public com.hedera.hashgraph.sdk.proto.ContractID.Builder getContractIDBuilder() {
return getContractIDFieldBuilder().getBuilder();
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder getContractIDOrBuilder() {
if ((balanceSourceCase_ == 3) && (contractIDBuilder_ != null)) {
return contractIDBuilder_.getMessageOrBuilder();
} else {
if (balanceSourceCase_ == 3) {
return (com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
}
/**
*
**
* The account ID for which information is requested
*
*
* .proto.ContractID contractID = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder>
getContractIDFieldBuilder() {
if (contractIDBuilder_ == null) {
if (!(balanceSourceCase_ == 3)) {
balanceSource_ = com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
contractIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder>(
(com.hedera.hashgraph.sdk.proto.ContractID) balanceSource_,
getParentForChildren(),
isClean());
balanceSource_ = null;
}
balanceSourceCase_ = 3;
onChanged();
return contractIDBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.CryptoGetAccountBalanceQuery)
}
// @@protoc_insertion_point(class_scope:proto.CryptoGetAccountBalanceQuery)
private static final com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery();
}
public static com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CryptoGetAccountBalanceQuery parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoGetAccountBalanceQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}