001// Generated by delombok at Fri Oct 04 16:05:59 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.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 @java.lang.SuppressWarnings("all") 091 public String getAdTitle() { 092 return this.adTitle; 093 } 094 095 @java.lang.SuppressWarnings("all") 096 public void setAdTitle(final String adTitle) { 097 this.adTitle = adTitle; 098 } 099 100 @java.lang.SuppressWarnings("all") 101 public String getPhotoUrl() { 102 return this.photoUrl; 103 } 104 105 @java.lang.SuppressWarnings("all") 106 public void setPhotoUrl(final String photoUrl) { 107 this.photoUrl = photoUrl; 108 } 109 110 @java.lang.SuppressWarnings("all") 111 public String getVideoUrl() { 112 return this.videoUrl; 113 } 114 115 @java.lang.SuppressWarnings("all") 116 public void setVideoUrl(final String videoUrl) { 117 this.videoUrl = videoUrl; 118 } 119 120 @java.lang.SuppressWarnings("all") 121 public String getPostId() { 122 return this.postId; 123 } 124 125 @java.lang.SuppressWarnings("all") 126 public void setPostId(final String postId) { 127 this.postId = postId; 128 } 129 } 130 131 @java.lang.Override 132 @java.lang.SuppressWarnings("all") 133 public java.lang.String toString() { 134 return "PostbackReferral(ref=" + this.getRef() + ", adId=" + this.getAdId() + ", source=" + this.getSource() + ", type=" + this.getType() + ", refererUri=" + this.getRefererUri() + ", isGuestUser=" + this.getIsGuestUser() + ", adsContextData=" + this.getAdsContextData() + ")"; 135 } 136 137 /** 138 * The arbitrary data that was originally passed in the ref param added to the m.me link. 139 */ 140 @java.lang.SuppressWarnings("all") 141 public String getRef() { 142 return this.ref; 143 } 144 145 /** 146 * The arbitrary data that was originally passed in the ref param added to the m.me link. 147 */ 148 @java.lang.SuppressWarnings("all") 149 public void setRef(final String ref) { 150 this.ref = ref; 151 } 152 153 /** 154 */ 155 @java.lang.SuppressWarnings("all") 156 public String getAdId() { 157 return this.adId; 158 } 159 160 /** 161 */ 162 @java.lang.SuppressWarnings("all") 163 public void setAdId(final String adId) { 164 this.adId = adId; 165 } 166 167 /** 168 * The source of this referral. Currently, the only possible value is “SHORTLINK”. 169 */ 170 @java.lang.SuppressWarnings("all") 171 public String getSource() { 172 return this.source; 173 } 174 175 /** 176 * The source of this referral. Currently, the only possible value is “SHORTLINK”. 177 */ 178 @java.lang.SuppressWarnings("all") 179 public void setSource(final String source) { 180 this.source = source; 181 } 182 183 /** 184 * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD". 185 */ 186 @java.lang.SuppressWarnings("all") 187 public String getType() { 188 return this.type; 189 } 190 191 /** 192 * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD". 193 */ 194 @java.lang.SuppressWarnings("all") 195 public void setType(final String type) { 196 this.type = type; 197 } 198 199 /** 200 * The URI of the site where the message was sent in the Facebook chat plugin. 201 */ 202 @java.lang.SuppressWarnings("all") 203 public String getRefererUri() { 204 return this.refererUri; 205 } 206 207 /** 208 * The URI of the site where the message was sent in the Facebook chat plugin. 209 */ 210 @java.lang.SuppressWarnings("all") 211 public void setRefererUri(final String refererUri) { 212 this.refererUri = refererUri; 213 } 214 215 /** 216 * A flag indicating whether the user is a guest user from Facebook Chat Plugin 217 */ 218 @java.lang.SuppressWarnings("all") 219 public Boolean getIsGuestUser() { 220 return this.isGuestUser; 221 } 222 223 /** 224 * A flag indicating whether the user is a guest user from Facebook Chat Plugin 225 */ 226 @java.lang.SuppressWarnings("all") 227 public void setIsGuestUser(final Boolean isGuestUser) { 228 this.isGuestUser = isGuestUser; 229 } 230 231 /** 232 * The data contaning information about the CTM ad, the user initiated the thread from. 233 */ 234 @java.lang.SuppressWarnings("all") 235 public AdsContextData getAdsContextData() { 236 return this.adsContextData; 237 } 238 239 /** 240 * The data contaning information about the CTM ad, the user initiated the thread from. 241 */ 242 @java.lang.SuppressWarnings("all") 243 public void setAdsContextData(final AdsContextData adsContextData) { 244 this.adsContextData = adsContextData; 245 } 246}