InlineQueryResultAudio::getTitle()   A
last analyzed

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