
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: CryptoGetAccountBalance.proto
package com.hederahashgraph.api.proto.java;
/**
*
* Response when the client sends the node CryptoGetAccountBalanceQuery
*
*
* Protobuf type {@code proto.CryptoGetAccountBalanceResponse}
*/
public final class CryptoGetAccountBalanceResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.CryptoGetAccountBalanceResponse)
CryptoGetAccountBalanceResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CryptoGetAccountBalanceResponse.newBuilder() to construct.
private CryptoGetAccountBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CryptoGetAccountBalanceResponse() {
balance_ = 0L;
tokenBalances_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CryptoGetAccountBalanceResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.hederahashgraph.api.proto.java.ResponseHeader.Builder subBuilder = null;
if (header_ != null) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(com.hederahashgraph.api.proto.java.ResponseHeader.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null;
if (accountID_ != null) {
subBuilder = accountID_.toBuilder();
}
accountID_ = input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(accountID_);
accountID_ = subBuilder.buildPartial();
}
break;
}
case 24: {
balance_ = input.readUInt64();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
tokenBalances_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
tokenBalances_.add(
input.readMessage(com.hederahashgraph.api.proto.java.TokenBalance.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
tokenBalances_ = java.util.Collections.unmodifiableList(tokenBalances_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.class, com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.Builder.class);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.ResponseHeader header_;
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return header_ != null;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public com.hederahashgraph.api.proto.java.ResponseHeader getHeader() {
return header_ == null ? com.hederahashgraph.api.proto.java.ResponseHeader.getDefaultInstance() : header_;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public com.hederahashgraph.api.proto.java.ResponseHeaderOrBuilder getHeaderOrBuilder() {
return getHeader();
}
public static final int ACCOUNTID_FIELD_NUMBER = 2;
private com.hederahashgraph.api.proto.java.AccountID accountID_;
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public boolean hasAccountID() {
return accountID_ != null;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountID getAccountID() {
return accountID_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : accountID_;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getAccountIDOrBuilder() {
return getAccountID();
}
public static final int BALANCE_FIELD_NUMBER = 3;
private long balance_;
/**
*
* The current balance, in tinybars
*
*
* uint64 balance = 3;
*/
public long getBalance() {
return balance_;
}
public static final int TOKENBALANCES_FIELD_NUMBER = 4;
private java.util.List tokenBalances_;
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public java.util.List getTokenBalancesList() {
return tokenBalances_;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public java.util.List extends com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder>
getTokenBalancesOrBuilderList() {
return tokenBalances_;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public int getTokenBalancesCount() {
return tokenBalances_.size();
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalance getTokenBalances(int index) {
return tokenBalances_.get(index);
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder getTokenBalancesOrBuilder(
int index) {
return tokenBalances_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (header_ != null) {
output.writeMessage(1, getHeader());
}
if (accountID_ != null) {
output.writeMessage(2, getAccountID());
}
if (balance_ != 0L) {
output.writeUInt64(3, balance_);
}
for (int i = 0; i < tokenBalances_.size(); i++) {
output.writeMessage(4, tokenBalances_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (header_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
if (accountID_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getAccountID());
}
if (balance_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, balance_);
}
for (int i = 0; i < tokenBalances_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, tokenBalances_.get(i));
}
size += unknownFields.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.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse other = (com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse) obj;
boolean result = true;
result = result && (hasHeader() == other.hasHeader());
if (hasHeader()) {
result = result && getHeader()
.equals(other.getHeader());
}
result = result && (hasAccountID() == other.hasAccountID());
if (hasAccountID()) {
result = result && getAccountID()
.equals(other.getAccountID());
}
result = result && (getBalance()
== other.getBalance());
result = result && getTokenBalancesList()
.equals(other.getTokenBalancesList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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();
}
if (hasAccountID()) {
hash = (37 * hash) + ACCOUNTID_FIELD_NUMBER;
hash = (53 * hash) + getAccountID().hashCode();
}
hash = (37 * hash) + BALANCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBalance());
if (getTokenBalancesCount() > 0) {
hash = (37 * hash) + TOKENBALANCES_FIELD_NUMBER;
hash = (53 * hash) + getTokenBalancesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse 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.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse 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.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Response when the client sends the node CryptoGetAccountBalanceQuery
*
*
* Protobuf type {@code proto.CryptoGetAccountBalanceResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.CryptoGetAccountBalanceResponse)
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.class, com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTokenBalancesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (headerBuilder_ == null) {
header_ = null;
} else {
header_ = null;
headerBuilder_ = null;
}
if (accountIDBuilder_ == null) {
accountID_ = null;
} else {
accountID_ = null;
accountIDBuilder_ = null;
}
balance_ = 0L;
if (tokenBalancesBuilder_ == null) {
tokenBalances_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
tokenBalancesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalance.internal_static_proto_CryptoGetAccountBalanceResponse_descriptor;
}
public com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.getDefaultInstance();
}
public com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse build() {
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse buildPartial() {
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse result = new com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (headerBuilder_ == null) {
result.header_ = header_;
} else {
result.header_ = headerBuilder_.build();
}
if (accountIDBuilder_ == null) {
result.accountID_ = accountID_;
} else {
result.accountID_ = accountIDBuilder_.build();
}
result.balance_ = balance_;
if (tokenBalancesBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
tokenBalances_ = java.util.Collections.unmodifiableList(tokenBalances_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.tokenBalances_ = tokenBalances_;
} else {
result.tokenBalances_ = tokenBalancesBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse) {
return mergeFrom((com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse other) {
if (other == com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse.getDefaultInstance()) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
if (other.hasAccountID()) {
mergeAccountID(other.getAccountID());
}
if (other.getBalance() != 0L) {
setBalance(other.getBalance());
}
if (tokenBalancesBuilder_ == null) {
if (!other.tokenBalances_.isEmpty()) {
if (tokenBalances_.isEmpty()) {
tokenBalances_ = other.tokenBalances_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureTokenBalancesIsMutable();
tokenBalances_.addAll(other.tokenBalances_);
}
onChanged();
}
} else {
if (!other.tokenBalances_.isEmpty()) {
if (tokenBalancesBuilder_.isEmpty()) {
tokenBalancesBuilder_.dispose();
tokenBalancesBuilder_ = null;
tokenBalances_ = other.tokenBalances_;
bitField0_ = (bitField0_ & ~0x00000008);
tokenBalancesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTokenBalancesFieldBuilder() : null;
} else {
tokenBalancesBuilder_.addAllMessages(other.tokenBalances_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.hederahashgraph.api.proto.java.ResponseHeader header_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ResponseHeader, com.hederahashgraph.api.proto.java.ResponseHeader.Builder, com.hederahashgraph.api.proto.java.ResponseHeaderOrBuilder> headerBuilder_;
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return headerBuilder_ != null || header_ != null;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public com.hederahashgraph.api.proto.java.ResponseHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? com.hederahashgraph.api.proto.java.ResponseHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public Builder setHeader(com.hederahashgraph.api.proto.java.ResponseHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
} else {
headerBuilder_.setMessage(value);
}
return this;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public Builder setHeader(
com.hederahashgraph.api.proto.java.ResponseHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
onChanged();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public Builder mergeHeader(com.hederahashgraph.api.proto.java.ResponseHeader value) {
if (headerBuilder_ == null) {
if (header_ != null) {
header_ =
com.hederahashgraph.api.proto.java.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
} else {
header_ = value;
}
onChanged();
} else {
headerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public Builder clearHeader() {
if (headerBuilder_ == null) {
header_ = null;
onChanged();
} else {
header_ = null;
headerBuilder_ = null;
}
return this;
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public com.hederahashgraph.api.proto.java.ResponseHeader.Builder getHeaderBuilder() {
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
public com.hederahashgraph.api.proto.java.ResponseHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
com.hederahashgraph.api.proto.java.ResponseHeader.getDefaultInstance() : header_;
}
}
/**
*
*Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
*
*
* .proto.ResponseHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ResponseHeader, com.hederahashgraph.api.proto.java.ResponseHeader.Builder, com.hederahashgraph.api.proto.java.ResponseHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ResponseHeader, com.hederahashgraph.api.proto.java.ResponseHeader.Builder, com.hederahashgraph.api.proto.java.ResponseHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
private com.hederahashgraph.api.proto.java.AccountID accountID_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> accountIDBuilder_;
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public boolean hasAccountID() {
return accountIDBuilder_ != null || accountID_ != null;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountID getAccountID() {
if (accountIDBuilder_ == null) {
return accountID_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : accountID_;
} else {
return accountIDBuilder_.getMessage();
}
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public Builder setAccountID(com.hederahashgraph.api.proto.java.AccountID value) {
if (accountIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
accountID_ = value;
onChanged();
} else {
accountIDBuilder_.setMessage(value);
}
return this;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public Builder setAccountID(
com.hederahashgraph.api.proto.java.AccountID.Builder builderForValue) {
if (accountIDBuilder_ == null) {
accountID_ = builderForValue.build();
onChanged();
} else {
accountIDBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public Builder mergeAccountID(com.hederahashgraph.api.proto.java.AccountID value) {
if (accountIDBuilder_ == null) {
if (accountID_ != null) {
accountID_ =
com.hederahashgraph.api.proto.java.AccountID.newBuilder(accountID_).mergeFrom(value).buildPartial();
} else {
accountID_ = value;
}
onChanged();
} else {
accountIDBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public Builder clearAccountID() {
if (accountIDBuilder_ == null) {
accountID_ = null;
onChanged();
} else {
accountID_ = null;
accountIDBuilder_ = null;
}
return this;
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountID.Builder getAccountIDBuilder() {
onChanged();
return getAccountIDFieldBuilder().getBuilder();
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getAccountIDOrBuilder() {
if (accountIDBuilder_ != null) {
return accountIDBuilder_.getMessageOrBuilder();
} else {
return accountID_ == null ?
com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : accountID_;
}
}
/**
*
* The account ID that is being described (this is useful with state proofs, for proving to a third party)
*
*
* .proto.AccountID accountID = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>
getAccountIDFieldBuilder() {
if (accountIDBuilder_ == null) {
accountIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>(
getAccountID(),
getParentForChildren(),
isClean());
accountID_ = null;
}
return accountIDBuilder_;
}
private long balance_ ;
/**
*
* The current balance, in tinybars
*
*
* uint64 balance = 3;
*/
public long getBalance() {
return balance_;
}
/**
*
* The current balance, in tinybars
*
*
* uint64 balance = 3;
*/
public Builder setBalance(long value) {
balance_ = value;
onChanged();
return this;
}
/**
*
* The current balance, in tinybars
*
*
* uint64 balance = 3;
*/
public Builder clearBalance() {
balance_ = 0L;
onChanged();
return this;
}
private java.util.List tokenBalances_ =
java.util.Collections.emptyList();
private void ensureTokenBalancesIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
tokenBalances_ = new java.util.ArrayList(tokenBalances_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenBalance, com.hederahashgraph.api.proto.java.TokenBalance.Builder, com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder> tokenBalancesBuilder_;
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public java.util.List getTokenBalancesList() {
if (tokenBalancesBuilder_ == null) {
return java.util.Collections.unmodifiableList(tokenBalances_);
} else {
return tokenBalancesBuilder_.getMessageList();
}
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public int getTokenBalancesCount() {
if (tokenBalancesBuilder_ == null) {
return tokenBalances_.size();
} else {
return tokenBalancesBuilder_.getCount();
}
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalance getTokenBalances(int index) {
if (tokenBalancesBuilder_ == null) {
return tokenBalances_.get(index);
} else {
return tokenBalancesBuilder_.getMessage(index);
}
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder setTokenBalances(
int index, com.hederahashgraph.api.proto.java.TokenBalance value) {
if (tokenBalancesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenBalancesIsMutable();
tokenBalances_.set(index, value);
onChanged();
} else {
tokenBalancesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder setTokenBalances(
int index, com.hederahashgraph.api.proto.java.TokenBalance.Builder builderForValue) {
if (tokenBalancesBuilder_ == null) {
ensureTokenBalancesIsMutable();
tokenBalances_.set(index, builderForValue.build());
onChanged();
} else {
tokenBalancesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder addTokenBalances(com.hederahashgraph.api.proto.java.TokenBalance value) {
if (tokenBalancesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenBalancesIsMutable();
tokenBalances_.add(value);
onChanged();
} else {
tokenBalancesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder addTokenBalances(
int index, com.hederahashgraph.api.proto.java.TokenBalance value) {
if (tokenBalancesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenBalancesIsMutable();
tokenBalances_.add(index, value);
onChanged();
} else {
tokenBalancesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder addTokenBalances(
com.hederahashgraph.api.proto.java.TokenBalance.Builder builderForValue) {
if (tokenBalancesBuilder_ == null) {
ensureTokenBalancesIsMutable();
tokenBalances_.add(builderForValue.build());
onChanged();
} else {
tokenBalancesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder addTokenBalances(
int index, com.hederahashgraph.api.proto.java.TokenBalance.Builder builderForValue) {
if (tokenBalancesBuilder_ == null) {
ensureTokenBalancesIsMutable();
tokenBalances_.add(index, builderForValue.build());
onChanged();
} else {
tokenBalancesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder addAllTokenBalances(
java.lang.Iterable extends com.hederahashgraph.api.proto.java.TokenBalance> values) {
if (tokenBalancesBuilder_ == null) {
ensureTokenBalancesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tokenBalances_);
onChanged();
} else {
tokenBalancesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder clearTokenBalances() {
if (tokenBalancesBuilder_ == null) {
tokenBalances_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
tokenBalancesBuilder_.clear();
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public Builder removeTokenBalances(int index) {
if (tokenBalancesBuilder_ == null) {
ensureTokenBalancesIsMutable();
tokenBalances_.remove(index);
onChanged();
} else {
tokenBalancesBuilder_.remove(index);
}
return this;
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalance.Builder getTokenBalancesBuilder(
int index) {
return getTokenBalancesFieldBuilder().getBuilder(index);
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder getTokenBalancesOrBuilder(
int index) {
if (tokenBalancesBuilder_ == null) {
return tokenBalances_.get(index); } else {
return tokenBalancesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public java.util.List extends com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder>
getTokenBalancesOrBuilderList() {
if (tokenBalancesBuilder_ != null) {
return tokenBalancesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tokenBalances_);
}
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalance.Builder addTokenBalancesBuilder() {
return getTokenBalancesFieldBuilder().addBuilder(
com.hederahashgraph.api.proto.java.TokenBalance.getDefaultInstance());
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public com.hederahashgraph.api.proto.java.TokenBalance.Builder addTokenBalancesBuilder(
int index) {
return getTokenBalancesFieldBuilder().addBuilder(
index, com.hederahashgraph.api.proto.java.TokenBalance.getDefaultInstance());
}
/**
* repeated .proto.TokenBalance tokenBalances = 4;
*/
public java.util.List
getTokenBalancesBuilderList() {
return getTokenBalancesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenBalance, com.hederahashgraph.api.proto.java.TokenBalance.Builder, com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder>
getTokenBalancesFieldBuilder() {
if (tokenBalancesBuilder_ == null) {
tokenBalancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenBalance, com.hederahashgraph.api.proto.java.TokenBalance.Builder, com.hederahashgraph.api.proto.java.TokenBalanceOrBuilder>(
tokenBalances_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
tokenBalances_ = null;
}
return tokenBalancesBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.CryptoGetAccountBalanceResponse)
}
// @@protoc_insertion_point(class_scope:proto.CryptoGetAccountBalanceResponse)
private static final com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse();
}
public static com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CryptoGetAccountBalanceResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CryptoGetAccountBalanceResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy