Completed
Push — master ( be22ff...83e3a1 )
by Alexander
20s queued 15s
created

Message::setWebAppData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\InvalidArgumentException;
7
use TelegramBot\Api\TypeInterface;
8
use TelegramBot\Api\Types\Inline\InlineKeyboardMarkup;
9
use TelegramBot\Api\Types\Payments\Invoice;
10
use TelegramBot\Api\Types\Payments\SuccessfulPayment;
11
12
class Message extends BaseType implements TypeInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     *
17
     * @var array
18
     */
19
    protected static $requiredParams = ['message_id', 'date', 'chat'];
20
21
    /**
22
     * {@inheritdoc}
23
     *
24
     * @var array
25
     */
26
    protected static $map = [
27
        'message_id' => true,
28
        'from' => User::class,
29
        'date' => true,
30
        'chat' => Chat::class,
31
        'forward_from' => User::class,
32
        'forward_from_chat' => Chat::class,
33
        'forward_from_message_id' => true,
34
        'forward_date' => true,
35
        'forward_signature' => true,
36
        'forward_sender_name' => true,
37
        'reply_to_message' => Message::class,
38
        'via_bot' => User::class,
39
        'edit_date' => true,
40
        'media_group_id' => true,
41
        'author_signature' => true,
42
        'text' => true,
43
        'entities' => ArrayOfMessageEntity::class,
44
        'caption_entities' => ArrayOfMessageEntity::class,
45
        'audio' => Audio::class,
46
        'document' => Document::class,
47
        'animation' => Animation::class,
48
        'photo' => ArrayOfPhotoSize::class,
49
        'sticker' => Sticker::class,
50
        'video' => Video::class,
51
        'voice' => Voice::class,
52
        'caption' => true,
53
        'contact' => Contact::class,
54
        'location' => Location::class,
55
        'venue' => Venue::class,
56
        'poll' => Poll::class,
57
        'dice' => Dice::class,
58
        'new_chat_members' => ArrayOfUser::class,
59
        'left_chat_member' => User::class,
60
        'new_chat_title' => true,
61
        'new_chat_photo' => ArrayOfPhotoSize::class,
62
        'delete_chat_photo' => true,
63
        'group_chat_created' => true,
64
        'supergroup_chat_created' => true,
65
        'channel_chat_created' => true,
66
        'migrate_to_chat_id' => true,
67
        'migrate_from_chat_id' => true,
68
        'pinned_message' => Message::class,
69
        'invoice' => Invoice::class,
70
        'successful_payment' => SuccessfulPayment::class,
71
        'connected_website' => true,
72
        'forum_topic_created' => ForumTopicCreated::class,
73
        'forum_topic_closed' => ForumTopicClosed::class,
74
        'forum_topic_reopened' => ForumTopicReopened::class,
75
        'is_topic_message' => true,
76
        'message_thread_id' => true,
77
        'web_app_data' => WebAppData::class,
78
        'reply_markup' => InlineKeyboardMarkup::class,
79
    ];
80
81
    /**
82
     * Unique message identifier
83
     *
84
     * @var int|float
85
     */
86
    protected $messageId;
87
88
    /**
89
     * Optional. Sender name. Can be empty for messages sent to channels
90
     *
91
     * @var \TelegramBot\Api\Types\User|null
92
     */
93
    protected $from;
94
95
    /**
96
     * Date the message was sent in Unix time
97
     *
98
     * @var int
99
     */
100
    protected $date;
101
102
    /**
103
     * Conversation the message belongs to — user in case of a private message, GroupChat in case of a group
104
     *
105
     * @var \TelegramBot\Api\Types\Chat
106
     */
107
    protected $chat;
108
109
    /**
110
     * Optional. For forwarded messages, sender of the original message
111
     *
112
     * @var \TelegramBot\Api\Types\User|null
113
     */
114
    protected $forwardFrom;
115
116
    /**
117
     * Optional. For messages forwarded from channels, information about
118
     * the original channel
119
     *
120
     * @var \TelegramBot\Api\Types\Chat|null
121
     */
122
    protected $forwardFromChat;
123
124
    /**
125
     * Optional. For messages forwarded from channels, identifier of
126
     * the original message in the channel
127
     *
128
     * @var int|null
129
     */
130
    protected $forwardFromMessageId;
131
132
    /**
133
     * Optional. For messages forwarded from channels, signature of the post author if present
134
     *
135
     * @var string|null
136
     */
137
    protected $forwardSignature;
138
139
    /**
140
     * Optional. Sender's name for messages forwarded from users who disallow adding a link to their account
141
     * in forwarded messages
142
     *
143
     * @var string|null
144
     */
145
    protected $forwardSenderName;
146
147
    /**
148
     * Optional. For forwarded messages, date the original message was sent in Unix time
149
     *
150
     * @var int|null
151
     */
152
    protected $forwardDate;
153
154
    /**
155
     * Optional. For replies, the original message. Note that the Message object in this field will not contain further
156
     * reply_to_message fields even if it itself is a reply.
157
     *
158
     * @var \TelegramBot\Api\Types\Message|null
159
     */
160
    protected $replyToMessage;
161
162
    /**
163
     * Optional. Bot through which the message was sent.
164
     *
165
     * @var \TelegramBot\Api\Types\User|null
166
     */
167
    protected $viaBot;
168
169
    /**
170
     * Optional. Date the message was last edited in Unix time
171
     *
172
     * @var int|null
173
     */
174
    protected $editDate;
175
176
    /**
177
     * Optional. The unique identifier of a media message group
178
     * this message belongs to
179
     *
180
     * @var int|null
181
     */
182
    protected $mediaGroupId;
183
184
    /**
185
     * Optional. Signature of the post author for messages in channels
186
     *
187
     * @var string|null
188
     */
189
    protected $authorSignature;
190
191
    /**
192
     * Optional. For text messages, the actual UTF-8 text of the message
193
     *
194
     * @var string|null
195
     */
196
    protected $text;
197
198
    /**
199
     * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.
200
     * array of \TelegramBot\Api\Types\MessageEntity
201
     *
202
     * @var array|null
203
     */
204
    protected $entities;
205
206
    /**
207
     * Optional. For messages with a caption, special entities like usernames,
208
     * URLs, bot commands, etc. that appear in the caption
209
     *
210
     * @var ArrayOfMessageEntity|null
211
     */
212
    protected $captionEntities;
213
214
    /**
215
     * Optional. Message is an audio file, information about the file
216
     *
217
     * @var \TelegramBot\Api\Types\Audio|null
218
     */
219
    protected $audio;
220
221
    /**
222
     * Optional. Message is a general file, information about the file
223
     *
224
     * @var \TelegramBot\Api\Types\Document|null
225
     */
226
    protected $document;
227
228
    /**
229
     * Optional. Message is a animation, information about the animation
230
     *
231
     * @var \TelegramBot\Api\Types\Animation|null
232
     */
233
    protected $animation;
234
235
    /**
236
     * Optional. Message is a photo, available sizes of the photo
237
     * array of \TelegramBot\Api\Types\Photo
238
     *
239
     * @var array|null
240
     */
241
    protected $photo;
242
243
    /**
244
     * Optional. Message is a sticker, information about the sticker
245
     *
246
     * @var \TelegramBot\Api\Types\Sticker|null
247
     */
248
    protected $sticker;
249
250
    /**
251
     * Optional. Message is a video, information about the video
252
     *
253
     * @var \TelegramBot\Api\Types\Video|null
254
     */
255
    protected $video;
256
257
    /**
258
     * Optional. Message is a voice message, information about the file
259
     *
260
     * @var \TelegramBot\Api\Types\Voice|null
261
     */
262
    protected $voice;
263
264
    /**
265
     * Optional. Text description of the video (usually empty)
266
     *
267
     * @var string|null
268
     */
269
    protected $caption;
270
271
    /**
272
     * Optional. Message is a shared contact, information about the contact
273
     *
274
     * @var \TelegramBot\Api\Types\Contact|null
275
     */
276
    protected $contact;
277
278
    /**
279
     * Optional. Message is a shared location, information about the location
280
     *
281
     * @var \TelegramBot\Api\Types\Location|null
282
     */
283
    protected $location;
284
285
    /**
286
     * Optional. Message is a venue, information about the venue
287
     *
288
     * @var \TelegramBot\Api\Types\Venue|null
289
     */
290
    protected $venue;
291
292
    /**
293
     * Optional. Message is a native poll, information about the poll
294
     *
295
     * @var \TelegramBot\Api\Types\Poll|null
296
     */
297
    protected $poll;
298
299
    /**
300
     * Optional. Message is a dice with random value from 1 to 6
301
     *
302
     * @var \TelegramBot\Api\Types\Dice|null
303
     */
304
    protected $dice;
305
306
    /**
307
     * Optional. New members that were added to the group or supergroup and information about them
308
     * (the bot itself may be one of these members)
309
     * array of \TelegramBot\Api\Types\User
310
     *
311
     * @var array|null
312
     */
313
    protected $newChatMembers;
314
315
    /**
316
     * Optional. A member was removed from the group, information about them (this member may be bot itself)
317
     *
318
     * @var \TelegramBot\Api\Types\User|null
319
     */
320
    protected $leftChatMember;
321
322
    /**
323
     * Optional. A group title was changed to this value
324
     *
325
     * @var string|null
326
     */
327
    protected $newChatTitle;
328
329
    /**
330
     * Optional. A group photo was change to this value
331
     *
332
     * @var PhotoSize[]|null
333
     */
334
    protected $newChatPhoto;
335
336
    /**
337
     * Optional. Informs that the group photo was deleted
338
     *
339
     * @var bool|null
340
     */
341
    protected $deleteChatPhoto;
342
343
    /**
344
     * Optional. Informs that the group has been created
345
     *
346
     * @var bool|null
347
     */
348
    protected $groupChatCreated;
349
350
    /**
351
     * Optional. Service message: the supergroup has been created
352
     *
353
     * @var bool|null
354
     */
355
    protected $supergroupChatCreated;
356
357
    /**
358
     * Optional. Service message: the channel has been created
359
     *
360
     * @var bool|null
361
     */
362
    protected $channelChatCreated;
363
364
    /**
365
     * Optional. The group has been migrated to a supergroup with the specified identifier,
366
     * not exceeding 1e13 by absolute value
367
     *
368
     * @var int|null
369
     */
370
    protected $migrateToChatId;
371
372
    /**
373
     * Optional. The supergroup has been migrated from a group with the specified identifier,
374
     * not exceeding 1e13 by absolute value
375
     *
376
     * @var int|null
377
     */
378
    protected $migrateFromChatId;
379
380
    /**
381
     * Optional. Specified message was pinned.Note that the Message object in this field
382
     * will not contain further reply_to_message fields even if it is itself a reply.
383
     *
384
     * @var Message|null
385
     */
386
    protected $pinnedMessage;
387
388
    /**
389
     * Optional. Message is an invoice for a payment, information about the invoice.
390
     *
391
     * @var Invoice|null
392
     */
393
    protected $invoice;
394
395
    /**
396
     * Optional. Message is a service message about a successful payment, information about the payment.
397
     *
398
     * @var SuccessfulPayment|null
399
     */
400
    protected $successfulPayment;
401
402
    /**
403
     * Optional. The domain name of the website on which the user has logged in.
404
     *
405
     * @var string|null
406
     */
407
    protected $connectedWebsite;
408
409
    /**
410
     * Optional. Service message: data sent by a Web App
411
     *
412
     * @var WebAppData|null
413
     */
414
    protected $webAppData;
415
416
    /**
417
     * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
418
     *
419
     * @var InlineKeyboardMarkup|null
420
     */
421
    protected $replyMarkup;
422
423
    /**
424
     * Optional. Service message: forum topic created
425
     *
426
     * @var ForumTopicCreated|null
427
     */
428
    protected $forumTopicCreated;
429
430
    /**
431
     * Optional. Service message: forum topic closed
432
     *
433
     * @var ForumTopicReopened|null
434
     */
435
    protected $forumTopicReopened;
436
437
    /**
438
     * Optional. Service message: forum topic reopened
439
     *
440
     * @var ForumTopicClosed|null
441
     */
442
    protected $forumTopicClosed;
443
444
    /**
445
     * Optional. True, if the message is sent to a forum topic
446
     *
447
     * @var bool|null
448
     */
449
    protected $isTopicMessage;
450
451
    /**
452
     * Optional. Unique identifier of a message thread to which the message belongs; for supergroups only
453 1
     *
454
     * @var int|null
455 1
     */
456
    protected $messageThreadId;
457
458
    /**
459
     * @return int|float
460
     */
461
    public function getMessageId()
462
    {
463 16
        return $this->messageId;
464
    }
465 16
466 15
    /**
467 15
     * @param mixed $messageId
468 1
     * @return void
469
     * @throws InvalidArgumentException
470 15
     */
471
    public function setMessageId($messageId)
472
    {
473
        if (is_integer($messageId) || is_float($messageId)) {
474
            $this->messageId = $messageId;
475 1
        } else {
476
            throw new InvalidArgumentException();
477 1
        }
478
    }
479
480
    /**
481
     * @return User|null
482
     */
483 14
    public function getFrom()
484
    {
485 14
        return $this->from;
486 14
    }
487
488
    /**
489
     * @param User $from
490
     * @return void
491 2
     */
492
    public function setFrom(User $from)
493 2
    {
494
        $this->from = $from;
495
    }
496
497
    /**
498
     * @return Chat
499 16
     */
500
    public function getChat()
501 16
    {
502 16
        return $this->chat;
503
    }
504
505
    /**
506
     * @param Chat $chat
507 1
     * @return void
508
     */
509 1
    public function setChat(Chat $chat)
510
    {
511
        $this->chat = $chat;
512
    }
513
514
    /**
515
     * @return int
516
     */
517 15
    public function getDate()
518
    {
519 15
        return $this->date;
520 14
    }
521 14
522 1
    /**
523
     * @param mixed $date
524 14
     * @return void
525
     * @throws InvalidArgumentException
526
     */
527
    public function setDate($date)
528
    {
529 1
        if (is_int($date)) {
530
            $this->date = $date;
531 1
        } else {
532
            throw new InvalidArgumentException();
533
        }
534
    }
535
536
    /**
537 2
     * @return User|null
538
     */
539 2
    public function getForwardFrom()
540 2
    {
541
        return $this->forwardFrom;
542
    }
543
544
    /**
545
     * @param User $forwardFrom
546
     * @return void
547
     */
548
    public function setForwardFrom(User $forwardFrom)
549
    {
550
        $this->forwardFrom = $forwardFrom;
551
    }
552
553
    /**
554
     * @return Chat|null
555
     */
556
    public function getForwardFromChat()
557
    {
558
        return $this->forwardFromChat;
559
    }
560
561
    /**
562
     * @param Chat $forwardFromChat
563
     * @return void
564
     */
565
    public function setForwardFromChat(Chat $forwardFromChat)
566
    {
567
        $this->forwardFromChat = $forwardFromChat;
568
    }
569
570
    /**
571
     * @return int|null
572
     */
573
    public function getForwardFromMessageId()
574
    {
575
        return $this->forwardFromMessageId;
576
    }
577
578
    /**
579
     * @param int $forwardFromMessageId
580
     * @return void
581
     */
582
    public function setForwardFromMessageId($forwardFromMessageId)
583
    {
584
        $this->forwardFromMessageId = $forwardFromMessageId;
585
    }
586
587
    /**
588
     * @return null|string
589
     */
590
    public function getForwardSignature()
591
    {
592
        return $this->forwardSignature;
593
    }
594
595
    /**
596
     * @param string $forwardSignature
597
     * @return void
598
     */
599
    public function setForwardSignature($forwardSignature)
600
    {
601
        $this->forwardSignature = $forwardSignature;
602
    }
603
604
    /**
605
     * @return null|string
606
     */
607
    public function getForwardSenderName()
608
    {
609 1
        return $this->forwardSenderName;
610
    }
611 1
612
    /**
613
     * @param string $forwardSenderName
614
     * @return void
615
     */
616
    public function setForwardSenderName($forwardSenderName)
617
    {
618
        $this->forwardSenderName = $forwardSenderName;
619 3
    }
620
621 3
    /**
622 2
     * @return int|null
623 2
     */
624 1
    public function getForwardDate()
625
    {
626 2
        return $this->forwardDate;
627
    }
628
629
    /**
630
     * @param mixed $forwardDate
631 1
     * @return void
632
     * @throws InvalidArgumentException
633 1
     */
634
    public function setForwardDate($forwardDate)
635
    {
636
        if (is_int($forwardDate)) {
637
            $this->forwardDate = $forwardDate;
638
        } else {
639 2
            throw new InvalidArgumentException();
640
        }
641 2
    }
642 2
643
    /**
644
     * @return null|self
645
     */
646
    public function getReplyToMessage()
647 2
    {
648
        return $this->replyToMessage;
649 2
    }
650
651
    /**
652
     * @param Message $replyToMessage
653
     * @return void
654
     */
655 3
    public function setReplyToMessage(Message $replyToMessage)
656
    {
657 3
        $this->replyToMessage = $replyToMessage;
658 3
    }
659
660
    /**
661
     * @return User|null
662
     */
663
    public function getViaBot()
664
    {
665
        return $this->viaBot;
666
    }
667
668
    /**
669
     * @param User $viaBot
670
     * @return void
671
     */
672
    public function setViaBot(User $viaBot)
673
    {
674
        $this->viaBot = $viaBot;
675
    }
676
677
    /**
678
     * @return int|null
679
     */
680
    public function getEditDate()
681
    {
682
        return $this->editDate;
683
    }
684
685
    /**
686
     * @param mixed $editDate
687
     * @return void
688
     * @throws InvalidArgumentException
689
     */
690
    public function setEditDate($editDate)
691
    {
692
        if (is_int($editDate)) {
693
            $this->editDate = $editDate;
694
        } else {
695
            throw new InvalidArgumentException();
696
        }
697
    }
698
699
    /**
700
     * @return int|null
701
     */
702
    public function getMediaGroupId()
703
    {
704
        return $this->mediaGroupId;
705
    }
706
707
    /**
708
     * @param int $mediaGroupId
709
     * @return void
710
     */
711
    public function setMediaGroupId($mediaGroupId)
712
    {
713
        $this->mediaGroupId = $mediaGroupId;
714
    }
715
716
    /**
717 7
     * @return null|string
718
     */
719 7
    public function getAuthorSignature()
720
    {
721
        return $this->authorSignature;
722
    }
723
724
    /**
725 5
     * @param string $authorSignature
726
     * @return void
727 5
     */
728 5
    public function setAuthorSignature($authorSignature)
729
    {
730
        $this->authorSignature = $authorSignature;
731
    }
732
733
    /**
734
     * @return null|string
735
     */
736
    public function getText()
737
    {
738
        return $this->text;
739
    }
740
741 1
    /**
742
     * @param string $text
743 1
     * @return void
744 1
     */
745
    public function setText($text)
746
    {
747
        $this->text = $text;
748
    }
749
750
    /**
751
     * @return array|null
752
     */
753
    public function getEntities()
754
    {
755
        return $this->entities;
756
    }
757
758
    /**
759
     * @param array $entities
760
     * @return void
761
     */
762
    public function setEntities($entities)
763
    {
764
        $this->entities = $entities;
765 1
    }
766
767 1
    /**
768
     * @return ArrayOfMessageEntity|null
769
     */
770
    public function getCaptionEntities()
771
    {
772
        return $this->captionEntities;
773 2
    }
774
775 2
    /**
776 2
     * @param ArrayOfMessageEntity $captionEntities
777
     * @return void
778
     */
779
    public function setCaptionEntities($captionEntities)
780
    {
781 1
        $this->captionEntities = $captionEntities;
782
    }
783 1
784
    /**
785
     * @return Audio|null
786
     */
787
    public function getAudio()
788
    {
789 2
        return $this->audio;
790
    }
791 2
792 2
    /**
793
     * @param Audio $audio
794
     * @return void
795
     */
796
    public function setAudio(Audio $audio)
797
    {
798
        $this->audio = $audio;
799
    }
800
801
    /**
802
     * @return Document|null
803
     */
804
    public function getDocument()
805
    {
806
        return $this->document;
807
    }
808
809
    /**
810
     * @param Document $document
811
     * @return void
812
     */
813 1
    public function setDocument($document)
814
    {
815 1
        $this->document = $document;
816
    }
817
818
    /**
819
     * @return Animation|null
820
     */
821 2
    public function getAnimation()
822
    {
823 2
        return $this->animation;
824 2
    }
825
826
    /**
827
     * @param Animation $animation
828
     * @return void
829 1
     */
830
    public function setAnimation(Animation $animation)
831 1
    {
832
        $this->animation = $animation;
833
    }
834
835
    /**
836
     * @return array|null
837 2
     */
838
    public function getPhoto()
839 2
    {
840 2
        return $this->photo;
841
    }
842
843
    /**
844
     * @param array $photo
845 1
     * @return void
846
     */
847 1
    public function setPhoto(array $photo)
848
    {
849
        $this->photo = $photo;
850
    }
851
852
    /**
853 2
     * @return Sticker|null
854
     */
855 2
    public function getSticker()
856 2
    {
857
        return $this->sticker;
858
    }
859
860
    /**
861 1
     * @param Sticker $sticker
862
     * @return void
863 1
     */
864
    public function setSticker(Sticker $sticker)
865
    {
866
        $this->sticker = $sticker;
867
    }
868
869 2
    /**
870
     * @return Video|null
871 2
     */
872 2
    public function getVideo()
873
    {
874
        return $this->video;
875
    }
876
877 1
    /**
878
     * @param Video $video
879 1
     * @return void
880
     */
881
    public function setVideo(Video $video)
882
    {
883
        $this->video = $video;
884
    }
885 2
886
    /**
887 2
     * @return Voice|null
888 2
     */
889
    public function getVoice()
890
    {
891
        return $this->voice;
892
    }
893 1
894
    /**
895 1
     * @param Voice $voice
896
     * @return void
897
     */
898
    public function setVoice($voice)
899
    {
900
        $this->voice = $voice;
901 2
    }
902
903 2
    /**
904 2
     * @return null|string
905
     */
906
    public function getCaption()
907
    {
908
        return $this->caption;
909 1
    }
910
911 1
    /**
912
     * @param string $caption
913
     * @return void
914
     */
915
    public function setCaption($caption)
916
    {
917 2
        $this->caption = $caption;
918
    }
919 2
920 2
    /**
921
     * @return Contact|null
922
     */
923
    public function getContact()
924
    {
925
        return $this->contact;
926
    }
927
928
    /**
929
     * @param Contact $contact
930
     * @return void
931
     */
932
    public function setContact(Contact $contact)
933
    {
934
        $this->contact = $contact;
935
    }
936
937
    /**
938
     * @return Location|null
939
     */
940
    public function getLocation()
941
    {
942
        return $this->location;
943
    }
944
945
    /**
946
     * @param Location $location
947
     * @return void
948
     */
949
    public function setLocation(Location $location)
950
    {
951
        $this->location = $location;
952
    }
953
954
    /**
955
     * @return Venue|null
956
     */
957 1
    public function getVenue()
958
    {
959 1
        return $this->venue;
960
    }
961
962
    /**
963
     * @param Venue $venue
964
     * @return void
965 2
     */
966
    public function setVenue($venue)
967 2
    {
968 2
        $this->venue = $venue;
969
    }
970
971
    /**
972
     * @return Poll|null
973 1
     */
974
    public function getPoll()
975 1
    {
976
        return $this->poll;
977
    }
978
979
    /**
980
     * @param Poll $poll
981 2
     * @return void
982
     */
983 2
    public function setPoll($poll)
984 2
    {
985
        $this->poll = $poll;
986
    }
987
988
    /**
989 1
     * @return Dice|null
990
     */
991 1
    public function getDice()
992
    {
993
        return $this->dice;
994
    }
995
996
    /**
997 2
     * @param Dice $dice
998
     * @return void
999 2
     */
1000 2
    public function setDice(Dice $dice)
1001
    {
1002
        $this->dice = $dice;
1003
    }
1004
1005 1
    /**
1006
     * @return array|null
1007 1
     */
1008
    public function getNewChatMembers()
1009
    {
1010
        return $this->newChatMembers;
1011
    }
1012
1013 2
    /**
1014
     * @param array $newChatMembers
1015 2
     * @return void
1016 2
     */
1017
    public function setNewChatMembers($newChatMembers)
1018
    {
1019
        $this->newChatMembers = $newChatMembers;
1020
    }
1021 1
1022
    /**
1023 1
     * @return User|null
1024
     */
1025
    public function getLeftChatMember()
1026
    {
1027
        return $this->leftChatMember;
1028
    }
1029 2
1030
    /**
1031 2
     * @param User $leftChatMember
1032 2
     * @return void
1033
     */
1034
    public function setLeftChatMember($leftChatMember)
1035
    {
1036
        $this->leftChatMember = $leftChatMember;
1037 1
    }
1038
1039 1
    /**
1040
     * @return null|string
1041
     */
1042
    public function getNewChatTitle()
1043
    {
1044
        return $this->newChatTitle;
1045 2
    }
1046
1047 2
    /**
1048 2
     * @param string $newChatTitle
1049
     * @return void
1050
     */
1051
    public function setNewChatTitle($newChatTitle)
