Package org.a2aproject.sdk.spec
Record Class ListTaskPushNotificationConfigsResult
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsResult
- Record Components:
configs- List of push notification configurations for the tasknextPageToken- 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 Summary
ConstructorsConstructorDescriptionConstructor for results without pagination.ListTaskPushNotificationConfigsResult(List<TaskPushNotificationConfig> configs, @Nullable String nextPageToken) Compact constructor for validation. -
Method Summary
Modifier and TypeMethodDescriptionconfigs()Returns the value of theconfigsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether there are more results available.booleanisEmpty()Return if the configs is empty or not.@Nullable StringReturns the value of thenextPageTokenrecord component.intsize()Return the size of the configs.final StringtoString()Returns a string representation of this record class.
-
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 configurationsnextPageToken- token for next page- Throws:
IllegalArgumentException- if validation fails
-
ListTaskPushNotificationConfigsResult
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
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). -
configs
Returns the value of theconfigsrecord component.- Returns:
- the value of the
configsrecord component
-
nextPageToken
Returns the value of thenextPageTokenrecord component.- Returns:
- the value of the
nextPageTokenrecord component
-