1 | <?php |
||
15 | class Voice extends BaseType implements TypeInterface |
||
16 | { |
||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | static protected $requiredParams = ['file_id', 'file_unique_id', 'duration']; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | static protected $map = [ |
||
30 | 'file_id' => true, |
||
31 | 'file_unique_id' => true, |
||
32 | 'duration' => true, |
||
33 | 'mime_type' => true, |
||
34 | 'file_size' => true, |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * Identifier for this file, which can be used to download or reuse the file |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $fileId; |
||
43 | |||
44 | /** |
||
45 | * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be |
||
46 | * used to download or reuse the file. |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $fileUniqueId; |
||
51 | |||
52 | /** |
||
53 | * Duration of the audio in seconds as defined by sender |
||
54 | * |
||
55 | * @var int |
||
56 | */ |
||
57 | protected $duration; |
||
58 | |||
59 | /** |
||
60 | * Optional. MIME type of the file as defined by sender |
||
61 | * |
||
62 | * @var string |
||
63 | */ |
||
64 | protected $mimeType; |
||
65 | |||
66 | /** |
||
67 | * Optional. File size |
||
68 | * |
||
69 | * @var int |
||
70 | */ |
||
71 | protected $fileSize; |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 1 | public function getFileId() |
|
80 | |||
81 | /** |
||
82 | * @param string $fileId |
||
83 | */ |
||
84 | 4 | public function setFileId($fileId) |
|
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getFileUniqueId() |
||
96 | |||
97 | /** |
||
98 | * @param string $fileUniqueId |
||
99 | */ |
||
100 | 2 | public function setFileUniqueId($fileUniqueId) |
|
101 | { |
||
102 | 2 | $this->fileUniqueId = $fileUniqueId; |
|
103 | 2 | } |
|
104 | |||
105 | /** |
||
106 | * @return int |
||
107 | */ |
||
108 | 1 | public function getDuration() |
|
112 | |||
113 | /** |
||
114 | * @param int $duration |
||
115 | * |
||
116 | * @throws InvalidArgumentException |
||
117 | */ |
||
118 | 5 | public function setDuration($duration) |
|
126 | |||
127 | /** |
||
128 | * @return string |
||
129 | */ |
||
130 | 1 | public function getMimeType() |
|
134 | |||
135 | /** |
||
136 | * @param string $mimeType |
||
137 | */ |
||
138 | 4 | public function setMimeType($mimeType) |
|
142 | |||
143 | /** |
||
144 | * @return int |
||
145 | */ |
||
146 | 1 | public function getFileSize() |
|
150 | |||
151 | /** |
||
152 | * @param int $fileSize |
||
153 | * |
||
154 | * @throws InvalidArgumentException |
||
155 | */ |
||
156 | 5 | public function setFileSize($fileSize) |
|
164 | } |
||
165 |