001// Generated by delombok at Wed Jan 31 21:27:42 UTC 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.whatsapp.platform.message;
024
025import com.restfb.Facebook;
026import com.restfb.types.AbstractFacebookType;
027
028public class Interactive extends AbstractFacebookType {
029  @Facebook("list_reply")
030  private Reply listReply;
031  @Facebook("button_reply")
032  private Reply buttonReply;
033  @Facebook
034  private Type type;
035
036  public Reply getReply() {
037    if (buttonReply != null) {
038      return buttonReply;
039    }
040    if (listReply != null) {
041      return listReply;
042    }
043    return null;
044  }
045
046  public boolean isButtonReply() {
047    return buttonReply != null;
048  }
049
050  public boolean isListReply() {
051    return listReply != null;
052  }
053
054
055  public static class Reply extends AbstractFacebookType {
056    @Facebook
057    private String id;
058    @Facebook
059    private String title;
060    @Facebook
061    private String description;
062
063    @java.lang.SuppressWarnings("all")
064    public String getId() {
065      return this.id;
066    }
067
068    @java.lang.SuppressWarnings("all")
069    public void setId(final String id) {
070      this.id = id;
071    }
072
073    @java.lang.SuppressWarnings("all")
074    public String getTitle() {
075      return this.title;
076    }
077
078    @java.lang.SuppressWarnings("all")
079    public void setTitle(final String title) {
080      this.title = title;
081    }
082
083    @java.lang.SuppressWarnings("all")
084    public String getDescription() {
085      return this.description;
086    }
087
088    @java.lang.SuppressWarnings("all")
089    public void setDescription(final String description) {
090      this.description = description;
091    }
092  }
093
094
095  public enum Type {
096    list_reply, button_reply;
097  }
098
099  @java.lang.SuppressWarnings("all")
100  public Reply getListReply() {
101    return this.listReply;
102  }
103
104  @java.lang.SuppressWarnings("all")
105  public void setListReply(final Reply listReply) {
106    this.listReply = listReply;
107  }
108
109  @java.lang.SuppressWarnings("all")
110  public Reply getButtonReply() {
111    return this.buttonReply;
112  }
113
114  @java.lang.SuppressWarnings("all")
115  public void setButtonReply(final Reply buttonReply) {
116    this.buttonReply = buttonReply;
117  }
118
119  @java.lang.SuppressWarnings("all")
120  public Type getType() {
121    return this.type;
122  }
123
124  @java.lang.SuppressWarnings("all")
125  public void setType(final Type type) {
126    this.type = type;
127  }
128}