Class ChargeSessionEndInfo.Builder

java.lang.Object
net.solarnetwork.ocpp.domain.ChargeSessionEndInfo.Builder
Enclosing class:
ChargeSessionEndInfo

public static final class ChargeSessionEndInfo.Builder extends Object
Builder to build ChargeSessionEndInfo.
  • Method Details

    • withChargePointId

      public ChargeSessionEndInfo.Builder withChargePointId(ChargePointIdentity chargePointId)
      Configure the charge point ID.
      Parameters:
      chargePointId - the charge point ID
      Returns:
      this instance
    • withAuthorizationId

      public ChargeSessionEndInfo.Builder withAuthorizationId(String authorizationId)
      Configure the authorization ID.
      Parameters:
      authorizationId - the authorization ID
      Returns:
      this instance
    • withTransactionId

      public ChargeSessionEndInfo.Builder withTransactionId(int transactionId)
      Configure the transaction ID.
      Parameters:
      transactionId - the transaction ID
      Returns:
      this instance
    • withTimestampEnd

      public ChargeSessionEndInfo.Builder withTimestampEnd(Instant timestampEnd)
      Configure the ending timestamp.
      Parameters:
      timestampEnd - the end time
      Returns:
      this instance
    • withMeterEnd

      public ChargeSessionEndInfo.Builder withMeterEnd(long meterEnd)
      Configure the final meter value.
      Parameters:
      meterEnd - the final meter value
      Returns:
      this instance
    • withReason

      Configure the end reason.
      Parameters:
      reason - the reason
      Returns:
      this instance
    • withTransactionData

      public ChargeSessionEndInfo.Builder withTransactionData(Iterable<SampledValue> transactionData)
      Configure the transaction data.
      Parameters:
      transactionData - the transaction data
      Returns:
      this instance
    • build

      public ChargeSessionEndInfo build()
      Create a new instance from this builder.
      Returns:
      the new instance