com.avito.android.model.network.AvitoOwner.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-ownership-api Show documentation
Show all versions of code-ownership-api Show documentation
Collection of infrastructure libraries and gradle plugins of Avito Android project
package com.avito.android.model.network
public data class AvitoOwner(
val id: String,
val name: String,
val type: OwnerType,
val channels: List,
val children: MutableList = mutableListOf(),
val parentId: String? = null,
val people: List = emptyList(),
)
public data class AvitoPeoplePerson(
val id: String,
val email: String,
)
public enum class OwnerType(public val key: String) {
Team("команда"),
Unit("юнит");
public companion object {
public fun getByKey(key: String?): OwnerType {
return when (key) {
Team.key -> Team
Unit.key -> Unit
else -> error("Not available option for owner type: $key")
}
}
}
}