diff --git a/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java b/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java index c991e44a..12192324 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java @@ -44,56 +44,63 @@ public class AnswerInlineQuery extends BotApiMethod { return inlineQueryId; } - public void setInlineQueryId(String inlineQueryId) { + public AnswerInlineQuery setInlineQueryId(String inlineQueryId) { this.inlineQueryId = inlineQueryId; + return this; } public List getResults() { return results; } - public void setResults(List results) { + public AnswerInlineQuery setResults(List results) { this.results = results; + return this; } public Integer getCacheTime() { return cacheTime; } - public void setCacheTime(Integer cacheTime) { + public AnswerInlineQuery setCacheTime(Integer cacheTime) { this.cacheTime = cacheTime; + return this; } public Boolean getPersonal() { return isPersonal; } - public void setPersonal(Boolean personal) { + public AnswerInlineQuery setPersonal(Boolean personal) { isPersonal = personal; + return this; } public String getNextOffset() { return nextOffset; } - public void setNextOffset(String nextOffset) { + public AnswerInlineQuery setNextOffset(String nextOffset) { this.nextOffset = nextOffset; + return this; } public String getSwitchPmText() { return switchPmText; } - public void setSwitchPmText(String switchPmText) { + public AnswerInlineQuery setSwitchPmText(String switchPmText) { this.switchPmText = switchPmText; + return this; } public String getSwitchPmParameter() { return switchPmParameter; } - public void setSwitchPmParameter(String switchPmParameter) { + public AnswerInlineQuery setSwitchPmParameter(String switchPmParameter) { this.switchPmParameter = switchPmParameter; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java b/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java index 4f09c95d..14da4fa7 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java @@ -42,24 +42,27 @@ public class ForwardMessage extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public ForwardMessage setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getFromChatId() { return fromChatId; } - public void setFromChatId(Integer fromChatId) { + public ForwardMessage setFromChatId(Integer fromChatId) { this.fromChatId = fromChatId; + return this; } public Integer getMessageId() { return messageId; } - public void setMessageId(Integer messageId) { + public ForwardMessage setMessageId(Integer messageId) { this.messageId = messageId; + return this; } public Boolean getDisableNotification() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java b/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java index 51e0fb41..2089f7ed 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java @@ -36,8 +36,9 @@ public class GetFile extends BotApiMethod { return fileId; } - public void setFileId(String fileId) { + public GetFile setFileId(String fileId) { this.fileId = fileId; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java b/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java index c17a0b97..fb5ef555 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java @@ -41,25 +41,29 @@ public class GetUserProfilePhotos extends BotApiMethod { return userId; } - public void setUserId(Integer userId) { + public GetUserProfilePhotos setUserId(Integer userId) { this.userId = userId; + return this; } public Integer getOffset() { return offset; } - public void setOffset(Integer offset) { + public GetUserProfilePhotos setOffset(Integer offset) { this.offset = offset; + return this; } public Integer getLimit() { return limit; } - public void setLimit(Integer limit) { + public GetUserProfilePhotos setLimit(Integer limit) { this.limit = limit; + return this; } + @Override public JSONObject toJson() { JSONObject jsonObject = new JSONObject(); diff --git a/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/KickChatMember.java b/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/KickChatMember.java index d441a040..2ce1f911 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/KickChatMember.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/KickChatMember.java @@ -38,16 +38,18 @@ public class KickChatMember extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public KickChatMember setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getUserId() { return userId; } - public void setUserId(Integer userId) { + public KickChatMember setUserId(Integer userId) { this.userId = userId; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/UnbanChatMember.java b/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/UnbanChatMember.java index 6de57d1f..6c75940c 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/UnbanChatMember.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/groupadministration/UnbanChatMember.java @@ -34,16 +34,18 @@ public class UnbanChatMember extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public UnbanChatMember setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getUserId() { return userId; } - public void setUserId(Integer userId) { + public UnbanChatMember setUserId(Integer userId) { this.userId = userId; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendAudio.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendAudio.java index 10689142..c9b6444c 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendAudio.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendAudio.java @@ -47,16 +47,18 @@ public class SendAudio { return this.duration; } - public void setDuration(Integer duration) { + public SendAudio setDuration(Integer duration) { this.duration = duration; + return this; } public String getChatId() { return chatId; } - public void setChatId(String chatId) { + public SendAudio setChatId(String chatId) { this.chatId = chatId; + return this; } public String getAudio() { @@ -69,9 +71,10 @@ public class SendAudio { * @param audio File_id of the audio to send * @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.isNewAudio = false; + return this; } /** @@ -80,42 +83,47 @@ public class SendAudio { * @param audio Path to the new file in your server * @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.isNewAudio = true; this.audioName = audioName; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendAudio setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendAudio setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public String getPerformer() { return performer; } - public void setPerformer(String performer) { + public SendAudio setPerformer(String performer) { this.performer = performer; + return this; } public String getTitle() { return title; } - public void setTitle(String title) { + public SendAudio setTitle(String title) { this.title = title; + return this; } public Boolean getDisableNotification() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendChatAction.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendChatAction.java index fe3f7c0a..8e1e55bf 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendChatAction.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendChatAction.java @@ -37,16 +37,18 @@ public class SendChatAction extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public SendChatAction setChatId(String chatId) { this.chatId = chatId; + return this; } public String getAction() { return action; } - public void setAction(String action) { + public SendChatAction setAction(String action) { this.action = action; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendContact.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendContact.java index 7fb6eff9..b3eaf39a 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendContact.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendContact.java @@ -45,24 +45,27 @@ public class SendContact extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public SendContact setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendContact setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendContact setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public Boolean getDisableNotification() { @@ -81,24 +84,27 @@ public class SendContact extends BotApiMethod { return phoneNumber; } - public void setPhoneNumber(String phoneNumber) { + public SendContact setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; + return this; } public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { + public SendContact setFirstName(String firstName) { this.firstName = firstName; + return this; } public String getLastName() { return lastName; } - public void setLastName(String lastName) { + public SendContact setLastName(String lastName) { this.lastName = lastName; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendDocument.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendDocument.java index 91a08c4c..5a552d0d 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendDocument.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendDocument.java @@ -39,23 +39,26 @@ public class SendDocument { return chatId; } - public void setChatId(String chatId) { + public SendDocument setChatId(String chatId) { this.chatId = chatId; + return this; } public String getDocument() { return document; } - public void setDocument(String document) { + public SendDocument setDocument(String document) { this.document = document; this.isNewDocument = false; + return this; } - public void setNewDocument(String document, String documentName) { + public SendDocument setNewDocument(String document, String documentName) { this.document = document; this.isNewDocument = true; this.documentName = documentName; + return this; } public boolean isNewDocument() { @@ -70,8 +73,9 @@ public class SendDocument { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendDocument setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public Boolean getDisableNotification() { @@ -90,16 +94,18 @@ public class SendDocument { return caption; } - public void setCaption(String caption) { + public SendDocument setCaption(String caption) { this.caption = caption; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendDocument setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendLocation.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendLocation.java index 6d5fd334..42098638 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendLocation.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendLocation.java @@ -42,40 +42,45 @@ public class SendLocation extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public SendLocation setChatId(String chatId) { this.chatId = chatId; + return this; } public Float getLatitude() { return latitude; } - public void setLatitude(Float latitude) { + public SendLocation setLatitude(Float latitude) { this.latitude = latitude; + return this; } public Float getLongitude() { return longitude; } - public void setLongitude(Float longitude) { + public SendLocation setLongitude(Float longitude) { this.longitude = longitude; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendLocation setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendLocation setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public Boolean getDisableNotification() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendMessage.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendMessage.java index 9938381a..f0488644 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendMessage.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendMessage.java @@ -49,32 +49,36 @@ public class SendMessage extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public SendMessage setChatId(String chatId) { this.chatId = chatId; + return this; } public String getText() { return text; } - public void setText(String text) { + public SendMessage setText(String text) { this.text = text; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendMessage setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendMessage setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public Boolean getDisableWebPagePreview() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java index 1ea1b3a8..3bb8536a 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java @@ -40,41 +40,46 @@ public class SendPhoto { return chatId; } - public void setChatId(String chatId) { + public SendPhoto setChatId(String chatId) { this.chatId = chatId; + return this; } public String getPhoto() { return photo; } - public void setPhoto(String photo) { + public SendPhoto setPhoto(String photo) { this.photo = photo; this.isNewPhoto = false; + return this; } public String getCaption() { return caption; } - public void setCaption(String caption) { + public SendPhoto setCaption(String caption) { this.caption = caption; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendPhoto setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendPhoto setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public boolean isNewPhoto() { @@ -97,10 +102,11 @@ public class SendPhoto { this.disableNotification = true; } - public void setNewPhoto(String photo, String photoName) { + public SendPhoto setNewPhoto(String photo, String photoName) { this.photo = photo; this.isNewPhoto = true; this.photoName = photoName; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendSticker.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendSticker.java index cb150961..3a08f29b 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendSticker.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendSticker.java @@ -37,39 +37,44 @@ public class SendSticker { return chatId; } - public void setChatId(String chatId) { + public SendSticker setChatId(String chatId) { this.chatId = chatId; + return this; } public String getSticker() { return sticker; } - public void setSticker(String sticker) { + public SendSticker setSticker(String sticker) { this.sticker = sticker; this.isNewSticker = false; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendSticker setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendSticker setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } - public void setSticker(String sticker, String stickerName) { + public SendSticker setSticker(String sticker, String stickerName) { this.sticker = sticker; this.isNewSticker = true; this.stickerName = stickerName; + return this; } public Boolean getDisableNotification() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVenue.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVenue.java index 7d220419..c3ac39c6 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVenue.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVenue.java @@ -49,40 +49,45 @@ public class SendVenue extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public SendVenue setChatId(String chatId) { this.chatId = chatId; + return this; } public Float getLatitude() { return latitude; } - public void setLatitude(Float latitude) { + public SendVenue setLatitude(Float latitude) { this.latitude = latitude; + return this; } public Float getLongitude() { return longitude; } - public void setLongitude(Float longitude) { + public SendVenue setLongitude(Float longitude) { this.longitude = longitude; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendVenue setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendVenue setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public Boolean getDisableNotification() { @@ -101,24 +106,27 @@ public class SendVenue extends BotApiMethod { return title; } - public void setTitle(String title) { + public SendVenue setTitle(String title) { this.title = title; + return this; } public String getAddress() { return address; } - public void setAddress(String address) { + public SendVenue setAddress(String address) { this.address = address; + return this; } public String getFoursquareId() { return foursquareId; } - public void setFoursquareId(String foursquareId) { + public SendVenue setFoursquareId(String foursquareId) { this.foursquareId = foursquareId; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVideo.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVideo.java index 89620a35..e1da970f 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVideo.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVideo.java @@ -46,49 +46,55 @@ public class SendVideo { return chatId; } - public void setChatId(String chatId) { + public SendVideo setChatId(String chatId) { this.chatId = chatId; + return this; } public String getVideo() { return video; } - public void setVideo(String video) { + public SendVideo setVideo(String video) { this.video = video; this.isNewVideo = false; + return this; } public Integer getDuration() { return duration; } - public void setDuration(Integer duration) { + public SendVideo setDuration(Integer duration) { this.duration = duration; + return this; } public String getCaption() { return caption; } - public void setCaption(String caption) { + public SendVideo setCaption(String caption) { this.caption = caption; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendVideo setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendVideo setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public boolean isNewVideo() { @@ -115,22 +121,25 @@ public class SendVideo { return width; } - public void setWidth(Integer width) { + public SendVideo setWidth(Integer width) { this.width = width; + return this; } public Integer getHeight() { return height; } - public void setHeight(Integer height) { + public SendVideo setHeight(Integer height) { this.height = height; + return this; } - public void setNewVideo(String video, String videoName) { + public SendVideo setNewVideo(String video, String videoName) { this.video = video; this.isNewVideo = true; this.videoName = videoName; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVoice.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVoice.java index 0a8456a3..6095b938 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendVoice.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendVoice.java @@ -64,47 +64,53 @@ public class SendVoice { return chatId; } - public void setChatId(String chatId) { + public SendVoice setChatId(String chatId) { this.chatId = chatId; + return this; } public String getAudio() { return audio; } - public void setAudio(String audio) { + public SendVoice setAudio(String audio) { this.audio = audio; this.isNewVoice = false; + return this; } - public void setNewAudio(String audio, String audioName) { + public SendVoice setNewAudio(String audio, String audioName) { this.audio = audio; this.isNewVoice = false; this.voiceName = audioName; + return this; } public Integer getReplayToMessageId() { return replayToMessageId; } - public void setReplayToMessageId(Integer replayToMessageId) { + public SendVoice setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; + return this; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } - public void setReplayMarkup(ReplyKeyboard replayMarkup) { + public SendVoice setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; + return this; } public Integer getDuration() { return duration; } - public void setDuration(Integer duration) { + public SendVoice setDuration(Integer duration) { this.duration = duration; + return this; } public boolean isNewVoice() { diff --git a/src/main/java/org/telegram/telegrambots/api/methods/updates/GetUpdates.java b/src/main/java/org/telegram/telegrambots/api/methods/updates/GetUpdates.java index 3dcb2155..91c4a5b7 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/updates/GetUpdates.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/updates/GetUpdates.java @@ -43,24 +43,27 @@ public class GetUpdates implements IToJson { return offset; } - public void setOffset(Integer offset) { + public GetUpdates setOffset(Integer offset) { this.offset = offset; + return this; } public Integer getLimit() { return limit; } - public void setLimit(Integer limit) { + public GetUpdates setLimit(Integer limit) { this.limit = limit; + return this; } public Integer getTimeout() { return timeout; } - public void setTimeout(Integer timeout) { + public GetUpdates setTimeout(Integer timeout) { this.timeout = timeout; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/updates/SetWebhook.java b/src/main/java/org/telegram/telegrambots/api/methods/updates/SetWebhook.java index 99ebdca7..b61bfc71 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/updates/SetWebhook.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/updates/SetWebhook.java @@ -25,16 +25,18 @@ public class SetWebhook { return url; } - public void setUrl(String url) { + public SetWebhook setUrl(String url) { this.url = url; + return this; } public String getCertificateFile() { return certificateFile; } - public void setCertificateFile(String certificateFile) { + public SetWebhook setCertificateFile(String certificateFile) { this.certificateFile = certificateFile; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageCaption.java b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageCaption.java index cb6b6fa9..ebc8de28 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageCaption.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageCaption.java @@ -52,40 +52,45 @@ public class EditMessageCaption extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public EditMessageCaption setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getMessageId() { return messageId; } - public void setMessageId(Integer messageId) { + public EditMessageCaption setMessageId(Integer messageId) { this.messageId = messageId; + return this; } public String getInlineMessageId() { return inlineMessageId; } - public void setInlineMessageId(String inlineMessageId) { + public EditMessageCaption setInlineMessageId(String inlineMessageId) { this.inlineMessageId = inlineMessageId; + return this; } public String getCaption() { return caption; } - public void setCaption(String caption) { + public EditMessageCaption setCaption(String caption) { this.caption = caption; + return this; } public InlineKeyboardMarkup getReplyMarkup() { return replyMarkup; } - public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { + public EditMessageCaption setReplyMarkup(InlineKeyboardMarkup replyMarkup) { this.replyMarkup = replyMarkup; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageReplyMarkup.java b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageReplyMarkup.java index 7b9551d5..3d236fdf 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageReplyMarkup.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageReplyMarkup.java @@ -50,32 +50,36 @@ public class EditMessageReplyMarkup extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public EditMessageReplyMarkup setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getMessageId() { return messageId; } - public void setMessageId(Integer messageId) { + public EditMessageReplyMarkup setMessageId(Integer messageId) { this.messageId = messageId; + return this; } public String getInlineMessageId() { return inlineMessageId; } - public void setInlineMessageId(String inlineMessageId) { + public EditMessageReplyMarkup setInlineMessageId(String inlineMessageId) { this.inlineMessageId = inlineMessageId; + return this; } public InlineKeyboardMarkup getReplyMarkup() { return replyMarkup; } - public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { + public EditMessageReplyMarkup setReplyMarkup(InlineKeyboardMarkup replyMarkup) { this.replyMarkup = replyMarkup; + return this; } @Override diff --git a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageText.java b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageText.java index ba0a85ae..1d2d470f 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageText.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/updatingmessages/EditMessageText.java @@ -64,40 +64,45 @@ public class EditMessageText extends BotApiMethod { return chatId; } - public void setChatId(String chatId) { + public EditMessageText setChatId(String chatId) { this.chatId = chatId; + return this; } public Integer getMessageId() { return messageId; } - public void setMessageId(Integer messageId) { + public EditMessageText setMessageId(Integer messageId) { this.messageId = messageId; + return this; } public String getInlineMessageId() { return inlineMessageId; } - public void setInlineMessageId(String inlineMessageId) { + public EditMessageText setInlineMessageId(String inlineMessageId) { this.inlineMessageId = inlineMessageId; + return this; } public String getText() { return text; } - public void setText(String text) { + public EditMessageText setText(String text) { this.text = text; + return this; } public InlineKeyboardMarkup getReplyMarkup() { return replyMarkup; } - public void setReplyMarkup(InlineKeyboardMarkup replyMarkup) { + public EditMessageText setReplyMarkup(InlineKeyboardMarkup replyMarkup) { this.replyMarkup = replyMarkup; + return this; } public void disableWebPagePreview() {