Skip to content

Commit 6096d1e

Browse files
author
Viktor Pelepiak
committed
Update models to add support for new ContainerType for block actions
1 parent fbce812 commit 6096d1e

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

slack-base/src/main/java/com/hubspot/slack/client/models/interaction/Container.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{
1717
@Type(value = ViewContainer.class, name = "view"),
1818
@Type(value = MessageContainer.class, name = "message"),
19+
@Type(value = MessageAttachmentContainer.class, name = "message_attachment"),
1920
}
2021
)
2122
public interface Container {

slack-base/src/main/java/com/hubspot/slack/client/models/interaction/ContainerType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
public enum ContainerType {
88
VIEW,
99
MESSAGE,
10+
MESSAGE_ATTACHMENT,
1011
UNKNOWN;
1112

1213
private static final EnumIndex<String, ContainerType> INDEX = new EnumIndex<>(
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.hubspot.slack.client.models.interaction;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
5+
import com.fasterxml.jackson.databind.annotation.JsonNaming;
6+
import com.hubspot.immutables.style.HubSpotStyle;
7+
import com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef;
8+
import java.util.Optional;
9+
import org.immutables.value.Value;
10+
11+
@Value.Immutable
12+
@HubSpotStyle
13+
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
14+
public interface MessageAttachmentContainerIF extends Container {
15+
String getMessageTs();
16+
17+
String getChannelId();
18+
19+
@JsonProperty("is_ephemeral")
20+
boolean isEphemeral();
21+
22+
@JsonProperty("is_app_unfurl")
23+
boolean isAppUnfurl();
24+
25+
int getAttachmentId();
26+
27+
Optional<ExternalRef> getExternalRef();
28+
29+
Optional<String> getEntityUrl();
30+
}

0 commit comments

Comments
 (0)