ListResponse

@Serializable
class ListResponse<T>(val data: List<T>, val usage: Usage? = null, val firstId: String? = null, val lastId: String? = null, val hasMore: Boolean? = null) : List<T>

Response as List of T.

Constructors

Link copied to clipboard
constructor(data: List<T>, usage: Usage? = null, firstId: String? = null, lastId: String? = null, hasMore: Boolean? = null)

Properties

Link copied to clipboard
@SerialName(value = "data")
val data: List<T>

List containing the actual results.

Link copied to clipboard
@SerialName(value = "first_id")
val firstId: String? = null

The ID of the first element returned.

Link copied to clipboard
@SerialName(value = "has_more")
val hasMore: Boolean? = null

If the list is truncated.

Link copied to clipboard
@SerialName(value = "last_id")
val lastId: String? = null

The ID of the last element returned.

Link copied to clipboard
open override val size: Int
Link copied to clipboard
@SerialName(value = "usage")
val usage: Usage? = null

Embedding usage data.

Functions

Link copied to clipboard
open operator override fun contains(element: T): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<T>): Boolean
Link copied to clipboard
open operator override fun get(index: Int): T
Link copied to clipboard
open override fun indexOf(element: T): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<T>
Link copied to clipboard
open override fun lastIndexOf(element: T): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<T>
open override fun listIterator(index: Int): ListIterator<T>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<T>