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' => PollAnswerQuery::class, |
||
45 | ]; |
||
46 | |||
47 | /** |
||
48 | * The update‘s unique identifier. |
||
49 | * Update identifiers start from a certain positive number and increase sequentially. |
||
50 | * This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or |
||
51 | * to restore the correct update sequence, should they get out of order. |
||
52 | * |
||
53 | * @var integer |
||
54 | */ |
||
55 | protected $updateId; |
||
56 | |||
57 | /** |
||
58 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
59 | * |
||
60 | * @var Message |
||
61 | */ |
||
62 | protected $message; |
||
63 | |||
64 | /** |
||
65 | * @var PollAnswerQuery |
||
66 | */ |
||
67 | protected $poll_answer; |
||
68 | |||
69 | |||
70 | /** |
||
71 | * Optional. New version of a message that is known to the bot and was edited |
||
72 | * |
||
73 | * @var Message |
||
74 | */ |
||
75 | protected $editedMessage; |
||
76 | |||
77 | /** |
||
78 | * Optional. New incoming channel post of any kind — text, photo, sticker, etc. |
||
79 | * |
||
80 | * @var Message |
||
81 | */ |
||
82 | protected $channelPost; |
||
83 | |||
84 | /** |
||
85 | * Optional. New version of a channel post that is known to the bot and was edited |
||
86 | * |
||
87 | * @var Message |
||
88 | */ |
||
89 | protected $editedChannelPost; |
||
90 | |||
91 | /** |
||
92 | * Optional. New incoming inline query |
||
93 | * |
||
94 | * @var \TelegramBot\Api\Types\Inline\InlineQuery |
||
95 | */ |
||
96 | protected $inlineQuery; |
||
97 | |||
98 | /** |
||
99 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
100 | * |
||
101 | * @var \TelegramBot\Api\Types\Inline\ChosenInlineResult |
||
102 | */ |
||
103 | protected $chosenInlineResult; |
||
104 | |||
105 | /** |
||
106 | * Optional. New incoming callback query |
||
107 | * |
||
108 | * @var \TelegramBot\Api\Types\CallbackQuery |
||
109 | */ |
||
110 | protected $callbackQuery; |
||
111 | |||
112 | /** |
||
113 | * Optional. New incoming shipping query. Only for invoices with flexible price |
||
114 | * |
||
115 | * @var ShippingQuery |
||
116 | */ |
||
117 | protected $shippingQuery; |
||
118 | |||
119 | /** |
||
120 | * Optional. New incoming pre-checkout query. Contains full information about checkout |
||
121 | * |
||
122 | * @var PreCheckoutQuery |
||
123 | */ |
||
124 | protected $preCheckoutQuery; |
||
125 | |||
126 | /** |
||
127 | * @return int |
||
128 | */ |
||
129 | public function getUpdateId() |
||
133 | |||
134 | /** |
||
135 | * @param int $updateId |
||
136 | */ |
||
137 | 3 | public function setUpdateId($updateId) |
|
141 | |||
142 | /** |
||
143 | * @return Message |
||
144 | */ |
||
145 | 9 | public function getMessage() |
|
149 | |||
150 | /** |
||
151 | * @param Message $message |
||
152 | */ |
||
153 | 3 | public function setMessage(Message $message) |
|
157 | |||
158 | /** |
||
159 | * @return Message |
||
160 | */ |
||
161 | public function getEditedMessage() |
||
165 | |||
166 | /** |
||
167 | * @param Message $editedMessage |
||
168 | */ |
||
169 | public function setEditedMessage($editedMessage) |
||
173 | |||
174 | /** |
||
175 | * @return Message |
||
176 | */ |
||
177 | public function getChannelPost() |
||
181 | |||
182 | /** |
||
183 | * @param Message $channelPost |
||
184 | */ |
||
185 | public function setChannelPost($channelPost) |
||
189 | |||
190 | /** |
||
191 | * @return Message |
||
192 | */ |
||
193 | public function getPollAnswer() |
||
197 | |||
198 | /** |
||
199 | * @param PollAnswerQuery $pollAnswer |
||
200 | */ |
||
201 | public function setPollAnswer($pollAnswer) |
||
205 | |||
206 | /** |
||
207 | * @return Message |
||
208 | */ |
||
209 | public function getEditedChannelPost() |
||
213 | |||
214 | /** |
||
215 | * @param Message $editedChannelPost |
||
216 | */ |
||
217 | public function setEditedChannelPost($editedChannelPost) |
||
221 | |||
222 | /** |
||
223 | * @return InlineQuery |
||
224 | */ |
||
225 | 8 | public function getInlineQuery() |
|
229 | |||
230 | /** |
||
231 | * @param InlineQuery $inlineQuery |
||
232 | */ |
||
233 | 1 | public function setInlineQuery($inlineQuery) |
|
237 | |||
238 | /** |
||
239 | * @return ChosenInlineResult |
||
240 | */ |
||
241 | public function getChosenInlineResult() |
||
245 | |||
246 | /** |
||
247 | * @param ChosenInlineResult $chosenInlineResult |
||
248 | */ |
||
249 | public function setChosenInlineResult($chosenInlineResult) |
||
253 | |||
254 | /** |
||
255 | * @return CallbackQuery |
||
256 | */ |
||
257 | public function getCallbackQuery() |
||
261 | |||
262 | /** |
||
263 | * @param CallbackQuery $callbackQuery |
||
264 | */ |
||
265 | public function setCallbackQuery($callbackQuery) |
||
269 | |||
270 | /** |
||
271 | * @author MY |
||
272 | * @return ShippingQuery |
||
273 | */ |
||
274 | public function getShippingQuery() |
||
278 | |||
279 | /** |
||
280 | * @author MY |
||
281 | * @param ShippingQuery $shippingQuery |
||
282 | */ |
||
283 | public function setShippingQuery($shippingQuery) |
||
287 | |||
288 | /** |
||
289 | * @author MY |
||
290 | * @return PreCheckoutQuery |
||
291 | */ |
||
292 | public function getPreCheckoutQuery() |
||
296 | |||
297 | /** |
||
298 | * @author MY |
||
299 | * @param PreCheckoutQuery $preCheckoutQuery |
||
300 | */ |
||
301 | public function setPreCheckoutQuery($preCheckoutQuery) |
||
305 | } |
||
306 |