Passed
Pull Request — master (#408)
by Alexander
01:43
created

VideoNote::setFileId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
/**
9
 * Class VideoNote
10
 * This object represents a video message (available in Telegram apps as of v.4.0).
11
 *
12
 * @package TelegramBot\Api\Types
13
 */
14
class VideoNote extends BaseType implements TypeInterface
15
{
16
    protected static $requiredParams = ['file_id', 'file_unique_id', 'length', 'duration'];
17
18
    protected static $map = [
19
        'file_id' => true,
20
        'file_unique_id' => true,
21
        'length' => true,
22
        'duration' => true,
23
        'thumb' => PhotoSize::class,
24
        'file_size' => true,
25
    ];
26
27
    /**
28
     * Unique identifier for this file
29
     *
30
     * @var string
31
     */
32
    protected $fileId;
33
34
    /**
35
     * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
36
     *
37
     * @var string
38
     */
39
    protected $fileUniqueId;
40
41
    /**
42
     * Video width and height (diameter of the video message) as defined by sender
43
     *
44
     * @var int
45
     */
46
    protected $length;
47
48
    /**
49
     * Duration of the video in seconds as defined by sender
50
     *
51
     * @var int
52
     */
53
    protected $duration;
54
55
    /**
56
     * Optional. Video thumbnail
57
     *
58
     * @var PhotoSize
59
     */
60
    protected $thumb;
61
62
    /**
63
     * Optional. File size in bytes
64
     *
65
     * @var int
66
     */
67
    protected $fileSize;
68
69
    /**
70
     * @return string
71
     */
72
    public function getFileId()
73
    {
74
        return $this->fileId;
75
    }
76
77
    /**
78
     * @param string $fileId
79
     */
80
    public function setFileId($fileId)
81
    {
82
        $this->fileId = $fileId;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getFileUniqueId()
89
    {
90
        return $this->fileUniqueId;
91
    }
92
93
    /**
94
     * @param string $fileUniqueId
95
     */
96
    public function setFileUniqueId($fileUniqueId)
97
    {
98
        $this->fileUniqueId = $fileUniqueId;
99
    }
100
101
    /**
102
     * @return int
103
     */
104
    public function getLength()
105
    {
106
        return $this->length;
107
    }
108
109
    /**
110
     * @param int $length
111
     */
112
    public function setLength($length)
113
    {
114
        $this->length = $length;
115
    }
116
117
    /**
118
     * @return int
119
     */
120
    public function getDuration()
121
    {
122
        return $this->duration;
123
    }
124
125
    /**
126
     * @param int $duration
127
     */
128
    public function setDuration($duration)
129
    {
130
        $this->duration = $duration;
131
    }
132
133
    /**
134
     * @return PhotoSize
135
     */
136
    public function getThumb()
137
    {
138
        return $this->thumb;
139
    }
140
141
    /**
142
     * @param PhotoSize $thumb
143
     */
144
    public function setThumb($thumb)
145
    {
146
        $this->thumb = $thumb;
147
    }
148
149
    /**
150
     * @return int
151
     */
152
    public function getFileSize()
153
    {
154
        return $this->fileSize;
155
    }
156
157
    /**
158
     * @param int $fileSize
159
     */
160
    public function setFileSize($fileSize)
161
    {
162
        $this->fileSize = $fileSize;
163
    }
164
}
165