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

main.com.sceyt.chatuikit.data.models.SceytResponse.kt Maven / Gradle / Ivy

package com.sceyt.chatuikit.data.models

import com.sceyt.chat.models.SceytException

sealed class SceytResponse(val data: T? = null, val message: String? = null, val code: Int? = null) {
    class Success(data: T?) : SceytResponse(data)
    class Error(val exception: SceytException? = null, data: T? = null) : SceytResponse(data, exception?.message, exception?.code)
}

sealed class SceytPagingResponse(val data: T? = null, val message: String? = null, val code: Int? = null) {
    class Success(data: T?, val hasNext: Boolean) : SceytPagingResponse(data)
    class Error(val exception: SceytException? = null, data: T? = null) : SceytPagingResponse(data, exception?.message, exception?.code)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy