Completed
Push — develop ( 23b8a0...80c8c3 )
by Michele
11:06
created

InputMediaVideo::getDuration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Input;
6
/**
7
 * Represents a video to be sent.
8
 *
9
 * More on https://core.telegram.org/bots/api#inputmediavideo
10
 */
11
class InputMediaVideo
12
{
13
14
    /**
15
     * Type of the result, must be video
16
     *
17
     * @var string
18
     */
19
    private $type;
20
21
    /**
22
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
23
     * Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using
24
     * multipart/form-data under <file_attach_name> name. More info on Sending Files >>
25
     *
26
     * @var string
27
     */
28
    private $media;
29
30
    /**
31
     * Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
32
     * The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
33
     * exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
34
     * only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using
35
     * multipart/form-data under <file_attach_name>. More info on Sending Files >>
36
     *
37
     * @var InputFile or String|null
38
     */
39
    private $thumb;
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. Video width
67
     *
68
     * @var int|null
69
     */
70
    private $width;
71
72
    /**
73
     * Optional. Video height
74
     *
75
     * @var int|null
76
     */
77
    private $height;
78
79
    /**
80
     * Optional. Video duration
81
     *
82
     * @var int|null
83
     */
84
    private $duration;
85
86
    /**
87
     * Optional. Pass True, if the uploaded video is suitable for streaming
88
     *
89
     * @var bool|null
90
     */
91
    private $supports_streaming;
92
93
    /**
94
     * @return string
95
     */
96
    public function getType(): string
97
    {
98
        return $this->type;
99
    }
100
101
    /**
102
     * @param string $type
103
     */
104
    public function setType(string $type): void
105
    {
106
        $this->type = $type;
107
    }
108
109
    /**
110
     * @return string
111
     */
112
    public function getMedia(): string
113
    {
114
        return $this->media;
115
    }
116
117
    /**
118
     * @param string $media
119
     */
120
    public function setMedia(string $media): void
121
    {
122
        $this->media = $media;
123
    }
124
125
    /**
126
     * @return InputFile
127
     */
128
    public function getThumb(): InputFile
129
    {
130
        return $this->thumb;
131
    }
132
133
    /**
134
     * @param InputFile $thumb
135
     */
136
    public function setThumb(InputFile $thumb): void
137
    {
138
        $this->thumb = $thumb;
139
    }
140
141
    /**
142
     * @return string|null
143
     */
144
    public function getCaption(): ?string
145
    {
146
        return $this->caption;
147
    }
148
149
    /**
150
     * @param string|null $caption
151
     */
152
    public function setCaption(?string $caption): void
153
    {
154
        $this->caption = $caption;
155
    }
156
157
    /**
158
     * @return string|null
159
     */
160
    public function getParseMode(): ?string
161
    {
162
        return $this->parse_mode;
163
    }
164
165
    /**
166
     * @param string|null $parse_mode
167
     */
168
    public function setParseMode(?string $parse_mode): void
169
    {
170
        $this->parse_mode = $parse_mode;
171
    }
172
173
    /**
174
     * @return int|null
175
     */
176
    public function getWidth(): ?int
177
    {
178
        return $this->width;
179
    }
180
181
    /**
182
     * @param int|null $width
183
     */
184
    public function setWidth(?int $width): void
185
    {
186
        $this->width = $width;
187
    }
188
189
    /**
190
     * @return int|null
191
     */
192
    public function getHeight(): ?int
193
    {
194
        return $this->height;
195
    }
196
197
    /**
198
     * @param int|null $height
199
     */
200
    public function setHeight(?int $height): void
201
    {
202
        $this->height = $height;
203
    }
204
205
    /**
206
     * @return int|null
207
     */
208
    public function getDuration(): ?int
209
    {
210
        return $this->duration;
211
    }
212
213
    /**
214
     * @param int|null $duration
215
     */
216
    public function setDuration(?int $duration): void
217
    {
218
        $this->duration = $duration;
219
    }
220
221
    /**
222
     * @return bool|null
223
     */
224
    public function getSupportsStreaming(): ?bool
225
    {
226
        return $this->supports_streaming;
227
    }
228
229
    /**
230
     * @param bool|null $supports_streaming
231
     */
232
    public function setSupportsStreaming(?bool $supports_streaming): void
233
    {
234
        $this->supports_streaming = $supports_streaming;
235
    }
236
237
    /**
238
     * @return \Zanzara\Telegram\Type\MessageEntity[]|null
239
     */
240
    public function getCaptionEntities(): ?array
241
    {
242
        return $this->caption_entities;
243
    }
244
245
    /**
246
     * @param \Zanzara\Telegram\Type\MessageEntity[]|null $caption_entities
247
     */
248
    public function setCaptionEntities(?array $caption_entities): void
249
    {
250
        $this->caption_entities = $caption_entities;
251
    }
252
253
}