1 | <?php |
||
17 | class Update extends BaseType implements TypeInterface |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | static protected $requiredParams = ['update_id']; |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | static protected $map = [ |
||
32 | 'update_id' => true, |
||
33 | 'message' => Message::class, |
||
34 | 'inline_query' => InlineQuery::class, |
||
35 | 'chosen_inline_result' => ChosenInlineResult::class, |
||
36 | 'callback_query' => CallbackQuery::class, |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * The update‘s unique identifier. |
||
41 | * Update identifiers start from a certain positive number and increase sequentially. |
||
42 | * This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or |
||
43 | * to restore the correct update sequence, should they get out of order. |
||
44 | * |
||
45 | * @var integer |
||
46 | */ |
||
47 | protected $updateId; |
||
48 | |||
49 | /** |
||
50 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
51 | * |
||
52 | * @var Message |
||
53 | */ |
||
54 | protected $message; |
||
55 | |||
56 | /** |
||
57 | * Optional. New incoming inline query |
||
58 | * |
||
59 | * @var \TelegramBot\Api\Types\Inline\InlineQuery |
||
60 | */ |
||
61 | protected $inlineQuery; |
||
62 | |||
63 | /** |
||
64 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
65 | * |
||
66 | * @var \TelegramBot\Api\Types\Inline\ChosenInlineResult |
||
67 | */ |
||
68 | protected $chosenInlineResult; |
||
69 | |||
70 | /** |
||
71 | * Optional. New incoming callback query |
||
72 | * |
||
73 | * @var \TelegramBot\Api\Types\CallbackQuery |
||
74 | */ |
||
75 | protected $callbackQuery; |
||
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | public function getUpdateId() |
||
84 | |||
85 | /** |
||
86 | * @param int $updateId |
||
87 | */ |
||
88 | 3 | public function setUpdateId($updateId) |
|
92 | |||
93 | /** |
||
94 | * @return Message |
||
95 | */ |
||
96 | 9 | public function getMessage() |
|
100 | |||
101 | /** |
||
102 | * @param Message $message |
||
103 | */ |
||
104 | 3 | public function setMessage(Message $message) |
|
108 | |||
109 | /** |
||
110 | * @return InlineQuery |
||
111 | */ |
||
112 | 8 | public function getInlineQuery() |
|
116 | |||
117 | /** |
||
118 | * @param InlineQuery $inlineQuery |
||
119 | */ |
||
120 | 1 | public function setInlineQuery($inlineQuery) |
|
124 | |||
125 | /** |
||
126 | * @return ChosenInlineResult |
||
127 | */ |
||
128 | public function getChosenInlineResult() |
||
132 | |||
133 | /** |
||
134 | * @param ChosenInlineResult $chosenInlineResult |
||
135 | */ |
||
136 | public function setChosenInlineResult($chosenInlineResult) |
||
140 | |||
141 | /** |
||
142 | * @return CallbackQuery |
||
143 | */ |
||
144 | public function getCallbackQuery() |
||
148 | |||
149 | /** |
||
150 | * @param CallbackQuery $callbackQuery |
||
151 | */ |
||
152 | public function setCallbackQuery($callbackQuery) |
||
156 | } |
||
157 |