Record Class GitHubChannelProperties
java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.github.GitHubChannelProperties
- Record Components:
token- Personal Access Token (PAT, fine-grained or classic) used for the REST API outbound and bot-identity lookup. Required.webhookSecret- shared secret configured on the webhook; used to verifyX-Hub-Signature-256. Required.apiBase- override for the GitHub REST API base; defaults tohttps://api.github.com(set tohttps://github.your-corp.com/api/v3for GitHub Enterprise Server)webhookPath- HTTP path Spring exposes the webhook under; defaults to/api/channels/github/{channelId}/webhookbotUserLogin- optional override for the bot account's login (e.g.my-bot). When unset, the channel resolves the login automatically viaGET /userat startup.
public record GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)
extends Record
Provider-specific configuration for a single GitHub channel instance, sourced from the
properties block of channels.<id> in agentscope.json.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiBase()Returns the value of theapiBaserecord component.Returns the value of thebotUserLoginrecord component.final booleanIndicates whether some other object is "equal to" this one.static GitHubChannelPropertiesReads aGitHubChannelPropertiesfrom an arbitrary properties map.final inthashCode()Returns a hash code value for this object.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewebhookPathrecord component.Returns the value of thewebhookSecretrecord component.
-
Constructor Details
-
GitHubChannelProperties
public GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin) Creates an instance of aGitHubChannelPropertiesrecord class.- Parameters:
token- the value for thetokenrecord componentwebhookSecret- the value for thewebhookSecretrecord componentapiBase- the value for theapiBaserecord componentwebhookPath- the value for thewebhookPathrecord componentbotUserLogin- the value for thebotUserLoginrecord component
-
-
Method Details
-
from
Reads aGitHubChannelPropertiesfrom 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). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
webhookSecret
Returns the value of thewebhookSecretrecord component.- Returns:
- the value of the
webhookSecretrecord component
-
apiBase
Returns the value of theapiBaserecord component.- Returns:
- the value of the
apiBaserecord component
-
webhookPath
Returns the value of thewebhookPathrecord component.- Returns:
- the value of the
webhookPathrecord component
-
botUserLogin
Returns the value of thebotUserLoginrecord component.- Returns:
- the value of the
botUserLoginrecord component
-