Class CryptoAllowance.Builder

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

public static final class CryptoAllowance.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<CryptoAllowance,CryptoAllowance.Builder> implements CryptoAllowanceOrBuilder
 *
 An approved allowance of hbar transfers.
 This message specifies one allowance for a single, unique, combination
 of owner, spender, and amount.

 If `owner` is not set, the effective `owner` SHALL be the `payer` for the
 enclosing transaction.<br/>
 The `spender` MUST be specified and MUST be a valid account.<br/>
 The `amount` MUST be a whole number, and SHOULD be greater than `0` unless
 this allowance is intended to _remove_ a previously approved allowance.
 
Protobuf type proto.CryptoAllowance
  • Field Summary

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

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * An amount of tinybar (10<sup>-8</sup> HBAR).<br/> This is the amount of HBAR held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    long
    * An amount of tinybar (10<sup>-8</sup> HBAR).<br/> This is the amount of HBAR held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    boolean
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    boolean
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    setAmount(long value)
    * An amount of tinybar (10<sup>-8</sup> HBAR).<br/> This is the amount of HBAR held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    setOwner(AccountID.Builder builderForValue)
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    setSpender(AccountID.Builder builderForValue)
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.

    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

    • hasOwner

      public boolean hasOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
      Specified by:
      hasOwner in interface CryptoAllowanceOrBuilder
      Returns:
      Whether the owner field is set.
    • getOwner

      public AccountID getOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
      Specified by:
      getOwner in interface CryptoAllowanceOrBuilder
      Returns:
      The owner.
    • setOwner

      public CryptoAllowance.Builder setOwner(AccountID value)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
    • setOwner

      public CryptoAllowance.Builder setOwner(AccountID.Builder builderForValue)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
    • mergeOwner

      public CryptoAllowance.Builder mergeOwner(AccountID value)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
    • clearOwner

      public CryptoAllowance.Builder clearOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 1;
    • hasSpender

      public boolean hasSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
      Specified by:
      hasSpender in interface CryptoAllowanceOrBuilder
      Returns:
      Whether the spender field is set.
    • getSpender

      public AccountID getSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
      Specified by:
      getSpender in interface CryptoAllowanceOrBuilder
      Returns:
      The spender.
    • setSpender

      public CryptoAllowance.Builder setSpender(AccountID value)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
    • setSpender

      public CryptoAllowance.Builder setSpender(AccountID.Builder builderForValue)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
    • mergeSpender

      public CryptoAllowance.Builder mergeSpender(AccountID value)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
    • clearSpender

      public CryptoAllowance.Builder clearSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 2;
    • getAmount

      public long getAmount()
       *
       An amount of tinybar (10<sup>-8</sup> HBAR).<br/>
       This is the amount of HBAR held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 3;
      Specified by:
      getAmount in interface CryptoAllowanceOrBuilder
      Returns:
      The amount.
    • setAmount

      public CryptoAllowance.Builder setAmount(long value)
       *
       An amount of tinybar (10<sup>-8</sup> HBAR).<br/>
       This is the amount of HBAR held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 3;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public CryptoAllowance.Builder clearAmount()
       *
       An amount of tinybar (10<sup>-8</sup> HBAR).<br/>
       This is the amount of HBAR held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 3;
      Returns:
      This builder for chaining.