methods classes: setters to builder style

This commit is contained in:
Alexander Babai 2016-04-12 22:25:54 +03:00
parent b9d997fddc
commit 0e36784cbe
22 changed files with 205 additions and 102 deletions

View File

@ -44,56 +44,63 @@ public class AnswerInlineQuery extends BotApiMethod<Boolean> {
return inlineQueryId; return inlineQueryId;
} }
public void setInlineQueryId(String inlineQueryId) { public AnswerInlineQuery setInlineQueryId(String inlineQueryId) {
this.inlineQueryId = inlineQueryId; this.inlineQueryId = inlineQueryId;
return this;
} }
public List<InlineQueryResult> getResults() { public List<InlineQueryResult> getResults() {
return results; return results;
} }
public void setResults(List<InlineQueryResult> results) { public AnswerInlineQuery setResults(List<InlineQueryResult> results) {
this.results = results; this.results = results;
return this;
} }
public Integer getCacheTime() { public Integer getCacheTime() {
return cacheTime; return cacheTime;
} }
public void setCacheTime(Integer cacheTime) { public AnswerInlineQuery setCacheTime(Integer cacheTime) {
this.cacheTime = cacheTime; this.cacheTime = cacheTime;
return this;
} }
public Boolean getPersonal() { public Boolean getPersonal() {
return isPersonal; return isPersonal;
} }
public void setPersonal(Boolean personal) { public AnswerInlineQuery setPersonal(Boolean personal) {
isPersonal = personal; isPersonal = personal;
return this;
} }
public String getNextOffset() { public String getNextOffset() {
return nextOffset; return nextOffset;
} }
public void setNextOffset(String nextOffset) { public AnswerInlineQuery setNextOffset(String nextOffset) {
this.nextOffset = nextOffset; this.nextOffset = nextOffset;
return this;
} }
public String getSwitchPmText() { public String getSwitchPmText() {
return switchPmText; return switchPmText;
} }
public void setSwitchPmText(String switchPmText) { public AnswerInlineQuery setSwitchPmText(String switchPmText) {
this.switchPmText = switchPmText; this.switchPmText = switchPmText;
return this;
} }
public String getSwitchPmParameter() { public String getSwitchPmParameter() {
return switchPmParameter; return switchPmParameter;
} }
public void setSwitchPmParameter(String switchPmParameter) { public AnswerInlineQuery setSwitchPmParameter(String switchPmParameter) {
this.switchPmParameter = switchPmParameter; this.switchPmParameter = switchPmParameter;
return this;
} }
@Override @Override

View File

