1 | <?php |
||
19 | class CallbackQuery extends BaseType |
||
20 | { |
||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | static protected $requiredParams = ['id', 'from']; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | static protected $map = [ |
||
34 | 'id' => true, |
||
35 | 'from' => User::class, |
||
36 | 'message' => Message::class, |
||
37 | 'inline_message_id' => true, |
||
38 | 'chat_instance' => true, |
||
39 | 'data' => true, |
||
40 | 'game_short_name' => true |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * Unique identifier for this query |
||
45 | * |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $id; |
||
49 | |||
50 | /** |
||
51 | * Sender |
||
52 | * |
||
53 | * @var \TelegramBot\Api\Types\User |
||
54 | */ |
||
55 | protected $from; |
||
56 | |||
57 | /** |
||
58 | * Optional. Message with the callback button that originated the query. |
||
59 | * Note that message content and message date will not be available |
||
60 | * if the message is too old |
||
61 | * |
||
62 | * @var \TelegramBot\Api\Types\Message |
||
63 | */ |
||
64 | protected $message; |
||
65 | |||
66 | /** |
||
67 | * Optional. Identifier of the message sent via the bot in inline mode, |
||
68 | * that originated the query. |
||
69 | * |
||
70 | * @var string |
||
71 | */ |
||
72 | protected $inlineMessageId; |
||
73 | |||
74 | /** |
||
75 | * Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. |
||
76 | * Useful for high scores in games. |
||
77 | * |
||
78 | * @var string |
||
79 | */ |
||
80 | protected $chatInstance; |
||
81 | |||
82 | /** |
||
83 | * Optional. Data associated with the callback button. |
||
84 | * Be aware that a bad client can send arbitrary data in this field. |
||
85 | * |
||
86 | * @var string |
||
87 | */ |
||
88 | protected $data; |
||
89 | |||
90 | /** |
||
91 | * Optional. Short name of a Game to be returned, |
||
92 | * serves as the unique identifier for the game |
||
93 | * |
||
94 | * @var string |
||
95 | */ |
||
96 | protected $gameShortName; |
||
97 | |||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | 2 | public function getId() |
|
106 | |||
107 | /** |
||
108 | * @param string $id |
||
109 | */ |
||
110 | 3 | public function setId($id) |
|
114 | |||
115 | /** |
||
116 | * @return User |
||
117 | */ |
||
118 | 2 | public function getFrom() |
|
122 | |||
123 | /** |
||
124 | * @param User $from |
||
125 | */ |
||
126 | 3 | public function setFrom(User $from) |
|
130 | |||
131 | /** |
||
132 | * @return Message |
||
133 | */ |
||
134 | public function getMessage() |
||
138 | |||
139 | /** |
||
140 | * @param Message $message |
||
141 | */ |
||
142 | public function setMessage($message) |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | 2 | public function getInlineMessageId() |
|
154 | |||
155 | /** |
||
156 | * @param string $inlineMessageId |
||
157 | */ |
||
158 | 3 | public function setInlineMessageId($inlineMessageId) |
|
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | 2 | public function getChatInstance() |
|
170 | |||
171 | /** |
||
172 | * @param string $chatInstance |
||
173 | */ |
||
174 | 3 | public function setChatInstance($chatInstance) |
|
178 | |||
179 | /** |
||
180 | * @return string |
||
181 | */ |
||
182 | 2 | public function getData() |
|
186 | |||
187 | /** |
||
188 | * @param string $data |
||
189 | */ |
||
190 | 3 | public function setData($data) |
|
194 | |||
195 | /** |
||
196 | * @return string |
||
197 | */ |
||
198 | 2 | public function getGameShortName() |
|
202 | |||
203 | /** |
||
204 | * @param string $gameShortName |
||
205 | */ |
||
206 | 3 | public function setGameShortName($gameShortName) |
|
210 | |||
211 | |||
212 | |||
213 | } |
||
214 |