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

com.avito.android.model.AvitoCodeOwner.kt Maven / Gradle / Ivy

Go to download

Collection of infrastructure libraries and gradle plugins of Avito Android project

There is a newer version: 2023.22
Show newest version
package com.avito.android.model

import java.io.Serializable

public interface AvitoCodeOwner : Owner {
    public val type: Type

    public val unitName: String
        get() = when (val type = this.type) {
            is Team -> type.unit.type.name
            is Unit -> type.name
        }

    public val unitType: Type
        get() = when (val type = this.type) {
            is Team -> type.unit.type
            is Unit -> type
        }
}

public sealed class Type(
    public val name: String,
    public val id: String,
) : Serializable

public class Unit(
    name: String,
    id: String,
) : Type(name, id)

public class Team(
    name: String,
    id: String,
    public val unit: AvitoCodeOwner,
) : Type(name, id)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy