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 | ]; |
||
37 | |||
38 | /** |
||
39 | * The update‘s unique identifier. |
||
40 | * Update identifiers start from a certain positive number and increase sequentially. |
||
41 | * This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or |
||
42 | * to restore the correct update sequence, should they get out of order. |
||
43 | * |
||
44 | * @var integer |
||
45 | */ |
||
46 | protected $updateId; |
||
47 | |||
48 | /** |
||
49 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
50 | * |
||
51 | * @var Message |
||
52 | */ |
||
53 | protected $message; |
||
54 | |||
55 | /** |
||
56 | * Optional. New incoming inline query |
||
57 | * |
||
58 | * @var \TelegramBot\Api\Types\Inline\InlineQuery |
||
59 | */ |
||
60 | protected $inlineQuery; |
||
61 | |||
62 | /** |
||
63 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
64 | * |
||
65 | * @var \TelegramBot\Api\Types\Inline\ChosenInlineResult |
||
66 | */ |
||
67 | protected $chosenInlineResult; |
||
68 | |||
69 | /** |
||
70 | * @return int |
||
71 | */ |
||
72 | public function getUpdateId() |
||
76 | |||
77 | /** |
||
78 | * @param int $updateId |
||
79 | */ |
||
80 | public function setUpdateId($updateId) |
||
84 | |||
85 | /** |
||
86 | * @return Message |
||
87 | */ |
||
88 | public function getMessage() |
||
92 | |||
93 | /** |
||
94 | * @param Message $message |
||
95 | */ |
||
96 | public function setMessage(Message $message) |
||
100 | |||
101 | /** |
||
102 | * @return InlineQuery |
||
103 | */ |
||
104 | public function getInlineQuery() |
||
108 | |||
109 | /** |
||
110 | * @param InlineQuery $inlineQuery |
||
111 | */ |
||
112 | public function setInlineQuery($inlineQuery) |
||
116 | |||
117 | /** |
||
118 | * @return ChosenInlineResult |
||
119 | */ |
||
120 | public function getChosenInlineResult() |
||
124 | |||
125 | /** |
||
126 | * @param ChosenInlineResult $chosenInlineResult |
||
127 | */ |
||
128 | public function setChosenInlineResult($chosenInlineResult) |
||
132 | } |
||
133 |