Skip to content

Commit 9596bca

Browse files
committed
Added the field sticker_type to the class StickerSet. Field contains_masks deprecated.
1 parent bca14ef commit 9596bca

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

library/src/main/java/com/pengrad/telegrambot/model/StickerSet.java

+14-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import java.util.Arrays;
55
import java.util.Objects;
66

7+
import com.pengrad.telegrambot.model.Sticker.Type;
8+
79
/**
810
* Stas Parshin
911
* 23 July 2017
@@ -13,6 +15,7 @@ public class StickerSet implements Serializable {
1315

1416
private String name;
1517
private String title;
18+
private Type sticker_type;
1619
private Boolean is_animated;
1720
private Boolean is_video;
1821
private Boolean contains_masks;
@@ -27,10 +30,18 @@ public String title() {
2730
return title;
2831
}
2932

33+
public Type stickerType() {
34+
return sticker_type;
35+
}
36+
3037
public Boolean isAnimated() {
3138
return is_animated;
3239
}
3340

41+
/**
42+
* @deprecated Use type() and check if it equals to Type.mask
43+
*/
44+
@Deprecated
3445
public Boolean containsMasks() {
3546
return contains_masks;
3647
}
@@ -54,16 +65,16 @@ public boolean equals(Object o) {
5465
StickerSet that = (StickerSet) o;
5566
return Objects.equals(name, that.name) &&
5667
Objects.equals(title, that.title) &&
68+
Objects.equals(sticker_type, that.sticker_type) &&
5769
Objects.equals(is_animated, that.is_animated) &&
5870
Objects.equals(is_video, that.is_video) &&
59-
Objects.equals(contains_masks, that.contains_masks) &&
6071
Arrays.equals(stickers, that.stickers) &&
6172
Objects.equals(thumb, that.thumb);
6273
}
6374

6475
@Override
6576
public int hashCode() {
66-
int result = Objects.hash(name, title, is_animated, is_video, contains_masks, thumb);
77+
int result = Objects.hash(name, title, sticker_type, is_animated, is_video, thumb);
6778
result = 31 * result + Arrays.hashCode(stickers);
6879
return result;
6980
}
@@ -73,9 +84,9 @@ public String toString() {
7384
return "StickerSet{" +
7485
"name='" + name + '\'' +
7586
", title='" + title + '\'' +
87+
", sticker_type='" + sticker_type + '\'' +
7688
", is_animated=" + is_animated +
7789
", is_video=" + is_video +
78-
", contains_masks=" + contains_masks +
7990
", stickers=" + Arrays.toString(stickers) +
8091
", thumb=" + thumb +
8192
'}';

0 commit comments

Comments
 (0)