Record Class GitLabChannelProperties

java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.gitlab.GitLabChannelProperties
Record Components:
token - Project / Group / Personal Access Token used for the REST API outbound and bot-identity lookup. Required, with api scope.
webhookToken - shared token configured on the project webhook; matched against X-Gitlab-Token via constant-time equality. Required.
apiBase - override for the GitLab REST API base; defaults to https://gitlab.com/api/v4.
webhookPath - HTTP path Spring exposes the webhook under; defaults to /api/channels/gitlab/{channelId}/webhook

public record GitLabChannelProperties(String token, String webhookToken, String apiBase, String webhookPath) extends Record
Provider-specific configuration for a single GitLab channel instance, sourced from the properties block of channels.<id> in agentscope.json.
  • Constructor Details

    • GitLabChannelProperties

      public GitLabChannelProperties(String token, String webhookToken, String apiBase, String webhookPath)
      Creates an instance of a GitLabChannelProperties record class.
      Parameters:
      token - the value for the token record component
      webhookToken - the value for the webhookToken record component
      apiBase - the value for the apiBase record component
      webhookPath - the value for the webhookPath record component
  • Method Details

    • from

      public static GitLabChannelProperties from(String channelId, Map<String,Object> props)
      Reads a GitLabChannelProperties from an arbitrary properties map.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • token

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • webhookToken

      public String webhookToken()
      Returns the value of the webhookToken record component.
      Returns:
      the value of the webhookToken record component
    • apiBase

      public String apiBase()
      Returns the value of the apiBase record component.
      Returns:
      the value of the apiBase record component
    • webhookPath

      public String webhookPath()
      Returns the value of the webhookPath record component.
      Returns:
      the value of the webhookPath record component