Skip to content

Commit 46cbc9a

Browse files
author
Viktor Pelepiak
committed
Update field properties to add more customization
1 parent 84cc8c7 commit 46cbc9a

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
package com.hubspot.slack.client.methods.params.chat.workobject.entity;
22

3+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
4+
import com.fasterxml.jackson.databind.annotation.JsonNaming;
5+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
36
import com.hubspot.immutables.style.HubSpotStyle;
7+
import com.hubspot.slack.client.methods.params.chat.workobject.serializers.FieldDataTypeSerializer;
8+
import java.util.Optional;
49
import org.immutables.value.Value;
510

611
@Value.Immutable
712
@HubSpotStyle
13+
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
814
public interface EntityPayloadAttributesCustomFieldIF {
915
String getKey();
1016
String getLabel();
1117
String getValue();
12-
String getType();
18+
19+
@JsonSerialize(using = FieldDataTypeSerializer.class)
20+
FieldDataType getType();
21+
22+
//Can only be set when the type is string. This icon will be displayed next to field's text value. Not compatible with tag_color.
23+
Optional<Icon> getIcon();
24+
25+
//Can only be set when the type is string, date, or timestamp. The field's content will be hyperlinked with the URL specified here
26+
Optional<String> getLink();
27+
28+
//Can only be set when the type is string. Allows the string to be highlighted in of one of the following colors: red, yellow, green, gray, blue. E.g. tag_color: "red"
29+
Optional<String> getTagColor();
30+
31+
//Used when the field's type is slack#/types/image.
32+
Optional<String> getImageUrl();
33+
34+
//Used when the field's type is slack#/types/image.
35+
Optional<String> getSlackFile();
36+
37+
//Used when the field's type is slack#/types/image.
38+
Optional<String> getAltText();
1339
}

0 commit comments

Comments
 (0)