Class FeeComponents

java.lang.Object
com.hedera.hashgraph.sdk.FeeComponents
All Implemented Interfaces:
Cloneable

public class FeeComponents extends Object implements Cloneable
Utility class used internally by the sdk.
  • Constructor Details

    • FeeComponents

      public FeeComponents()
      Constructor.
  • Method Details

    • fromProtobuf

      static FeeComponents fromProtobuf(FeeComponents feeComponents)
      Create a fee components object from a protobuf.
      Parameters:
      feeComponents - the protobuf
      Returns:
      the fee component object
    • fromBytes

      public static FeeComponents fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a fee component object from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the fee component object
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • getMin

      public long getMin()
      Extract the minimum component.
      Returns:
      the minimum component
    • setMin

      public FeeComponents setMin(long min)
      Assign the minimum component.
      Parameters:
      min - the minimum component
      Returns:
      this
    • getMax

      public long getMax()
      Extract the maximum component.
      Returns:
      the maximum component
    • setMax

      public FeeComponents setMax(long max)
      Assign the maximum component.
      Parameters:
      max - the maximum component
      Returns:
      this
    • getConstant

      public long getConstant()
      Extract the constant component.
      Returns:
      the constant component
    • setConstant

      public FeeComponents setConstant(long constant)
      Assign the constant component.
      Parameters:
      constant - the constant component
      Returns:
      this
    • getTransactionBandwidthByte

      public long getTransactionBandwidthByte()
      Extract the transaction bandwidth bytes.
      Returns:
      the transaction bandwidth bytes
    • setTransactionBandwidthByte

      public FeeComponents setTransactionBandwidthByte(long transactionBandwidthByte)
      Assign the transaction bandwidth bytes.
      Parameters:
      transactionBandwidthByte - the transaction bandwidth bytes
      Returns:
      this
    • getTransactionVerification

      public long getTransactionVerification()
      Extract the transaction verification price per signature.
      Returns:
      the transaction verification price per signature
    • setTransactionVerification

      public FeeComponents setTransactionVerification(long transactionVerification)
      Assign the transaction verification price per signature.
      Parameters:
      transactionVerification - the transaction verification price per signature
      Returns:
      this
    • getTransactionRamByteHour

      public long getTransactionRamByteHour()
      Extract the of ram consumed in byte hours.
      Returns:
      price of ram consumed in byte hours
    • setTransactionRamByteHour

      public FeeComponents setTransactionRamByteHour(long transactionRamByteHour)
      Assign the price of ram consumed in byte hours.
      Parameters:
      transactionRamByteHour - price of ram consumed in byte hours
      Returns:
      this
    • getTransactionStorageByteHour

      public long getTransactionStorageByteHour()
      Extract the of storage in byte hours.
      Returns:
      price of storage in byte hours
    • setTransactionStorageByteHour

      public FeeComponents setTransactionStorageByteHour(long transactionStorageByteHour)
      Assign the price of storage consumed in byte hours.
      Parameters:
      transactionStorageByteHour - price of storage in byte hours
      Returns:
      this
    • getContractTransactionGas

      public long getContractTransactionGas()
      Extract the of gas for computation.
      Returns:
      price of gas for computation
    • setContractTransactionGas

      public FeeComponents setContractTransactionGas(long contractTransactionGas)
      Assign the price of computation in gas.
      Parameters:
      contractTransactionGas - price of gas for computation
      Returns:
      this
    • getTransferVolumeHbar

      public long getTransferVolumeHbar()
      Extract the per hbar transferred.
      Returns:
      price per hbar transferred
    • setTransferVolumeHbar

      public FeeComponents setTransferVolumeHbar(long transferVolumeHbar)
      Assign the price per hbar transferred.
      Parameters:
      transferVolumeHbar - price per hbar transferred
      Returns:
      this
    • getResponseMemoryByte

      public long getResponseMemoryByte()
      Extract the for data retrieved.
      Returns:
      price for data retrieved
    • setResponseMemoryByte

      public FeeComponents setResponseMemoryByte(long responseMemoryByte)
      Assign the price for data retrieved in bytes.
      Parameters:
      responseMemoryByte - price for data retrieved
      Returns:
      this
    • getResponseDiskByte

      public long getResponseDiskByte()
      Extract the for data retrieved from disk.
      Returns:
      price for data retrieved from disk
    • setResponseDiskByte

      public FeeComponents setResponseDiskByte(long responseDiskByte)
      Assign the price for data retrieved from disk.
      Parameters:
      responseDiskByte - price for data retrieved from disk
      Returns:
      this
    • toProtobuf

      FeeComponents toProtobuf()
      Convert fee component object to protobuf.
      Returns:
      the protobuf
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Convert fee component object to byte array.
      Returns:
      the byte array
    • clone

      public FeeComponents clone()
      Overrides:
      clone in class Object