4
4
import java .util .Arrays ;
5
5
import java .util .Objects ;
6
6
7
+ import com .pengrad .telegrambot .model .Sticker .Type ;
8
+
7
9
/**
8
10
* Stas Parshin
9
11
* 23 July 2017
@@ -13,6 +15,7 @@ public class StickerSet implements Serializable {
13
15
14
16
private String name ;
15
17
private String title ;
18
+ private Type sticker_type ;
16
19
private Boolean is_animated ;
17
20
private Boolean is_video ;
18
21
private Boolean contains_masks ;
@@ -27,10 +30,18 @@ public String title() {
27
30
return title ;
28
31
}
29
32
33
+ public Type stickerType () {
34
+ return sticker_type ;
35
+ }
36
+
30
37
public Boolean isAnimated () {
31
38
return is_animated ;
32
39
}
33
40
41
+ /**
42
+ * @deprecated Use type() and check if it equals to Type.mask
43
+ */
44
+ @ Deprecated
34
45
public Boolean containsMasks () {
35
46
return contains_masks ;
36
47
}
@@ -54,16 +65,16 @@ public boolean equals(Object o) {
54
65
StickerSet that = (StickerSet ) o ;
55
66
return Objects .equals (name , that .name ) &&
56
67
Objects .equals (title , that .title ) &&
68
+ Objects .equals (sticker_type , that .sticker_type ) &&
57
69
Objects .equals (is_animated , that .is_animated ) &&
58
70
Objects .equals (is_video , that .is_video ) &&
59
- Objects .equals (contains_masks , that .contains_masks ) &&
60
71
Arrays .equals (stickers , that .stickers ) &&
61
72
Objects .equals (thumb , that .thumb );
62
73
}
63
74
64
75
@ Override
65
76
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 );
67
78
result = 31 * result + Arrays .hashCode (stickers );
68
79
return result ;
69
80
}
@@ -73,9 +84,9 @@ public String toString() {
73
84
return "StickerSet{" +
74
85
"name='" + name + '\'' +
75
86
", title='" + title + '\'' +
87
+ ", sticker_type='" + sticker_type + '\'' +
76
88
", is_animated=" + is_animated +
77
89
", is_video=" + is_video +
78
- ", contains_masks=" + contains_masks +
79
90
", stickers=" + Arrays .toString (stickers ) +
80
91
", thumb=" + thumb +
81
92
'}' ;
0 commit comments