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'sevent.payloadfieldappId- app ID from the delivery envelopeinstallationId- installation ID from the delivery envelopetimestamp- time of receipt on this controllerorigin- origin of the HTTP request, fromSCMEvent.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappId()Returns the value of theappIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventTyperecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstallationIdrecord component.origin()Returns the value of theoriginrecord component.com.fasterxml.jackson.databind.JsonNodepayload()Returns the value of thepayloadrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
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 aOriginWebhookEventrecord class.- Parameters:
eventType- the value for theeventTyperecord componentpayload- the value for thepayloadrecord componentappId- the value for theappIdrecord componentinstallationId- the value for theinstallationIdrecord componenttimestamp- the value for thetimestamprecord componentorigin- the value for theoriginrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
eventType
Returns the value of theeventTyperecord component.- Returns:
- the value of the
eventTyperecord component
-
payload
@NonNull public com.fasterxml.jackson.databind.JsonNode payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
appId
Returns the value of theappIdrecord component.- Returns:
- the value of the
appIdrecord component
-
installationId
Returns the value of theinstallationIdrecord component.- Returns:
- the value of the
installationIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-