All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hedera.hashgraph.sdk.proto.TokenReference Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: token_reject.proto

// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * A union token identifier.
 *
 * Identify a fungible/common token type, or a single non-fungible/unique token serial.
 * 
* * Protobuf type {@code proto.TokenReference} */ public final class TokenReference extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.TokenReference) TokenReferenceOrBuilder { private static final long serialVersionUID = 0L; // Use TokenReference.newBuilder() to construct. private TokenReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TokenReference() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new TokenReference(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.TokenReference.class, com.hedera.hashgraph.sdk.proto.TokenReference.Builder.class); } private int tokenIdentifierCase_ = 0; @SuppressWarnings("serial") private java.lang.Object tokenIdentifier_; public enum TokenIdentifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FUNGIBLE_TOKEN(1), NFT(2), TOKENIDENTIFIER_NOT_SET(0); private final int value; private TokenIdentifierCase(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 TokenIdentifierCase valueOf(int value) { return forNumber(value); } public static TokenIdentifierCase forNumber(int value) { switch (value) { case 1: return FUNGIBLE_TOKEN; case 2: return NFT; case 0: return TOKENIDENTIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TokenIdentifierCase getTokenIdentifierCase() { return TokenIdentifierCase.forNumber( tokenIdentifierCase_); } public static final int FUNGIBLE_TOKEN_FIELD_NUMBER = 1; /** *
   **
   * A fungible/common token type.
   * 
* * .proto.TokenID fungible_token = 1; * @return Whether the fungibleToken field is set. */ @java.lang.Override public boolean hasFungibleToken() { return tokenIdentifierCase_ == 1; } /** *
   **
   * A fungible/common token type.
   * 
* * .proto.TokenID fungible_token = 1; * @return The fungibleToken. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenID getFungibleToken() { if (tokenIdentifierCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } /** *
   **
   * A fungible/common token type.
   * 
* * .proto.TokenID fungible_token = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder getFungibleTokenOrBuilder() { if (tokenIdentifierCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } public static final int NFT_FIELD_NUMBER = 2; /** *
   **
   * A single specific serialized non-fungible/unique token.
   * 
* * .proto.NftID nft = 2; * @return Whether the nft field is set. */ @java.lang.Override public boolean hasNft() { return tokenIdentifierCase_ == 2; } /** *
   **
   * A single specific serialized non-fungible/unique token.
   * 
* * .proto.NftID nft = 2; * @return The nft. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.NftID getNft() { if (tokenIdentifierCase_ == 2) { return (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance(); } /** *
   **
   * A single specific serialized non-fungible/unique token.
   * 
* * .proto.NftID nft = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.NftIDOrBuilder getNftOrBuilder() { if (tokenIdentifierCase_ == 2) { return (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.NftID.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 (tokenIdentifierCase_ == 1) { output.writeMessage(1, (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_); } if (tokenIdentifierCase_ == 2) { output.writeMessage(2, (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (tokenIdentifierCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_); } if (tokenIdentifierCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_); } 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.TokenReference)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.TokenReference other = (com.hedera.hashgraph.sdk.proto.TokenReference) obj; if (!getTokenIdentifierCase().equals(other.getTokenIdentifierCase())) return false; switch (tokenIdentifierCase_) { case 1: if (!getFungibleToken() .equals(other.getFungibleToken())) return false; break; case 2: if (!getNft() .equals(other.getNft())) 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(); switch (tokenIdentifierCase_) { case 1: hash = (37 * hash) + FUNGIBLE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getFungibleToken().hashCode(); break; case 2: hash = (37 * hash) + NFT_FIELD_NUMBER; hash = (53 * hash) + getNft().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.TokenReference parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.TokenReference 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.TokenReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.TokenReference 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.TokenReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.TokenReference 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.TokenReference parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.TokenReference 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.TokenReference parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.TokenReference 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.TokenReference 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.TokenReference 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.TokenReference 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; } /** *
   **
   * A union token identifier.
   *
   * Identify a fungible/common token type, or a single non-fungible/unique token serial.
   * 
* * Protobuf type {@code proto.TokenReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.TokenReference) com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.TokenReference.class, com.hedera.hashgraph.sdk.proto.TokenReference.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.TokenReference.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (fungibleTokenBuilder_ != null) { fungibleTokenBuilder_.clear(); } if (nftBuilder_ != null) { nftBuilder_.clear(); } tokenIdentifierCase_ = 0; tokenIdentifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenReference_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenReference getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.TokenReference.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenReference build() { com.hedera.hashgraph.sdk.proto.TokenReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenReference buildPartial() { com.hedera.hashgraph.sdk.proto.TokenReference result = new com.hedera.hashgraph.sdk.proto.TokenReference(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.TokenReference result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs(com.hedera.hashgraph.sdk.proto.TokenReference result) { result.tokenIdentifierCase_ = tokenIdentifierCase_; result.tokenIdentifier_ = this.tokenIdentifier_; if (tokenIdentifierCase_ == 1 && fungibleTokenBuilder_ != null) { result.tokenIdentifier_ = fungibleTokenBuilder_.build(); } if (tokenIdentifierCase_ == 2 && nftBuilder_ != null) { result.tokenIdentifier_ = nftBuilder_.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.TokenReference) { return mergeFrom((com.hedera.hashgraph.sdk.proto.TokenReference)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.TokenReference other) { if (other == com.hedera.hashgraph.sdk.proto.TokenReference.getDefaultInstance()) return this; switch (other.getTokenIdentifierCase()) { case FUNGIBLE_TOKEN: { mergeFungibleToken(other.getFungibleToken()); break; } case NFT: { mergeNft(other.getNft()); break; } case TOKENIDENTIFIER_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( getFungibleTokenFieldBuilder().getBuilder(), extensionRegistry); tokenIdentifierCase_ = 1; break; } // case 10 case 18: { input.readMessage( getNftFieldBuilder().getBuilder(), extensionRegistry); tokenIdentifierCase_ = 2; break; } // case 18 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 tokenIdentifierCase_ = 0; private java.lang.Object tokenIdentifier_; public TokenIdentifierCase getTokenIdentifierCase() { return TokenIdentifierCase.forNumber( tokenIdentifierCase_); } public Builder clearTokenIdentifier() { tokenIdentifierCase_ = 0; tokenIdentifier_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.TokenID, com.hedera.hashgraph.sdk.proto.TokenID.Builder, com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder> fungibleTokenBuilder_; /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; * @return Whether the fungibleToken field is set. */ @java.lang.Override public boolean hasFungibleToken() { return tokenIdentifierCase_ == 1; } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; * @return The fungibleToken. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenID getFungibleToken() { if (fungibleTokenBuilder_ == null) { if (tokenIdentifierCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } else { if (tokenIdentifierCase_ == 1) { return fungibleTokenBuilder_.getMessage(); } return com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ public Builder setFungibleToken(com.hedera.hashgraph.sdk.proto.TokenID value) { if (fungibleTokenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } tokenIdentifier_ = value; onChanged(); } else { fungibleTokenBuilder_.setMessage(value); } tokenIdentifierCase_ = 1; return this; } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ public Builder setFungibleToken( com.hedera.hashgraph.sdk.proto.TokenID.Builder builderForValue) { if (fungibleTokenBuilder_ == null) { tokenIdentifier_ = builderForValue.build(); onChanged(); } else { fungibleTokenBuilder_.setMessage(builderForValue.build()); } tokenIdentifierCase_ = 1; return this; } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ public Builder mergeFungibleToken(com.hedera.hashgraph.sdk.proto.TokenID value) { if (fungibleTokenBuilder_ == null) { if (tokenIdentifierCase_ == 1 && tokenIdentifier_ != com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance()) { tokenIdentifier_ = com.hedera.hashgraph.sdk.proto.TokenID.newBuilder((com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_) .mergeFrom(value).buildPartial(); } else { tokenIdentifier_ = value; } onChanged(); } else { if (tokenIdentifierCase_ == 1) { fungibleTokenBuilder_.mergeFrom(value); } else { fungibleTokenBuilder_.setMessage(value); } } tokenIdentifierCase_ = 1; return this; } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ public Builder clearFungibleToken() { if (fungibleTokenBuilder_ == null) { if (tokenIdentifierCase_ == 1) { tokenIdentifierCase_ = 0; tokenIdentifier_ = null; onChanged(); } } else { if (tokenIdentifierCase_ == 1) { tokenIdentifierCase_ = 0; tokenIdentifier_ = null; } fungibleTokenBuilder_.clear(); } return this; } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ public com.hedera.hashgraph.sdk.proto.TokenID.Builder getFungibleTokenBuilder() { return getFungibleTokenFieldBuilder().getBuilder(); } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder getFungibleTokenOrBuilder() { if ((tokenIdentifierCase_ == 1) && (fungibleTokenBuilder_ != null)) { return fungibleTokenBuilder_.getMessageOrBuilder(); } else { if (tokenIdentifierCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } } /** *
     **
     * A fungible/common token type.
     * 
* * .proto.TokenID fungible_token = 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> getFungibleTokenFieldBuilder() { if (fungibleTokenBuilder_ == null) { if (!(tokenIdentifierCase_ == 1)) { tokenIdentifier_ = com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance(); } fungibleTokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.TokenID, com.hedera.hashgraph.sdk.proto.TokenID.Builder, com.hedera.hashgraph.sdk.proto.TokenIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.TokenID) tokenIdentifier_, getParentForChildren(), isClean()); tokenIdentifier_ = null; } tokenIdentifierCase_ = 1; onChanged(); return fungibleTokenBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.NftID, com.hedera.hashgraph.sdk.proto.NftID.Builder, com.hedera.hashgraph.sdk.proto.NftIDOrBuilder> nftBuilder_; /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; * @return Whether the nft field is set. */ @java.lang.Override public boolean hasNft() { return tokenIdentifierCase_ == 2; } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; * @return The nft. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.NftID getNft() { if (nftBuilder_ == null) { if (tokenIdentifierCase_ == 2) { return (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance(); } else { if (tokenIdentifierCase_ == 2) { return nftBuilder_.getMessage(); } return com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance(); } } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ public Builder setNft(com.hedera.hashgraph.sdk.proto.NftID value) { if (nftBuilder_ == null) { if (value == null) { throw new NullPointerException(); } tokenIdentifier_ = value; onChanged(); } else { nftBuilder_.setMessage(value); } tokenIdentifierCase_ = 2; return this; } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ public Builder setNft( com.hedera.hashgraph.sdk.proto.NftID.Builder builderForValue) { if (nftBuilder_ == null) { tokenIdentifier_ = builderForValue.build(); onChanged(); } else { nftBuilder_.setMessage(builderForValue.build()); } tokenIdentifierCase_ = 2; return this; } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ public Builder mergeNft(com.hedera.hashgraph.sdk.proto.NftID value) { if (nftBuilder_ == null) { if (tokenIdentifierCase_ == 2 && tokenIdentifier_ != com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance()) { tokenIdentifier_ = com.hedera.hashgraph.sdk.proto.NftID.newBuilder((com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_) .mergeFrom(value).buildPartial(); } else { tokenIdentifier_ = value; } onChanged(); } else { if (tokenIdentifierCase_ == 2) { nftBuilder_.mergeFrom(value); } else { nftBuilder_.setMessage(value); } } tokenIdentifierCase_ = 2; return this; } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ public Builder clearNft() { if (nftBuilder_ == null) { if (tokenIdentifierCase_ == 2) { tokenIdentifierCase_ = 0; tokenIdentifier_ = null; onChanged(); } } else { if (tokenIdentifierCase_ == 2) { tokenIdentifierCase_ = 0; tokenIdentifier_ = null; } nftBuilder_.clear(); } return this; } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ public com.hedera.hashgraph.sdk.proto.NftID.Builder getNftBuilder() { return getNftFieldBuilder().getBuilder(); } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.NftIDOrBuilder getNftOrBuilder() { if ((tokenIdentifierCase_ == 2) && (nftBuilder_ != null)) { return nftBuilder_.getMessageOrBuilder(); } else { if (tokenIdentifierCase_ == 2) { return (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_; } return com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance(); } } /** *
     **
     * A single specific serialized non-fungible/unique token.
     * 
* * .proto.NftID nft = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.NftID, com.hedera.hashgraph.sdk.proto.NftID.Builder, com.hedera.hashgraph.sdk.proto.NftIDOrBuilder> getNftFieldBuilder() { if (nftBuilder_ == null) { if (!(tokenIdentifierCase_ == 2)) { tokenIdentifier_ = com.hedera.hashgraph.sdk.proto.NftID.getDefaultInstance(); } nftBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.NftID, com.hedera.hashgraph.sdk.proto.NftID.Builder, com.hedera.hashgraph.sdk.proto.NftIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.NftID) tokenIdentifier_, getParentForChildren(), isClean()); tokenIdentifier_ = null; } tokenIdentifierCase_ = 2; onChanged(); return nftBuilder_; } @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.TokenReference) } // @@protoc_insertion_point(class_scope:proto.TokenReference) private static final com.hedera.hashgraph.sdk.proto.TokenReference DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.TokenReference(); } public static com.hedera.hashgraph.sdk.proto.TokenReference getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TokenReference 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.TokenReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy