public class SetChatPhoto extends PartialBotApiMethod<Boolean>
| Modifier and Type | Field and Description |
|---|---|
static String |
CHATID_FIELD |
static String |
PATH |
static String |
PHOTO_FIELD |
OBJECT_MAPPER| Constructor and Description |
|---|
SetChatPhoto() |
SetChatPhoto(Long chatId,
File photo) |
SetChatPhoto(Long chatId,
InputStream photoStream,
String photoName) |
SetChatPhoto(String chatId,
File photo) |
SetChatPhoto(String chatId,
InputStream photoStream,
String photoName) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
deserializeResponse(String answer)
Deserialize a json answer to the response type to a method
|
String |
getChatId() |
File |
getPhoto() |
String |
getPhotoName() |
InputStream |
getPhotoStream() |
SetChatPhoto |
setChatId(Long chatId) |
SetChatPhoto |
setChatId(String chatId) |
SetChatPhoto |
setNewPhoto(String photoName,
InputStream inputStream) |
SetChatPhoto |
setPhoto(File file) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public static final String CHATID_FIELD
public static final String PHOTO_FIELD
public SetChatPhoto()
public SetChatPhoto(String chatId, InputStream photoStream, String photoName)
public SetChatPhoto(Long chatId, InputStream photoStream, String photoName)
public String getChatId()
public SetChatPhoto setChatId(String chatId)
public SetChatPhoto setChatId(Long chatId)
public SetChatPhoto setPhoto(File file)
public SetChatPhoto setNewPhoto(String photoName, InputStream inputStream)
public String getPhotoName()
public InputStream getPhotoStream()
public File getPhoto()
public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethoddeserializeResponse in class PartialBotApiMethod<Boolean>answer - Json answer receivedTelegramApiRequestExceptionpublic void validate()
throws TelegramApiValidationException
ValidableTelegramApiValidationException - If any mandatory field is emptyCopyright © 2018. All rights reserved.