001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026 002/* 003 * Copyright (c) 2010-2026 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types; 024 025import static java.util.Collections.unmodifiableList; 026import java.util.ArrayList; 027import java.util.Date; 028import java.util.List; 029import com.restfb.Facebook; 030import com.restfb.JsonMapper.JsonMappingCompleted; 031import com.restfb.json.Json; 032import com.restfb.json.JsonValue; 033import com.restfb.types.features.HasCreatedTime; 034import com.restfb.types.features.HasFrom; 035import com.restfb.types.features.HasMessage; 036 037/** 038 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/message/">Message Graph API type</a> 039 * . 040 * 041 * @author <a href="http://restfb.com">Mark Allen</a> 042 * @author Felipe Kurkowski 043 * @author alockhart 044 */ 045public class Message extends FacebookType implements HasCreatedTime, HasFrom, HasMessage { 046 /** 047 * The time the message was initially created. 048 */ 049 @Facebook("created_time") 050 private Date createdTime; 051 /** 052 * The subject of the message. 053 */ 054 @Facebook 055 private String subject; 056 /** 057 * The sender of this message 058 */ 059 @Facebook 060 private ExtendedReferenceType from; 061 @Facebook 062 private List<ExtendedReferenceType> to = new ArrayList<>(); 063 @Facebook("is_unsupported") 064 private boolean isUnsupported = false; 065 /** 066 * The text of the message 067 */ 068 @Facebook 069 private String message; 070 /** 071 * Sticker contained in the message. 072 */ 073 @Facebook 074 private String sticker; 075 @Facebook 076 private List<Reaction> reactions = new ArrayList<>(); 077 @Facebook 078 private List<Attachment> attachments = new ArrayList<>(); 079 @Facebook 080 private List<Share> shares = new ArrayList<>(); 081 @Facebook 082 private Story story; 083 /** 084 * The time of the last update to this message. 085 */ 086 @Facebook("updated_time") 087 private Date updatedTime; 088 /** 089 * The "unread" count for this message. 090 */ 091 @Facebook 092 private Integer unread; 093 /** 094 * Whether this message has been seen. 095 */ 096 @Facebook 097 private Boolean unseen; 098 @Facebook("reply_to") 099 private ReplyTo replyTo; 100 @Facebook("tags") 101 private transient String rawTags; 102 private List<String> tags = new ArrayList<>(); 103 private static final long serialVersionUID = 1L; 104 105 106 public static class ReplyTo extends FacebookType { 107 private static final long serialVersionUID = 1L; 108 @Facebook 109 private String mid; 110 @Facebook("is_self_reply") 111 private Boolean isSelfReply; 112 113 @java.lang.SuppressWarnings("all") 114 @lombok.Generated 115 public String getMid() { 116 return this.mid; 117 } 118 119 @java.lang.SuppressWarnings("all") 120 @lombok.Generated 121 public void setMid(final String mid) { 122 this.mid = mid; 123 } 124 125 @java.lang.SuppressWarnings("all") 126 @lombok.Generated 127 public Boolean getIsSelfReply() { 128 return this.isSelfReply; 129 } 130 131 @java.lang.SuppressWarnings("all") 132 @lombok.Generated 133 public void setIsSelfReply(final Boolean isSelfReply) { 134 this.isSelfReply = isSelfReply; 135 } 136 } 137 138 139 /** 140 * Represents an attached file that you may find on a private message. 141 * 142 * @author alockhart 143 * @since 1.6.12 144 */ 145 public static class Attachment extends FacebookType { 146 private static final long serialVersionUID = 1L; 147 /** 148 * The attachment's filename, for example 121423423.jpg. 149 */ 150 @Facebook 151 private String name; 152 /** 153 * The attachment's mime type, for example image/jpeg. 154 */ 155 @Facebook("mime_type") 156 private String mimeType; 157 /** 158 * The size of the attachment in bytes. 159 */ 160 @Facebook 161 private Long size; 162 @Facebook("file_url") 163 private String fileUrl; 164 /** 165 * When the attached file is an image, Facebook will also send information about its width, height and url. 166 */ 167 @Facebook("image_data") 168 private ImageData imageData; 169 /** 170 * When the attached file is a video, Facebook will also send information about its width, height and url. 171 */ 172 @Facebook("video_data") 173 private VideoData videoData; 174 /** 175 * When the attachment is a generic template, Facebook returns title, subtitle, media URL and CTA metadata. 176 */ 177 @Facebook("generic_template") 178 private GenericTemplate genericTemplate; 179 180 /** 181 * returns if the attachment is an image 182 * 183 * @return true if the attachment is an image, false otherwise 184 */ 185 public boolean isImage() { 186 return null != imageData && null == videoData; 187 } 188 189 /** 190 * returns if the attachment is a video 191 * 192 * @return true if the attachment is a video, false otherwise 193 */ 194 public boolean isVideo() { 195 return null != videoData; 196 } 197 198 /** 199 * returns if the attachment is a generic template 200 * 201 * @return true if the attachment is a generic template, false otherwise 202 */ 203 public boolean isGenericTemplate() { 204 return null != genericTemplate; 205 } 206 207 /** 208 * returns if the attachment is a placeholder for the real attachment, that is not accessible via API due to privacy 209 * rules in Europe 210 * 211 * check <a href="https://developers.facebook.com/docs/messenger-platform/europe-updates">at Facebook</a> 212 * 213 * @return true if not accessible in the EU 214 */ 215 public boolean isRemovedInEurope() { 216 return "1234".equals(getId()); 217 } 218 219 /** 220 * The attachment's filename, for example 121423423.jpg. 221 * 222 * @return The attachment's filename. 223 */ 224 @java.lang.SuppressWarnings("all") 225 @lombok.Generated 226 public String getName() { 227 return this.name; 228 } 229 230 /** 231 * The attachment's filename, for example 121423423.jpg. 232 */ 233 @java.lang.SuppressWarnings("all") 234 @lombok.Generated 235 public void setName(final String name) { 236 this.name = name; 237 } 238 239 /** 240 * The attachment's mime type, for example image/jpeg. 241 * 242 * @return The attachment's mime type. 243 */ 244 @java.lang.SuppressWarnings("all") 245 @lombok.Generated 246 public String getMimeType() { 247 return this.mimeType; 248 } 249 250 /** 251 * The attachment's mime type, for example image/jpeg. 252 */ 253 @java.lang.SuppressWarnings("all") 254 @lombok.Generated 255 public void setMimeType(final String mimeType) { 256 this.mimeType = mimeType; 257 } 258 259 /** 260 * The size of the attachment in bytes. 261 * 262 * @return The size of the attachment in bytes. 263 */ 264 @java.lang.SuppressWarnings("all") 265 @lombok.Generated 266 public Long getSize() { 267 return this.size; 268 } 269 270 /** 271 * The size of the attachment in bytes. 272 */ 273 @java.lang.SuppressWarnings("all") 274 @lombok.Generated 275 public void setSize(final Long size) { 276 this.size = size; 277 } 278 279 @java.lang.SuppressWarnings("all") 280 @lombok.Generated 281 public String getFileUrl() { 282 return this.fileUrl; 283 } 284 285 @java.lang.SuppressWarnings("all") 286 @lombok.Generated 287 public void setFileUrl(final String fileUrl) { 288 this.fileUrl = fileUrl; 289 } 290 291 /** 292 * When the attached file is an image, Facebook will also send information about its width, height and url. 293 * 294 * @return The attachment's image data. 295 */ 296 @java.lang.SuppressWarnings("all") 297 @lombok.Generated 298 public ImageData getImageData() { 299 return this.imageData; 300 } 301 302 /** 303 * When the attached file is an image, Facebook will also send information about its width, height and url. 304 */ 305 @java.lang.SuppressWarnings("all") 306 @lombok.Generated 307 public void setImageData(final ImageData imageData) { 308 this.imageData = imageData; 309 } 310 311 /** 312 * When the attached file is a video, Facebook will also send information about its width, height and url. 313 * 314 * @return The attachment's video data. 315 */ 316 @java.lang.SuppressWarnings("all") 317 @lombok.Generated 318 public VideoData getVideoData() { 319 return this.videoData; 320 } 321 322 /** 323 * When the attached file is a video, Facebook will also send information about its width, height and url. 324 */ 325 @java.lang.SuppressWarnings("all") 326 @lombok.Generated 327 public void setVideoData(final VideoData videoData) { 328 this.videoData = videoData; 329 } 330 331 /** 332 * When the attachment is a generic template, Facebook returns title, subtitle, media URL and CTA metadata. 333 * 334 * @return The attachment's generic template data. 335 */ 336 @java.lang.SuppressWarnings("all") 337 @lombok.Generated 338 public GenericTemplate getGenericTemplate() { 339 return this.genericTemplate; 340 } 341 342 /** 343 * When the attachment is a generic template, Facebook returns title, subtitle, media URL and CTA metadata. 344 */ 345 @java.lang.SuppressWarnings("all") 346 @lombok.Generated 347 public void setGenericTemplate(final GenericTemplate genericTemplate) { 348 this.genericTemplate = genericTemplate; 349 } 350 } 351 352 353 /** 354 * Additional attachment information, only present when the attachment is a generic template. 355 */ 356 public static class GenericTemplate extends AbstractFacebookType { 357 private static final long serialVersionUID = 1L; 358 @Facebook 359 private String title; 360 @Facebook 361 private String subtitle; 362 @Facebook("media_url") 363 private String mediaUrl; 364 @Facebook 365 private GenericTemplateCallToAction cta; 366 367 @java.lang.SuppressWarnings("all") 368 @lombok.Generated 369 public String getTitle() { 370 return this.title; 371 } 372 373 @java.lang.SuppressWarnings("all") 374 @lombok.Generated 375 public void setTitle(final String title) { 376 this.title = title; 377 } 378 379 @java.lang.SuppressWarnings("all") 380 @lombok.Generated 381 public String getSubtitle() { 382 return this.subtitle; 383 } 384 385 @java.lang.SuppressWarnings("all") 386 @lombok.Generated 387 public void setSubtitle(final String subtitle) { 388 this.subtitle = subtitle; 389 } 390 391 @java.lang.SuppressWarnings("all") 392 @lombok.Generated 393 public String getMediaUrl() { 394 return this.mediaUrl; 395 } 396 397 @java.lang.SuppressWarnings("all") 398 @lombok.Generated 399 public void setMediaUrl(final String mediaUrl) { 400 this.mediaUrl = mediaUrl; 401 } 402 403 @java.lang.SuppressWarnings("all") 404 @lombok.Generated 405 public GenericTemplateCallToAction getCta() { 406 return this.cta; 407 } 408 409 @java.lang.SuppressWarnings("all") 410 @lombok.Generated 411 public void setCta(final GenericTemplateCallToAction cta) { 412 this.cta = cta; 413 } 414 } 415 416 417 /** 418 * Call-to-action metadata included in a generic template attachment. 419 */ 420 public static class GenericTemplateCallToAction extends AbstractFacebookType { 421 private static final long serialVersionUID = 1L; 422 @Facebook 423 private String title; 424 @Facebook 425 private String type; 426 @Facebook 427 private String url; 428 429 @java.lang.SuppressWarnings("all") 430 @lombok.Generated 431 public String getTitle() { 432 return this.title; 433 } 434 435 @java.lang.SuppressWarnings("all") 436 @lombok.Generated 437 public void setTitle(final String title) { 438 this.title = title; 439 } 440 441 @java.lang.SuppressWarnings("all") 442 @lombok.Generated 443 public String getType() { 444 return this.type; 445 } 446 447 @java.lang.SuppressWarnings("all") 448 @lombok.Generated 449 public void setType(final String type) { 450 this.type = type; 451 } 452 453 @java.lang.SuppressWarnings("all") 454 @lombok.Generated 455 public String getUrl() { 456 return this.url; 457 } 458 459 @java.lang.SuppressWarnings("all") 460 @lombok.Generated 461 public void setUrl(final String url) { 462 this.url = url; 463 } 464 } 465 466 467 /** 468 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/message/shares/">Message Share 469 * Graph API type</a>. 470 */ 471 public static class Share extends NamedFacebookType { 472 /** 473 * The URL to the shared item. 474 */ 475 @Facebook 476 private String link; 477 /** 478 * The description of the shared item. 479 */ 480 @Facebook 481 private String description; 482 @Facebook 483 private String picture; 484 485 /** 486 * The URL to the shared item. 487 * 488 * @return The URL to the shared item. 489 */ 490 @java.lang.SuppressWarnings("all") 491 @lombok.Generated 492 public String getLink() { 493 return this.link; 494 } 495 496 /** 497 * The URL to the shared item. 498 */ 499 @java.lang.SuppressWarnings("all") 500 @lombok.Generated 501 public void setLink(final String link) { 502 this.link = link; 503 } 504 505 /** 506 * The description of the shared item. 507 * 508 * @return The description of the shared item. 509 */ 510 @java.lang.SuppressWarnings("all") 511 @lombok.Generated 512 public String getDescription() { 513 return this.description; 514 } 515 516 /** 517 * The description of the shared item. 518 */ 519 @java.lang.SuppressWarnings("all") 520 @lombok.Generated 521 public void setDescription(final String description) { 522 this.description = description; 523 } 524 525 @java.lang.SuppressWarnings("all") 526 @lombok.Generated 527 public String getPicture() { 528 return this.picture; 529 } 530 531 @java.lang.SuppressWarnings("all") 532 @lombok.Generated 533 public void setPicture(final String picture) { 534 this.picture = picture; 535 } 536 } 537 538 539 /** 540 * Additional attachment information, only present when an attached file is an image. 541 * 542 * @author Felipe Kurkowski 543 */ 544 public static class ImageData extends AttachmentData { 545 private static final long serialVersionUID = 1L; 546 /** 547 * The image's max width. 548 */ 549 @Facebook("max_width") 550 private int maxWidth; 551 /** 552 * The image's max height. 553 */ 554 @Facebook("max_height") 555 private int maxHeight; 556 @Facebook("render_as_sticker") 557 private Boolean renderAsSticker; 558 @Facebook("image_type") 559 private int imageType; 560 @Facebook("raw_gif_image") 561 private String rawGifImage; 562 @Facebook("raw_webp_image") 563 private String rawWebpImage; 564 @Facebook("animated_gif_url") 565 private String animatedGifUrl; 566 @Facebook("animated_gif_preview_url") 567 private String animatedGifPreviewUrl; 568 @Facebook("animated_webp_url") 569 private String animatedWebpUrl; 570 @Facebook("animated_webp_preview_url") 571 private String animatedWebpPreviewUrl; 572 573 /** 574 * The image's max width. 575 * 576 * @return The image's max width. 577 */ 578 @java.lang.SuppressWarnings("all") 579 @lombok.Generated 580 public int getMaxWidth() { 581 return this.maxWidth; 582 } 583 584 /** 585 * The image's max width. 586 */ 587 @java.lang.SuppressWarnings("all") 588 @lombok.Generated 589 public void setMaxWidth(final int maxWidth) { 590 this.maxWidth = maxWidth; 591 } 592 593 /** 594 * The image's max height. 595 * 596 * @return The image's max height. 597 */ 598 @java.lang.SuppressWarnings("all") 599 @lombok.Generated 600 public int getMaxHeight() { 601 return this.maxHeight; 602 } 603 604 /** 605 * The image's max height. 606 */ 607 @java.lang.SuppressWarnings("all") 608 @lombok.Generated 609 public void setMaxHeight(final int maxHeight) { 610 this.maxHeight = maxHeight; 611 } 612 613 @java.lang.SuppressWarnings("all") 614 @lombok.Generated 615 public Boolean getRenderAsSticker() { 616 return this.renderAsSticker; 617 } 618 619 @java.lang.SuppressWarnings("all") 620 @lombok.Generated 621 public void setRenderAsSticker(final Boolean renderAsSticker) { 622 this.renderAsSticker = renderAsSticker; 623 } 624 625 @java.lang.SuppressWarnings("all") 626 @lombok.Generated 627 public int getImageType() { 628 return this.imageType; 629 } 630 631 @java.lang.SuppressWarnings("all") 632 @lombok.Generated 633 public void setImageType(final int imageType) { 634 this.imageType = imageType; 635 } 636 637 @java.lang.SuppressWarnings("all") 638 @lombok.Generated 639 public String getRawGifImage() { 640 return this.rawGifImage; 641 } 642 643 @java.lang.SuppressWarnings("all") 644 @lombok.Generated 645 public void setRawGifImage(final String rawGifImage) { 646 this.rawGifImage = rawGifImage; 647 } 648 649 @java.lang.SuppressWarnings("all") 650 @lombok.Generated 651 public String getRawWebpImage() { 652 return this.rawWebpImage; 653 } 654 655 @java.lang.SuppressWarnings("all") 656 @lombok.Generated 657 public void setRawWebpImage(final String rawWebpImage) { 658 this.rawWebpImage = rawWebpImage; 659 } 660 661 @java.lang.SuppressWarnings("all") 662 @lombok.Generated 663 public String getAnimatedGifUrl() { 664 return this.animatedGifUrl; 665 } 666 667 @java.lang.SuppressWarnings("all") 668 @lombok.Generated 669 public void setAnimatedGifUrl(final String animatedGifUrl) { 670 this.animatedGifUrl = animatedGifUrl; 671 } 672 673 @java.lang.SuppressWarnings("all") 674 @lombok.Generated 675 public String getAnimatedGifPreviewUrl() { 676 return this.animatedGifPreviewUrl; 677 } 678 679 @java.lang.SuppressWarnings("all") 680 @lombok.Generated 681 public void setAnimatedGifPreviewUrl(final String animatedGifPreviewUrl) { 682 this.animatedGifPreviewUrl = animatedGifPreviewUrl; 683 } 684 685 @java.lang.SuppressWarnings("all") 686 @lombok.Generated 687 public String getAnimatedWebpUrl() { 688 return this.animatedWebpUrl; 689 } 690 691 @java.lang.SuppressWarnings("all") 692 @lombok.Generated 693 public void setAnimatedWebpUrl(final String animatedWebpUrl) { 694 this.animatedWebpUrl = animatedWebpUrl; 695 } 696 697 @java.lang.SuppressWarnings("all") 698 @lombok.Generated 699 public String getAnimatedWebpPreviewUrl() { 700 return this.animatedWebpPreviewUrl; 701 } 702 703 @java.lang.SuppressWarnings("all") 704 @lombok.Generated 705 public void setAnimatedWebpPreviewUrl(final String animatedWebpPreviewUrl) { 706 this.animatedWebpPreviewUrl = animatedWebpPreviewUrl; 707 } 708 } 709 710 711 /** 712 * Additional attachment information, only present when an attached file is a video. 713 */ 714 public static class VideoData extends AttachmentData { 715 private static final long serialVersionUID = 1L; 716 @Facebook 717 private int length; 718 @Facebook("video_type") 719 private int videoType; 720 @Facebook 721 private int rotation; 722 723 @java.lang.SuppressWarnings("all") 724 @lombok.Generated 725 public int getLength() { 726 return this.length; 727 } 728 729 @java.lang.SuppressWarnings("all") 730 @lombok.Generated 731 public void setLength(final int length) { 732 this.length = length; 733 } 734 735 @java.lang.SuppressWarnings("all") 736 @lombok.Generated 737 public int getVideoType() { 738 return this.videoType; 739 } 740 741 @java.lang.SuppressWarnings("all") 742 @lombok.Generated 743 public void setVideoType(final int videoType) { 744 this.videoType = videoType; 745 } 746 747 @java.lang.SuppressWarnings("all") 748 @lombok.Generated 749 public int getRotation() { 750 return this.rotation; 751 } 752 753 @java.lang.SuppressWarnings("all") 754 @lombok.Generated 755 public void setRotation(final int rotation) { 756 this.rotation = rotation; 757 } 758 } 759 760 761 public static abstract class AttachmentData extends AbstractFacebookType { 762 private static final long serialVersionUID = 1L; 763 /** 764 * The image's width. 765 */ 766 @Facebook 767 private int width; 768 /** 769 * The image's height. 770 */ 771 @Facebook 772 private int height; 773 /** 774 * The image's url. 775 */ 776 @Facebook 777 private String url; 778 /** 779 * The image's preview url. 780 */ 781 @Facebook("preview_url") 782 private String previewUrl; 783 784 /** 785 * The image's width. 786 * 787 * @return The image's width. 788 */ 789 @java.lang.SuppressWarnings("all") 790 @lombok.Generated 791 public int getWidth() { 792 return this.width; 793 } 794 795 /** 796 * The image's width. 797 */ 798 @java.lang.SuppressWarnings("all") 799 @lombok.Generated 800 public void setWidth(final int width) { 801 this.width = width; 802 } 803 804 /** 805 * The image's height. 806 * 807 * @return The image's height. 808 */ 809 @java.lang.SuppressWarnings("all") 810 @lombok.Generated 811 public int getHeight() { 812 return this.height; 813 } 814 815 /** 816 * The image's height. 817 */ 818 @java.lang.SuppressWarnings("all") 819 @lombok.Generated 820 public void setHeight(final int height) { 821 this.height = height; 822 } 823 824 /** 825 * The image's url. 826 * 827 * @return The image's url. 828 */ 829 @java.lang.SuppressWarnings("all") 830 @lombok.Generated 831 public String getUrl() { 832 return this.url; 833 } 834 835 /** 836 * The image's url. 837 */ 838 @java.lang.SuppressWarnings("all") 839 @lombok.Generated 840 public void setUrl(final String url) { 841 this.url = url; 842 } 843 844 /** 845 * The image's preview url. 846 * 847 * @return The image's preview url. 848 */ 849 @java.lang.SuppressWarnings("all") 850 @lombok.Generated 851 public String getPreviewUrl() { 852 return this.previewUrl; 853 } 854 855 /** 856 * The image's preview url. 857 */ 858 @java.lang.SuppressWarnings("all") 859 @lombok.Generated 860 public void setPreviewUrl(final String previewUrl) { 861 this.previewUrl = previewUrl; 862 } 863 } 864 865 866 public static class Reaction extends AbstractFacebookType { 867 @Facebook 868 private String reaction; 869 @Facebook 870 private List<ExtendedReferenceType> users = new ArrayList<>(); 871 872 public List<ExtendedReferenceType> getUsers() { 873 return users; 874 } 875 876 public boolean addUser(ExtendedReferenceType user) { 877 return users.add(user); 878 } 879 880 public boolean removeUser(ExtendedReferenceType user) { 881 return users.remove(user); 882 } 883 884 @java.lang.SuppressWarnings("all") 885 @lombok.Generated 886 public String getReaction() { 887 return this.reaction; 888 } 889 890 @java.lang.SuppressWarnings("all") 891 @lombok.Generated 892 public void setReaction(final String reaction) { 893 this.reaction = reaction; 894 } 895 } 896 897 898 public static class Story extends AbstractFacebookType { 899 @Facebook("reply_to") 900 StoryReply replyTo; 901 @Facebook 902 StoryMention mention; 903 904 @java.lang.SuppressWarnings("all") 905 @lombok.Generated 906 public StoryReply getReplyTo() { 907 return this.replyTo; 908 } 909 910 @java.lang.SuppressWarnings("all") 911 @lombok.Generated 912 public void setReplyTo(final StoryReply replyTo) { 913 this.replyTo = replyTo; 914 } 915 916 @java.lang.SuppressWarnings("all") 917 @lombok.Generated 918 public StoryMention getMention() { 919 return this.mention; 920 } 921 922 @java.lang.SuppressWarnings("all") 923 @lombok.Generated 924 public void setMention(final StoryMention mention) { 925 this.mention = mention; 926 } 927 } 928 929 930 public static class StoryReply extends FacebookType { 931 @Facebook 932 private String link; 933 934 @java.lang.SuppressWarnings("all") 935 @lombok.Generated 936 public String getLink() { 937 return this.link; 938 } 939 940 @java.lang.SuppressWarnings("all") 941 @lombok.Generated 942 public void setLink(final String link) { 943 this.link = link; 944 } 945 } 946 947 948 public static class StoryMention extends FacebookType { 949 @Facebook 950 private String link; 951 952 @java.lang.SuppressWarnings("all") 953 @lombok.Generated 954 public String getLink() { 955 return this.link; 956 } 957 958 @java.lang.SuppressWarnings("all") 959 @lombok.Generated 960 public void setLink(final String link) { 961 this.link = link; 962 } 963 } 964 965 @JsonMappingCompleted 966 void convertTags() { 967 if (rawTags != null) { 968 JsonValue parsedObject = Json.parse(rawTags); 969 if (parsedObject.isObject() && parsedObject.asObject().get("data").isArray()) { 970 for (JsonValue tagObject : parsedObject.asObject().get("data").asArray()) { 971 tags.add(tagObject.asObject().get("name").asString()); 972 } 973 } 974 } 975 } 976 977 /** 978 * The attachments associated with the message. 979 * 980 * @return The attachments associated with the message. 981 */ 982 public List<Attachment> getAttachments() { 983 return (attachments != null ? unmodifiableList(attachments) : null); 984 } 985 986 public boolean addAttachment(Attachment attachment) { 987 return attachments.add(attachment); 988 } 989 990 public boolean removeAttachment(Attachment attachment) { 991 return attachments.remove(attachment); 992 } 993 994 /** 995 * The shares associated with the message. 996 * <p> 997 * This is page only. 998 * 999 * @return The shares associated with the message. 1000 */ 1001 public List<Share> getShares() { 1002 return (shares != null ? unmodifiableList(shares) : null); 1003 } 1004 1005 public boolean addShare(Share share) { 1006 return shares.add(share); 1007 } 1008 1009 public boolean removeShare(Share share) { 1010 return shares.remove(share); 1011 } 1012 1013 /** 1014 * A list of recipients of the message. 1015 * 1016 * @return A list of the message recipients 1017 */ 1018 public List<ExtendedReferenceType> getTo() { 1019 return unmodifiableList(to); 1020 } 1021 1022 public boolean addTo(ExtendedReferenceType receiver) { 1023 return to.add(receiver); 1024 } 1025 1026 public boolean removeTo(ExtendedReferenceType receiver) { 1027 return to.remove(receiver); 1028 } 1029 1030 /** 1031 * A set of tags indicating the message folder and source of the message. 1032 * 1033 * @return A set of tags indicating the message folder and source of the message. 1034 */ 1035 public List<String> getTags() { 1036 return unmodifiableList(tags); 1037 } 1038 1039 public boolean addTag(String tag) { 1040 return tags.add(tag); 1041 } 1042 1043 public boolean removeTag(String tag) { 1044 return tags.remove(tag); 1045 } 1046 1047 /** 1048 * Reaction (like/love) on the existing message 1049 * 1050 * @return list of reactions 1051 */ 1052 public List<Reaction> getReactions() { 1053 return unmodifiableList(reactions); 1054 } 1055 1056 public boolean addReaction(Reaction reaction) { 1057 return reactions.add(reaction); 1058 } 1059 1060 public boolean removeReaction(Reaction reaction) { 1061 return reactions.remove(reaction); 1062 } 1063 1064 /** 1065 * The time the message was initially created. 1066 * 1067 * @return The time the message was initially created. 1068 */ 1069 @Override 1070 @java.lang.SuppressWarnings("all") 1071 @lombok.Generated 1072 public Date getCreatedTime() { 1073 return this.createdTime; 1074 } 1075 1076 /** 1077 * The time the message was initially created. 1078 */ 1079 @java.lang.SuppressWarnings("all") 1080 @lombok.Generated 1081 public void setCreatedTime(final Date createdTime) { 1082 this.createdTime = createdTime; 1083 } 1084 1085 /** 1086 * The subject of the message. 1087 * 1088 * @return The subject of the message. 1089 */ 1090 @java.lang.SuppressWarnings("all") 1091 @lombok.Generated 1092 public String getSubject() { 1093 return this.subject; 1094 } 1095 1096 /** 1097 * The subject of the message. 1098 */ 1099 @java.lang.SuppressWarnings("all") 1100 @lombok.Generated 1101 public void setSubject(final String subject) { 1102 this.subject = subject; 1103 } 1104 1105 /** 1106 * The sender of this message 1107 * 1108 * @return The sender of this message 1109 */ 1110 @Override 1111 @java.lang.SuppressWarnings("all") 1112 @lombok.Generated 1113 public ExtendedReferenceType getFrom() { 1114 return this.from; 1115 } 1116 1117 /** 1118 * The sender of this message 1119 */ 1120 @java.lang.SuppressWarnings("all") 1121 @lombok.Generated 1122 public void setFrom(final ExtendedReferenceType from) { 1123 this.from = from; 1124 } 1125 1126 @java.lang.SuppressWarnings("all") 1127 @lombok.Generated 1128 public boolean isUnsupported() { 1129 return this.isUnsupported; 1130 } 1131 1132 @java.lang.SuppressWarnings("all") 1133 @lombok.Generated 1134 public void setUnsupported(final boolean isUnsupported) { 1135 this.isUnsupported = isUnsupported; 1136 } 1137 1138 /** 1139 * The text of the message 1140 * 1141 * @return The text of the message 1142 */ 1143 @Override 1144 @java.lang.SuppressWarnings("all") 1145 @lombok.Generated 1146 public String getMessage() { 1147 return this.message; 1148 } 1149 1150 /** 1151 * The text of the message 1152 */ 1153 @java.lang.SuppressWarnings("all") 1154 @lombok.Generated 1155 public void setMessage(final String message) { 1156 this.message = message; 1157 } 1158 1159 /** 1160 * Sticker contained in the message. 1161 * 1162 * @return The Sticker in that message 1163 */ 1164 @java.lang.SuppressWarnings("all") 1165 @lombok.Generated 1166 public String getSticker() { 1167 return this.sticker; 1168 } 1169 1170 /** 1171 * Sticker contained in the message. 1172 */ 1173 @java.lang.SuppressWarnings("all") 1174 @lombok.Generated 1175 public void setSticker(final String sticker) { 1176 this.sticker = sticker; 1177 } 1178 1179 @java.lang.SuppressWarnings("all") 1180 @lombok.Generated 1181 public Story getStory() { 1182 return this.story; 1183 } 1184 1185 @java.lang.SuppressWarnings("all") 1186 @lombok.Generated 1187 public void setStory(final Story story) { 1188 this.story = story; 1189 } 1190 1191 /** 1192 * The time of the last update to this message. 1193 * 1194 * @return The time of the last update to this message. 1195 */ 1196 @java.lang.SuppressWarnings("all") 1197 @lombok.Generated 1198 public Date getUpdatedTime() { 1199 return this.updatedTime; 1200 } 1201 1202 /** 1203 * The time of the last update to this message. 1204 */ 1205 @java.lang.SuppressWarnings("all") 1206 @lombok.Generated 1207 public void setUpdatedTime(final Date updatedTime) { 1208 this.updatedTime = updatedTime; 1209 } 1210 1211 /** 1212 * The "unread" count for this message. 1213 * 1214 * @return The "unread" count for this message. 1215 */ 1216 @java.lang.SuppressWarnings("all") 1217 @lombok.Generated 1218 public Integer getUnread() { 1219 return this.unread; 1220 } 1221 1222 /** 1223 * The "unread" count for this message. 1224 */ 1225 @java.lang.SuppressWarnings("all") 1226 @lombok.Generated 1227 public void setUnread(final Integer unread) { 1228 this.unread = unread; 1229 } 1230 1231 /** 1232 * Whether this message has been seen. 1233 * 1234 * @return Whether this message has been seen. 1235 */ 1236 @java.lang.SuppressWarnings("all") 1237 @lombok.Generated 1238 public Boolean getUnseen() { 1239 return this.unseen; 1240 } 1241 1242 /** 1243 * Whether this message has been seen. 1244 */ 1245 @java.lang.SuppressWarnings("all") 1246 @lombok.Generated 1247 public void setUnseen(final Boolean unseen) { 1248 this.unseen = unseen; 1249 } 1250 1251 @java.lang.SuppressWarnings("all") 1252 @lombok.Generated 1253 public ReplyTo getReplyTo() { 1254 return this.replyTo; 1255 } 1256 1257 @java.lang.SuppressWarnings("all") 1258 @lombok.Generated 1259 public void setReplyTo(final ReplyTo replyTo) { 1260 this.replyTo = replyTo; 1261 } 1262}