@ -42,24 +42,27 @@ public class ForwardMessage extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public ForwardMessage setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getFromChatId() { public Integer getFromChatId() {
return fromChatId; return fromChatId;
} }
public void setFromChatId(Integer fromChatId) { public ForwardMessage setFromChatId(Integer fromChatId) {
this.fromChatId = fromChatId; this.fromChatId = fromChatId;
return this;
} }
public Integer getMessageId() { public Integer getMessageId() {
return messageId; return messageId;
} }
public void setMessageId(Integer messageId) { public ForwardMessage setMessageId(Integer messageId) {
this.messageId = messageId; this.messageId = messageId;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {

View File

@ -36,8 +36,9 @@ public class GetFile extends BotApiMethod<File> {
return fileId; return fileId;
} }
public void setFileId(String fileId) { public GetFile setFileId(String fileId) {
this.fileId = fileId; this.fileId = fileId;
return this;
} }
@Override @Override

View File

@ -41,25 +41,29 @@ public class GetUserProfilePhotos extends BotApiMethod<UserProfilePhotos> {
return userId; return userId;
} }
public void setUserId(Integer userId) { public GetUserProfilePhotos setUserId(Integer userId) {
this.userId = userId; this.userId = userId;
return this;
} }
public Integer getOffset() { public Integer getOffset() {
return offset; return offset;
} }
public void setOffset(Integer offset) { public GetUserProfilePhotos setOffset(Integer offset) {
this.offset = offset; this.offset = offset;
return this;
} }
public Integer getLimit() { public Integer getLimit() {
return limit; return limit;
} }
public void setLimit(Integer limit) { public GetUserProfilePhotos setLimit(Integer limit) {
this.limit = limit; this.limit = limit;
return this;
} }
@Override @Override
public JSONObject toJson() { public JSONObject toJson() {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();

View File

@ -38,16 +38,18 @@ public class KickChatMember extends BotApiMethod<Boolean> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public KickChatMember setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getUserId() { public Integer getUserId() {
return userId; return userId;
} }
public void setUserId(Integer userId) { public KickChatMember setUserId(Integer userId) {
this.userId = userId; this.userId = userId;
return this;
} }
@Override @Override

View File

@ -34,16 +34,18 @@ public class UnbanChatMember extends BotApiMethod<Boolean> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public UnbanChatMember setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getUserId() { public Integer getUserId() {
return userId; return userId;
} }
public void setUserId(Integer userId) { public UnbanChatMember setUserId(Integer userId) {
this.userId = userId; this.userId = userId;
return this;
} }
@Override @Override

View File

@ -47,16 +47,18 @@ public class SendAudio {
return this.duration; return this.duration;
} }
public void setDuration(Integer duration) { public SendAudio setDuration(Integer duration) {
this.duration = duration; this.duration = duration;
return this;
} }
public String getChatId() { public String getChatId() {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendAudio setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getAudio() { public String getAudio() {
@ -69,9 +71,10 @@ public class SendAudio {
* @param audio File_id of the audio to send * @param audio File_id of the audio to send
* @note The file_id must have already been received or sent by your bot * @note The file_id must have already been received or sent by your bot
*/ */
public void setAudio(String audio) { public SendAudio setAudio(String audio) {
this.audio = audio; this.audio = audio;
this.isNewAudio = false; this.isNewAudio = false;
return this;
} }
/** /**
@ -80,42 +83,47 @@ public class SendAudio {
* @param audio Path to the new file in your server * @param audio Path to the new file in your server
* @param audioName Name of the file itself * @param audioName Name of the file itself
*/ */
public void setNewAudio(String audio, String audioName) { public SendAudio setNewAudio(String audio, String audioName) {
this.audio = audio; this.audio = audio;
this.isNewAudio = true; this.isNewAudio = true;
this.audioName = audioName; this.audioName = audioName;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendAudio setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendAudio setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public String getPerformer() { public String getPerformer() {
return performer; return performer;
} }
public void setPerformer(String performer) { public SendAudio setPerformer(String performer) {
this.performer = performer; this.performer = performer;
return this;
} }
public String getTitle() { public String getTitle() {
return title; return title;
} }
public void setTitle(String title) { public SendAudio setTitle(String title) {
this.title = title; this.title = title;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {

View File

@ -37,16 +37,18 @@ public class SendChatAction extends BotApiMethod<Boolean> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendChatAction setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getAction() { public String getAction() {
return action; return action;
} }
public void setAction(String action) { public SendChatAction setAction(String action) {
this.action = action; this.action = action;
return this;
} }
@Override @Override

View File

@ -45,24 +45,27 @@ public class SendContact extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendContact setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendContact setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendContact setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {
@ -81,24 +84,27 @@ public class SendContact extends BotApiMethod<Message> {
return phoneNumber; return phoneNumber;
} }
public void setPhoneNumber(String phoneNumber) { public SendContact setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber; this.phoneNumber = phoneNumber;
return this;
} }
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
public void setFirstName(String firstName) { public SendContact setFirstName(String firstName) {
this.firstName = firstName; this.firstName = firstName;
return this;
} }
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
public void setLastName(String lastName) { public SendContact setLastName(String lastName) {
this.lastName = lastName; this.lastName = lastName;
return this;
} }
@Override @Override

View File

@ -39,23 +39,26 @@ public class SendDocument {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendDocument setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getDocument() { public String getDocument() {
return document; return document;
} }
public void setDocument(String document) { public SendDocument setDocument(String document) {
this.document = document; this.document = document;
this.isNewDocument = false; this.isNewDocument = false;
return this;
} }
public void setNewDocument(String document, String documentName) { public SendDocument setNewDocument(String document, String documentName) {
this.document = document; this.document = document;
this.isNewDocument = true; this.isNewDocument = true;
this.documentName = documentName; this.documentName = documentName;
return this;
} }
public boolean isNewDocument() { public boolean isNewDocument() {
@ -70,8 +73,9 @@ public class SendDocument {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendDocument setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {
@ -90,16 +94,18 @@ public class SendDocument {
return caption; return caption;
} }
public void setCaption(String caption) { public SendDocument setCaption(String caption) {
this.caption = caption; this.caption = caption;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendDocument setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
@Override @Override

View File

@ -42,40 +42,45 @@ public class SendLocation extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendLocation setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Float getLatitude() { public Float getLatitude() {
return latitude; return latitude;
} }
public void setLatitude(Float latitude) { public SendLocation setLatitude(Float latitude) {
this.latitude = latitude; this.latitude = latitude;
return this;
} }
public Float getLongitude() { public Float getLongitude() {
return longitude; return longitude;
} }
public void setLongitude(Float longitude) { public SendLocation setLongitude(Float longitude) {
this.longitude = longitude; this.longitude = longitude;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendLocation setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendLocation setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {

View File

@ -49,32 +49,36 @@ public class SendMessage extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendMessage setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getText() { public String getText() {
return text; return text;
} }
public void setText(String text) { public SendMessage setText(String text) {
this.text = text; this.text = text;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendMessage setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendMessage setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public Boolean getDisableWebPagePreview() { public Boolean getDisableWebPagePreview() {

View File

@ -40,41 +40,46 @@ public class SendPhoto {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendPhoto setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getPhoto() { public String getPhoto() {
return photo; return photo;
} }
public void setPhoto(String photo) { public SendPhoto setPhoto(String photo) {
this.photo = photo; this.photo = photo;
this.isNewPhoto = false; this.isNewPhoto = false;
return this;
} }
public String getCaption() { public String getCaption() {
return caption; return caption;
} }
public void setCaption(String caption) { public SendPhoto setCaption(String caption) {
this.caption = caption; this.caption = caption;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendPhoto setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendPhoto setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public boolean isNewPhoto() { public boolean isNewPhoto() {
@ -97,10 +102,11 @@ public class SendPhoto {
this.disableNotification = true; this.disableNotification = true;
} }
public void setNewPhoto(String photo, String photoName) { public SendPhoto setNewPhoto(String photo, String photoName) {
this.photo = photo; this.photo = photo;
this.isNewPhoto = true; this.isNewPhoto = true;
this.photoName = photoName; this.photoName = photoName;
return this;
} }
@Override @Override

View File

@ -37,39 +37,44 @@ public class SendSticker {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendSticker setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getSticker() { public String getSticker() {
return sticker; return sticker;
} }
public void setSticker(String sticker) { public SendSticker setSticker(String sticker) {
this.sticker = sticker; this.sticker = sticker;
this.isNewSticker = false; this.isNewSticker = false;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendSticker setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendSticker setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public void setSticker(String sticker, String stickerName) { public SendSticker setSticker(String sticker, String stickerName) {
this.sticker = sticker; this.sticker = sticker;
this.isNewSticker = true; this.isNewSticker = true;
this.stickerName = stickerName; this.stickerName = stickerName;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {

View File

@ -49,40 +49,45 @@ public class SendVenue extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendVenue setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Float getLatitude() { public Float getLatitude() {
return latitude; return latitude;
} }
public void setLatitude(Float latitude) { public SendVenue setLatitude(Float latitude) {
this.latitude = latitude; this.latitude = latitude;
return this;
} }
public Float getLongitude() { public Float getLongitude() {
return longitude; return longitude;
} }
public void setLongitude(Float longitude) { public SendVenue setLongitude(Float longitude) {
this.longitude = longitude; this.longitude = longitude;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendVenue setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendVenue setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public Boolean getDisableNotification() { public Boolean getDisableNotification() {
@ -101,24 +106,27 @@ public class SendVenue extends BotApiMethod<Message> {
return title; return title;
} }
public void setTitle(String title) { public SendVenue setTitle(String title) {
this.title = title; this.title = title;
return this;
} }
public String getAddress() { public String getAddress() {
return address; return address;
} }
public void setAddress(String address) { public SendVenue setAddress(String address) {
this.address = address; this.address = address;
return this;
} }
public String getFoursquareId() { public String getFoursquareId() {
return foursquareId; return foursquareId;
} }
public void setFoursquareId(String foursquareId) { public SendVenue setFoursquareId(String foursquareId) {
this.foursquareId = foursquareId; this.foursquareId = foursquareId;
return this;
} }
@Override @Override

View File

@ -46,49 +46,55 @@ public class SendVideo {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendVideo setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getVideo() { public String getVideo() {
return video; return video;
} }
public void setVideo(String video) { public SendVideo setVideo(String video) {
this.video = video; this.video = video;
this.isNewVideo = false; this.isNewVideo = false;
return this;
} }
public Integer getDuration() { public Integer getDuration() {
return duration; return duration;
} }
public void setDuration(Integer duration) { public SendVideo setDuration(Integer duration) {
this.duration = duration; this.duration = duration;
return this;
} }
public String getCaption() { public String getCaption() {
return caption; return caption;
} }
public void setCaption(String caption) { public SendVideo setCaption(String caption) {
this.caption = caption; this.caption = caption;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendVideo setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendVideo setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public boolean isNewVideo() { public boolean isNewVideo() {
@ -115,22 +121,25 @@ public class SendVideo {
return width; return width;
} }
public void setWidth(Integer width) { public SendVideo setWidth(Integer width) {
this.width = width; this.width = width;
return this;
} }
public Integer getHeight() { public Integer getHeight() {
return height; return height;
} }
public void setHeight(Integer height) { public SendVideo setHeight(Integer height) {
this.height = height; this.height = height;
return this;
} }
public void setNewVideo(String video, String videoName) { public SendVideo setNewVideo(String video, String videoName) {
this.video = video; this.video = video;
this.isNewVideo = true; this.isNewVideo = true;
this.videoName = videoName; this.videoName = videoName;
return this;
} }
@Override @Override

View File

@ -64,47 +64,53 @@ public class SendVoice {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public SendVoice setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public String getAudio() { public String getAudio() {
return audio; return audio;
} }
public void setAudio(String audio) { public SendVoice setAudio(String audio) {
this.audio = audio; this.audio = audio;
this.isNewVoice = false; this.isNewVoice = false;
return this;
} }
public void setNewAudio(String audio, String audioName) { public SendVoice setNewAudio(String audio, String audioName) {
this.audio = audio; this.audio = audio;
this.isNewVoice = false; this.isNewVoice = false;
this.voiceName = audioName; this.voiceName = audioName;
return this;
} }
public Integer getReplayToMessageId() { public Integer getReplayToMessageId() {
return replayToMessageId; return replayToMessageId;
} }
public void setReplayToMessageId(Integer replayToMessageId) { public SendVoice setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId; this.replayToMessageId = replayToMessageId;
return this;
} }
public ReplyKeyboard getReplayMarkup() { public ReplyKeyboard getReplayMarkup() {
return replayMarkup; return replayMarkup;
} }
public void setReplayMarkup(ReplyKeyboard replayMarkup) { public SendVoice setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup; this.replayMarkup = replayMarkup;
return this;
} }
public Integer getDuration() { public Integer getDuration() {
return duration; return duration;
} }
public void setDuration(Integer duration) { public SendVoice setDuration(Integer duration) {
this.duration = duration; this.duration = duration;
return this;
} }
public boolean isNewVoice() { public boolean isNewVoice() {

View File

@ -43,24 +43,27 @@ public class GetUpdates implements IToJson {
return offset; return offset;
} }
public void setOffset(Integer offset) { public GetUpdates setOffset(Integer offset) {
this.offset = offset; this.offset = offset;
return this;
} }
public Integer getLimit() { public Integer getLimit() {
return limit; return limit;
} }
public void setLimit(Integer limit) { public GetUpdates setLimit(Integer limit) {
this.limit = limit; this.limit = limit;
return this;
} }
public Integer getTimeout() { public Integer getTimeout() {
return timeout; return timeout;
} }
public void setTimeout(Integer timeout) { public GetUpdates setTimeout(Integer timeout) {
this.timeout = timeout; this.timeout = timeout;
return this;
} }
@Override @Override

View File

@ -25,16 +25,18 @@ public class SetWebhook {
return url; return url;
} }
public void setUrl(String url) { public SetWebhook setUrl(String url) {
this.url = url; this.url = url;
return this;
} }
public String getCertificateFile() { public String getCertificateFile() {
return certificateFile; return certificateFile;
} }
public void setCertificateFile(String certificateFile) { public SetWebhook setCertificateFile(String certificateFile) {
this.certificateFile = certificateFile; this.certificateFile = certificateFile;
return this;
} }
@Override @Override

View File

@ -52,40 +52,45 @@ public class EditMessageCaption extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public EditMessageCaption setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getMessageId() { public Integer getMessageId() {
return messageId; return messageId;
} }
public void setMessageId(Integer messageId) { public EditMessageCaption setMessageId(Integer messageId) {
this.messageId = messageId; this.messageId = messageId;
return this;
} }
public String getInlineMessageId() { public String getInlineMessageId() {
return inlineMessageId; return inlineMessageId;
} }
public void setInlineMessageId(String inlineMessageId) { public EditMessageCaption setInlineMessageId(String inlineMessageId) {
this.inlineMessageId = inlineMessageId; this.inlineMessageId = inlineMessageId;
return this;
} }
public String getCaption() { public String getCaption() {
return caption; return caption;
} }
public void setCaption(String caption) { public EditMessageCaption setCaption(String caption) {
this.caption = caption; this.caption = caption;
return this;
} }
public InlineKeyboardMarkup getReplyMarkup() { public InlineKeyboardMarkup getReplyMarkup() {
return replyMarkup; return replyMarkup;
} }
public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { public EditMessageCaption setReplyMarkup(InlineKeyboardMarkup replyMarkup) {
this.replyMarkup = replyMarkup; this.replyMarkup = replyMarkup;
return this;
} }
@Override @Override

View File

@ -50,32 +50,36 @@ public class EditMessageReplyMarkup extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public EditMessageReplyMarkup setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getMessageId() { public Integer getMessageId() {
return messageId; return messageId;
} }
public void setMessageId(Integer messageId) { public EditMessageReplyMarkup setMessageId(Integer messageId) {
this.messageId = messageId; this.messageId = messageId;
return this;
} }
public String getInlineMessageId() { public String getInlineMessageId() {
return inlineMessageId; return inlineMessageId;
} }
public void setInlineMessageId(String inlineMessageId) { public EditMessageReplyMarkup setInlineMessageId(String inlineMessageId) {
this.inlineMessageId = inlineMessageId; this.inlineMessageId = inlineMessageId;
return this;
} }
public InlineKeyboardMarkup getReplyMarkup() { public InlineKeyboardMarkup getReplyMarkup() {
return replyMarkup; return replyMarkup;
} }
public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { public EditMessageReplyMarkup setReplyMarkup(InlineKeyboardMarkup replyMarkup) {
this.replyMarkup = replyMarkup; this.replyMarkup = replyMarkup;
return this;
} }
@Override @Override

View File

@ -64,40 +64,45 @@ public class EditMessageText extends BotApiMethod<Message> {
return chatId; return chatId;
} }
public void setChatId(String chatId) { public EditMessageText setChatId(String chatId) {
this.chatId = chatId; this.chatId = chatId;
return this;
} }
public Integer getMessageId() { public Integer getMessageId() {
return messageId; return messageId;
} }
public void setMessageId(Integer messageId) { public EditMessageText setMessageId(Integer messageId) {
this.messageId = messageId; this.messageId = messageId;
return this;
} }
public String getInlineMessageId() { public String getInlineMessageId() {
return inlineMessageId; return inlineMessageId;
} }
public void setInlineMessageId(String inlineMessageId) { public EditMessageText setInlineMessageId(String inlineMessageId) {
this.inlineMessageId = inlineMessageId; this.inlineMessageId = inlineMessageId;
return this;
} }
public String getText() { public String getText() {
return text; return text;
} }
public void setText(String text) { public EditMessageText setText(String text) {
this.text = text; this.text = text;
return this;
} }
public InlineKeyboardMarkup getReplyMarkup() { public InlineKeyboardMarkup getReplyMarkup() {
return replyMarkup; return replyMarkup;
} }
public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { public EditMessageText setReplyMarkup(InlineKeyboardMarkup replyMarkup) {
this.replyMarkup = replyMarkup; this.replyMarkup = replyMarkup;
return this;
} }
public void disableWebPagePreview() { public void disableWebPagePreview() {