001// Generated by delombok at Sun Apr 14 14:59:49 CEST 2024
002/*
003 * Copyright (c) 2010-2024 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("tags")
099  private transient String rawTags;
100  private List<String> tags = new ArrayList<>();
101  private static final long serialVersionUID = 1L;
102
103
104  /**
105   * Represents an attached file that you may find on a private message.
106   *
107   * @author alockhart
108   * @since 1.6.12
109   */
110  public static class Attachment extends FacebookType {
111    private static final long serialVersionUID = 1L;
112    /**
113     * The attachment's filename, for example 121423423.jpg.
114     */
115    @Facebook
116    private String name;
117    /**
118     * The attachment's mime type, for example image/jpeg.
119     */
120    @Facebook("mime_type")
121    private String mimeType;
122    /**
123     * The size of the attachment in bytes.
124     */
125    @Facebook
126    private Long size;
127    @Facebook("file_url")
128    private String fileUrl;
129    /**
130     * When the attached file is an image, Facebook will also send information about it's width, height and url.
131     */
132    @Facebook("image_data")
133    private ImageData imageData;
134    /**
135     * When the attached file is a video, Facebook will also send information about it's width, height and url.
136     */
137    @Facebook("video_data")
138    private VideoData videoData;
139
140    /**
141     * returns if the attachment is a image
142     * 
143     * @return true if the attachment is a image, false otherwise
144     */
145    public boolean isImage() {
146      return null != imageData && null == videoData;
147    }
148
149    /**
150     * returns if the attachment is a video
151     * 
152     * @return true if the attachment is a video, false otherwise
153     */
154    public boolean isVideo() {
155      return null != videoData;
156    }
157
158    /**
159     * returns if the attachment is a placeholder for the real attachment, that is not accessible via API due to privacy
160     * rules in Europe
161     *
162     * check <a href="https://developers.facebook.com/docs/messenger-platform/europe-updates">at Facebook</a>
163     *
164     * @return true if not accessible in the EU
165     */
166    public boolean isRemovedInEurope() {
167      return "1234".equals(getId());
168    }
169
170    /**
171     * The attachment's filename, for example 121423423.jpg.
172     *
173     * @return The attachment's filename.
174     */
175    @java.lang.SuppressWarnings("all")
176    public String getName() {
177      return this.name;
178    }
179
180    /**
181     * The attachment's filename, for example 121423423.jpg.
182     */
183    @java.lang.SuppressWarnings("all")
184    public void setName(final String name) {
185      this.name = name;
186    }
187
188    /**
189     * The attachment's mime type, for example image/jpeg.
190     *
191     * @return The attachment's mime type.
192     */
193    @java.lang.SuppressWarnings("all")
194    public String getMimeType() {
195      return this.mimeType;
196    }
197
198    /**
199     * The attachment's mime type, for example image/jpeg.
200     */
201    @java.lang.SuppressWarnings("all")
202    public void setMimeType(final String mimeType) {
203      this.mimeType = mimeType;
204    }
205
206    /**
207     * The size of the attachment in bytes.
208     *
209     * @return The size of the attachment in bytes.
210     */
211    @java.lang.SuppressWarnings("all")
212    public Long getSize() {
213      return this.size;
214    }
215
216    /**
217     * The size of the attachment in bytes.
218     */
219    @java.lang.SuppressWarnings("all")
220    public void setSize(final Long size) {
221      this.size = size;
222    }
223
224    @java.lang.SuppressWarnings("all")
225    public String getFileUrl() {
226      return this.fileUrl;
227    }
228
229    @java.lang.SuppressWarnings("all")
230    public void setFileUrl(final String fileUrl) {
231      this.fileUrl = fileUrl;
232    }
233
234    /**
235     * When the attached file is an image, Facebook will also send information about it's width, height and url.
236     *
237     * @return The attachment's image data.
238     */
239    @java.lang.SuppressWarnings("all")
240    public ImageData getImageData() {
241      return this.imageData;
242    }
243
244    /**
245     * When the attached file is an image, Facebook will also send information about it's width, height and url.
246     */
247    @java.lang.SuppressWarnings("all")
248    public void setImageData(final ImageData imageData) {
249      this.imageData = imageData;
250    }
251
252    /**
253     * When the attached file is a video, Facebook will also send information about it's width, height and url.
254     *
255     * @return The attachment's video data.
256     */
257    @java.lang.SuppressWarnings("all")
258    public VideoData getVideoData() {
259      return this.videoData;
260    }
261
262    /**
263     * When the attached file is a video, Facebook will also send information about it's width, height and url.
264     */
265    @java.lang.SuppressWarnings("all")
266    public void setVideoData(final VideoData videoData) {
267      this.videoData = videoData;
268    }
269  }
270
271
272  /**
273   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/message/shares/">Message Share
274   * Graph API type</a>.
275   */
276  public static class Share extends NamedFacebookType {
277    /**
278     * The URL to the shared item.
279     */
280    @Facebook
281    private String link;
282    /**
283     * The description of the shared item.
284     */
285    @Facebook
286    private String description;
287    @Facebook
288    private String picture;
289
290    /**
291     * The URL to the shared item.
292     *
293     * @return The URL to the shared item.
294     */
295    @java.lang.SuppressWarnings("all")
296    public String getLink() {
297      return this.link;
298    }
299
300    /**
301     * The URL to the shared item.
302     */
303    @java.lang.SuppressWarnings("all")
304    public void setLink(final String link) {
305      this.link = link;
306    }
307
308    /**
309     * The description of the shared item.
310     *
311     * @return The description of the shared item.
312     */
313    @java.lang.SuppressWarnings("all")
314    public String getDescription() {
315      return this.description;
316    }
317
318    /**
319     * The description of the shared item.
320     */
321    @java.lang.SuppressWarnings("all")
322    public void setDescription(final String description) {
323      this.description = description;
324    }
325
326    @java.lang.SuppressWarnings("all")
327    public String getPicture() {
328      return this.picture;
329    }
330
331    @java.lang.SuppressWarnings("all")
332    public void setPicture(final String picture) {
333      this.picture = picture;
334    }
335  }
336
337
338  /**
339   * Additional attachment information, only present when an attached file is an image.
340   *
341   * @author Felipe Kurkowski
342   */
343  public static class ImageData extends AttachmentData {
344    private static final long serialVersionUID = 1L;
345    /**
346     * The image's max width.
347     */
348    @Facebook("max_width")
349    private int maxWidth;
350    /**
351     * The image's max height.
352     */
353    @Facebook("max_height")
354    private int maxHeight;
355    @Facebook("render_as_sticker")
356    private Boolean renderAsSticker;
357    @Facebook("image_type")
358    private int imageType;
359    @Facebook("raw_gif_image")
360    private String rawGifImage;
361    @Facebook("raw_webp_image")
362    private String rawWebpImage;
363    @Facebook("animated_gif_url")
364    private String animatedGifUrl;
365    @Facebook("animated_gif_preview_url")
366    private String animatedGifPreviewUrl;
367    @Facebook("animated_webp_url")
368    private String animatedWebpUrl;
369    @Facebook("animated_webp_preview_url")
370    private String animatedWebpPreviewUrl;
371
372    /**
373     * The image's max width.
374     *
375     * @return The image's max width.
376     */
377    @java.lang.SuppressWarnings("all")
378    public int getMaxWidth() {
379      return this.maxWidth;
380    }
381
382    /**
383     * The image's max width.
384     */
385    @java.lang.SuppressWarnings("all")
386    public void setMaxWidth(final int maxWidth) {
387      this.maxWidth = maxWidth;
388    }
389
390    /**
391     * The image's max height.
392     *
393     * @return The image's max height.
394     */
395    @java.lang.SuppressWarnings("all")
396    public int getMaxHeight() {
397      return this.maxHeight;
398    }
399
400    /**
401     * The image's max height.
402     */
403    @java.lang.SuppressWarnings("all")
404    public void setMaxHeight(final int maxHeight) {
405      this.maxHeight = maxHeight;
406    }
407
408    @java.lang.SuppressWarnings("all")
409    public Boolean getRenderAsSticker() {
410      return this.renderAsSticker;
411    }
412
413    @java.lang.SuppressWarnings("all")
414    public void setRenderAsSticker(final Boolean renderAsSticker) {
415      this.renderAsSticker = renderAsSticker;
416    }
417
418    @java.lang.SuppressWarnings("all")
419    public int getImageType() {
420      return this.imageType;
421    }
422
423    @java.lang.SuppressWarnings("all")
424    public void setImageType(final int imageType) {
425      this.imageType = imageType;
426    }
427
428    @java.lang.SuppressWarnings("all")
429    public String getRawGifImage() {
430      return this.rawGifImage;
431    }
432
433    @java.lang.SuppressWarnings("all")
434    public void setRawGifImage(final String rawGifImage) {
435      this.rawGifImage = rawGifImage;
436    }
437
438    @java.lang.SuppressWarnings("all")
439    public String getRawWebpImage() {
440      return this.rawWebpImage;
441    }
442
443    @java.lang.SuppressWarnings("all")
444    public void setRawWebpImage(final String rawWebpImage) {
445      this.rawWebpImage = rawWebpImage;
446    }
447
448    @java.lang.SuppressWarnings("all")
449    public String getAnimatedGifUrl() {
450      return this.animatedGifUrl;
451    }
452
453    @java.lang.SuppressWarnings("all")
454    public void setAnimatedGifUrl(final String animatedGifUrl) {
455      this.animatedGifUrl = animatedGifUrl;
456    }
457
458    @java.lang.SuppressWarnings("all")
459    public String getAnimatedGifPreviewUrl() {
460      return this.animatedGifPreviewUrl;
461    }
462
463    @java.lang.SuppressWarnings("all")
464    public void setAnimatedGifPreviewUrl(final String animatedGifPreviewUrl) {
465      this.animatedGifPreviewUrl = animatedGifPreviewUrl;
466    }
467
468    @java.lang.SuppressWarnings("all")
469    public String getAnimatedWebpUrl() {
470      return this.animatedWebpUrl;
471    }
472
473    @java.lang.SuppressWarnings("all")
474    public void setAnimatedWebpUrl(final String animatedWebpUrl) {
475      this.animatedWebpUrl = animatedWebpUrl;
476    }
477
478    @java.lang.SuppressWarnings("all")
479    public String getAnimatedWebpPreviewUrl() {
480      return this.animatedWebpPreviewUrl;
481    }
482
483    @java.lang.SuppressWarnings("all")
484    public void setAnimatedWebpPreviewUrl(final String animatedWebpPreviewUrl) {
485      this.animatedWebpPreviewUrl = animatedWebpPreviewUrl;
486    }
487  }
488
489
490  /**
491   * Additional attachment information, only present when an attached file is an video.
492   */
493  public static class VideoData extends AttachmentData {
494    private static final long serialVersionUID = 1L;
495    @Facebook
496    private int length;
497    @Facebook("video_type")
498    private int videoType;
499    @Facebook
500    private int rotation;
501
502    @java.lang.SuppressWarnings("all")
503    public int getLength() {
504      return this.length;
505    }
506
507    @java.lang.SuppressWarnings("all")
508    public void setLength(final int length) {
509      this.length = length;
510    }
511
512    @java.lang.SuppressWarnings("all")
513    public int getVideoType() {
514      return this.videoType;
515    }
516
517    @java.lang.SuppressWarnings("all")
518    public void setVideoType(final int videoType) {
519      this.videoType = videoType;
520    }
521
522    @java.lang.SuppressWarnings("all")
523    public int getRotation() {
524      return this.rotation;
525    }
526
527    @java.lang.SuppressWarnings("all")
528    public void setRotation(final int rotation) {
529      this.rotation = rotation;
530    }
531  }
532
533
534  public static abstract class AttachmentData extends AbstractFacebookType {
535    private static final long serialVersionUID = 1L;
536    /**
537     * The image's width.
538     */
539    @Facebook
540    private int width;
541    /**
542     * The image's height.
543     */
544    @Facebook
545    private int height;
546    /**
547     * The image's url.
548     */
549    @Facebook
550    private String url;
551    /**
552     * The image's preview url.
553     */
554    @Facebook("preview_url")
555    private String previewUrl;
556
557    /**
558     * The image's width.
559     *
560     * @return The image's width.
561     */
562    @java.lang.SuppressWarnings("all")
563    public int getWidth() {
564      return this.width;
565    }
566
567    /**
568     * The image's width.
569     */
570    @java.lang.SuppressWarnings("all")
571    public void setWidth(final int width) {
572      this.width = width;
573    }
574
575    /**
576     * The image's height.
577     *
578     * @return The image's height.
579     */
580    @java.lang.SuppressWarnings("all")
581    public int getHeight() {
582      return this.height;
583    }
584
585    /**
586     * The image's height.
587     */
588    @java.lang.SuppressWarnings("all")
589    public void setHeight(final int height) {
590      this.height = height;
591    }
592
593    /**
594     * The image's url.
595     *
596     * @return The image's url.
597     */
598    @java.lang.SuppressWarnings("all")
599    public String getUrl() {
600      return this.url;
601    }
602
603    /**
604     * The image's url.
605     */
606    @java.lang.SuppressWarnings("all")
607    public void setUrl(final String url) {
608      this.url = url;
609    }
610
611    /**
612     * The image's preview url.
613     *
614     * @return The image's preview url.
615     */
616    @java.lang.SuppressWarnings("all")
617    public String getPreviewUrl() {
618      return this.previewUrl;
619    }
620
621    /**
622     * The image's preview url.
623     */
624    @java.lang.SuppressWarnings("all")
625    public void setPreviewUrl(final String previewUrl) {
626      this.previewUrl = previewUrl;
627    }
628  }
629
630
631  public static class Reaction extends AbstractFacebookType {
632    @Facebook
633    private String reaction;
634    @Facebook
635    private List<ExtendedReferenceType> users = new ArrayList<>();
636
637    public List<ExtendedReferenceType> getUsers() {
638      return users;
639    }
640
641    public boolean addUser(ExtendedReferenceType user) {
642      return users.add(user);
643    }
644
645    public boolean removeUser(ExtendedReferenceType user) {
646      return users.remove(user);
647    }
648
649    @java.lang.SuppressWarnings("all")
650    public String getReaction() {
651      return this.reaction;
652    }
653
654    @java.lang.SuppressWarnings("all")
655    public void setReaction(final String reaction) {
656      this.reaction = reaction;
657    }
658  }
659
660
661  public static class Story extends AbstractFacebookType {
662    @Facebook("reply_to")
663    StoryReply replyTo;
664    @Facebook
665    StoryMention mention;
666
667    @java.lang.SuppressWarnings("all")
668    public StoryReply getReplyTo() {
669      return this.replyTo;
670    }
671
672    @java.lang.SuppressWarnings("all")
673    public void setReplyTo(final StoryReply replyTo) {
674      this.replyTo = replyTo;
675    }
676
677    @java.lang.SuppressWarnings("all")
678    public StoryMention getMention() {
679      return this.mention;
680    }
681
682    @java.lang.SuppressWarnings("all")
683    public void setMention(final StoryMention mention) {
684      this.mention = mention;
685    }
686  }
687
688
689  public static class StoryReply extends FacebookType {
690    @Facebook
691    private String link;
692
693    @java.lang.SuppressWarnings("all")
694    public String getLink() {
695      return this.link;
696    }
697
698    @java.lang.SuppressWarnings("all")
699    public void setLink(final String link) {
700      this.link = link;
701    }
702  }
703
704
705  public static class StoryMention extends FacebookType {
706    @Facebook
707    private String link;
708
709    @java.lang.SuppressWarnings("all")
710    public String getLink() {
711      return this.link;
712    }
713
714    @java.lang.SuppressWarnings("all")
715    public void setLink(final String link) {
716      this.link = link;
717    }
718  }
719
720  @JsonMappingCompleted
721  void convertTags() {
722    if (rawTags != null) {
723      JsonValue parsedObject = Json.parse(rawTags);
724      if (parsedObject.isObject() && parsedObject.asObject().get("data").isArray()) {
725        for (JsonValue tagObject : parsedObject.asObject().get("data").asArray()) {
726          tags.add(tagObject.asObject().get("name").asString());
727        }
728      }
729    }
730  }
731
732  /**
733   * The attachments associated with the message.
734   *
735   * @return The attachments associated with the message.
736   */
737  public List<Attachment> getAttachments() {
738    return (attachments != null ? unmodifiableList(attachments) : null);
739  }
740
741  public boolean addAttachment(Attachment attachment) {
742    return attachments.add(attachment);
743  }
744
745  public boolean removeAttachment(Attachment attachment) {
746    return attachments.remove(attachment);
747  }
748
749  /**
750   * The shares associated with the message.
751   *
752   * This is page only.
753   *
754   * @return The shares associated with the message.
755   */
756  public List<Share> getShares() {
757    return (shares != null ? unmodifiableList(shares) : null);
758  }
759
760  public boolean addShare(Share share) {
761    return shares.add(share);
762  }
763
764  public boolean removeShare(Share share) {
765    return shares.remove(share);
766  }
767
768  /**
769   * A list of recipients of the message.
770   *
771   * @return A list of the message recipients
772   */
773  public List<ExtendedReferenceType> getTo() {
774    return unmodifiableList(to);
775  }
776
777  public boolean addTo(ExtendedReferenceType receiver) {
778    return to.add(receiver);
779  }
780
781  public boolean removeTo(ExtendedReferenceType receiver) {
782    return to.remove(receiver);
783  }
784
785  /**
786   * A set of tags indicating the message folder and source of the message.
787   *
788   * @return A set of tags indicating the message folder and source of the message.
789   */
790  public List<String> getTags() {
791    return unmodifiableList(tags);
792  }
793
794  public boolean addTag(String tag) {
795    return tags.add(tag);
796  }
797
798  public boolean removeTag(String tag) {
799    return tags.remove(tag);
800  }
801
802  /**
803   * Reaction (like/love) on the existing message
804   *
805   * @return list of reactions
806   */
807  public List<Reaction> getReactions() {
808    return unmodifiableList(reactions);
809  }
810
811  public boolean addReaction(Reaction reaction) {
812    return reactions.add(reaction);
813  }
814
815  public boolean removeReaction(Reaction reaction) {
816    return reactions.remove(reaction);
817  }
818
819  /**
820   * The time the message was initially created.
821   *
822   * @return The time the message was initially created.
823   */
824  @Override
825  @java.lang.SuppressWarnings("all")
826  public Date getCreatedTime() {
827    return this.createdTime;
828  }
829
830  /**
831   * The time the message was initially created.
832   */
833  @java.lang.SuppressWarnings("all")
834  public void setCreatedTime(final Date createdTime) {
835    this.createdTime = createdTime;
836  }
837
838  /**
839   * The subject of the message.
840   *
841   * @return The subject of the message.
842   */
843  @java.lang.SuppressWarnings("all")
844  public String getSubject() {
845    return this.subject;
846  }
847
848  /**
849   * The subject of the message.
850   */
851  @java.lang.SuppressWarnings("all")
852  public void setSubject(final String subject) {
853    this.subject = subject;
854  }
855
856  /**
857   * The sender of this message
858   *
859   * @return The sender of this message
860   */
861  @Override
862  @java.lang.SuppressWarnings("all")
863  public ExtendedReferenceType getFrom() {
864    return this.from;
865  }
866
867  /**
868   * The sender of this message
869   */
870  @java.lang.SuppressWarnings("all")
871  public void setFrom(final ExtendedReferenceType from) {
872    this.from = from;
873  }
874
875  @java.lang.SuppressWarnings("all")
876  public boolean isUnsupported() {
877    return this.isUnsupported;
878  }
879
880  @java.lang.SuppressWarnings("all")
881  public void setUnsupported(final boolean isUnsupported) {
882    this.isUnsupported = isUnsupported;
883  }
884
885  /**
886   * The text of the message
887   *
888   * @return The text of the message
889   */
890  @Override
891  @java.lang.SuppressWarnings("all")
892  public String getMessage() {
893    return this.message;
894  }
895
896  /**
897   * The text of the message
898   */
899  @java.lang.SuppressWarnings("all")
900  public void setMessage(final String message) {
901    this.message = message;
902  }
903
904  /**
905   * Sticker contained in the message.
906   *
907   * @return The Sticker in that message
908   */
909  @java.lang.SuppressWarnings("all")
910  public String getSticker() {
911    return this.sticker;
912  }
913
914  /**
915   * Sticker contained in the message.
916   */
917  @java.lang.SuppressWarnings("all")
918  public void setSticker(final String sticker) {
919    this.sticker = sticker;
920  }
921
922  @java.lang.SuppressWarnings("all")
923  public Story getStory() {
924    return this.story;
925  }
926
927  @java.lang.SuppressWarnings("all")
928  public void setStory(final Story story) {
929    this.story = story;
930  }
931
932  /**
933   * The time of the last update to this message.
934   *
935   * @return The time of the last update to this message.
936   */
937  @java.lang.SuppressWarnings("all")
938  public Date getUpdatedTime() {
939    return this.updatedTime;
940  }
941
942  /**
943   * The time of the last update to this message.
944   */
945  @java.lang.SuppressWarnings("all")
946  public void setUpdatedTime(final Date updatedTime) {
947    this.updatedTime = updatedTime;
948  }
949
950  /**
951   * The "unread" count for this message.
952   *
953   * @return The "unread" count for this message.
954   */
955  @java.lang.SuppressWarnings("all")
956  public Integer getUnread() {
957    return this.unread;
958  }
959
960  /**
961   * The "unread" count for this message.
962   */
963  @java.lang.SuppressWarnings("all")
964  public void setUnread(final Integer unread) {
965    this.unread = unread;
966  }
967
968  /**
969   * Whether this message has been seen.
970   *
971   * @return Whether this message has been seen.
972   */
973  @java.lang.SuppressWarnings("all")
974  public Boolean getUnseen() {
975    return this.unseen;
976  }
977
978  /**
979   * Whether this message has been seen.
980   */
981  @java.lang.SuppressWarnings("all")
982  public void setUnseen(final Boolean unseen) {
983    this.unseen = unseen;
984  }
985}