|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Zanzara\Telegram\Type\InlineQueryResult; |
|
6
|
|
|
|
|
7
|
|
|
use Zanzara\Telegram\Type\Input\InputMessageContent; |
|
8
|
|
|
use Zanzara\Telegram\Type\Keyboard\InlineKeyboardMarkup; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the |
|
12
|
|
|
* user with an optional caption. Alternatively, you can use input_message_content to send a message with the |
|
13
|
|
|
* specified content instead of the video. |
|
14
|
|
|
* |
|
15
|
|
|
* More on https://core.telegram.org/bots/api#inlinequeryresultcachedvideo |
|
16
|
|
|
*/ |
|
17
|
|
|
class InlineQueryResultCachedVideo extends InlineQueryResult |
|
18
|
|
|
{ |
|
19
|
|
|
|
|
20
|
|
|
/** |
|
21
|
|
|
* A valid file identifier for the video file |
|
22
|
|
|
* |
|
23
|
|
|
* @var string |
|
24
|
|
|
*/ |
|
25
|
|
|
private $video_file_id; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Title for the result |
|
29
|
|
|
* |
|
30
|
|
|
* @var string |
|
31
|
|
|
*/ |
|
32
|
|
|
private $title; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Optional. Short description of the result |
|
36
|
|
|
* |
|
37
|
|
|
* @var string|null |
|
38
|
|
|
*/ |
|
39
|
|
|
private $description; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
|
43
|
|
|
* |
|
44
|
|
|
* @var string|null |
|
45
|
|
|
*/ |
|
46
|
|
|
private $caption; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in |
|
50
|
|
|
* the media caption. |
|
51
|
|
|
* |
|
52
|
|
|
* @var string|null |
|
53
|
|
|
*/ |
|
54
|
|
|
private $parse_mode; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
|
58
|
|
|
* |
|
59
|
|
|
* @since zanzara 0.5.0, Telegram Bot Api 5.0 |
|
60
|
|
|
* |
|
61
|
|
|
* @var \Zanzara\Telegram\Type\MessageEntity[]|null |
|
62
|
|
|
*/ |
|
63
|
|
|
private $caption_entities; |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* Optional. Inline keyboard attached to the message |
|
67
|
|
|
* |
|
68
|
|
|
* @var InlineKeyboardMarkup|null |
|
69
|
|
|
*/ |
|
70
|
|
|
private $reply_markup; |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* Optional. Content of the message to be sent instead of the video |
|
74
|
|
|
* |
|
75
|
|
|
* @var InputMessageContent|null |
|
76
|
|
|
*/ |
|
77
|
|
|
private $input_message_content; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @return string |
|
81
|
|
|
*/ |
|
82
|
|
|
public function getVideoFileId(): string |
|
83
|
|
|
{ |
|
84
|
|
|
return $this->video_file_id; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @param string $video_file_id |
|
89
|
|
|
*/ |
|
90
|
|
|
public function setVideoFileId(string $video_file_id): void |
|
91
|
|
|
{ |
|
92
|
|
|
$this->video_file_id = $video_file_id; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @return string |
|
97
|
|
|
*/ |
|
98
|
|
|
public function getTitle(): string |
|
99
|
|
|
{ |
|
100
|
|
|
return $this->title; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @param string $title |
|
105
|
|
|
*/ |
|
106
|
|
|
public function setTitle(string $title): void |
|
107
|
|
|
{ |
|
108
|
|
|
$this->title = $title; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* @return string|null |
|
113
|
|
|
*/ |
|
114
|
|
|
public function getDescription(): ?string |
|
115
|
|
|
{ |
|
116
|
|
|
return $this->description; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* @param string|null $description |
|
121
|
|
|
*/ |
|
122
|
|
|
public function setDescription(?string $description): void |
|
123
|
|
|
{ |
|
124
|
|
|
$this->description = $description; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* @return string|null |
|
129
|
|
|
*/ |
|
130
|
|
|
public function getCaption(): ?string |
|
131
|
|
|
{ |
|
132
|
|
|
return $this->caption; |
|
133
|
|
|
} |
|
134
|
|
|
|
|
135
|
|
|
/** |
|
136
|
|
|
* @param string|null $caption |
|
137
|
|
|
*/ |
|
138
|
|
|
public function setCaption(?string $caption): void |
|
139
|
|
|
{ |
|
140
|
|
|
$this->caption = $caption; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
/** |
|
144
|
|
|
* @return string|null |
|
145
|
|
|
*/ |
|
146
|
|
|
public function getParseMode(): ?string |
|
147
|
|
|
{ |
|
148
|
|
|
return $this->parse_mode; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* @param string|null $parse_mode |
|
153
|
|
|
*/ |
|
154
|
|
|
public function setParseMode(?string $parse_mode): void |
|
155
|
|
|
{ |
|
156
|
|
|
$this->parse_mode = $parse_mode; |
|
157
|
|
|
} |
|
158
|
|
|
|
|
159
|
|
|
/** |
|
160
|
|
|
* @return InlineKeyboardMarkup|null |
|
161
|
|
|
*/ |
|
162
|
|
|
public function getReplyMarkup(): ?InlineKeyboardMarkup |
|
163
|
|
|
{ |
|
164
|
|
|
return $this->reply_markup; |
|
165
|
|
|
} |
|
166
|
|
|
|
|
167
|
|
|
/** |
|
168
|
|
|
* @param InlineKeyboardMarkup|null $reply_markup |
|
169
|
|
|
*/ |
|
170
|
|
|
public function setReplyMarkup(?InlineKeyboardMarkup $reply_markup): void |
|
171
|
|
|
{ |
|
172
|
|
|
$this->reply_markup = $reply_markup; |
|
173
|
|
|
} |
|
174
|
|
|
|
|
175
|
|
|
/** |
|
176
|
|
|
* @return InputMessageContent|null |
|
177
|
|
|
*/ |
|
178
|
|
|
public function getInputMessageContent(): ?InputMessageContent |
|
179
|
|
|
{ |
|
180
|
|
|
return $this->input_message_content; |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
/** |
|
184
|
|
|
* @param InputMessageContent|null $input_message_content |
|
185
|
|
|
*/ |
|
186
|
|
|
public function setInputMessageContent(?InputMessageContent $input_message_content): void |
|
187
|
|
|
{ |
|
188
|
|
|
$this->input_message_content = $input_message_content; |
|
189
|
|
|
} |
|
190
|
|
|
|
|
191
|
|
|
/** |
|
192
|
|
|
* @return \Zanzara\Telegram\Type\MessageEntity[]|null |
|
193
|
|
|
*/ |
|
194
|
|
|
public function getCaptionEntities(): ?array |
|
195
|
|
|
{ |
|
196
|
|
|
return $this->caption_entities; |
|
197
|
|
|
} |
|
198
|
|
|
|
|
199
|
|
|
/** |
|
200
|
|
|
* @param \Zanzara\Telegram\Type\MessageEntity[]|null $caption_entities |
|
201
|
|
|
*/ |
|
202
|
|
|
public function setCaptionEntities(?array $caption_entities): void |
|
203
|
|
|
{ |
|
204
|
|
|
$this->caption_entities = $caption_entities; |
|
205
|
|
|
} |
|
206
|
|
|
|
|
207
|
|
|
} |