1 | <?php |
||
19 | class Update extends BaseType implements TypeInterface |
||
20 | { |
||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | static protected $requiredParams = ['update_id']; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | static protected $map = [ |
||
34 | 'update_id' => true, |
||
35 | 'message' => Message::class, |
||
36 | 'edited_message' => Message::class, |
||
37 | 'channel_post' => Message::class, |
||
38 | 'edited_channel_post' => Message::class, |
||
39 | 'inline_query' => InlineQuery::class, |
||
40 | 'chosen_inline_result' => ChosenInlineResult::class, |
||
41 | 'callback_query' => CallbackQuery::class, |
||
42 | 'shipping_query' => ShippingQuery::class, |
||
43 | 'pre_checkout_query' => PreCheckoutQuery::class, |
||
44 | 'poll_answer' => PollAnswer::class, |
||
45 | 'poll' => Poll::class, |
||
46 | ]; |
||
47 | |||
48 | /** |
||
49 | * The update‘s unique identifier. |
||
50 | * Update identifiers start from a certain positive number and increase sequentially. |
||
51 | * This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or |
||
52 | * to restore the correct update sequence, should they get out of order. |
||
53 | * |
||
54 | * @var integer |
||
55 | */ |
||
56 | protected $updateId; |
||
57 | |||
58 | /** |
||
59 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
60 | * |
||
61 | * @var Message |
||
62 | */ |
||
63 | protected $message; |
||
64 | |||
65 | /** |
||
66 | * @var PollAnswer |
||
67 | */ |
||
68 | protected $pollAnswer; |
||
69 | |||
70 | /** |
||
71 | * @var Poll |
||
72 | */ |
||
73 | protected $poll; |
||
74 | |||
75 | |||
76 | /** |
||
77 | * Optional. New version of a message that is known to the bot and was edited |
||
78 | * |
||
79 | * @var Message |
||
80 | */ |
||
81 | protected $editedMessage; |
||
82 | |||
83 | /** |
||
84 | * Optional. New incoming channel post of any kind — text, photo, sticker, etc. |
||
85 | * |
||
86 | * @var Message |
||
87 | */ |
||
88 | protected $channelPost; |
||
89 | |||
90 | /** |
||
91 | * Optional. New version of a channel post that is known to the bot and was edited |
||
92 | * |
||
93 | * @var Message |
||
94 | */ |
||
95 | protected $editedChannelPost; |
||
96 | |||
97 | /** |
||
98 | * Optional. New incoming inline query |
||
99 | * |
||
100 | * @var \TelegramBot\Api\Types\Inline\InlineQuery |
||
101 | */ |
||
102 | protected $inlineQuery; |
||
103 | |||
104 | /** |
||
105 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
106 | * |
||
107 | * @var \TelegramBot\Api\Types\Inline\ChosenInlineResult |
||
108 | */ |
||
109 | protected $chosenInlineResult; |
||
110 | |||
111 | /** |
||
112 | * Optional. New incoming callback query |
||
113 | * |
||
114 | * @var \TelegramBot\Api\Types\CallbackQuery |
||
115 | */ |
||
116 | protected $callbackQuery; |
||
117 | |||
118 | /** |
||
119 | * Optional. New incoming shipping query. Only for invoices with flexible price |
||
120 | * |
||
121 | * @var ShippingQuery |
||
122 | */ |
||
123 | protected $shippingQuery; |
||
124 | |||
125 | /** |
||
126 | * Optional. New incoming pre-checkout query. Contains full information about checkout |
||
127 | * |
||
128 | * @var PreCheckoutQuery |
||
129 | */ |
||
130 | protected $preCheckoutQuery; |
||
131 | |||
132 | /** |
||
133 | * @return int |
||
134 | */ |
||
135 | public function getUpdateId() |
||
139 | |||
140 | /** |
||
141 | * @param int $updateId |
||
142 | */ |
||
143 | 3 | public function setUpdateId($updateId) |
|
147 | |||
148 | /** |
||
149 | * @return Message |
||
150 | */ |
||
151 | 9 | public function getMessage() |
|
155 | |||
156 | /** |
||
157 | * @param Message $message |
||
158 | */ |
||
159 | 3 | public function setMessage(Message $message) |
|
163 | |||
164 | /** |
||
165 | * @return Message |
||
166 | */ |
||
167 | public function getEditedMessage() |
||
171 | |||
172 | /** |
||
173 | * @param Message $editedMessage |
||
174 | */ |
||
175 | public function setEditedMessage($editedMessage) |
||
179 | |||
180 | /** |
||
181 | * @return Message |
||
182 | */ |
||
183 | public function getChannelPost() |
||
187 | |||
188 | /** |
||
189 | * @param Message $channelPost |
||
190 | */ |
||
191 | public function setChannelPost($channelPost) |
||
195 | |||
196 | /** |
||
197 | * @return PollAnswer |
||
198 | */ |
||
199 | public function getPollAnswer() |
||
203 | |||
204 | /** |
||
205 | * @return Poll |
||
206 | */ |
||
207 | public function getPoll() |
||
211 | |||
212 | /** |
||
213 | * @param Poll $poll |
||
214 | */ |
||
215 | public function setPoll($poll) |
||
219 | |||
220 | /** |
||
221 | * @param PollAnswer $pollAnswer |
||
222 | */ |
||
223 | public function setPollAnswer($pollAnswer) |
||
227 | |||
228 | /** |
||
229 | * @return Message |
||
230 | */ |
||
231 | public function getEditedChannelPost() |
||
235 | |||
236 | /** |
||
237 | * @param Message $editedChannelPost |
||
238 | */ |
||
239 | public function setEditedChannelPost($editedChannelPost) |
||
243 | |||
244 | /** |
||
245 | * @return InlineQuery |
||
246 | */ |
||
247 | 8 | public function getInlineQuery() |
|
251 | |||
252 | /** |
||
253 | * @param InlineQuery $inlineQuery |
||
254 | */ |
||
255 | 1 | public function setInlineQuery($inlineQuery) |
|
259 | |||
260 | /** |
||
261 | * @return ChosenInlineResult |
||
262 | */ |
||
263 | public function getChosenInlineResult() |
||
267 | |||
268 | /** |
||
269 | * @param ChosenInlineResult $chosenInlineResult |
||
270 | */ |
||
271 | public function setChosenInlineResult($chosenInlineResult) |
||
275 | |||
276 | /** |
||
277 | * @return CallbackQuery |
||
278 | */ |
||
279 | public function getCallbackQuery() |
||
283 | |||
284 | /** |
||
285 | * @param CallbackQuery $callbackQuery |
||
286 | */ |
||
287 | public function setCallbackQuery($callbackQuery) |
||
291 | |||
292 | /** |
||
293 | * @author MY |
||
294 | * @return ShippingQuery |
||
295 | */ |
||
296 | public function getShippingQuery() |
||
300 | |||
301 | /** |
||
302 | * @author MY |
||
303 | * @param ShippingQuery $shippingQuery |
||
304 | */ |
||
305 | public function setShippingQuery($shippingQuery) |
||
309 | |||
310 | /** |
||
311 | * @author MY |
||
312 | * @return PreCheckoutQuery |
||
313 | */ |
||
314 | public function getPreCheckoutQuery() |
||
318 | |||
319 | /** |
||
320 | * @author MY |
||
321 | * @param PreCheckoutQuery $preCheckoutQuery |
||
322 | */ |
||
323 | public function setPreCheckoutQuery($preCheckoutQuery) |
||
327 | } |
||
328 |