Record Class OriginWebhookEvent

java.lang.Object
java.lang.Record
io.jenkins.plugins.cursor_origin_branch_source.OriginWebhookEvent
Record Components:
eventType - event type slug, e.g. "repository.pushed" or "pull_request.created"
payload - raw event payload node from the webhook envelope's event.payload field
appId - app ID from the delivery envelope
installationId - installation ID from the delivery envelope
timestamp - time of receipt on this controller
origin - origin of the HTTP request, from SCMEvent.originOf(jakarta.servlet.http.HttpServletRequest)

public record OriginWebhookEvent(String eventType, com.fasterxml.jackson.databind.JsonNode payload, String appId, String installationId, Instant timestamp, String origin) extends Record
Carries a verified Cursor Origin webhook delivery to OriginEventSubscriber instances.
  • Constructor Details

    • OriginWebhookEvent

      public OriginWebhookEvent(@NonNull String eventType, @NonNull com.fasterxml.jackson.databind.JsonNode payload, @NonNull String appId, @NonNull String installationId, @NonNull Instant timestamp, @CheckForNull String origin)
      Creates an instance of a OriginWebhookEvent record class.
      Parameters:
      eventType - the value for the eventType record component
      payload - the value for the payload record component
      appId - the value for the appId record component
      installationId - the value for the installationId record component
      timestamp - the value for the timestamp record component
      origin - the value for the origin 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.
    • eventType

      @NonNull public String eventType()
      Returns the value of the eventType record component.
      Returns:
      the value of the eventType record component
    • payload

      @NonNull public com.fasterxml.jackson.databind.JsonNode payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component
    • appId

      @NonNull public String appId()
      Returns the value of the appId record component.
      Returns:
      the value of the appId record component
    • installationId

      @NonNull public String installationId()
      Returns the value of the installationId record component.
      Returns:
      the value of the installationId record component
    • timestamp

      @NonNull public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • origin

      @CheckForNull public String origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component