Search in sources :

Example 1 with HttpEventNotificationConfigEntity

use of org.graylog.events.contentpack.entities.HttpEventNotificationConfigEntity in project graylog2-server by Graylog2.

the class NotificationFacadeTest method createTestEntity.

private EntityV1 createTestEntity() {
    final HttpEventNotificationConfigEntity httpEventNotificationConfigEntity = HttpEventNotificationConfigEntity.builder().url(ValueReference.of("https://hulud.net")).build();
    final NotificationEntity notificationEntity = NotificationEntity.builder().title(ValueReference.of("title")).description(ValueReference.of("descriptions")).config(httpEventNotificationConfigEntity).build();
    final JsonNode data = objectMapper.convertValue(notificationEntity, JsonNode.class);
    return EntityV1.builder().data(data).id(ModelId.of("beef-1337")).type(ModelTypes.NOTIFICATION_V1).build();
}
Also used : HttpEventNotificationConfigEntity(org.graylog.events.contentpack.entities.HttpEventNotificationConfigEntity) JsonNode(com.fasterxml.jackson.databind.JsonNode) NotificationEntity(org.graylog.events.contentpack.entities.NotificationEntity)

Aggregations

JsonNode (com.fasterxml.jackson.databind.JsonNode)1 HttpEventNotificationConfigEntity (org.graylog.events.contentpack.entities.HttpEventNotificationConfigEntity)1 NotificationEntity (org.graylog.events.contentpack.entities.NotificationEntity)1