com.github.codedrinker.fm.entity.FMReplyMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of facebook-messenger Show documentation
Show all versions of facebook-messenger Show documentation
A most easily usable Facebook Messenger Platform API
The newest version!
/*
* Copyright 2017 Chunlei Wang
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.codedrinker.fm.entity;
import com.github.codedrinker.fm.exception.QuickReplyOutOfBoundException;
import java.util.List;
public class FMReplyMessage {
private Member recipient;
private Message message;
private String sender_action;
public Member getRecipient() {
return recipient;
}
public void setRecipient(Member recipient) {
this.recipient = recipient;
}
public Message getMessage() {
return message;
}
public void setMessage(Message message) {
this.message = message;
}
public String getSender_action() {
return sender_action;
}
public void setSender_action(String sender_action) {
this.sender_action = sender_action;
}
public FMReplyMessage withQuickReplies(List quickReplies) {
this.getMessage().withQuickReplies(quickReplies);
return this;
}
public static class Message {
private String text;
private Attachment attachment;
private List quick_replies;
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Attachment getAttachment() {
return attachment;
}
public void setAttachment(Attachment attachment) {
this.attachment = attachment;
}
public List getQuick_replies() {
return quick_replies;
}
public void setQuick_replies(List quick_replies) {
this.quick_replies = quick_replies;
}
public static class Attachment {
private String type = "template";
private Payload payload;
public Payload getPayload() {
return payload;
}
public void setPayload(Payload payload) {
this.payload = payload;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static class Payload {
private TemplateType template_type = TemplateType.generic;
private TopElementStyle top_element_style;
private String text;
private List