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) FeeComponentsExtract the network data.(package private) FeeComponentsExtract the node data.(package private) FeeComponentsExtract the service data.(package private) FeeDataTypegetType()Extract the fee data type.(package private) FeeDatasetNetworkData(FeeComponents networkData) Assign the network data fee component object.(package private) FeeDatasetNodeData(FeeComponents nodeData) Assign the node data fee component object.(package private) FeeDatasetServiceData(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
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
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
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
-