Package dev.dokimos.server.dto.v1
Record Class AlertWebhookView
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.AlertWebhookView
public record AlertWebhookView(UUID id, UUID projectId, String url, boolean hasSecret, boolean enabled, Instant createdAt)
extends Record
Public view of an
AlertWebhook. Never carries the signing secret: hasSecret reports
only whether one is configured.-
Constructor Summary
ConstructorsConstructorDescriptionAlertWebhookView(UUID id, UUID projectId, String url, boolean hasSecret, boolean enabled, Instant createdAt) Creates an instance of aAlertWebhookViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.static AlertWebhookViewfrom(AlertWebhook webhook) final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasSecretrecord component.id()Returns the value of theidrecord component.Returns the value of theprojectIdrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
AlertWebhookView
public AlertWebhookView(UUID id, UUID projectId, String url, boolean hasSecret, boolean enabled, Instant createdAt) Creates an instance of aAlertWebhookViewrecord class.- Parameters:
id- the value for theidrecord componentprojectId- the value for theprojectIdrecord componenturl- the value for theurlrecord componenthasSecret- the value for thehasSecretrecord componentenabled- the value for theenabledrecord componentcreatedAt- the value for thecreatedAtrecord component
-
-
Method Details
-
from
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
hasSecret
public boolean hasSecret()Returns the value of thehasSecretrecord component.- Returns:
- the value of the
hasSecretrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-