All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.bselzer.gw2.v2.model.account.token.SubTokenInfo.kt Maven / Gradle / Ivy

The newest version!
package com.bselzer.gw2.v2.model.account.token

import com.bselzer.gw2.v2.model.wrapper.Url
import com.bselzer.gw2.v2.scope.core.Permission
import com.bselzer.gw2.v2.scope.core.Requirement
import com.bselzer.gw2.v2.scope.core.Scope
import kotlinx.datetime.Instant
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
 * The sub-token information associated with an API key or another token.
 *
 * @see the wiki
 */
@Scope(Requirement.REQUIRED, Permission.ACCOUNT)
@Serializable
@SerialName("Subtoken")
data class SubTokenInfo(
    /**
     * The requested token id.
     */
    @SerialName("id")
    override val id: SubToken,

    /**
     * The expiration date.
     */
    @SerialName("expires_at")
    val expiresAt: Instant = Instant.DISTANT_PAST,

    /**
     * The creation date.
     */
    @SerialName("issued_at")
    val issuedAt: Instant = Instant.DISTANT_PAST,

    /**
     * The collection of available endpoints if the token is restricted.
     */
    @SerialName("urls")
    val urls: List = emptyList()
) : TokenInfo()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy