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

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

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

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

/**
 * 
 **
 * At consensus, updates an already created Non Fungible Token to the given values.
 *
 * If no value is given for a field, that field is left unchanged.
 * Only certain fields such as metadata can be updated.
 *
 * Updating the metadata of an NFT does not affect its ownership or transferability.
 * This operation is intended for updating attributes of individual NFTs in a collection.
 *
 * --- Signing Requirements ---
 * 1. To update metadata of an NFT, the metadata_key of the token should sign the transaction.
 * 
* * Protobuf type {@code proto.TokenUpdateNftsTransactionBody} */ public final class TokenUpdateNftsTransactionBody extends com.google.protobuf.GeneratedMessageLite< TokenUpdateNftsTransactionBody, TokenUpdateNftsTransactionBody.Builder> implements // @@protoc_insertion_point(message_implements:proto.TokenUpdateNftsTransactionBody) TokenUpdateNftsTransactionBodyOrBuilder { private TokenUpdateNftsTransactionBody() { serialNumbers_ = emptyLongList(); } private int bitField0_; public static final int TOKEN_FIELD_NUMBER = 1; private com.hedera.hashgraph.sdk.proto.TokenID token_; /** *
   **
   * The token for which to update NFTs.
   * 
* * .proto.TokenID token = 1; */ @java.lang.Override public boolean hasToken() { return ((bitField0_ & 0x00000001) != 0); } /** *
   **
   * The token for which to update NFTs.
   * 
* * .proto.TokenID token = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenID getToken() { return token_ == null ? com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance() : token_; } /** *
   **
   * The token for which to update NFTs.
   * 
* * .proto.TokenID token = 1; */ private void setToken(com.hedera.hashgraph.sdk.proto.TokenID value) { value.getClass(); token_ = value; bitField0_ |= 0x00000001; } /** *
   **
   * The token for which to update NFTs.
   * 
* * .proto.TokenID token = 1; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeToken(com.hedera.hashgraph.sdk.proto.TokenID value) { value.getClass(); if (token_ != null && token_ != com.hedera.hashgraph.sdk.proto.TokenID.getDefaultInstance()) { token_ = com.hedera.hashgraph.sdk.proto.TokenID.newBuilder(token_).mergeFrom(value).buildPartial(); } else { token_ = value; } bitField0_ |= 0x00000001; } /** *
   **
   * The token for which to update NFTs.
   * 
* * .proto.TokenID token = 1; */ private void clearToken() { token_ = null; bitField0_ = (bitField0_ & ~0x00000001); } public static final int SERIAL_NUMBERS_FIELD_NUMBER = 2; private com.google.protobuf.Internal.LongList serialNumbers_; /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @return A list containing the serialNumbers. */ @java.lang.Override public java.util.List getSerialNumbersList() { return serialNumbers_; } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @return The count of serialNumbers. */ @java.lang.Override public int getSerialNumbersCount() { return serialNumbers_.size(); } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @param index The index of the element to return. * @return The serialNumbers at the given index. */ @java.lang.Override public long getSerialNumbers(int index) { return serialNumbers_.getLong(index); } private int serialNumbersMemoizedSerializedSize = -1; private void ensureSerialNumbersIsMutable() { com.google.protobuf.Internal.LongList tmp = serialNumbers_; if (!tmp.isModifiable()) { serialNumbers_ = com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); } } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @param index The index to set the value at. * @param value The serialNumbers to set. */ private void setSerialNumbers( int index, long value) { ensureSerialNumbersIsMutable(); serialNumbers_.setLong(index, value); } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @param value The serialNumbers to add. */ private void addSerialNumbers(long value) { ensureSerialNumbersIsMutable(); serialNumbers_.addLong(value); } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; * @param values The serialNumbers to add. */ private void addAllSerialNumbers( java.lang.Iterable values) { ensureSerialNumbersIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, serialNumbers_); } /** *
   **
   * The list of serial numbers to be updated.
   * 
* * repeated int64 serial_numbers = 2; */ private void clearSerialNumbers() { serialNumbers_ = emptyLongList(); } public static final int METADATA_FIELD_NUMBER = 3; private com.google.protobuf.BytesValue metadata_; /** *
   **
   * The new metadata of the NFT(s)
   * 
* * .google.protobuf.BytesValue metadata = 3; */ @java.lang.Override public boolean hasMetadata() { return ((bitField0_ & 0x00000002) != 0); } /** *
   **
   * The new metadata of the NFT(s)
   * 
* * .google.protobuf.BytesValue metadata = 3; */ @java.lang.Override public com.google.protobuf.BytesValue getMetadata() { return metadata_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : metadata_; } /** *
   **
   * The new metadata of the NFT(s)
   * 
* * .google.protobuf.BytesValue metadata = 3; */ private void setMetadata(com.google.protobuf.BytesValue value) { value.getClass(); metadata_ = value; bitField0_ |= 0x00000002; } /** *
   **
   * The new metadata of the NFT(s)
   * 
* * .google.protobuf.BytesValue metadata = 3; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeMetadata(com.google.protobuf.BytesValue value) { value.getClass(); if (metadata_ != null && metadata_ != com.google.protobuf.BytesValue.getDefaultInstance()) { metadata_ = com.google.protobuf.BytesValue.newBuilder(metadata_).mergeFrom(value).buildPartial(); } else { metadata_ = value; } bitField0_ |= 0x00000002; } /** *
   **
   * The new metadata of the NFT(s)
   * 
* * .google.protobuf.BytesValue metadata = 3; */ private void clearMetadata() { metadata_ = null; bitField0_ = (bitField0_ & ~0x00000002); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody prototype) { return DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   **
   * At consensus, updates an already created Non Fungible Token to the given values.
   *
   * If no value is given for a field, that field is left unchanged.
   * Only certain fields such as metadata can be updated.
   *
   * Updating the metadata of an NFT does not affect its ownership or transferability.
   * This operation is intended for updating attributes of individual NFTs in a collection.
   *
   * --- Signing Requirements ---
   * 1. To update metadata of an NFT, the metadata_key of the token should sign the transaction.
   * 
* * Protobuf type {@code proto.TokenUpdateNftsTransactionBody} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody, Builder> implements // @@protoc_insertion_point(builder_implements:proto.TokenUpdateNftsTransactionBody) com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBodyOrBuilder { // Construct using com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ @java.lang.Override public boolean hasToken() { return instance.hasToken(); } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenID getToken() { return instance.getToken(); } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ public Builder setToken(com.hedera.hashgraph.sdk.proto.TokenID value) { copyOnWrite(); instance.setToken(value); return this; } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ public Builder setToken( com.hedera.hashgraph.sdk.proto.TokenID.Builder builderForValue) { copyOnWrite(); instance.setToken(builderForValue.build()); return this; } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ public Builder mergeToken(com.hedera.hashgraph.sdk.proto.TokenID value) { copyOnWrite(); instance.mergeToken(value); return this; } /** *
     **
     * The token for which to update NFTs.
     * 
* * .proto.TokenID token = 1; */ public Builder clearToken() { copyOnWrite(); instance.clearToken(); return this; } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @return A list containing the serialNumbers. */ @java.lang.Override public java.util.List getSerialNumbersList() { return java.util.Collections.unmodifiableList( instance.getSerialNumbersList()); } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @return The count of serialNumbers. */ @java.lang.Override public int getSerialNumbersCount() { return instance.getSerialNumbersCount(); } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @param index The index of the element to return. * @return The serialNumbers at the given index. */ @java.lang.Override public long getSerialNumbers(int index) { return instance.getSerialNumbers(index); } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @param value The serialNumbers to set. * @return This builder for chaining. */ public Builder setSerialNumbers( int index, long value) { copyOnWrite(); instance.setSerialNumbers(index, value); return this; } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @param value The serialNumbers to add. * @return This builder for chaining. */ public Builder addSerialNumbers(long value) { copyOnWrite(); instance.addSerialNumbers(value); return this; } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @param values The serialNumbers to add. * @return This builder for chaining. */ public Builder addAllSerialNumbers( java.lang.Iterable values) { copyOnWrite(); instance.addAllSerialNumbers(values); return this; } /** *
     **
     * The list of serial numbers to be updated.
     * 
* * repeated int64 serial_numbers = 2; * @return This builder for chaining. */ public Builder clearSerialNumbers() { copyOnWrite(); instance.clearSerialNumbers(); return this; } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ @java.lang.Override public boolean hasMetadata() { return instance.hasMetadata(); } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ @java.lang.Override public com.google.protobuf.BytesValue getMetadata() { return instance.getMetadata(); } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ public Builder setMetadata(com.google.protobuf.BytesValue value) { copyOnWrite(); instance.setMetadata(value); return this; } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ public Builder setMetadata( com.google.protobuf.BytesValue.Builder builderForValue) { copyOnWrite(); instance.setMetadata(builderForValue.build()); return this; } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ public Builder mergeMetadata(com.google.protobuf.BytesValue value) { copyOnWrite(); instance.mergeMetadata(value); return this; } /** *
     **
     * The new metadata of the NFT(s)
     * 
* * .google.protobuf.BytesValue metadata = 3; */ public Builder clearMetadata() { copyOnWrite(); instance.clearMetadata(); return this; } // @@protoc_insertion_point(builder_scope:proto.TokenUpdateNftsTransactionBody) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "bitField0_", "token_", "serialNumbers_", "metadata_", }; java.lang.String info = "\u0000\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u1009\u0000\u0002" + "%\u0003\u1009\u0001"; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:proto.TokenUpdateNftsTransactionBody) private static final com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody DEFAULT_INSTANCE; static { TokenUpdateNftsTransactionBody defaultInstance = new TokenUpdateNftsTransactionBody(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( TokenUpdateNftsTransactionBody.class, defaultInstance); } public static com.hedera.hashgraph.sdk.proto.TokenUpdateNftsTransactionBody getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy