Record Class ListTaskPushNotificationConfigsResult

java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsResult
Record Components:
configs - List of push notification configurations for the task
nextPageToken - Token for retrieving the next page of results (null if no more results)

public record ListTaskPushNotificationConfigsResult(List<TaskPushNotificationConfig> configs, @Nullable String nextPageToken) extends Record
Result of listing push notification configurations for a task with pagination support.
  • Constructor Details

    • ListTaskPushNotificationConfigsResult

      public ListTaskPushNotificationConfigsResult(List<TaskPushNotificationConfig> configs, @Nullable String nextPageToken)
      Compact constructor for validation. Validates parameters and creates a defensive copy of the configs list.
      Parameters:
      configs - the list of push notification configurations
      nextPageToken - token for next page
      Throws:
      IllegalArgumentException - if validation fails
    • ListTaskPushNotificationConfigsResult

      public ListTaskPushNotificationConfigsResult(List<TaskPushNotificationConfig> configs)
      Constructor for results without pagination.
      Parameters:
      configs - the list of push notification configurations
  • Method Details

    • hasMoreResults

      public boolean hasMoreResults()
      Returns whether there are more results available.
      Returns:
      true if there are more pages of results
    • size

      public int size()
      Return the size of the configs.
      Returns:
      the size of the configs.
    • isEmpty

      public boolean isEmpty()
      Return if the configs is empty or not.
      Returns:
      true if the configs is empty - false otherwise.
    • 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.
    • configs

      public List<TaskPushNotificationConfig> configs()
      Returns the value of the configs record component.
      Returns:
      the value of the configs record component
    • nextPageToken

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