Class DingTalkConf
-
- All Implemented Interfaces:
public class DingTalkConf- Since:
2023-02-21
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDingTalkConf.Loader
-
Field Summary
Fields Modifier and Type Field Description public final static StringMsgTextpublic final static StringMsgMarkdownpublic Stringdryrunpublic StringwebhookUrlpublic StringdigestSecretpublic StringaccessTokenpublic StringnoticeKeywordpublic StringmsgTypepublic Map<String, String>noticeMobiles
-
Constructor Summary
Constructors Constructor Description DingTalkConf()
-
Method Summary
Modifier and Type Method Description StringgetDryrun()the dryrun prefix of subject. voidsetDryrun(String dryrun)the dryrun prefix of subject. StringgetWebhookUrl()template of DingTalk webhook URL. voidsetWebhookUrl(String webhookUrl)template of DingTalk webhook URL. StringgetDigestSecret()secret of message digest, `empty` means disable. voidsetDigestSecret(String digestSecret)secret of message digest, `empty` means disable. StringgetAccessToken()the DingTalk access_token used to send the alert, `empty` means disable. voidsetAccessToken(String accessToken)the DingTalk access_token used to send the alert, `empty` means disable. StringgetNoticeKeyword()custom keywords, to successfully send message must contain at least 1 keyword. voidsetNoticeKeyword(String noticeKeyword)custom keywords, to successfully send message must contain at least 1 keyword. StringgetMsgType()message type, support `text`|`markdown` voidsetMsgType(String msgType)message type, support `text`|`markdown` Map<String, String>getNoticeMobiles()notified person and his phone number, non-member's phone number will be desensitized. voidsetNoticeMobiles(Map<String, String> noticeMobiles)notified person and his phone number, non-member's phone number will be desensitized. StringgetValidWebhook()voidadopt(DingTalkConf that)use all properties from that voidmerge(DingTalkConf that)if this.property is invalid, then use that.property. booleanequals(@Nullable() Object o)inthashCode()StringtoString()-
-
Method Detail
-
setDryrun
void setDryrun(String dryrun)
the dryrun prefix of subject. merge if null, `empty` means disable.
-
getWebhookUrl
String getWebhookUrl()
template of DingTalk webhook URL.
-
setWebhookUrl
void setWebhookUrl(String webhookUrl)
template of DingTalk webhook URL.
-
getDigestSecret
String getDigestSecret()
secret of message digest, `empty` means disable.
-
setDigestSecret
void setDigestSecret(String digestSecret)
secret of message digest, `empty` means disable.
-
getAccessToken
String getAccessToken()
the DingTalk access_token used to send the alert, `empty` means disable.
-
setAccessToken
void setAccessToken(String accessToken)
the DingTalk access_token used to send the alert, `empty` means disable.
-
getNoticeKeyword
String getNoticeKeyword()
custom keywords, to successfully send message must contain at least 1 keyword.
-
setNoticeKeyword
void setNoticeKeyword(String noticeKeyword)
custom keywords, to successfully send message must contain at least 1 keyword.
-
getMsgType
String getMsgType()
message type, support `text`|`markdown`
-
setMsgType
void setMsgType(String msgType)
message type, support `text`|`markdown`
-
getNoticeMobiles
Map<String, String> getNoticeMobiles()
notified person and his phone number, non-member's phone number will be desensitized. It is automatically added to the text eg. @155xxxx
-
setNoticeMobiles
void setNoticeMobiles(Map<String, String> noticeMobiles)
notified person and his phone number, non-member's phone number will be desensitized. It is automatically added to the text eg. @155xxxx
-
getValidWebhook
@Nullable() String getValidWebhook()
-
adopt
void adopt(DingTalkConf that)
use all properties from that
-
merge
void merge(DingTalkConf that)
if this.property is invalid, then use that.property. except for 'noticeMobiles' which merge value only if key matches.
-
hashCode
int hashCode()
-
-
-
-