-
Notifications
You must be signed in to change notification settings - Fork 0
/
SendMessage.java
90 lines (73 loc) · 2.14 KB
/
SendMessage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package greachconf.bot;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.micronaut.bots.telegram.core.Send;
import io.micronaut.core.annotation.Introspected;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.validation.constraints.NotBlank;
/**
* @see <a href="https://core.telegram.org/bots/api#sendmessage">sendMessage</a>
*/
@Introspected
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SendMessage extends Send {
@NotBlank
private String method = "sendMessage";
/**
* Text of the message to be sent
*/
@Nonnull
@NotBlank
private String text;
/**
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
*/
@JsonProperty("parse_mode")
@Nullable
private String parseMode;
/**
* Disables link previews for links in this message.
*/
@Nullable
@JsonProperty("disable_web_page_preview")
private Boolean disableWebPagePreview;
public SendMessage() {
super("sendMessage");
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
@Nullable
public String getParseMode() {
return parseMode;
}
public void setParseMode(@Nullable String parseMode) {
this.parseMode = parseMode;
}
@Nullable
public Boolean getDisableWebPagePreview() {
return disableWebPagePreview;
}
public void setDisableWebPagePreview(@Nullable Boolean disableWebPagePreview) {
this.disableWebPagePreview = disableWebPagePreview;
}
@Override
public String toString() {
return "SendMessage{" +
"method='" + method + '\'' +
", text='" + text + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
'}';
}
}