1052
    {
1053 1
        $this->newChatTitle = $newChatTitle;
1054
    }
1055 1
1056
    /**
1057
     * @return PhotoSize[]|null
1058
     */
1059
    public function getNewChatPhoto()
1060
    {
1061 2
        return $this->newChatPhoto;
1062
    }
1063 2
1064 2
    /**
1065
     * @param PhotoSize[]|null $newChatPhoto
1066
     * @return void
1067
     */
1068
    public function setNewChatPhoto($newChatPhoto)
1069 1
    {
1070
        $this->newChatPhoto = $newChatPhoto;
1071 1
    }
1072
1073
    /**
1074
     * @return bool|null
1075
     */
1076
    public function isDeleteChatPhoto()
1077 2
    {
1078
        return $this->deleteChatPhoto;
1079 2
    }
1080 2
1081
    /**
1082
     * @param mixed $deleteChatPhoto
1083
     * @return void
1084
     */
1085 1
    public function setDeleteChatPhoto($deleteChatPhoto)
1086
    {
1087 1
        $this->deleteChatPhoto = (bool) $deleteChatPhoto;
1088
    }
1089
1090
    /**
1091
     * @return bool|null
1092
     */
1093 2
    public function isGroupChatCreated()
1094
    {
1095 2
        return $this->groupChatCreated;
1096 2
    }
1097
1098
    /**
1099
     * @param mixed $groupChatCreated
1100
     * @return void
1101 1
     */
1102
    public function setGroupChatCreated($groupChatCreated)
1103 1
    {
1104
        $this->groupChatCreated = (bool) $groupChatCreated;
1105
    }
1106
1107
    /**
1108
     * @return bool|null
1109 2
     */
1110
    public function isSupergroupChatCreated()
1111 2
    {
1112 2
        return $this->supergroupChatCreated;
1113
    }
1114
1115
    /**
1116
     * @param bool $supergroupChatCreated
1117 1
     * @return void
1118
     */
1119 1
    public function setSupergroupChatCreated($supergroupChatCreated)
1120
    {
1121
        $this->supergroupChatCreated = $supergroupChatCreated;
1122
    }
1123
1124
    /**
1125 4
     * @return bool|null
1126
     */
1127 4
    public function isChannelChatCreated()
1128 4
    {
1129
        return $this->channelChatCreated;
1130
    }
1131
1132
    /**
1133
     * @param bool $channelChatCreated
1134
     * @return void
1135
     */
1136
    public function setChannelChatCreated($channelChatCreated)
1137
    {
1138
        $this->channelChatCreated = $channelChatCreated;
1139
    }
1140
1141
    /**
1142
     * @return int|null
1143
     */
1144
    public function getMigrateToChatId()
1145
    {
1146
        return $this->migrateToChatId;
1147
    }
1148
1149
    /**
1150
     * @param int $migrateToChatId
1151
     * @return void
1152
     */
1153
    public function setMigrateToChatId($migrateToChatId)
1154
    {
1155
        $this->migrateToChatId = $migrateToChatId;
1156
    }
1157
1158
    /**
1159
     * @return int|null
1160
     */
1161
    public function getMigrateFromChatId()
1162
    {
1163
        return $this->migrateFromChatId;
1164
    }
1165
1166
    /**
1167
     * @param int $migrateFromChatId
1168
     * @return void
1169
     */
1170
    public function setMigrateFromChatId($migrateFromChatId)
1171
    {
1172
        $this->migrateFromChatId = $migrateFromChatId;
1173
    }
1174
1175
    /**
1176
     * @return null|self
1177
     */
1178
    public function getPinnedMessage()
1179
    {
1180
        return $this->pinnedMessage;
1181
    }
1182
1183
    /**
1184
     * @param Message $pinnedMessage
1185
     * @return void
1186
     */
1187
    public function setPinnedMessage($pinnedMessage)
1188
    {
1189
        $this->pinnedMessage = $pinnedMessage;
1190
    }
1191
1192
    /**
1193
     * @author MY
1194
     *
1195
     * @return Invoice|null
1196
     */
1197
    public function getInvoice()
1198
    {
1199
        return $this->invoice;
1200
    }
1201
1202
    /**
1203
     * @author MY
1204
     * @param Invoice $invoice
1205
     * @return void
1206
     */
1207
    public function setInvoice($invoice)
