import aet.com.google.gson.annotations.SerializedName
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonNames

@Serializable
data class System @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("key_fp" ) var keyFp : String? = null
)

@Serializable
data class User @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("uzi_id"  ) var uziId  : String? = null,
    @JsonNames("uzi_ura" ) var uziUra : String? = null
)

@Serializable
data class Claims @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("url"                  ) var url                  : String? = null,
    @JsonNames("challenge"            ) var challenge            : String? = null,
    @JsonNames("timestamp"            ) var timestamp            : Int?    = null,
    @JsonNames("authorizationSubject" ) var authorizationSubject : String? = null,
    @JsonNames("user"                 ) var user                 : User?   = User(),
    @JsonNames("system"               ) var system               : System? = System()
)

@Serializable
data class Header @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("alg" ) var alg : String? = null,
    @JsonNames("x5c" ) var x5c : String? = null
)

@Serializable
data class Data @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("allowedAlg" ) var allowedAlg : ArrayList<String> = arrayListOf(),
    @JsonNames("header"     ) var header     : Header?           = Header(),
    @JsonNames("claims"     ) var claims     : Claims?           = Claims()
)

@Serializable
data class DVPARTokenTemplate @OptIn(ExperimentalSerializationApi::class) constructor(
    @JsonNames("toComplement" ) var toComplement : ArrayList<String> = arrayListOf(),
    @JsonNames("tokenType"    ) var tokenType    : String?           = null,
    @JsonNames("tokenSubtype" ) var tokenSubtype : String?           = null,
    @JsonNames("data"         ) var data         : Data?             = Data()
)