com.hedera.hashgraph.sdk.proto.TokenRelationship 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: basic_types.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Token's information related to the given Account
*
*
* Protobuf type {@code proto.TokenRelationship}
*/
public final class TokenRelationship extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.TokenRelationship)
TokenRelationshipOrBuilder {
private static final long serialVersionUID = 0L;
// Use TokenRelationship.newBuilder() to construct.
private TokenRelationship(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TokenRelationship() {
symbol_ = "";
kycStatus_ = 0;
freezeStatus_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TokenRelationship();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_TokenRelationship_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_TokenRelationship_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.TokenRelationship.class, com.hedera.hashgraph.sdk.proto.TokenRelationship.Builder.class);
}
private int bitField0_;
public static final int TOKENID_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.TokenID tokenId_;
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
* @return Whether the tokenId field is set.
*/
@java.lang.Override
public boolean hasTokenId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
* @return The tokenId.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenID getTokenId() {
return tokenId_ == null ? com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance() : tokenId_;
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder getTokenIdOrBuilder() {
return tokenId_ == null ? com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance() : tokenId_;
}
public static final int SYMBOL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object symbol_ = "";
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @return The symbol.
*/
@java.lang.Override
public java.lang.String getSymbol() {
java.lang.Object ref = symbol_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
symbol_ = s;
return s;
}
}
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @return The bytes for symbol.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSymbolBytes() {
java.lang.Object ref = symbol_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
symbol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BALANCE_FIELD_NUMBER = 3;
private long balance_ = 0L;
/**
*
**
* For token of type FUNGIBLE_COMMON - the balance that the Account holds in the smallest
* denomination. For token of type NON_FUNGIBLE_UNIQUE - the number of NFTs held by the account
*
*
* uint64 balance = 3;
* @return The balance.
*/
@java.lang.Override
public long getBalance() {
return balance_;
}
public static final int KYCSTATUS_FIELD_NUMBER = 4;
private int kycStatus_ = 0;
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @return The enum numeric value on the wire for kycStatus.
*/
@java.lang.Override public int getKycStatusValue() {
return kycStatus_;
}
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @return The kycStatus.
*/
@java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenKycStatus getKycStatus() {
com.hedera.hashgraph.sdk.proto.TokenKycStatus result = com.hedera.hashgraph.sdk.proto.TokenKycStatus.forNumber(kycStatus_);
return result == null ? com.hedera.hashgraph.sdk.proto.TokenKycStatus.UNRECOGNIZED : result;
}
public static final int FREEZESTATUS_FIELD_NUMBER = 5;
private int freezeStatus_ = 0;
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @return The enum numeric value on the wire for freezeStatus.
*/
@java.lang.Override public int getFreezeStatusValue() {
return freezeStatus_;
}
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @return The freezeStatus.
*/
@java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenFreezeStatus getFreezeStatus() {
com.hedera.hashgraph.sdk.proto.TokenFreezeStatus result = com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.forNumber(freezeStatus_);
return result == null ? com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.UNRECOGNIZED : result;
}
public static final int DECIMALS_FIELD_NUMBER = 6;
private int decimals_ = 0;
/**
*
**
* Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
*
*
* uint32 decimals = 6;
* @return The decimals.
*/
@java.lang.Override
public int getDecimals() {
return decimals_;
}
public static final int AUTOMATIC_ASSOCIATION_FIELD_NUMBER = 7;
private boolean automaticAssociation_ = false;
/**
*
**
* Specifies if the relationship is created implicitly. False : explicitly associated, True :
* implicitly associated.
*
*
* bool automatic_association = 7;
* @return The automaticAssociation.
*/
@java.lang.Override
public boolean getAutomaticAssociation() {
return automaticAssociation_;
}
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, getTokenId());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(symbol_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, symbol_);
}
if (balance_ != 0L) {
output.writeUInt64(3, balance_);
}
if (kycStatus_ != com.hedera.hashgraph.sdk.proto.TokenKycStatus.KycNotApplicable.getNumber()) {
output.writeEnum(4, kycStatus_);
}
if (freezeStatus_ != com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.FreezeNotApplicable.getNumber()) {
output.writeEnum(5, freezeStatus_);
}
if (decimals_ != 0) {
output.writeUInt32(6, decimals_);
}
if (automaticAssociation_ != false) {
output.writeBool(7, automaticAssociation_);
}
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, getTokenId());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(symbol_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, symbol_);
}
if (balance_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, balance_);
}
if (kycStatus_ != com.hedera.hashgraph.sdk.proto.TokenKycStatus.KycNotApplicable.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, kycStatus_);
}
if (freezeStatus_ != com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.FreezeNotApplicable.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, freezeStatus_);
}
if (decimals_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, decimals_);
}
if (automaticAssociation_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, automaticAssociation_);
}
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.TokenRelationship)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.TokenRelationship other = (com.hedera.hashgraph.sdk.proto.TokenRelationship) obj;
if (hasTokenId() != other.hasTokenId()) return false;
if (hasTokenId()) {
if (!getTokenId()
.equals(other.getTokenId())) return false;
}
if (!getSymbol()
.equals(other.getSymbol())) return false;
if (getBalance()
!= other.getBalance()) return false;
if (kycStatus_ != other.kycStatus_) return false;
if (freezeStatus_ != other.freezeStatus_) return false;
if (getDecimals()
!= other.getDecimals()) return false;
if (getAutomaticAssociation()
!= other.getAutomaticAssociation()) return false;
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 (hasTokenId()) {
hash = (37 * hash) + TOKENID_FIELD_NUMBER;
hash = (53 * hash) + getTokenId().hashCode();
}
hash = (37 * hash) + SYMBOL_FIELD_NUMBER;
hash = (53 * hash) + getSymbol().hashCode();
hash = (37 * hash) + BALANCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBalance());
hash = (37 * hash) + KYCSTATUS_FIELD_NUMBER;
hash = (53 * hash) + kycStatus_;
hash = (37 * hash) + FREEZESTATUS_FIELD_NUMBER;
hash = (53 * hash) + freezeStatus_;
hash = (37 * hash) + DECIMALS_FIELD_NUMBER;
hash = (53 * hash) + getDecimals();
hash = (37 * hash) + AUTOMATIC_ASSOCIATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutomaticAssociation());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship 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.TokenRelationship parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship 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.TokenRelationship parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship 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.TokenRelationship parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship 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.TokenRelationship parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship 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.TokenRelationship 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.TokenRelationship 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.TokenRelationship 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;
}
/**
*
**
* Token's information related to the given Account
*
*
* Protobuf type {@code proto.TokenRelationship}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.TokenRelationship)
com.hedera.hashgraph.sdk.proto.TokenRelationshipOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_TokenRelationship_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_TokenRelationship_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.TokenRelationship.class, com.hedera.hashgraph.sdk.proto.TokenRelationship.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.TokenRelationship.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTokenIdFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tokenId_ = null;
if (tokenIdBuilder_ != null) {
tokenIdBuilder_.dispose();
tokenIdBuilder_ = null;
}
symbol_ = "";
balance_ = 0L;
kycStatus_ = 0;
freezeStatus_ = 0;
decimals_ = 0;
automaticAssociation_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_TokenRelationship_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRelationship getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.TokenRelationship.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRelationship build() {
com.hedera.hashgraph.sdk.proto.TokenRelationship result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRelationship buildPartial() {
com.hedera.hashgraph.sdk.proto.TokenRelationship result = new com.hedera.hashgraph.sdk.proto.TokenRelationship(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.TokenRelationship result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tokenId_ = tokenIdBuilder_ == null
? tokenId_
: tokenIdBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.symbol_ = symbol_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.balance_ = balance_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.kycStatus_ = kycStatus_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.freezeStatus_ = freezeStatus_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.decimals_ = decimals_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.automaticAssociation_ = automaticAssociation_;
}
result.bitField0_ |= to_bitField0_;
}
@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.TokenRelationship) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.TokenRelationship)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.TokenRelationship other) {
if (other == com.hedera.hashgraph.sdk.proto.TokenRelationship.getDefaultInstance()) return this;
if (other.hasTokenId()) {
mergeTokenId(other.getTokenId());
}
if (!other.getSymbol().isEmpty()) {
symbol_ = other.symbol_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getBalance() != 0L) {
setBalance(other.getBalance());
}
if (other.kycStatus_ != 0) {
setKycStatusValue(other.getKycStatusValue());
}
if (other.freezeStatus_ != 0) {
setFreezeStatusValue(other.getFreezeStatusValue());
}
if (other.getDecimals() != 0) {
setDecimals(other.getDecimals());
}
if (other.getAutomaticAssociation() != false) {
setAutomaticAssociation(other.getAutomaticAssociation());
}
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(
getTokenIdFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
symbol_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
balance_ = input.readUInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
kycStatus_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
freezeStatus_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
decimals_ = input.readUInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56: {
automaticAssociation_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 56
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 bitField0_;
private com.hedera.hashgraph.sdk.proto.TokenID tokenId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenID, com.hedera.hashgraph.sdk.proto.TokenID.Builder, com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder> tokenIdBuilder_;
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
* @return Whether the tokenId field is set.
*/
public boolean hasTokenId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
* @return The tokenId.
*/
public com.hedera.hashgraph.sdk.proto.TokenID getTokenId() {
if (tokenIdBuilder_ == null) {
return tokenId_ == null ? com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance() : tokenId_;
} else {
return tokenIdBuilder_.getMessage();
}
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public Builder setTokenId(com.hedera.hashgraph.sdk.proto.TokenID value) {
if (tokenIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tokenId_ = value;
} else {
tokenIdBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public Builder setTokenId(
com.hedera.hashgraph.sdk.proto.TokenID.Builder builderForValue) {
if (tokenIdBuilder_ == null) {
tokenId_ = builderForValue.build();
} else {
tokenIdBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public Builder mergeTokenId(com.hedera.hashgraph.sdk.proto.TokenID value) {
if (tokenIdBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tokenId_ != null &&
tokenId_ != com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance()) {
getTokenIdBuilder().mergeFrom(value);
} else {
tokenId_ = value;
}
} else {
tokenIdBuilder_.mergeFrom(value);
}
if (tokenId_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public Builder clearTokenId() {
bitField0_ = (bitField0_ & ~0x00000001);
tokenId_ = null;
if (tokenIdBuilder_ != null) {
tokenIdBuilder_.dispose();
tokenIdBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public com.hedera.hashgraph.sdk.proto.TokenID.Builder getTokenIdBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTokenIdFieldBuilder().getBuilder();
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
public com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder getTokenIdOrBuilder() {
if (tokenIdBuilder_ != null) {
return tokenIdBuilder_.getMessageOrBuilder();
} else {
return tokenId_ == null ?
com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance() : tokenId_;
}
}
/**
*
**
* The ID of the token
*
*
* .proto.TokenID tokenId = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenID, com.hedera.hashgraph.sdk.proto.TokenID.Builder, com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder>
getTokenIdFieldBuilder() {
if (tokenIdBuilder_ == null) {
tokenIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenID, com.hedera.hashgraph.sdk.proto.TokenID.Builder, com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder>(
getTokenId(),
getParentForChildren(),
isClean());
tokenId_ = null;
}
return tokenIdBuilder_;
}
private java.lang.Object symbol_ = "";
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @return The symbol.
*/
public java.lang.String getSymbol() {
java.lang.Object ref = symbol_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
symbol_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @return The bytes for symbol.
*/
public com.google.protobuf.ByteString
getSymbolBytes() {
java.lang.Object ref = symbol_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
symbol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @param value The symbol to set.
* @return This builder for chaining.
*/
public Builder setSymbol(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
symbol_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @return This builder for chaining.
*/
public Builder clearSymbol() {
symbol_ = getDefaultInstance().getSymbol();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
**
* The Symbol of the token
*
*
* string symbol = 2;
* @param value The bytes for symbol to set.
* @return This builder for chaining.
*/
public Builder setSymbolBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
symbol_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private long balance_ ;
/**
*
**
* For token of type FUNGIBLE_COMMON - the balance that the Account holds in the smallest
* denomination. For token of type NON_FUNGIBLE_UNIQUE - the number of NFTs held by the account
*
*
* uint64 balance = 3;
* @return The balance.
*/
@java.lang.Override
public long getBalance() {
return balance_;
}
/**
*
**
* For token of type FUNGIBLE_COMMON - the balance that the Account holds in the smallest
* denomination. For token of type NON_FUNGIBLE_UNIQUE - the number of NFTs held by the account
*
*
* uint64 balance = 3;
* @param value The balance to set.
* @return This builder for chaining.
*/
public Builder setBalance(long value) {
balance_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* For token of type FUNGIBLE_COMMON - the balance that the Account holds in the smallest
* denomination. For token of type NON_FUNGIBLE_UNIQUE - the number of NFTs held by the account
*
*
* uint64 balance = 3;
* @return This builder for chaining.
*/
public Builder clearBalance() {
bitField0_ = (bitField0_ & ~0x00000004);
balance_ = 0L;
onChanged();
return this;
}
private int kycStatus_ = 0;
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @return The enum numeric value on the wire for kycStatus.
*/
@java.lang.Override public int getKycStatusValue() {
return kycStatus_;
}
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @param value The enum numeric value on the wire for kycStatus to set.
* @return This builder for chaining.
*/
public Builder setKycStatusValue(int value) {
kycStatus_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @return The kycStatus.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenKycStatus getKycStatus() {
com.hedera.hashgraph.sdk.proto.TokenKycStatus result = com.hedera.hashgraph.sdk.proto.TokenKycStatus.forNumber(kycStatus_);
return result == null ? com.hedera.hashgraph.sdk.proto.TokenKycStatus.UNRECOGNIZED : result;
}
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @param value The kycStatus to set.
* @return This builder for chaining.
*/
public Builder setKycStatus(com.hedera.hashgraph.sdk.proto.TokenKycStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
kycStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
**
* The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not
* have KYC key, KycNotApplicable is returned
*
*
* .proto.TokenKycStatus kycStatus = 4;
* @return This builder for chaining.
*/
public Builder clearKycStatus() {
bitField0_ = (bitField0_ & ~0x00000008);
kycStatus_ = 0;
onChanged();
return this;
}
private int freezeStatus_ = 0;
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @return The enum numeric value on the wire for freezeStatus.
*/
@java.lang.Override public int getFreezeStatusValue() {
return freezeStatus_;
}
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @param value The enum numeric value on the wire for freezeStatus to set.
* @return This builder for chaining.
*/
public Builder setFreezeStatusValue(int value) {
freezeStatus_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @return The freezeStatus.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenFreezeStatus getFreezeStatus() {
com.hedera.hashgraph.sdk.proto.TokenFreezeStatus result = com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.forNumber(freezeStatus_);
return result == null ? com.hedera.hashgraph.sdk.proto.TokenFreezeStatus.UNRECOGNIZED : result;
}
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @param value The freezeStatus to set.
* @return This builder for chaining.
*/
public Builder setFreezeStatus(com.hedera.hashgraph.sdk.proto.TokenFreezeStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
freezeStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
**
* The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does
* not have Freeze key, FreezeNotApplicable is returned
*
*
* .proto.TokenFreezeStatus freezeStatus = 5;
* @return This builder for chaining.
*/
public Builder clearFreezeStatus() {
bitField0_ = (bitField0_ & ~0x00000010);
freezeStatus_ = 0;
onChanged();
return this;
}
private int decimals_ ;
/**
*
**
* Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
*
*
* uint32 decimals = 6;
* @return The decimals.
*/
@java.lang.Override
public int getDecimals() {
return decimals_;
}
/**
*
**
* Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
*
*
* uint32 decimals = 6;
* @param value The decimals to set.
* @return This builder for chaining.
*/
public Builder setDecimals(int value) {
decimals_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
*
*
* uint32 decimals = 6;
* @return This builder for chaining.
*/
public Builder clearDecimals() {
bitField0_ = (bitField0_ & ~0x00000020);
decimals_ = 0;
onChanged();
return this;
}
private boolean automaticAssociation_ ;
/**
*
**
* Specifies if the relationship is created implicitly. False : explicitly associated, True :
* implicitly associated.
*
*
* bool automatic_association = 7;
* @return The automaticAssociation.
*/
@java.lang.Override
public boolean getAutomaticAssociation() {
return automaticAssociation_;
}
/**
*
**
* Specifies if the relationship is created implicitly. False : explicitly associated, True :
* implicitly associated.
*
*
* bool automatic_association = 7;
* @param value The automaticAssociation to set.
* @return This builder for chaining.
*/
public Builder setAutomaticAssociation(boolean value) {
automaticAssociation_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
**
* Specifies if the relationship is created implicitly. False : explicitly associated, True :
* implicitly associated.
*
*
* bool automatic_association = 7;
* @return This builder for chaining.
*/
public Builder clearAutomaticAssociation() {
bitField0_ = (bitField0_ & ~0x00000040);
automaticAssociation_ = false;
onChanged();
return this;
}
@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.TokenRelationship)
}
// @@protoc_insertion_point(class_scope:proto.TokenRelationship)
private static final com.hedera.hashgraph.sdk.proto.TokenRelationship DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.TokenRelationship();
}
public static com.hedera.hashgraph.sdk.proto.TokenRelationship getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TokenRelationship 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.TokenRelationship getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}