InlineQueryResultCachedAudio::setCaption()   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 1
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\TypeInlineQueryResult;
6
7
namespace Zanzara\Telegram\Type\InlineQueryResult;
8
9
use Zanzara\Telegram\Type\Input\InputMessageContent;
10
use Zanzara\Telegram\Type\Keyboard\InlineKeyboardMarkup;
11
12
/**
13
 * Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by
14
 * the user. Alternatively, you can use input_message_content to send a message with the specified content instead of
15
 * the audio.
16
 *
17
 * More on https://core.telegram.org/bots/api#inlinequeryresultcachedaudio
18
 */
19
class InlineQueryResultCachedAudio extends InlineQueryResult
20
{
21
22
    /**
23
     * A valid file identifier for the audio file
24
     *
25
     * @var string
26
     */
27
    private $audio_file_id;
28
29
    /**
30
     * Optional. Caption, 0-1024 characters after entities parsing
31
     *
32
     * @var string|null
33
     */
34
    private $caption;
35
36
    /**
37
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in
38
     * the media caption.
39
     *
40
     * @var string|null
41
     */
42
    private $parse_mode;
43
44
    /**
45
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
46
     *
47
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
48
     *
49
     * @var \Zanzara\Telegram\Type\MessageEntity[]|null
50
     */
51
    private $caption_entities;
52
53
    /**
54
     * Optional. Inline keyboard attached to the message
55
     *
56
     * @var InlineKeyboardMarkup|null
57
     */
58
    private $reply_markup;
59
60
    /**
61
     * Optional. Content of the message to be sent instead of the audio
62
     *
63
     * @var InputMessageContent|null
64
     */
65
    private $input_message_content;
66
67
    /**
68
     * @return string
69
     */
70
    public function getAudioFileId(): string
71
    {
72
        return $this->audio_file_id;
73
    }
74
75
    /**
76
     * @param string $audio_file_id
77
     */
78
    public function setAudioFileId(string $audio_file_id): void
79
    {
80
        $this->audio_file_id = $audio_file_id;
81
    }
82
83
    /**
84
     * @return string|null
85
     */
86
    public function getCaption(): ?string
87
    {
88
        return $this->caption;
89
    }
90
91
    /**
92
     * @param string|null $caption
93
     */
94
    public function setCaption(?string $caption): void
95
    {
96
        $this->caption = $caption;
97
    }
98
99
    /**
100
     * @return string|null
101
     */
102
    public function getParseMode(): ?string
103
    {
104
        return $this->parse_mode;
105
    }
106
107
    /**
108
     * @param string|null $parse_mode
109
     */
110
    public function setParseMode(?string $parse_mode): void
111
    {
112
        $this->parse_mode = $parse_mode;
113
    }
114
115
    /**
116
     * @return InlineKeyboardMarkup|null
117
     */
118
    public function getReplyMarkup(): ?InlineKeyboardMarkup
119
    {
120
        return $this->reply_markup;
121
    }
122
123
    /**
124
     * @param InlineKeyboardMarkup|null $reply_markup
125
     */
126
    public function setReplyMarkup(?InlineKeyboardMarkup $reply_markup): void
127
    {
128
        $this->reply_markup = $reply_markup;
129
    }
130
131
    /**
132
     * @return InputMessageContent|null
133
     */
134
    public function getInputMessageContent(): ?InputMessageContent
135
    {
136
        return $this->input_message_content;
137
    }
138
139
    /**
140
     * @param InputMessageContent|null $input_message_content
141
     */
142
    public function setInputMessageContent(?InputMessageContent $input_message_content): void
143
    {
144
        $this->input_message_content = $input_message_content;
145
    }
146
147
    /**
148
     * @return \Zanzara\Telegram\Type\MessageEntity[]|null
149
     */
150
    public function getCaptionEntities(): ?array
151
    {
152
        return $this->caption_entities;
153
    }
154
155
    /**
156
     * @param \Zanzara\Telegram\Type\MessageEntity[]|null $caption_entities
157
     */
158
    public function setCaptionEntities(?array $caption_entities): void
159
    {
160
        $this->caption_entities = $caption_entities;
161
    }
162
163
}