11package com .pengrad .telegrambot .model ;
22
33import java .io .Serializable ;
4+ import java .util .Arrays ;
45import java .util .Objects ;
56
67public class ChatShared implements Serializable {
78 private final static long serialVersionUID = 0L ;
89
910 private Integer request_id ;
1011 private Long chat_id ;
12+ private String title ;
13+ private String username ;
14+ private PhotoSize [] photo ;
1115
1216 public Integer requestId () {
1317 return request_id ;
@@ -17,28 +21,49 @@ public Long chatId() {
1721 return chat_id ;
1822 }
1923
24+ public String title () {
25+ return title ;
26+ }
27+
28+ public String username () {
29+ return username ;
30+ }
31+
32+ public PhotoSize [] photo () {
33+ return photo ;
34+ }
35+
2036 @ Override
2137 public boolean equals (Object o ) {
2238 if (this == o ) return true ;
2339 if (o == null || getClass () != o .getClass ()) return false ;
2440
2541 ChatShared that = (ChatShared ) o ;
2642
27- return Objects .equals (request_id , that .request_id ) &&
28- Objects .equals (chat_id , that .chat_id );
43+ return Objects .equals (request_id , that .request_id )
44+ && Objects .equals (chat_id , that .chat_id )
45+ && Objects .equals (title , that .title )
46+ && Objects .equals (username , that .username )
47+ && Arrays .equals (photo , that .photo );
2948 }
3049
3150 @ Override
3251 public int hashCode () {
3352 return Objects .hash (request_id ,
34- chat_id );
53+ chat_id ,
54+ title ,
55+ username ,
56+ Arrays .hashCode (photo ));
3557 }
3658
3759 @ Override
3860 public String toString () {
3961 return "ChatShared{" +
40- "request_id='" + request_id + '\'' +
41- ", chat_id='" + chat_id + '\'' +
42- '}' ;
62+ "request_id=" + request_id +
63+ ", chat_id=" + chat_id +
64+ ", title='" + title + '\'' +
65+ ", username='" + username + '\'' +
66+ ", photo=" + Arrays .toString (photo ) +
67+ '}' ;
4368 }
4469}
0 commit comments