Record Class DingTalkChannelProperties
java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.dingtalk.DingTalkChannelProperties
- Record Components:
appKey- enterprise internal app keyappSecret- enterprise internal app secretrobotCode- robot code used as outbound sender id; required for repliesmode- reception mode:stream(default) orhttpaesKey- 43-character base64 (no padding) AES key for callback body decryption; only used inhttpmode, and only required when the robot is configured with encryptionapiBase- override for the DingTalk OpenAPI base; defaulthttps://api.dingtalk.comoapiBase- override for the legacy OAPI base used bygettoken; defaulthttps://oapi.dingtalk.comstreamRegisterUrl- override for the Stream gateway registration endpoint; defaulthttps://api.dingtalk.com/v1.0/gateway/connections/open
public record DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)
extends Record
Configuration for a single DingTalk (钉钉) channel instance.
Reception mode: MODE_STREAM (default) receives bot messages over a persistent
WebSocket connection; MODE_HTTP receives them via signed HTTP callbacks delivered to
/api/channels/dingtalk/{channelId}/callback, requiring a Spring web application.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl) Deprecated.DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl) Creates an instance of aDingTalkChannelPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaesKey()Returns the value of theaesKeyrecord component.apiBase()Returns the value of theapiBaserecord component.appKey()Returns the value of theappKeyrecord component.Returns the value of theappSecretrecord component.final booleanIndicates whether some other object is "equal to" this one.static DingTalkChannelPropertiesReads aDingTalkChannelPropertiesout of an arbitrary properties map.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.oapiBase()Returns the value of theoapiBaserecord component.Returns the value of therobotCoderecord component.Returns the value of thestreamRegisterUrlrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MODE_STREAM
Reception mode value: bot messages arrive over a persistent Stream WebSocket.- See Also:
-
MODE_HTTP
Reception mode value: bot messages arrive as signed HTTP callbacks.- See Also:
-
DEFAULT_API_BASE
- See Also:
-
DEFAULT_OAPI_BASE
- See Also:
-
DEFAULT_STREAM_REGISTER_URL
- See Also:
-
-
Constructor Details
-
DingTalkChannelProperties
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl) Creates an instance of aDingTalkChannelPropertiesrecord class.- Parameters:
appKey- the value for theappKeyrecord componentappSecret- the value for theappSecretrecord componentrobotCode- the value for therobotCoderecord componentmode- the value for themoderecord componentaesKey- the value for theaesKeyrecord componentapiBase- the value for theapiBaserecord componentoapiBase- the value for theoapiBaserecord componentstreamRegisterUrl- the value for thestreamRegisterUrlrecord component
-
DingTalkChannelProperties
@Deprecated public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl) Deprecated.use the canonical constructor (orfrom(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)) so the reception mode is explicitConvenience constructor matching the pre-callback-mode signature; delegates withmode=streamand noaesKey.
-
-
Method Details
-
from
Reads aDingTalkChannelPropertiesout of an arbitrary properties map. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
appKey
Returns the value of theappKeyrecord component.- Returns:
- the value of the
appKeyrecord component
-
appSecret
Returns the value of theappSecretrecord component.- Returns:
- the value of the
appSecretrecord component
-
robotCode
Returns the value of therobotCoderecord component.- Returns:
- the value of the
robotCoderecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
aesKey
Returns the value of theaesKeyrecord component.- Returns:
- the value of the
aesKeyrecord component
-
apiBase
Returns the value of theapiBaserecord component.- Returns:
- the value of the
apiBaserecord component
-
oapiBase
Returns the value of theoapiBaserecord component.- Returns:
- the value of the
oapiBaserecord component
-
streamRegisterUrl
Returns the value of thestreamRegisterUrlrecord component.- Returns:
- the value of the
streamRegisterUrlrecord component
-
from(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)) so the reception mode is explicit