1208
    {
1209
        $this->invoice = $invoice;
1210
    }
1211
1212
    /**
1213
     * @author MY
1214
     *
1215
     * @return SuccessfulPayment|null
1216
     */
1217
    public function getSuccessfulPayment()
1218
    {
1219
        return $this->successfulPayment;
1220
    }
1221
1222
    /**
1223
     * @author MY
1224
     * @param SuccessfulPayment $successfulPayment
1225
     * @return void
1226
     */
1227
    public function setSuccessfulPayment($successfulPayment)
1228
    {
1229
        $this->successfulPayment = $successfulPayment;
1230
    }
1231
1232
    /**
1233
     * @return null|string
1234
     */
1235
    public function getConnectedWebsite()
1236
    {
1237
        return $this->connectedWebsite;
1238
    }
1239
1240
    /**
1241
     * @param string $connectedWebsite
1242
     * @return void
1243
     */
1244
    public function setConnectedWebsite($connectedWebsite)
1245
    {
1246
        $this->connectedWebsite = $connectedWebsite;
1247
    }
1248
1249
    /**
1250
     * @return WebAppData|null
1251
     */
1252
    public function getWebAppData()
1253
    {
1254
        return $this->webAppData;
1255
    }
1256
1257
    /**
1258
     * @param WebAppData|null $webAppData
1259
     * @return void
1260
     */
1261
    public function setWebAppData($webAppData)
1262
    {
1263
        $this->webAppData = $webAppData;
1264
    }
1265
1266
    /**
1267
     * @return InlineKeyboardMarkup|null
1268
     */
1269
    public function getReplyMarkup()
1270
    {
1271
        return $this->replyMarkup;
1272
    }
1273
1274
    /**
1275
     * @param InlineKeyboardMarkup $replyMarkup
1276
     * @return void
1277
     */
1278
    public function setReplyMarkup($replyMarkup)
1279
    {
1280
        $this->replyMarkup = $replyMarkup;
1281
    }
1282
1283
    /**
1284
     * @return ForumTopicCreated|null
1285
     */
1286
    public function getForumTopicCreated()
1287
    {
1288
        return $this->forumTopicCreated;
1289
    }
1290
1291
    /**
1292
     * @param ForumTopicCreated $forumTopicCreated
1293
     * @return void
1294
     */
1295
    public function setForumTopicCreated($forumTopicCreated)
1296
    {
1297
        $this->forumTopicCreated = $forumTopicCreated;
1298
    }
1299
1300
    /**
1301
     * @return ForumTopicClosed|null
1302
     */
1303
    public function getForumTopicClosed()
1304
    {
1305
        return $this->forumTopicClosed;
1306
    }
1307
1308
    /**
1309
     * @param ForumTopicClosed $forumTopicClosed
1310
     * @return void
1311
     */
1312
    public function setForumTopicClosed($forumTopicClosed)
1313
    {
1314
        $this->forumTopicClosed = $forumTopicClosed;
1315
    }
1316
1317
    /**
1318
     * @return ForumTopicReopened|null
1319
     */
1320
    public function getForumTopicReopened()
1321
    {
1322
        return $this->forumTopicReopened;
1323
    }
1324
1325
    /**
1326
     * @param ForumTopicReopened $forumTopicReopened
1327
     * @return void
1328
     */
1329
    public function setForumTopicReopened($forumTopicReopened)
1330
    {
1331
        $this->forumTopicReopened = $forumTopicReopened;
1332
    }
1333
1334
    /**
1335
     * @return bool|null
1336
     */
1337
    public function getIsTopicMessage()
1338
    {
1339
        return $this->isTopicMessage;
1340
    }
1341
1342
    /**
1343
     * @param bool $isTopicMessage
1344
     * @return void
1345
     */
1346
    public function setIsTopicMessage($isTopicMessage)
1347
    {
1348
        $this->isTopicMessage = $isTopicMessage;
1349
    }
1350
1351
    /**
1352
     * @return int|null
1353
     */
1354
    public function getMessageThreadId()
1355
    {
1356
        return $this->messageThreadId;
1357
    }
1358
1359
    /**
1360
     * @param int|null $messageThreadId
1361
     * @return void
1362
     */
1363
    public function setMessageThreadId($messageThreadId)
1364
    {
1365
        $this->messageThreadId = $messageThreadId;
1366
    }
1367
}
1368