001// Generated by delombok at Wed Nov 11 21:20:25 CET 2020
002/*
003 * Copyright (c) 2010-2020 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 String isGuestUser;
061
062  @java.lang.Override
063  @java.lang.SuppressWarnings("all")
064  public java.lang.String toString() {
065    return "PostbackReferral(ref=" + this.getRef() + ", adId=" + this.getAdId() + ", source=" + this.getSource() + ", type=" + this.getType() + ", refererUri=" + this.getRefererUri() + ", isGuestUser=" + this.getIsGuestUser() + ")";
066  }
067
068  /**
069   * The arbitrary data that was originally passed in the ref param added to the m.me link.
070   */
071  @java.lang.SuppressWarnings("all")
072  public String getRef() {
073    return this.ref;
074  }
075
076  /**
077   * The arbitrary data that was originally passed in the ref param added to the m.me link.
078   */
079  @java.lang.SuppressWarnings("all")
080  public void setRef(final String ref) {
081    this.ref = ref;
082  }
083
084  /**
085   */
086  @java.lang.SuppressWarnings("all")
087  public String getAdId() {
088    return this.adId;
089  }
090
091  /**
092   */
093  @java.lang.SuppressWarnings("all")
094  public void setAdId(final String adId) {
095    this.adId = adId;
096  }
097
098  /**
099   * The source of this referral. Currently, the only possible value is “SHORTLINK”.
100   */
101  @java.lang.SuppressWarnings("all")
102  public String getSource() {
103    return this.source;
104  }
105
106  /**
107   * The source of this referral. Currently, the only possible value is “SHORTLINK”.
108   */
109  @java.lang.SuppressWarnings("all")
110  public void setSource(final String source) {
111    this.source = source;
112  }
113
114  /**
115   * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD".
116   */
117  @java.lang.SuppressWarnings("all")
118  public String getType() {
119    return this.type;
120  }
121
122  /**
123   * The identifier for the referral. For referrals coming from m.me links, it will always be "OPEN_THREAD".
124   */
125  @java.lang.SuppressWarnings("all")
126  public void setType(final String type) {
127    this.type = type;
128  }
129
130  /**
131   * The URI of the site where the message was sent in the Facebook chat plugin.
132   */
133  @java.lang.SuppressWarnings("all")
134  public String getRefererUri() {
135    return this.refererUri;
136  }
137
138  /**
139   * The URI of the site where the message was sent in the Facebook chat plugin.
140   */
141  @java.lang.SuppressWarnings("all")
142  public void setRefererUri(final String refererUri) {
143    this.refererUri = refererUri;
144  }
145
146  /**
147   * A flag indicating whether the user is a guest user from Facebook Chat Plugin
148   */
149  @java.lang.SuppressWarnings("all")
150  public String getIsGuestUser() {
151    return this.isGuestUser;
152  }
153
154  /**
155   * A flag indicating whether the user is a guest user from Facebook Chat Plugin
156   */
157  @java.lang.SuppressWarnings("all")
158  public void setIsGuestUser(final String isGuestUser) {
159    this.isGuestUser = isGuestUser;
160  }
161}