Class GrantedCryptoAllowance.Builder

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

public static final class GrantedCryptoAllowance.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<GrantedCryptoAllowance,GrantedCryptoAllowance.Builder> implements GrantedCryptoAllowanceOrBuilder
 *
 Permission granted by one account (the "funding" account) to another
 account (the "spender" account) that allows the spender to spend a
 specified amount of HBAR owned by the funding account.

 An allowance SHALL NOT transfer any HBAR directly, it only permits
 transactions signed only by the spender account to transfer HBAR, up
 to the amount specified, from the funding account.

 Once the specified amount is spent, the allowance SHALL be consumed
 and a new allowance SHALL be required before that spending account
 may spend additional HBAR from the funding account.
 
Protobuf type proto.GrantedCryptoAllowance
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * The maximum amount that the spender account may transfer within the scope of this allowance.
    * The identifier for the spending account associated with this allowance.
    long
    * The maximum amount that the spender account may transfer within the scope of this allowance.
    * The identifier for the spending account associated with this allowance.
    boolean
    * The identifier for the spending account associated with this allowance.
    * The identifier for the spending account associated with this allowance.
    setAmount(long value)
    * The maximum amount that the spender account may transfer within the scope of this allowance.
    * The identifier for the spending account associated with this allowance.
    setSpender(AccountID.Builder builderForValue)
    * The identifier for the spending account associated with this allowance.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • hasSpender

      public boolean hasSpender()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
      Specified by:
      hasSpender in interface GrantedCryptoAllowanceOrBuilder
      Returns:
      Whether the spender field is set.
    • getSpender

      public AccountID getSpender()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
      Specified by:
      getSpender in interface GrantedCryptoAllowanceOrBuilder
      Returns:
      The spender.
    • setSpender

      public GrantedCryptoAllowance.Builder setSpender(AccountID value)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
    • setSpender

      public GrantedCryptoAllowance.Builder setSpender(AccountID.Builder builderForValue)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
    • mergeSpender

      public GrantedCryptoAllowance.Builder mergeSpender(AccountID value)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
    • clearSpender

      public GrantedCryptoAllowance.Builder clearSpender()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend
       HBAR from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender = 1;
    • getAmount

      public long getAmount()
       *
       The maximum amount that the spender account may transfer within
       the scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in tinybar (i.e. 10<sup>-8</sup> HBAR).
       
      int64 amount = 2;
      Specified by:
      getAmount in interface GrantedCryptoAllowanceOrBuilder
      Returns:
      The amount.
    • setAmount

      public GrantedCryptoAllowance.Builder setAmount(long value)
       *
       The maximum amount that the spender account may transfer within
       the scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in tinybar (i.e. 10<sup>-8</sup> HBAR).
       
      int64 amount = 2;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public GrantedCryptoAllowance.Builder clearAmount()
       *
       The maximum amount that the spender account may transfer within
       the scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in tinybar (i.e. 10<sup>-8</sup> HBAR).
       
      int64 amount = 2;
      Returns:
      This builder for chaining.