java.lang.Object
com.google.protobuf.AbstractMessageLite<CustomFee,CustomFee.Builder>
com.google.protobuf.GeneratedMessageLite<CustomFee,CustomFee.Builder>
com.hedera.hashgraph.sdk.proto.CustomFee
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,CustomFeeOrBuilder
@Generated
public final class CustomFee
extends com.google.protobuf.GeneratedMessageLite<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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* 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.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) boolean* Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens.static CustomFee* 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.static CustomFee.Builderstatic CustomFee.BuildernewBuilder(CustomFee prototype) static CustomFeeparseDelimitedFrom(InputStream input) static CustomFeeparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomFeeparseFrom(byte[] data) static CustomFeeparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomFeeparseFrom(com.google.protobuf.ByteString data) static CustomFeeparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomFeeparseFrom(com.google.protobuf.CodedInputStream input) static CustomFeeparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomFeeparseFrom(InputStream input) static CustomFeeparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomFeeparseFrom(ByteBuffer data) static CustomFeeparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CustomFee> parser()Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
FIXED_FEE_FIELD_NUMBER
public static final int FIXED_FEE_FIELD_NUMBER- See Also:
-
FRACTIONAL_FEE_FIELD_NUMBER
public static final int FRACTIONAL_FEE_FIELD_NUMBER- See Also:
-
ROYALTY_FEE_FIELD_NUMBER
public static final int ROYALTY_FEE_FIELD_NUMBER- See Also:
-
FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER
public static final int FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER- See Also:
-
ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER
public static final int ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER- See Also:
-
-
Method Details
-
getFeeCase
- Specified by:
getFeeCasein interfaceCustomFeeOrBuilder
-
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.
-
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.
-
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.
-
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.
-
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.
-
parseFrom
public static CustomFee parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomFee parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomFee parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomFee parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomFee parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CustomFee parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CustomFee parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CustomFee parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<CustomFee,CustomFee.Builder>
-
getDefaultInstance
-
parser
-