import kotlinx.coroutines.delay import kotlin.math.max data class Config(val baseUrl: String, val timeout: Int) class HttpClient(private val config: Config) { fun get(path: String): String { return buildRequest("GET", path) } fun post(path: String, body: String): String { return buildRequest("POST", path) } private fun buildRequest(method: String, path: String): String { return "$method ${config.baseUrl}$path" } } interface Loggable { fun log() } open class BaseProcessor class Result class DataProcessor : BaseProcessor(), Loggable { var current: Result = Result() fun run(input: DataProcessor): Result { return current } override fun log() {} } class LoggingList(inner: MutableList) : MutableList by inner fun createClient(baseUrl: String): HttpClient { val config = Config(baseUrl, 30) return HttpClient(config) } enum class ChatType { NORMAL, GROUP, SYSTEM }