Record Class Trigger
java.lang.Object
java.lang.Record
org.chenile.trigger.model.Trigger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theeventIdrecord component.The field for theheadersrecord component.private final ObjectThe field for thepayloadrecord component.private final StringThe field for thesourcerecord component.The field for thetriggerContextrecord component.private final InstantThe field for thetriggerTimerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.eventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.payload()Returns the value of thepayloadrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetriggerContextrecord component.Returns the value of thetriggerTimerecord component.
-
Field Details
-
eventId
The field for theeventIdrecord component. -
triggerTime
The field for thetriggerTimerecord component. -
headers
-
triggerContext
-
payload
The field for thepayloadrecord component. -
source
The field for thesourcerecord component.
-
-
Constructor Details
-
Trigger
public Trigger(String eventId, Instant triggerTime, Map<String, String> headers, Map<String, Object> triggerContext, Object payload, String source) Creates an instance of aTriggerrecord class.- Parameters:
eventId- the value for theeventIdrecord componenttriggerTime- the value for thetriggerTimerecord componentheaders- the value for theheadersrecord componenttriggerContext- the value for thetriggerContextrecord componentpayload- the value for thepayloadrecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
eventId
Returns the value of theeventIdrecord component.- Returns:
- the value of the
eventIdrecord component
-
triggerTime
Returns the value of thetriggerTimerecord component.- Returns:
- the value of the
triggerTimerecord component
-
headers
-
triggerContext
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
CHENILE