Skip to content

Commit

Permalink
hopefully fix the inject issues
Browse files Browse the repository at this point in the history
  • Loading branch information
irgendwr committed May 16, 2024
1 parent ba95e45 commit 99ba8b9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
<version>${auto-service.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${guice.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public abstract class TelegramEventNotificationConfig implements EventNotificati

@JsonProperty(FIELD_CHATS)
@NotBlank
public abstract Set<String> chats();
public abstract ImmutableSet<String> chats();

@JsonProperty(FIELD_MESSAGE_TEMPLATE)
@NotBlank
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableSet;

import de.irgendwr.TelegramEventNotificationConfig;
import org.graylog.events.contentpack.entities.EventNotificationConfigEntity;
import org.graylog.events.notifications.EventNotificationConfig;
Expand Down Expand Up @@ -39,7 +41,7 @@ public abstract class TelegramEventNotificationConfigEntity implements EventNoti

@JsonProperty(FIELD_CHATS)
@NotBlank
public abstract Set<String> chats();
public abstract ImmutableSet<String> chats();

@JsonProperty(FIELD_MESSAGE_TEMPLATE)
@NotBlank
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/de/irgendwr/models/MessageModelData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;

import org.graylog.events.event.EventDto;
import org.graylog.events.processor.EventDefinitionDto;
import org.graylog2.plugin.MessageSummary;
Expand Down Expand Up @@ -36,7 +38,7 @@ public abstract class MessageModelData {
public abstract EventDto event();

@JsonProperty("backlog")
public abstract List<MessageSummary> backlog();
public abstract ImmutableList<MessageSummary> backlog();

@JsonProperty("backlog_size")
public abstract int backlogSize();
Expand All @@ -48,7 +50,7 @@ public abstract class MessageModelData {
public abstract String graylogUrl();

@JsonProperty("streams")
public abstract List<StreamModelData> streams();
public abstract ImmutableList<StreamModelData> streams();

public static Builder builder() {
return new AutoValue_MessageModelData.Builder();
Expand Down

0 comments on commit 99ba8b9

Please sign in to comment.