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 | 'channel_post' => Message::class, |
||
37 | 'inline_query' => InlineQuery::class, |
||
38 | 'chosen_inline_result' => ChosenInlineResult::class, |
||
39 | 'callback_query' => CallbackQuery::class, |
||
40 | 'shipping_query' => ShippingQuery::class, |
||
41 | 'pre_checkout_query' => PreCheckoutQuery::class, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * The update‘s unique identifier. |
||
46 | * Update identifiers start from a certain positive number and increase sequentially. |
||
47 | * This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or |
||
48 | * to restore the correct update sequence, should they get out of order. |
||
49 | * |
||
50 | * @var integer |
||
51 | */ |
||
52 | protected $updateId; |
||
53 | |||
54 | /** |
||
55 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
56 | * |
||
57 | * @var Message |
||
58 | */ |
||
59 | protected $message; |
||
60 | |||
61 | /** |
||
62 | * Optional. New channel post of any kind — text, photo, sticker, etc. |
||
63 | * |
||
64 | * @var Message |
||
65 | */ |
||
66 | protected $channelPost; |
||
67 | |||
68 | /** |
||
69 | * Optional. New incoming inline query |
||
70 | * |
||
71 | * @var \TelegramBot\Api\Types\Inline\InlineQuery |
||
72 | */ |
||
73 | protected $inlineQuery; |
||
74 | |||
75 | /** |
||
76 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
77 | * |
||
78 | * @var \TelegramBot\Api\Types\Inline\ChosenInlineResult |
||
79 | */ |
||
80 | protected $chosenInlineResult; |
||
81 | |||
82 | /** |
||
83 | * Optional. New incoming callback query |
||
84 | * |
||
85 | * @var \TelegramBot\Api\Types\CallbackQuery |
||
86 | */ |
||
87 | protected $callbackQuery; |
||
88 | |||
89 | /** |
||
90 | * Optional. New incoming shipping query. Only for invoices with flexible price |
||
91 | * |
||
92 | * @var ShippingQuery |
||
93 | */ |
||
94 | protected $shippingQuery; |
||
95 | |||
96 | /** |
||
97 | * Optional. New incoming pre-checkout query. Contains full information about checkout |
||
98 | * |
||
99 | * @var PreCheckoutQuery |
||
100 | */ |
||
101 | protected $preCheckoutQuery; |
||
102 | |||
103 | /** |
||
104 | * @return int |
||
105 | */ |
||
106 | public function getUpdateId() |
||
110 | |||
111 | /** |
||
112 | * @param int $updateId |
||
113 | */ |
||
114 | 3 | public function setUpdateId($updateId) |
|
118 | |||
119 | /** |
||
120 | * @return Message |
||
121 | */ |
||
122 | 9 | public function getMessage() |
|
126 | |||
127 | /** |
||
128 | * @param Message $message |
||
129 | */ |
||
130 | 3 | public function setMessage(Message $message) |
|
134 | |||
135 | /** |
||
136 | * @return Message |
||
137 | */ |
||
138 | public function getChannelPost() |
||
142 | |||
143 | /** |
||
144 | * @param Message $channelPost |
||
145 | */ |
||
146 | public function setChannelPost($channelPost) |
||
150 | |||
151 | /** |
||
152 | * @return InlineQuery |
||
153 | */ |
||
154 | 8 | public function getInlineQuery() |
|
158 | |||
159 | /** |
||
160 | * @param InlineQuery $inlineQuery |
||
161 | */ |
||
162 | 1 | public function setInlineQuery($inlineQuery) |
|
166 | |||
167 | /** |
||
168 | * @return ChosenInlineResult |
||
169 | */ |
||
170 | public function getChosenInlineResult() |
||
174 | |||
175 | /** |
||
176 | * @param ChosenInlineResult $chosenInlineResult |
||
177 | */ |
||
178 | public function setChosenInlineResult($chosenInlineResult) |
||
182 | |||
183 | /** |
||
184 | * @return CallbackQuery |
||
185 | */ |
||
186 | public function getCallbackQuery() |
||
190 | |||
191 | /** |
||
192 | * @param CallbackQuery $callbackQuery |
||
193 | */ |
||
194 | public function setCallbackQuery($callbackQuery) |
||
198 | |||
199 | /** |
||
200 | * @author MY |
||
201 | * @return ShippingQuery |
||
202 | */ |
||
203 | public function getShippingQuery() |
||
207 | |||
208 | /** |
||
209 | * @author MY |
||
210 | * @param ShippingQuery $shippingQuery |
||
211 | */ |
||
212 | public function setShippingQuery($shippingQuery) |
||
216 | |||
217 | /** |
||
218 | * @author MY |
||
219 | * @return PreCheckoutQuery |
||
220 | */ |
||
221 | public function getPreCheckoutQuery() |
||
225 | |||
226 | /** |
||
227 | * @author MY |
||
228 | * @param PreCheckoutQuery $preCheckoutQuery |
||
229 | */ |
||
230 | public function setPreCheckoutQuery($preCheckoutQuery) |
||
234 | } |
||
235 |