java.lang.Object
com.hedera.hashgraph.sdk.FeeData
- All Implemented Interfaces:
Cloneable
The total fees charged for a transaction. It contains three parts namely
node data, network data and service data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static FeeDatafromBytes(byte[] bytes) Initialize fee data object from byte array.(package private) static FeeDatafromProtobuf(FeeData feeData) Initialize fee data object from a protobuf.(package private) @Nullable FeeComponentsExtract the network data.(package private) @Nullable FeeComponentsExtract the node data.(package private) @Nullable FeeComponentsExtract the service data.(package private) FeeDataTypegetType()Extract the fee data type.(package private) FeeDatasetNetworkData(@Nullable FeeComponents networkData) Assign the network data fee component object.(package private) FeeDatasetNodeData(@Nullable FeeComponents nodeData) Assign the node data fee component object.(package private) FeeDatasetServiceData(@Nullable FeeComponents serviceData) Assign the service data fee component object.(package private) FeeDatasetType(FeeDataType type) Assign the fee data type.byte[]toBytes()Create the byte array.(package private) FeeDataConvert the fee data type into a protobuf.toString()
-
Constructor Details
-
FeeData
public FeeData()Constructor.
-
-
Method Details
-
fromProtobuf
Initialize fee data object from a protobuf.- Parameters:
feeData- the protobuf- Returns:
- the fee data object
-
fromBytes
public static FeeData fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Initialize fee data object from byte array.- Parameters:
bytes- the byte array- Returns:
- the fee data object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
getNodeData
@Nullable FeeComponents getNodeData()Extract the node data.- Returns:
- the node data fee components object
-
setNodeData
Assign the node data fee component object.- Parameters:
nodeData- the node data fee component object- Returns:
this
-
getNetworkData
@Nullable FeeComponents getNetworkData()Extract the network data.- Returns:
- the network data fee component object
-
setNetworkData
Assign the network data fee component object.- Parameters:
networkData- the network data fee component object- Returns:
this
-
getServiceData
@Nullable FeeComponents getServiceData()Extract the service data.- Returns:
- the service data fee component object
-
setServiceData
Assign the service data fee component object.- Parameters:
serviceData- the service data fee component object- Returns:
this
-
getType
FeeDataType getType()Extract the fee data type.- Returns:
- the fee data type
-
setType
Assign the fee data type.FeeDataType- Parameters:
type- the fee data type- Returns:
this
-
toProtobuf
FeeData toProtobuf()Convert the fee data type into a protobuf.- Returns:
- the protobuf
-
toString
-
toBytes
public byte[] toBytes()Create the byte array.- Returns:
- a byte array representation
-
clone
-