-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
string literals for json and payload length checks.
- Loading branch information
Showing
7 changed files
with
249 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
...lient/src/main/java/systems/comodal/pagerduty/event/data/PagerDutyEventPayloadRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package systems.comodal.pagerduty.event.data; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
record PagerDutyEventPayloadRecord(String dedupKey, | ||
String summary, | ||
String source, | ||
PagerDutySeverity severity, | ||
ZonedDateTime timestamp, | ||
String component, | ||
String group, | ||
String type, | ||
Map<String, Object> customDetails, | ||
List<PagerDutyLinkRef> links, | ||
List<PagerDutyImageRef> images, | ||
String json) implements PagerDutyEventPayload { | ||
|
||
@Override | ||
public String getDedupKey() { | ||
return dedupKey; | ||
} | ||
|
||
@Override | ||
public String getSummary() { | ||
return summary; | ||
} | ||
|
||
@Override | ||
public String getSource() { | ||
return source; | ||
} | ||
|
||
@Override | ||
public PagerDutySeverity getSeverity() { | ||
return severity; | ||
} | ||
|
||
@Override | ||
public ZonedDateTime getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
@Override | ||
public String getComponent() { | ||
return component; | ||
} | ||
|
||
@Override | ||
public String getGroup() { | ||
return group; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getCustomDetails() { | ||
return customDetails; | ||
} | ||
|
||
@Override | ||
public List<PagerDutyLinkRef> getLinks() { | ||
return links; | ||
} | ||
|
||
@Override | ||
public List<PagerDutyImageRef> getImages() { | ||
return images; | ||
} | ||
|
||
@Override | ||
public String getPayloadJson() { | ||
return json; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return json; | ||
} | ||
} |
Oops, something went wrong.