Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
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 TypeMethodDescription* 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.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.* A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.booleanhasOwner()* 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`.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.mergeSpender(AccountID value) * 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.setSpender(AccountID value) * 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, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
hasOwnerin interfaceCryptoAllowanceOrBuilder- Returns:
- Whether the owner field is set.
-
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:
getOwnerin interfaceCryptoAllowanceOrBuilder- Returns:
- The owner.
-
setOwner
* 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
* 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
* 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
* 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:
hasSpenderin interfaceCryptoAllowanceOrBuilder- Returns:
- Whether the spender field is set.
-
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:
getSpenderin interfaceCryptoAllowanceOrBuilder- Returns:
- The spender.
-
setSpender
* 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
* 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
* 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
* 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:
getAmountin interfaceCryptoAllowanceOrBuilder- Returns:
- The amount.
-
setAmount
* 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
* 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.
-