Record Class EventPreview.Success

java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.EventPreview.Success
Record Components:
encoderTypeId - type id of the encoder that was used to encode the data covered by encoded.
encoded - the encoded data rendered as text: raw byte[] output is Base64-encoded, everything else is its string form.
metadata - the encoded event's metadata as a JSON tree — the same content carried by EventPayload.getMetadata(), in its wire shape.
All Implemented Interfaces:
EventPreview
Enclosing interface:
EventPreview

public static record EventPreview.Success(String encoderTypeId, String encoded, com.inductiveautomation.ignition.common.gson.JsonObject metadata) extends Record implements EventPreview
A successfully encoded event.
  • Constructor Details

    • Success

      public Success(String encoderTypeId, String encoded, com.inductiveautomation.ignition.common.gson.JsonObject metadata)
      Creates an instance of a Success record class.
      Parameters:
      encoderTypeId - the value for the encoderTypeId record component
      encoded - the value for the encoded record component
      metadata - the value for the metadata record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • encoderTypeId

      public String encoderTypeId()
      Returns the value of the encoderTypeId record component.
      Returns:
      the value of the encoderTypeId record component
    • encoded

      public String encoded()
      Returns the value of the encoded record component.
      Returns:
      the value of the encoded record component
    • metadata

      public com.inductiveautomation.ignition.common.gson.JsonObject metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component