forked from TelegramBot/Api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdate.php
More file actions
282 lines (248 loc) · 6.04 KB
/
Update.php
File metadata and controls
282 lines (248 loc) · 6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<?php
namespace TelegramBot\Api\Types;
use TelegramBot\Api\BaseType;
use TelegramBot\Api\TypeInterface;
use TelegramBot\Api\Types\Inline\ChosenInlineResult;
use TelegramBot\Api\Types\Inline\InlineQuery;
use TelegramBot\Api\Types\Payments\Query\PreCheckoutQuery;
use TelegramBot\Api\Types\Payments\Query\ShippingQuery;
/**
* Class Update
* This object represents an incoming update.
* Only one of the optional parameters can be present in any given update.
*
* @package TelegramBot\Api\Types
*/
class Update extends BaseType implements TypeInterface
{
/**
* {@inheritdoc}
*
* @var array
*/
static protected $requiredParams = ['update_id'];
/**
* {@inheritdoc}
*
* @var array
*/
static protected $map = [
'update_id' => true,
'message' => Message::class,
'edited_message' => Message::class,
'channel_post' => Message::class,
'edited_channel_post' => Message::class,
'inline_query' => InlineQuery::class,
'chosen_inline_result' => ChosenInlineResult::class,
'callback_query' => CallbackQuery::class,
'shipping_query' => ShippingQuery::class,
'pre_checkout_query' => PreCheckoutQuery::class,
];
/**
* The update‘s unique identifier.
* Update identifiers start from a certain positive number and increase sequentially.
* This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or
* to restore the correct update sequence, should they get out of order.
*
* @var integer
*/
protected $updateId;
/**
* Optional. New incoming message of any kind — text, photo, sticker, etc.
*
* @var Message
*/
protected $message;
/**
* Optional. New version of a message that is known to the bot and was edited
*
* @var Message
*/
protected $editedMessage;
/**
* Optional. New incoming channel post of any kind — text, photo, sticker, etc.
*
* @var Message
*/
protected $channelPost;
/**
* Optional. New version of a channel post that is known to the bot and was edited
*
* @var Message
*/
protected $editedChannelPost;
/**
* Optional. New incoming inline query
*
* @var \TelegramBot\Api\Types\Inline\InlineQuery
*/
protected $inlineQuery;
/**
* Optional. The result of a inline query that was chosen by a user and sent to their chat partner
*
* @var \TelegramBot\Api\Types\Inline\ChosenInlineResult
*/
protected $chosenInlineResult;
/**
* Optional. New incoming callback query
*
* @var \TelegramBot\Api\Types\CallbackQuery
*/
protected $callbackQuery;
/**
* Optional. New incoming shipping query. Only for invoices with flexible price
*
* @var ShippingQuery
*/
protected $shippingQuery;
/**
* Optional. New incoming pre-checkout query. Contains full information about checkout
*
* @var PreCheckoutQuery
*/
protected $preCheckoutQuery;
/**
* @return int
*/
public function getUpdateId()
{
return $this->updateId;
}
/**
* @param int $updateId
*/
public function setUpdateId($updateId)
{
$this->updateId = $updateId;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
/**
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getEditedMessage()
{
return $this->editedMessage;
}
/**
* @param Message $editedMessage
*/
public function setEditedMessage($editedMessage)
{
$this->editedMessage = $editedMessage;
}
/**
* @return Message
*/
public function getChannelPost()
{
return $this->channelPost;
}
/**
* @param Message $channelPost
*/
public function setChannelPost($channelPost)
{
$this->channelPost = $channelPost;
}
/**
* @return Message
*/
public function getEditedChannelPost()
{
return $this->editedChannelPost;
}
/**
* @param Message $editedChannelPost
*/
public function setEditedChannelPost($editedChannelPost)
{
$this->editedChannelPost = $editedChannelPost;
}
/**
* @return InlineQuery
*/
public function getInlineQuery()
{
return $this->inlineQuery;
}
/**
* @param InlineQuery $inlineQuery
*/
public function setInlineQuery($inlineQuery)
{
$this->inlineQuery = $inlineQuery;
}
/**
* @return ChosenInlineResult
*/
public function getChosenInlineResult()
{
return $this->chosenInlineResult;
}
/**
* @param ChosenInlineResult $chosenInlineResult
*/
public function setChosenInlineResult($chosenInlineResult)
{
$this->chosenInlineResult = $chosenInlineResult;
}
/**
* @return CallbackQuery
*/
public function getCallbackQuery()
{
return $this->callbackQuery;
}
/**
* @param CallbackQuery $callbackQuery
*/
public function setCallbackQuery($callbackQuery)
{
$this->callbackQuery = $callbackQuery;
}
/**
* @author MY
* @return ShippingQuery
*/
public function getShippingQuery()
{
return $this->shippingQuery;
}
/**
* @author MY
* @param ShippingQuery $shippingQuery
*/
public function setShippingQuery($shippingQuery)
{
$this->shippingQuery = $shippingQuery;
}
/**
* @author MY
* @return PreCheckoutQuery
*/
public function getPreCheckoutQuery()
{
return $this->preCheckoutQuery;
}
/**
* @author MY
* @param PreCheckoutQuery $preCheckoutQuery
*/
public function setPreCheckoutQuery($preCheckoutQuery)
{
$this->preCheckoutQuery = $preCheckoutQuery;
}
}