
commonMain.io.sentry.kotlin.multiplatform.protocol.User.kt Maven / Gradle / Ivy
package io.sentry.kotlin.multiplatform.protocol
data class User(
override var email: String = "",
override var id: String = "",
override var username: String = "",
override var ipAddress: String? = null,
override var other: MutableMap? = null,
override var unknown: MutableMap? = null
) : ISentryUser {
constructor(user: ISentryUser) : this(
user.email,
user.id,
user.username,
user.ipAddress,
user.other,
user.unknown
)
// This secondary constructor allows Swift also to init without specifying nil explicitly
// example: User.init() instead of User.init(user: nil)
constructor() : this("", "", "", null, null, null)
}
interface ISentryUser {
/** The user's email */
var email: String
/** The user's id */
var id: String
/** The user's username */
var username: String
/** The user's ip address*/
var ipAddress: String?
/**
* Additional arbitrary fields, as stored in the database (and sometimes as sent by clients). All
* data from `self.other` should end up here after store normalization.
*/
var other: MutableMap?
/** Unknown fields, only internal usage. */
var unknown: MutableMap?
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy