Completed
Push — develop ( f04484...39ae35 )
by Michele
114:31 queued 112:23
created

InlineQueryResultGif::setReplyMarkup()   A

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\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 animated GIF file. By default, this animated GIF file will be sent by the user with optional
12
 * caption. Alternatively, you can use input_message_content to send a message with the specified content instead of
13
 * the animation.
14
 *
15
 * More on https://core.telegram.org/bots/api#inlinequeryresultgif
16
 */
17
class InlineQueryResultGif extends InlineQueryResult
18
{
19
20
    /**
21
     * A valid URL for the GIF file. File size must not exceed 1MB
22
     *
23
     * @var string
24
     */
25
    private $gif_url;
26
27
    /**
28
     * Optional. Width of the GIF
29
     *
30
     * @var int|null
31
     */
32
    private $gif_width;
33
34
    /**
35
     * Optional. Height of the GIF
36
     *
37
     * @var int|null
38
     */
39
    private $gif_height;
40
41
    /**
42
     * Optional. Duration of the GIF
43
     *
44
     * @var int|null
45
     */
46
    private $gif_duration;
47
48
    /**
49
     * URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result.
50
     *
51
     * @var string
52
     */
53
    private $thumb_url;
54
55
    /**
56
     * Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to
57
     * “image/jpeg”.
58
     *
59
     * @var string|null
60
     */
61
    private $thumb_mime_type;
62
63
    /**
64
     * Optional. Title for the result
65
     *
66
     * @var string|null
67
     */
68
    private $title;
69
70
    /**
71
     * Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
72
     *
73
     * @var string|null
74
     */
75
    private $caption;
76
77
    /**
78
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in
79
     * the media caption.
80
     *
81
     * @var string|null
82
     */
83
    private $parse_mode;
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 GIF animation
94
     *
95
     * @var InputMessageContent|null
96
     */
97
    private $input_message_content;
98
99
    /**
100
     * @return string
101
     */
102
    public function getGifUrl(): string
103
    {
104
        return $this->gif_url;
105
    }
106
107
    /**
108
     * @param string $gif_url
109
     */
110
    public function setGifUrl(string $gif_url): void
111
    {
112
        $this->gif_url = $gif_url;
113
    }
114
115
    /**
116
     * @return int|null
117
     */
118
    public function getGifWidth(): ?int
119
    {
120
        return $this->gif_width;
121
    }
122
123
    /**
124
     * @param int|null $gif_width
125
     */
126
    public function setGifWidth(?int $gif_width): void
127
    {
128
        $this->gif_width = $gif_width;
129
    }
130
131
    /**
132
     * @return int|null
133
     */
134
    public function getGifHeight(): ?int
135
    {
136
        return $this->gif_height;
137
    }
138
139
    /**
140
     * @param int|null $gif_height
141
     */
142
    public function setGifHeight(?int $gif_height): void
143
    {
144
        $this->gif_height = $gif_height;
145
    }
146
147
    /**
148
     * @return int|null
149
     */
150
    public function getGifDuration(): ?int
151
    {
152
        return $this->gif_duration;
153
    }
154
155
    /**
156
     * @param int|null $gif_duration
157
     */
158
    public function setGifDuration(?int $gif_duration): void
159
    {
160
        $this->gif_duration = $gif_duration;
161
    }
162
163
    /**
164
     * @return string
165
     */
166
    public function getThumbUrl(): string
167
    {
168
        return $this->thumb_url;
169
    }
170
171
    /**
172
     * @param string $thumb_url
173
     */
174
    public function setThumbUrl(string $thumb_url): void
175
    {
176
        $this->thumb_url = $thumb_url;
177
    }
178
179
    /**
180
     * @return string|null
181
     */
182
    public function getTitle(): ?string
183
    {
184
        return $this->title;
185
    }
186
187
    /**
188
     * @param string|null $title
189
     */
190
    public function setTitle(?string $title): void
191
    {
192
        $this->title = $title;
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 string|null
261
     */
262
    public function getThumbMimeType(): ?string
263
    {
264
        return $this->thumb_mime_type;
265
    }
266
267
    /**
268
     * @param string|null $thumb_mime_type
269
     */
270
    public function setThumbMimeType(?string $thumb_mime_type): void
271
    {
272
        $this->thumb_mime_type = $thumb_mime_type;
273
    }
274
275
}