Class SampledValue.Builder

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

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

    • withSessionId

      public SampledValue.Builder withSessionId(UUID sessionId)
      Configure the session ID.
      Parameters:
      sessionId - the session ID
      Returns:
      this instance
    • withTimestamp

      public SampledValue.Builder withTimestamp(Instant timestamp)
      Configure the timestamp.
      Parameters:
      timestamp - the timestamp
      Returns:
      this instance
    • withValue

      public SampledValue.Builder withValue(String value)
      Configure the value.
      Parameters:
      value - the value
      Returns:
      this instance
    • withContext

      public SampledValue.Builder withContext(ReadingContext context)
      Configure the context.
      Parameters:
      context - the context
      Returns:
      this instance
    • withMeasurand

      public SampledValue.Builder withMeasurand(Measurand measurand)
      Configure the measurand.
      Parameters:
      measurand - the measurand
      Returns:
      this instance
    • withPhase

      public SampledValue.Builder withPhase(Phase phase)
      Configure the phase.
      Parameters:
      phase - the phase
      Returns:
      this instance
    • withLocation

      public SampledValue.Builder withLocation(Location location)
      Configure the location.
      Parameters:
      location - the location
      Returns:
      this instance
    • withUnit

      public SampledValue.Builder withUnit(UnitOfMeasure unit)
      Configure the unit.
      Parameters:
      unit - the unit
      Returns:
      this instance
    • build

      public SampledValue build()
      Build a value from this builder.
      Returns:
      the new instance