Record Class TaskPushNotificationConfig

java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.TaskPushNotificationConfig
Record Components:
id - unique identifier (e.g. UUID) for this push notification configuration
taskId - the unique identifier of the task to receive push notifications for
url - the HTTP/HTTPS endpoint URL to receive push notifications (required)
token - optional bearer token for simple authentication
authentication - optional complex authentication configuration
tenant - optional tenant identifier, provided as a path parameter

public record TaskPushNotificationConfig(String id, @Nullable String taskId, String url, @Nullable String token, @Nullable AuthenticationInfo authentication, @Nullable String tenant) extends Record
Push notification configuration associated with a specific task.

This record defines the endpoint and authentication details for receiving task event notifications. When configured, the agent will POST task updates (status changes, artifact additions, completions) to the specified URL as they occur, enabling asynchronous workflows without polling.

Authentication can be provided via either:

  • Simple bearer token in the token field
  • More complex authentication via AuthenticationInfo

Used for managing task-specific push notification settings via the push notification management methods (tasks/pushNotificationConfig/set, tasks/pushNotificationConfig/get, etc.).

See Also:
  • Constructor Details

    • TaskPushNotificationConfig

      public TaskPushNotificationConfig(String id, @Nullable String taskId, String url, @Nullable String token, @Nullable AuthenticationInfo authentication, @Nullable String tenant)
      Compact constructor for validation. Validates that required parameters are not null.
      Parameters:
      id - the configuration identifier
      taskId - the task identifier
      url - the notification endpoint URL
      token - optional bearer token
      authentication - optional authentication info
      tenant - the tenant identifier
  • Method Details

    • builder

      public static TaskPushNotificationConfig.Builder builder()
      Create a new Builder
      Returns:
      the builder
    • builder

      Create a new Builder initialized with values from an existing TaskPushNotificationConfig.
      Parameters:
      config - the TaskPushNotificationConfig to copy values from
      Returns:
      the builder
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • taskId

      public @Nullable String taskId()
      Returns the value of the taskId record component.
      Returns:
      the value of the taskId record component
    • url

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

      public @Nullable String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • authentication

      public @Nullable AuthenticationInfo authentication()
      Returns the value of the authentication record component.
      Returns:
      the value of the authentication record component
    • tenant

      public @Nullable String tenant()
      Returns the value of the tenant record component.
      Returns:
      the value of the tenant record component