Record Class IntakeIngressEnvelope

java.lang.Object
java.lang.Record
ai.pipestream.connector.intake.ingress.IntakeIngressEnvelope
Record Components:
request - The original gRPC handoff request from the connector
sourceDocId - The document identifier from the source system
schemaVersion - Version of this envelope schema
datasourceId - The identifier of the datasource
accountId - The identifier of the account
crawlId - The identifier of the crawl session
docId - The Pipestream internal document identifier
streamId - The identifier of the ingestion stream
payloadMode - Mode of the payload (e.g., inline, reference)
retryCount - Number of times this request has been retried
acceptedAtMs - Epoch timestamp when the request was accepted

public record IntakeIngressEnvelope(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId, String schemaVersion, String datasourceId, String accountId, String crawlId, String docId, String streamId, String payloadMode, int retryCount, long acceptedAtMs) extends Record
Redis Stream payload shared by connector-intake and the engine sidecar.
  • Field Details

  • Constructor Details

    • IntakeIngressEnvelope

      public IntakeIngressEnvelope(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId, String schemaVersion, String datasourceId, String accountId, String crawlId, String docId, String streamId, String payloadMode, int retryCount, long acceptedAtMs)
      Creates an instance of a IntakeIngressEnvelope record class.
      Parameters:
      request - the value for the request record component
      sourceDocId - the value for the sourceDocId record component
      schemaVersion - the value for the schemaVersion record component
      datasourceId - the value for the datasourceId record component
      accountId - the value for the accountId record component
      crawlId - the value for the crawlId record component
      docId - the value for the docId record component
      streamId - the value for the streamId record component
      payloadMode - the value for the payloadMode record component
      retryCount - the value for the retryCount record component
      acceptedAtMs - the value for the acceptedAtMs record component
  • Method Details

    • fromRequest

      public static IntakeIngressEnvelope fromRequest(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId)
      Create an envelope from a gRPC request and source document ID.
      Parameters:
      request - The gRPC handoff request
      sourceDocId - The source document ID
      Returns:
      A new IntakeIngressEnvelope instance
    • toRedisFields

      public Map<String,String> toRedisFields()
      Convert the envelope to a map of strings for storage in Redis Stream.
      Returns:
      A map containing all envelope fields
    • fromRedisFields

      public static IntakeIngressEnvelope fromRedisFields(Map<String,String> fields) throws com.google.protobuf.InvalidProtocolBufferException
      Reconstruct an envelope from a map of Redis Stream fields.
      Parameters:
      fields - The map of fields from Redis
      Returns:
      A reconstructed IntakeIngressEnvelope instance
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - if the request payload is corrupt
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • request

      public ai.pipestream.engine.v1.IntakeHandoffRequest request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • sourceDocId

      public String sourceDocId()
      Returns the value of the sourceDocId record component.
      Returns:
      the value of the sourceDocId record component
    • schemaVersion

      public String schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • datasourceId

      public String datasourceId()
      Returns the value of the datasourceId record component.
      Returns:
      the value of the datasourceId record component
    • accountId

      public String accountId()
      Returns the value of the accountId record component.
      Returns:
      the value of the accountId record component
    • crawlId

      public String crawlId()
      Returns the value of the crawlId record component.
      Returns:
      the value of the crawlId record component
    • docId

      public String docId()
      Returns the value of the docId record component.
      Returns:
      the value of the docId record component
    • streamId

      public String streamId()
      Returns the value of the streamId record component.
      Returns:
      the value of the streamId record component
    • payloadMode

      public String payloadMode()
      Returns the value of the payloadMode record component.
      Returns:
      the value of the payloadMode record component
    • retryCount

      public int retryCount()
      Returns the value of the retryCount record component.
      Returns:
      the value of the retryCount record component
    • acceptedAtMs

      public long acceptedAtMs()
      Returns the value of the acceptedAtMs record component.
      Returns:
      the value of the acceptedAtMs record component