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.messaging; 024 025import com.restfb.Facebook; 026 027/** 028 * Represents the referral sub object described here: 029 * https://developers.facebook.com/docs/messenger-platform/referral-params 030 */ 031public class PostbackReferral { 032 /** 033 * The arbitrary data that was originally passed in the ref param added to the m.me link. 034 */ 035 @Facebook 036 private String ref; 037 /** 038 */ 039 @Facebook("ad_id") 040 private String adId; 041 /** 042 * The source of this referral. Currently, the only possible value is “SHORTLINK”. 043 */ 044 @Facebook 045 private String source; 046 /** 047 * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD". 048 */ 049 @Facebook 050 private String type; 051 /** 052 * The URI of the site where the message was sent in the Facebook chat plugin. 053 */ 054 @Facebook("referer_uri") 055 private String refererUri; 056 /** 057 * A flag indicating whether the user is a guest user from Facebook Chat Plugin 058 */ 059 @Facebook("is_guest_user") 060 private Boolean isGuestUser; 061 /** 062 * The data contaning information about the CTM ad, the user initiated the thread from. 063 */ 064 @Facebook("ads_context_data") 065 private AdsContextData adsContextData; 066 067 068 public static class AdsContextData { 069 /** 070 * Title of the Ad. 071 */ 072 @Facebook("ad_title") 073 private String adTitle; 074 /** 075 * [Optional] Url of the image from the Ad the user is interested. 076 */ 077 @Facebook("photo_url") 078 private String photoUrl; 079 /** 080 * [Optional] Thumbnail url of the the video from the ad. 081 */ 082 @Facebook("video_url") 083 private String videoUrl; 084 /** 085 * ID of the post. 086 */ 087 @Facebook("post_id") 088 private String postId; 089 090 /** 091 * Title of the Ad. 092 */ 093 @java.lang.SuppressWarnings("all") 094 @lombok.Generated 095 public String getAdTitle() { 096 return this.adTitle; 097 } 098 099 /** 100 * Title of the Ad. 101 */ 102 @java.lang.SuppressWarnings("all") 103 @lombok.Generated 104 public void setAdTitle(final String adTitle) { 105 this.adTitle = adTitle; 106 } 107 108 /** 109 * [Optional] Url of the image from the Ad the user is interested. 110 */ 111 @java.lang.SuppressWarnings("all") 112 @lombok.Generated 113 public String getPhotoUrl() { 114 return this.photoUrl; 115 } 116 117 /** 118 * [Optional] Url of the image from the Ad the user is interested. 119 */ 120 @java.lang.SuppressWarnings("all") 121 @lombok.Generated 122 public void setPhotoUrl(final String photoUrl) { 123 this.photoUrl = photoUrl; 124 } 125 126 /** 127 * [Optional] Thumbnail url of the the video from the ad. 128 */ 129 @java.lang.SuppressWarnings("all") 130 @lombok.Generated 131 public String getVideoUrl() { 132 return this.videoUrl; 133 } 134 135 /** 136 * [Optional] Thumbnail url of the the video from the ad. 137 */ 138 @java.lang.SuppressWarnings("all") 139 @lombok.Generated 140 public void setVideoUrl(final String videoUrl) { 141 this.videoUrl = videoUrl; 142 } 143 144 /** 145 * ID of the post. 146 */ 147 @java.lang.SuppressWarnings("all") 148 @lombok.Generated 149 public String getPostId() { 150 return this.postId; 151 } 152 153 /** 154 * ID of the post. 155 */ 156 @java.lang.SuppressWarnings("all") 157 @lombok.Generated 158 public void setPostId(final String postId) { 159 this.postId = postId; 160 } 161 } 162 163 @java.lang.Override 164 @java.lang.SuppressWarnings("all") 165 @lombok.Generated 166 public java.lang.String toString() { 167 return "PostbackReferral(ref=" + this.getRef() + ", adId=" + this.getAdId() + ", source=" + this.getSource() + ", type=" + this.getType() + ", refererUri=" + this.getRefererUri() + ", isGuestUser=" + this.getIsGuestUser() + ", adsContextData=" + this.getAdsContextData() + ")"; 168 } 169 170 /** 171 * The arbitrary data that was originally passed in the ref param added to the m.me link. 172 */ 173 @java.lang.SuppressWarnings("all") 174 @lombok.Generated 175 public String getRef() { 176 return this.ref; 177 } 178 179 /** 180 * The arbitrary data that was originally passed in the ref param added to the m.me link. 181 */ 182 @java.lang.SuppressWarnings("all") 183 @lombok.Generated 184 public void setRef(final String ref) { 185 this.ref = ref; 186 } 187 188 /** 189 */ 190 @java.lang.SuppressWarnings("all") 191 @lombok.Generated 192 public String getAdId() { 193 return this.adId; 194 } 195 196 /** 197 */ 198 @java.lang.SuppressWarnings("all") 199 @lombok.Generated 200 public void setAdId(final String adId) { 201 this.adId = adId; 202 } 203 204 /** 205 * The source of this referral. Currently, the only possible value is “SHORTLINK”. 206 */ 207 @java.lang.SuppressWarnings("all") 208 @lombok.Generated 209 public String getSource() { 210 return this.source; 211 } 212 213 /** 214 * The source of this referral. Currently, the only possible value is “SHORTLINK”. 215 */ 216 @java.lang.SuppressWarnings("all") 217 @lombok.Generated 218 public void setSource(final String source) { 219 this.source = source; 220 } 221 222 /** 223 * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD". 224 */ 225 @java.lang.SuppressWarnings("all") 226 @lombok.Generated 227 public String getType() { 228 return this.type; 229 } 230 231 /** 232 * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD". 233 */ 234 @java.lang.SuppressWarnings("all") 235 @lombok.Generated 236 public void setType(final String type) { 237 this.type = type; 238 } 239 240 /** 241 * The URI of the site where the message was sent in the Facebook chat plugin. 242 */ 243 @java.lang.SuppressWarnings("all") 244 @lombok.Generated 245 public String getRefererUri() { 246 return this.refererUri; 247 } 248 249 /** 250 * The URI of the site where the message was sent in the Facebook chat plugin. 251 */ 252 @java.lang.SuppressWarnings("all") 253 @lombok.Generated 254 public void setRefererUri(final String refererUri) { 255 this.refererUri = refererUri; 256 } 257 258 /** 259 * A flag indicating whether the user is a guest user from Facebook Chat Plugin 260 */ 261 @java.lang.SuppressWarnings("all") 262 @lombok.Generated 263 public Boolean getIsGuestUser() { 264 return this.isGuestUser; 265 } 266 267 /** 268 * A flag indicating whether the user is a guest user from Facebook Chat Plugin 269 */ 270 @java.lang.SuppressWarnings("all") 271 @lombok.Generated 272 public void setIsGuestUser(final Boolean isGuestUser) { 273 this.isGuestUser = isGuestUser; 274 } 275 276 /** 277 * The data contaning information about the CTM ad, the user initiated the thread from. 278 */ 279 @java.lang.SuppressWarnings("all") 280 @lombok.Generated 281 public AdsContextData getAdsContextData() { 282 return this.adsContextData; 283 } 284 285 /** 286 * The data contaning information about the CTM ad, the user initiated the thread from. 287 */ 288 @java.lang.SuppressWarnings("all") 289 @lombok.Generated 290 public void setAdsContextData(final AdsContextData adsContextData) { 291 this.adsContextData = adsContextData; 292 } 293}