Class TokenRejectTransactionBody.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<TokenRejectTransactionBody,TokenRejectTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<TokenRejectTransactionBody,TokenRejectTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, TokenRejectTransactionBodyOrBuilder, Cloneable
Enclosing class:
TokenRejectTransactionBody

public static final class TokenRejectTransactionBody.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<TokenRejectTransactionBody,TokenRejectTransactionBody.Builder> implements TokenRejectTransactionBodyOrBuilder
 *
 Reject undesired token(s).<br/>
 Transfer one or more token balances held by the requesting account to the
 treasury for each token type.

 Each transfer SHALL be one of the following
 - A single non-fungible/unique token.
 - The full balance held for a fungible/common token.
 A single `tokenReject` transaction SHALL support a maximum
 of 10 transfers.<br/>
 A token that is `pause`d MUST NOT be rejected.<br/>
 If the `owner` account is `frozen` with respect to the identified token(s)
 the token(s) MUST NOT be rejected.<br/>
 The `payer` for this transaction, and `owner` if set, SHALL NOT be charged
 any custom fees or other fees beyond the `tokenReject` transaction fee.

 ### Block Stream Effects
 - Each successful transfer from `payer` to `treasury` SHALL be recorded in
 the `token_transfer_list` for the transaction record.
 
Protobuf type proto.TokenRejectTransactionBody
  • Method Details

    • hasOwner

      public boolean hasOwner()
       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
      Specified by:
      hasOwner in interface TokenRejectTransactionBodyOrBuilder
      Returns:
      Whether the owner field is set.
    • getOwner

      public AccountID getOwner()
       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
      Specified by:
      getOwner in interface TokenRejectTransactionBodyOrBuilder
      Returns:
      The owner.
    • setOwner

       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
    • setOwner

      public TokenRejectTransactionBody.Builder setOwner(AccountID.Builder builderForValue)
       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
    • mergeOwner

      public TokenRejectTransactionBody.Builder mergeOwner(AccountID value)
       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
    • clearOwner

       *
       An account identifier.<br/>
       This OPTIONAL field identifies the account holding the
       tokens to be rejected.
       <p>
       If set, this account MUST sign this transaction.
       If not set, the `payer` for this transaction SHALL be the effective
       `owner` for this transaction.
       
      .proto.AccountID owner = 1;
    • getRejectionsList

      public List<TokenReference> getRejectionsList()
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
      Specified by:
      getRejectionsList in interface TokenRejectTransactionBodyOrBuilder
    • getRejectionsCount

      public int getRejectionsCount()
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
      Specified by:
      getRejectionsCount in interface TokenRejectTransactionBodyOrBuilder
    • getRejections

      public TokenReference getRejections(int index)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
      Specified by:
      getRejections in interface TokenRejectTransactionBodyOrBuilder
    • setRejections

      public TokenRejectTransactionBody.Builder setRejections(int index, TokenReference value)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • setRejections

      public TokenRejectTransactionBody.Builder setRejections(int index, TokenReference.Builder builderForValue)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • addRejections

      public TokenRejectTransactionBody.Builder addRejections(TokenReference value)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • addRejections

      public TokenRejectTransactionBody.Builder addRejections(int index, TokenReference value)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • addRejections

      public TokenRejectTransactionBody.Builder addRejections(TokenReference.Builder builderForValue)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • addRejections

      public TokenRejectTransactionBody.Builder addRejections(int index, TokenReference.Builder builderForValue)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • addAllRejections

      public TokenRejectTransactionBody.Builder addAllRejections(Iterable<? extends TokenReference> values)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • clearRejections

      public TokenRejectTransactionBody.Builder clearRejections()
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;
    • removeRejections

      public TokenRejectTransactionBody.Builder removeRejections(int index)
       *
       A list of one or more token rejections.
       <p>
       On success each rejected token serial number or balance SHALL be
       transferred from the requesting account to the treasury account for
       that token type.<br/>
       After rejection the requesting account SHALL continue to be associated
       with the token.<br/>
       If dissociation is desired then a separate `TokenDissociate` transaction
       MUST be submitted to remove the association.<br/>
       This list MUST contain at least one (1) entry and MUST NOT contain more
       than ten (10) entries.
       
      repeated .proto.TokenReference rejections = 2;