Record Class WeComChannelProperties
java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.wecom.WeComChannelProperties
- Record Components:
corpId- WeCom corporation id (cn: 企业 ID)agentId- self-built application id (numeric, but kept as int for the send API)secret- application secrettoken- callback token (configured in the WeCom admin console)encodingAesKey- 43-character base64 (no padding) AES key for callback encryptioncallbackPath- the HTTP path Spring exposes the callback under; defaults to/api/channels/wecom/{channelId}/callbackapiBase- override for the WeCom API base URL; defaulthttps://qyapi.weixin.qq.com
public record WeComChannelProperties(String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase)
extends Record
Provider-specific configuration for a single WeCom (企业微信) channel instance, sourced from the
properties block of channels.<id> in agentscope.json.
The environment-variable-resolved values (e.g. ${WECOM_CORP_ID}) are expected to be
substituted by the caller before construction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintagentId()Returns the value of theagentIdrecord component.apiBase()Returns the value of theapiBaserecord component.Returns the value of thecallbackPathrecord component.corpId()Returns the value of thecorpIdrecord component.Returns the value of theencodingAesKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.static WeComChannelPropertiesReads aWeComChannelPropertiesout of an arbitrary properties map.final inthashCode()Returns a hash code value for this object.secret()Returns the value of thesecretrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WeComChannelProperties
public WeComChannelProperties(String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase) Creates an instance of aWeComChannelPropertiesrecord class.- Parameters:
corpId- the value for thecorpIdrecord componentagentId- the value for theagentIdrecord componentsecret- the value for thesecretrecord componenttoken- the value for thetokenrecord componentencodingAesKey- the value for theencodingAesKeyrecord componentcallbackPath- the value for thecallbackPathrecord componentapiBase- the value for theapiBaserecord component
-
-
Method Details
-
from
Reads aWeComChannelPropertiesout 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
corpId
Returns the value of thecorpIdrecord component.- Returns:
- the value of the
corpIdrecord component
-
agentId
public int agentId()Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
secret
Returns the value of thesecretrecord component.- Returns:
- the value of the
secretrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
encodingAesKey
Returns the value of theencodingAesKeyrecord component.- Returns:
- the value of the
encodingAesKeyrecord component
-
callbackPath
Returns the value of thecallbackPathrecord component.- Returns:
- the value of the
callbackPathrecord component
-
apiBase
Returns the value of theapiBaserecord component.- Returns:
- the value of the
apiBaserecord component
-