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.webhook; 024 025import java.util.ArrayList; 026import java.util.Date; 027import java.util.List; 028import com.restfb.Facebook; 029import com.restfb.JsonMapper.JsonMappingCompleted; 030import com.restfb.types.webhook.messaging.MessagingItem; 031 032public class WebhookEntry { 033 @Facebook 034 private String uid; 035 @Facebook 036 private String id; 037 private Date time = new Date(); 038 @Facebook("time") 039 private Long rawTime; 040 @Facebook("changed_fields") 041 private List<String> changedFields = new ArrayList<>(); 042 @Facebook 043 private List<Change> changes = new ArrayList<>(); 044 @Facebook 045 private List<MessagingItem> messaging = new ArrayList<>(); 046 @Facebook 047 private List<MessagingItem> standby = new ArrayList<>(); 048 049 public boolean hasStandby() { 050 return !standby.isEmpty(); 051 } 052 053 @JsonMappingCompleted 054 private void convertDate() { 055 if (rawTime != null) { 056 time.setTime(rawTime * 1000); 057 } 058 } 059 060 @java.lang.Override 061 @java.lang.SuppressWarnings("all") 062 @lombok.Generated 063 public java.lang.String toString() { 064 return "WebhookEntry(uid=" + this.getUid() + ", id=" + this.getId() + ", time=" + this.getTime() + ", rawTime=" + this.rawTime + ", changedFields=" + this.getChangedFields() + ", changes=" + this.getChanges() + ", messaging=" + this.getMessaging() + ", standby=" + this.getStandby() + ")"; 065 } 066 067 @java.lang.SuppressWarnings("all") 068 @lombok.Generated 069 public String getUid() { 070 return this.uid; 071 } 072 073 @java.lang.SuppressWarnings("all") 074 @lombok.Generated 075 public void setUid(final String uid) { 076 this.uid = uid; 077 } 078 079 @java.lang.SuppressWarnings("all") 080 @lombok.Generated 081 public String getId() { 082 return this.id; 083 } 084 085 @java.lang.SuppressWarnings("all") 086 @lombok.Generated 087 public void setId(final String id) { 088 this.id = id; 089 } 090 091 @java.lang.SuppressWarnings("all") 092 @lombok.Generated 093 public Date getTime() { 094 return this.time; 095 } 096 097 @java.lang.SuppressWarnings("all") 098 @lombok.Generated 099 public void setTime(final Date time) { 100 this.time = time; 101 } 102 103 @java.lang.SuppressWarnings("all") 104 @lombok.Generated 105 public List<String> getChangedFields() { 106 return this.changedFields; 107 } 108 109 @java.lang.SuppressWarnings("all") 110 @lombok.Generated 111 public void setChangedFields(final List<String> changedFields) { 112 this.changedFields = changedFields; 113 } 114 115 @java.lang.SuppressWarnings("all") 116 @lombok.Generated 117 public List<Change> getChanges() { 118 return this.changes; 119 } 120 121 @java.lang.SuppressWarnings("all") 122 @lombok.Generated 123 public void setChanges(final List<Change> changes) { 124 this.changes = changes; 125 } 126 127 @java.lang.SuppressWarnings("all") 128 @lombok.Generated 129 public List<MessagingItem> getMessaging() { 130 return this.messaging; 131 } 132 133 @java.lang.SuppressWarnings("all") 134 @lombok.Generated 135 public void setMessaging(final List<MessagingItem> messaging) { 136 this.messaging = messaging; 137 } 138 139 @java.lang.SuppressWarnings("all") 140 @lombok.Generated 141 public List<MessagingItem> getStandby() { 142 return this.standby; 143 } 144 145 @java.lang.SuppressWarnings("all") 146 @lombok.Generated 147 public void setStandby(final List<MessagingItem> standby) { 148 this.standby = standby; 149 } 150}