Audio::setFileUniqueId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\File;
6
7
/**
8
 * This object represents an audio file to be treated as music by the Telegram clients.
9
 *
10
 * More on https://core.telegram.org/bots/api#audio
11
 */
12
class Audio
13
{
14
15
    /**
16
     * Identifier for this file, which can be used to download or reuse the file
17
     *
18
     * @var string
19
     */
20
    private $file_id;
21
22
    /**
23
     * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to
24
     * download or reuse the file.
25
     *
26
     * @var string
27
     */
28
    private $file_unique_id;
29
30
    /**
31
     * Duration of the audio in seconds as defined by sender
32
     *
33
     * @var int
34
     */
35
    private $duration;
36
37
    /**
38
     * Optional. Performer of the audio as defined by sender or by audio tags
39
     *
40
     * @var string|null
41
     */
42
    private $performer;
43
44
    /**
45
     * Optional. Title of the audio as defined by sender or by audio tags
46
     *
47
     * @var string|null
48
     */
49
    private $title;
50
51
    /**
52
     * Optional. Original filename as defined by sender
53
     *
54
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
55
     *
56
     * @var string|null
57
     */
58
    private $file_name;
59
60
    /**
61
     * Optional. MIME type of the file as defined by sender
62
     *
63
     * @var string|null
64
     */
65
    private $mime_type;
66
67
    /**
68
     * Optional. File size
69
     *
70
     * @var int|null
71
     */
72
    private $file_size;
73
74
    /**
75
     * Optional. Thumbnail of the album cover to which the music file belongs
76
     *
77
     * @var PhotoSize|null
78
     */
79
    private $thumb;
80
81
    /**
82
     * @return string
83
     */
84
    public function getFileId(): string
85
    {
86
        return $this->file_id;
87
    }
88
89
    /**
90
     * @param string $file_id
91
     */
92
    public function setFileId(string $file_id): void
93
    {
94
        $this->file_id = $file_id;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getFileUniqueId(): string
101
    {
102
        return $this->file_unique_id;
103
    }
104
105
    /**
106
     * @param string $file_unique_id
107
     */
108
    public function setFileUniqueId(string $file_unique_id): void
109
    {
110
        $this->file_unique_id = $file_unique_id;
111
    }
112
113
    /**
114
     * @return int
115
     */
116
    public function getDuration(): int
117
    {
118
        return $this->duration;
119
    }
120
121
    /**
122
     * @param int $duration
123
     */
124
    public function setDuration(int $duration): void
125
    {
126
        $this->duration = $duration;
127
    }
128
129
    /**
130
     * @return string|null
131
     */
132
    public function getPerformer(): ?string
133
    {
134
        return $this->performer;
135
    }
136
137
    /**
138
     * @param string|null $performer
139
     */
140
    public function setPerformer(?string $performer): void
141
    {
142
        $this->performer = $performer;
143
    }
144
145
    /**
146
     * @return string|null
147
     */
148
    public function getTitle(): ?string
149
    {
150
        return $this->title;
151
    }
152
153
    /**
154
     * @param string|null $title
155
     */
156
    public function setTitle(?string $title): void
157
    {
158
        $this->title = $title;
159
    }
160
161
    /**
162
     * @return string|null
163
     */
164
    public function getMimeType(): ?string
165
    {
166
        return $this->mime_type;
167
    }
168
169
    /**
170
     * @param string|null $mime_type
171
     */
172
    public function setMimeType(?string $mime_type): void
173
    {
174
        $this->mime_type = $mime_type;
175
    }
176
177
    /**
178
     * @return int|null
179
     */
180
    public function getFileSize(): ?int
181
    {
182
        return $this->file_size;
183
    }
184
185
    /**
186
     * @param int|null $file_size
187
     */
188
    public function setFileSize(?int $file_size): void
189
    {
190
        $this->file_size = $file_size;
191
    }
192
193
    /**
194
     * @return PhotoSize|null
195
     */
196
    public function getThumb(): ?PhotoSize
197
    {
198
        return $this->thumb;
199
    }
200
201
    /**
202
     * @param PhotoSize|null $thumb
203
     */
204
    public function setThumb(?PhotoSize $thumb): void
205
    {
206
        $this->thumb = $thumb;
207
    }
208
209
    /**
210
     * @return string|null
211
     */
212
    public function getFileName(): ?string
213
    {
214
        return $this->file_name;
215
    }
216
217
    /**
218
     * @param string|null $file_name
219
     */
220
    public function setFileName(?string $file_name): void
221
    {
222
        $this->file_name = $file_name;
223
    }
224
225
}