Completed
Push — develop ( 23b8a0...80c8c3 )
by Michele
11:06
created

InlineQueryResultPhoto::setCaptionEntities()   A

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\InlineQueryResult;
6
7
use Zanzara\Telegram\Type\Input\InputMessageContent;
8
use Zanzara\Telegram\Type\Keyboard\InlineKeyboardMarkup;
9
10
/**
11
 * Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively,
12
 * you can use input_message_content to send a message with the specified content instead of the photo.
13
 *
14
 * More on https://core.telegram.org/bots/api#inlinequeryresultphoto
15
 */
16
class InlineQueryResultPhoto extends InlineQueryResult
17
{
18
19
    /**
20
     * A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
21
     *
22
     * @var string
23
     */
24
    private $photo_url;
25
26
    /**
27
     * URL of the thumbnail for the photo
28
     *
29
     * @var string
30
     */
31
    private $thumb_url;
32
33
    /**
34
     * Optional. Width of the photo
35
     *
36
     * @var int|null
37
     */
38
    private $photo_width;
39
40
    /**
41
     * Optional. Height of the photo
42
     *
43
     * @var int|null
44
     */
45
    private $photo_height;
46
47
    /**
48
     * Optional. Title for the result
49
     *
50
     * @var string|null
51
     */
52
    private $title;
53
54
    /**
55
     * Optional. Short description of the result
56
     *
57
     * @var string|null
58
     */
59
    private $description;
60
61
    /**
62
     * Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
63
     *
64
     * @var string|null
65
     */
66
    private $caption;
67
68
    /**
69
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in
70
     * the media caption.
71
     *
72
     * @var string|null
73
     */
74
    private $parse_mode;
75
76
    /**
77
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
78
     *
79
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
80
     *
81
     * @var \Zanzara\Telegram\Type\MessageEntity[]|null
82
     */
83
    private $caption_entities;
84
85
    /**
86
     * Optional. Inline keyboard attached to the message
87
     *
88
     * @var InlineKeyboardMarkup|null
89
     */
90
    private $reply_markup;
91
92
    /**
93
     * Optional. Content of the message to be sent instead of the photo
94
     *
95
     * @var InputMessageContent|null
96
     */
97
    private $input_message_content;
98
99
    /**
100
     * @return string
101
     */
102
    public function getPhotoUrl(): string
103
    {
104
        return $this->photo_url;
105
    }
106
107
    /**
108
     * @param string $photo_url
109
     */
110
    public function setPhotoUrl(string $photo_url): void
111
    {
112
        $this->photo_url = $photo_url;
113
    }
114
115
    /**
116
     * @return string
117
     */
118
    public function getThumbUrl(): string
119
    {
120
        return $this->thumb_url;
121
    }
122
123
    /**
124
     * @param string $thumb_url
125
     */
126
    public function setThumbUrl(string $thumb_url): void
127
    {
128
        $this->thumb_url = $thumb_url;
129
    }
130
131
    /**
132
     * @return int|null
133
     */
134
    public function getPhotoWidth(): ?int
135
    {
136
        return $this->photo_width;
137
    }
138
139
    /**
140
     * @param int|null $photo_width
141
     */
142
    public function setPhotoWidth(?int $photo_width): void
143
    {
144
        $this->photo_width = $photo_width;
145
    }
146
147
    /**
148
     * @return int|null
149
     */
150
    public function getPhotoHeight(): ?int
151
    {
152
        return $this->photo_height;
153
    }
154
155
    /**
156
     * @param int|null $photo_height
157
     */
158
    public function setPhotoHeight(?int $photo_height): void
159
    {
160
        $this->photo_height = $photo_height;
161
    }
162
163
    /**
164
     * @return string|null
165
     */
166
    public function getTitle(): ?string
167
    {
168
        return $this->title;
169
    }
170
171
    /**
172
     * @param string|null $title
173
     */
174
    public function setTitle(?string $title): void
175
    {
176
        $this->title = $title;
177
    }
178
179
    /**
180
     * @return string|null
181
     */
182
    public function getDescription(): ?string
183
    {
184
        return $this->description;
185
    }
186
187
    /**
188
     * @param string|null $description
189
     */
190
    public function setDescription(?string $description): void
191
    {
192
        $this->description = $description;
193
    }
194
195
    /**
196
     * @return string|null
197
     */
198
    public function getCaption(): ?string
199
    {
200
        return $this->caption;
201
    }
202
203
    /**
204
     * @param string|null $caption
205
     */
206
    public function setCaption(?string $caption): void
207
    {
208
        $this->caption = $caption;
209
    }
210
211
    /**
212
     * @return string|null
213
     */
214
    public function getParseMode(): ?string
215
    {
216
        return $this->parse_mode;
217
    }
218
219
    /**
220
     * @param string|null $parse_mode
221
     */
222
    public function setParseMode(?string $parse_mode): void
223
    {
224
        $this->parse_mode = $parse_mode;
225
    }
226
227
    /**
228
     * @return InlineKeyboardMarkup|null
229
     */
230
    public function getReplyMarkup(): ?InlineKeyboardMarkup
231
    {
232
        return $this->reply_markup;
233
    }
234
235
    /**
236
     * @param InlineKeyboardMarkup|null $reply_markup
237
     */
238
    public function setReplyMarkup(?InlineKeyboardMarkup $reply_markup): void
239
    {
240
        $this->reply_markup = $reply_markup;
241
    }
242
243
    /**
244
     * @return InputMessageContent|null
245
     */
246
    public function getInputMessageContent(): ?InputMessageContent
247
    {
248
        return $this->input_message_content;
249
    }
250
251
    /**
252
     * @param InputMessageContent|null $input_message_content
253
     */
254
    public function setInputMessageContent(?InputMessageContent $input_message_content): void
255
    {
256
        $this->input_message_content = $input_message_content;
257
    }
258
259
    /**
260
     * @return \Zanzara\Telegram\Type\MessageEntity[]|null
261
     */
262
    public function getCaptionEntities(): ?array
263
    {
264
        return $this->caption_entities;
265
    }
266
267
    /**
268
     * @param \Zanzara\Telegram\Type\MessageEntity[]|null $caption_entities
269
     */
270
    public function setCaptionEntities(?array $caption_entities): void
271
    {
272
        $this->caption_entities = $caption_entities;
273
    }
274
275
}