mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-14 05:45:26 +00:00
15 lines
461 B
Kotlin
15 lines
461 B
Kotlin
package dev.inmo.tgbotapi.webapps.cloud
|
|
|
|
import dev.inmo.tgbotapi.types.cloudStorageKeyRegex
|
|
import dev.inmo.tgbotapi.types.cloudStorageValueRegex
|
|
import kotlinx.serialization.Serializable
|
|
|
|
@Serializable
|
|
value class CloudStorageValue(val value: String) {
|
|
init {
|
|
require(value.matches(cloudStorageValueRegex)) {
|
|
"'$value' must pass $cloudStorageValueRegex in case you wish to use it as key for cloud storage operations"
|
|
}
|
|
}
|
|
}
|