java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<CustomFee,CustomFee.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<CustomFee,CustomFee.Builder>
com.hedera.hashgraph.sdk.proto.CustomFee.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,CustomFeeOrBuilder,Cloneable
- Enclosing class:
CustomFee
public static final class CustomFee.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<CustomFee,CustomFee.Builder>
implements CustomFeeOrBuilder
* A transfer fee to assess during a CryptoTransfer.<br/> This fee applies to transactions that transfer units of the token to which the fee is attached. A custom fee may be either fixed or fractional, and must specify a fee collector account to receive the assessed fees. Custom fees MUST be greater than zero (0).Protobuf type
proto.CustomFee-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens.clearFee()* The account to receive the custom fee.* A fixed fee to be charged to the `sender` for every token transfer.* A fee defined as a fraction of the tokens transferred.* A fee charged as royalty for any transfer of a non-fungible/unique token.boolean* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens.* The account to receive the custom fee.* A fixed fee to be charged to the `sender` for every token transfer.* A fee defined as a fraction of the tokens transferred.* A fee charged as royalty for any transfer of a non-fungible/unique token.boolean* The account to receive the custom fee.boolean* A fixed fee to be charged to the `sender` for every token transfer.boolean* A fee defined as a fraction of the tokens transferred.boolean* A fee charged as royalty for any transfer of a non-fungible/unique token.* The account to receive the custom fee.mergeFixedFee(FixedFee value) * A fixed fee to be charged to the `sender` for every token transfer.mergeFractionalFee(FractionalFee value) * A fee defined as a fraction of the tokens transferred.mergeRoyaltyFee(RoyaltyFee value) * A fee charged as royalty for any transfer of a non-fungible/unique token.setAllCollectorsAreExempt(boolean value) * Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens.* The account to receive the custom fee.setFeeCollectorAccountId(AccountID.Builder builderForValue) * The account to receive the custom fee.setFixedFee(FixedFee value) * A fixed fee to be charged to the `sender` for every token transfer.setFixedFee(FixedFee.Builder builderForValue) * A fixed fee to be charged to the `sender` for every token transfer.setFractionalFee(FractionalFee value) * A fee defined as a fraction of the tokens transferred.setFractionalFee(FractionalFee.Builder builderForValue) * A fee defined as a fraction of the tokens transferred.setRoyaltyFee(RoyaltyFee value) * A fee charged as royalty for any transfer of a non-fungible/unique token.setRoyaltyFee(RoyaltyFee.Builder builderForValue) * A fee charged as royalty for any transfer of a non-fungible/unique token.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
-
getFeeCase
- Specified by:
getFeeCasein interfaceCustomFeeOrBuilder
-
clearFee
-
hasFixedFee
public boolean hasFixedFee()* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1;- Specified by:
hasFixedFeein interfaceCustomFeeOrBuilder- Returns:
- Whether the fixedFee field is set.
-
getFixedFee
* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1;- Specified by:
getFixedFeein interfaceCustomFeeOrBuilder- Returns:
- The fixedFee.
-
setFixedFee
* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1; -
setFixedFee
* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1; -
mergeFixedFee
* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1; -
clearFixedFee
* A fixed fee to be charged to the `sender` for every token transfer. <p> This type of fee MAY be defined for any token type.<br/> This type of fee MAY be more consistent and reliable than other types.
.proto.FixedFee fixed_fee = 1; -
hasFractionalFee
public boolean hasFractionalFee()* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2;- Specified by:
hasFractionalFeein interfaceCustomFeeOrBuilder- Returns:
- Whether the fractionalFee field is set.
-
getFractionalFee
* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2;- Specified by:
getFractionalFeein interfaceCustomFeeOrBuilder- Returns:
- The fractionalFee.
-
setFractionalFee
* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2; -
setFractionalFee
* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2; -
mergeFractionalFee
* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2; -
clearFractionalFee
* A fee defined as a fraction of the tokens transferred. <p> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee MAY be charged to either sender, as an increase to the amount sent, or receiver, as a reduction to the amount received.
.proto.FractionalFee fractional_fee = 2; -
hasRoyaltyFee
public boolean hasRoyaltyFee()* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4;- Specified by:
hasRoyaltyFeein interfaceCustomFeeOrBuilder- Returns:
- Whether the royaltyFee field is set.
-
getRoyaltyFee
* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4;- Specified by:
getRoyaltyFeein interfaceCustomFeeOrBuilder- Returns:
- The royaltyFee.
-
setRoyaltyFee
* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4; -
setRoyaltyFee
* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4; -
mergeRoyaltyFee
* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4; -
clearRoyaltyFee
* A fee charged as royalty for any transfer of a non-fungible/unique token. <p> This type of fee MUST NOT be defined for a fungible/common token type.
.proto.RoyaltyFee royalty_fee = 4; -
hasFeeCollectorAccountId
public boolean hasFeeCollectorAccountId()* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3;- Specified by:
hasFeeCollectorAccountIdin interfaceCustomFeeOrBuilder- Returns:
- Whether the feeCollectorAccountId field is set.
-
getFeeCollectorAccountId
* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3;- Specified by:
getFeeCollectorAccountIdin interfaceCustomFeeOrBuilder- Returns:
- The feeCollectorAccountId.
-
setFeeCollectorAccountId
* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3; -
setFeeCollectorAccountId
* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3; -
mergeFeeCollectorAccountId
* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3; -
clearFeeCollectorAccountId
* The account to receive the custom fee.
.proto.AccountID fee_collector_account_id = 3; -
getAllCollectorsAreExempt
public boolean getAllCollectorsAreExempt()* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens. <p> The treasury account for a token, and the account identified by the `fee_collector_account_id` field of this `CustomFee` are always exempt from this custom fee to avoid redundant and unnecessary transfers. If this value is `true` then the account(s) identified in `fee_collector_account_id` for _all_ custom fee definitions for this token type SHALL also be exempt from this custom fee. This behavior is specified in HIP-573.
bool all_collectors_are_exempt = 5;- Specified by:
getAllCollectorsAreExemptin interfaceCustomFeeOrBuilder- Returns:
- The allCollectorsAreExempt.
-
setAllCollectorsAreExempt
* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens. <p> The treasury account for a token, and the account identified by the `fee_collector_account_id` field of this `CustomFee` are always exempt from this custom fee to avoid redundant and unnecessary transfers. If this value is `true` then the account(s) identified in `fee_collector_account_id` for _all_ custom fee definitions for this token type SHALL also be exempt from this custom fee. This behavior is specified in HIP-573.
bool all_collectors_are_exempt = 5;- Parameters:
value- The allCollectorsAreExempt to set.- Returns:
- This builder for chaining.
-
clearAllCollectorsAreExempt
* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens. <p> The treasury account for a token, and the account identified by the `fee_collector_account_id` field of this `CustomFee` are always exempt from this custom fee to avoid redundant and unnecessary transfers. If this value is `true` then the account(s) identified in `fee_collector_account_id` for _all_ custom fee definitions for this token type SHALL also be exempt from this custom fee. This behavior is specified in HIP-573.
bool all_collectors_are_exempt = 5;- Returns:
- This builder for chaining.
-