2021-01-05 17:04:09 +00:00
|
|
|
@file:Suppress("NOTHING_TO_INLINE", "unused", "UNCHECKED_CAST")
|
2021-01-05 05:54:02 +00:00
|
|
|
|
|
|
|
package dev.inmo.tgbotapi.extensions.utils
|
2021-01-09 14:59:37 +00:00
|
|
|
import dev.inmo.tgbotapi.CommonAbstracts.MultilevelTextSource
|
|
|
|
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
|
2021-01-05 05:54:02 +00:00
|
|
|
import dev.inmo.tgbotapi.types.*
|
|
|
|
import dev.inmo.tgbotapi.types.CallbackQuery.*
|
|
|
|
import dev.inmo.tgbotapi.types.ChatMember.*
|
|
|
|
import dev.inmo.tgbotapi.types.ChatMember.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.*
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InlineQuery
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery
|
|
|
|
import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery
|
|
|
|
import dev.inmo.tgbotapi.types.InputMedia.*
|
2021-01-09 14:59:37 +00:00
|
|
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
2021-01-05 05:54:02 +00:00
|
|
|
import dev.inmo.tgbotapi.types.actions.*
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.*
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.*
|
|
|
|
import dev.inmo.tgbotapi.types.chat.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.chat.abstracts.extended.*
|
|
|
|
import dev.inmo.tgbotapi.types.files.*
|
|
|
|
import dev.inmo.tgbotapi.types.files.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.abstracts.*
|
2021-01-09 14:59:37 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.content.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.content.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.content.media.*
|
|
|
|
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
|
2021-01-23 15:10:57 +00:00
|
|
|
import dev.inmo.tgbotapi.types.passport.*
|
|
|
|
import dev.inmo.tgbotapi.types.passport.encrypted_data.*
|
|
|
|
import dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.*
|
2021-01-05 05:54:02 +00:00
|
|
|
import dev.inmo.tgbotapi.types.polls.*
|
|
|
|
import dev.inmo.tgbotapi.types.update.*
|
|
|
|
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.*
|
|
|
|
import dev.inmo.tgbotapi.types.update.abstracts.*
|
2021-01-05 17:02:00 +00:00
|
|
|
import dev.inmo.tgbotapi.utils.PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asBot(): Bot? = this as? Bot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireBot(): Bot = this as Bot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asCommonBot(): CommonBot? = this as? CommonBot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireCommonBot(): CommonBot = this as CommonBot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asCommonUser(): CommonUser? = this as? CommonUser
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireCommonUser(): CommonUser = this as CommonUser
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedBot(): ExtendedBot? = this as? ExtendedBot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedBot(): ExtendedBot = this as ExtendedBot
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asUser(): User? = this as? User
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireUser(): User = this as User
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asChannelChat(): ChannelChat? = this as? ChannelChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireChannelChat(): ChannelChat = this as ChannelChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asGroupChat(): GroupChat? = this as? GroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireGroupChat(): GroupChat = this as GroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asPrivateChat(): PrivateChat? = this as? PrivateChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requirePrivateChat(): PrivateChat = this as PrivateChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asPublicChat(): PublicChat? = this as? PublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requirePublicChat(): PublicChat = this as PublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asSuperPublicChat(): SuperPublicChat? = this as? SuperPublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireSuperPublicChat(): SuperPublicChat = this as SuperPublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asSupergroupChat(): SupergroupChat? = this as? SupergroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireSupergroupChat(): SupergroupChat = this as SupergroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asUnknownChatType(): UnknownChatType? = this as? UnknownChatType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireUnknownChatType(): UnknownChatType = this as UnknownChatType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asUsernameChat(): UsernameChat? = this as? UsernameChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireUsernameChat(): UsernameChat = this as UsernameChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedChannelChat(): ExtendedChannelChat? = this as? ExtendedChannelChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedChannelChat(): ExtendedChannelChat = this as ExtendedChannelChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedChat(): ExtendedChat? = this as? ExtendedChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedChat(): ExtendedChat = this as ExtendedChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedGroupChat(): ExtendedGroupChat? = this as? ExtendedGroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedGroupChat(): ExtendedGroupChat = this as ExtendedGroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedPrivateChat(): ExtendedPrivateChat? = this as? ExtendedPrivateChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedPrivateChat(): ExtendedPrivateChat = this as ExtendedPrivateChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedPublicChat(): ExtendedPublicChat? = this as? ExtendedPublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedPublicChat(): ExtendedPublicChat = this as ExtendedPublicChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Chat.asExtendedSupergroupChat(): ExtendedSupergroupChat? = this as? ExtendedSupergroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Chat.requireExtendedSupergroupChat(): ExtendedSupergroupChat = this as ExtendedSupergroupChat
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asDataCallbackQuery(): DataCallbackQuery? = this as? DataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireDataCallbackQuery(): DataCallbackQuery = this as DataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asGameShortNameCallbackQuery(): GameShortNameCallbackQuery? = this as? GameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireGameShortNameCallbackQuery(): GameShortNameCallbackQuery = this as GameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asInlineMessageIdCallbackQuery(): InlineMessageIdCallbackQuery? = this as? InlineMessageIdCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireInlineMessageIdCallbackQuery(): InlineMessageIdCallbackQuery = this as InlineMessageIdCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asInlineMessageIdDataCallbackQuery(): InlineMessageIdDataCallbackQuery? = this as? InlineMessageIdDataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireInlineMessageIdDataCallbackQuery(): InlineMessageIdDataCallbackQuery = this as InlineMessageIdDataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asInlineMessageIdGameShortNameCallbackQuery(): InlineMessageIdGameShortNameCallbackQuery? = this as? InlineMessageIdGameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireInlineMessageIdGameShortNameCallbackQuery(): InlineMessageIdGameShortNameCallbackQuery = this as InlineMessageIdGameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asMessageCallbackQuery(): MessageCallbackQuery? = this as? MessageCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireMessageCallbackQuery(): MessageCallbackQuery = this as MessageCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asMessageDataCallbackQuery(): MessageDataCallbackQuery? = this as? MessageDataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireMessageDataCallbackQuery(): MessageDataCallbackQuery = this as MessageDataCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asMessageGameShortNameCallbackQuery(): MessageGameShortNameCallbackQuery? = this as? MessageGameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireMessageGameShortNameCallbackQuery(): MessageGameShortNameCallbackQuery = this as MessageGameShortNameCallbackQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun CallbackQuery.asUnknownCallbackQueryType(): UnknownCallbackQueryType? = this as? UnknownCallbackQueryType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun CallbackQuery.requireUnknownCallbackQueryType(): UnknownCallbackQueryType = this as UnknownCallbackQueryType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-23 15:10:57 +00:00
|
|
|
inline fun PassportElementError.asPassportElementErrorDataField(): PassportElementErrorDataField? = this as? PassportElementErrorDataField
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorDataField(): PassportElementErrorDataField = this as PassportElementErrorDataField
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorFile(): PassportElementErrorFile? = this as? PassportElementErrorFile
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorFile(): PassportElementErrorFile = this as PassportElementErrorFile
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorFiles(): PassportElementErrorFiles? = this as? PassportElementErrorFiles
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorFiles(): PassportElementErrorFiles = this as PassportElementErrorFiles
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorFrontSide(): PassportElementErrorFrontSide? = this as? PassportElementErrorFrontSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorFrontSide(): PassportElementErrorFrontSide = this as PassportElementErrorFrontSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorReverseSide(): PassportElementErrorReverseSide? = this as? PassportElementErrorReverseSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorReverseSide(): PassportElementErrorReverseSide = this as PassportElementErrorReverseSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorSelfie(): PassportElementErrorSelfie? = this as? PassportElementErrorSelfie
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorSelfie(): PassportElementErrorSelfie = this as PassportElementErrorSelfie
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorTranslationFile(): PassportElementErrorTranslationFile? = this as? PassportElementErrorTranslationFile
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorTranslationFile(): PassportElementErrorTranslationFile = this as PassportElementErrorTranslationFile
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorTranslationFiles(): PassportElementErrorTranslationFiles? = this as? PassportElementErrorTranslationFiles
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorTranslationFiles(): PassportElementErrorTranslationFiles = this as PassportElementErrorTranslationFiles
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementErrorUnspecified(): PassportElementErrorUnspecified? = this as? PassportElementErrorUnspecified
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementErrorUnspecified(): PassportElementErrorUnspecified = this as PassportElementErrorUnspecified
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementFileError(): PassportElementFileError? = this as? PassportElementFileError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementFileError(): PassportElementFileError = this as PassportElementFileError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportElementFilesError(): PassportElementFilesError? = this as? PassportElementFilesError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportElementFilesError(): PassportElementFilesError = this as PassportElementFilesError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportMultipleElementsError(): PassportMultipleElementsError? = this as? PassportMultipleElementsError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportMultipleElementsError(): PassportMultipleElementsError = this as PassportMultipleElementsError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asPassportSingleElementError(): PassportSingleElementError? = this as? PassportSingleElementError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requirePassportSingleElementError(): PassportSingleElementError = this as PassportSingleElementError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.asUnknownPassportElementError(): UnknownPassportElementError? = this as? UnknownPassportElementError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun PassportElementError.requireUnknownPassportElementError(): UnknownPassportElementError = this as UnknownPassportElementError
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asBankStatement(): BankStatement? = this as? BankStatement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireBankStatement(): BankStatement = this as BankStatement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asCommonPassport(): CommonPassport? = this as? CommonPassport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireCommonPassport(): CommonPassport = this as CommonPassport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asDriverLicense(): DriverLicense? = this as? DriverLicense
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireDriverLicense(): DriverLicense = this as DriverLicense
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asEmail(): Email? = this as? Email
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireEmail(): Email = this as Email
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asEncryptedAddress(): EncryptedAddress? = this as? EncryptedAddress
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireEncryptedAddress(): EncryptedAddress = this as EncryptedAddress
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asEncryptedPersonalDetails(): EncryptedPersonalDetails? = this as? EncryptedPersonalDetails
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireEncryptedPersonalDetails(): EncryptedPersonalDetails = this as EncryptedPersonalDetails
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asIdentityCard(): IdentityCard? = this as? IdentityCard
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireIdentityCard(): IdentityCard = this as IdentityCard
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asInternalPassport(): InternalPassport? = this as? InternalPassport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireInternalPassport(): InternalPassport = this as InternalPassport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asPassport(): Passport? = this as? Passport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requirePassport(): Passport = this as Passport
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asPassportRegistration(): PassportRegistration? = this as? PassportRegistration
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requirePassportRegistration(): PassportRegistration = this as PassportRegistration
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asPhoneNumber(): PhoneNumber? = this as? PhoneNumber
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requirePhoneNumber(): PhoneNumber = this as PhoneNumber
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asRentalAgreement(): RentalAgreement? = this as? RentalAgreement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireRentalAgreement(): RentalAgreement = this as RentalAgreement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asTemporaryRegistration(): TemporaryRegistration? = this as? TemporaryRegistration
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireTemporaryRegistration(): TemporaryRegistration = this as TemporaryRegistration
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asTranslatableFilesCollection(): TranslatableFilesCollection? = this as? TranslatableFilesCollection
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireTranslatableFilesCollection(): TranslatableFilesCollection = this as TranslatableFilesCollection
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asTranslatableIDDocument(): TranslatableIDDocument? = this as? TranslatableIDDocument
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireTranslatableIDDocument(): TranslatableIDDocument = this as TranslatableIDDocument
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asUtilityBill(): UtilityBill? = this as? UtilityBill
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireUtilityBill(): UtilityBill = this as UtilityBill
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asFilesCollection(): FilesCollection? = this as? FilesCollection
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireFilesCollection(): FilesCollection = this as FilesCollection
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asTranslatable(): Translatable? = this as? Translatable
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireTranslatable(): Translatable = this as Translatable
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asUnknownEncryptedPassportElement(): UnknownEncryptedPassportElement? = this as? UnknownEncryptedPassportElement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireUnknownEncryptedPassportElement(): UnknownEncryptedPassportElement = this as UnknownEncryptedPassportElement
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithData(): WithData? = this as? WithData
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithData(): WithData = this as WithData
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithEmail(): WithEmail? = this as? WithEmail
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithEmail(): WithEmail = this as WithEmail
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithFrontSide(): WithFrontSide? = this as? WithFrontSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithFrontSide(): WithFrontSide = this as WithFrontSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithPhoneNumber(): WithPhoneNumber? = this as? WithPhoneNumber
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithPhoneNumber(): WithPhoneNumber = this as WithPhoneNumber
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithReverseSide(): WithReverseSide? = this as? WithReverseSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithReverseSide(): WithReverseSide = this as WithReverseSide
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.asWithSelfie(): WithSelfie? = this as? WithSelfie
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun EncryptedPassportElement.requireWithSelfie(): WithSelfie = this as WithSelfie
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.asAnonymousGroupMessageImpl(): AnonymousGroupMessageImpl<MessageContent>? = this as? AnonymousGroupMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.requireAnonymousGroupMessageImpl(): AnonymousGroupMessageImpl<MessageContent> = this as AnonymousGroupMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.asChannelMessageImpl(): ChannelMessageImpl<MessageContent>? = this as? ChannelMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.requireChannelMessageImpl(): ChannelMessageImpl<MessageContent> = this as ChannelMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.asFromChannelGroupMessageImpl(): FromChannelGroupMessageImpl<MessageContent>? = this as? FromChannelGroupMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.requireFromChannelGroupMessageImpl(): FromChannelGroupMessageImpl<MessageContent> = this as FromChannelGroupMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.asPassportMessage(): PassportMessage? = this as? PassportMessage
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.requirePassportMessage(): PassportMessage = this as PassportMessage
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.asPrivateMessageImpl(): PrivateMessageImpl<MessageContent>? = this as? PrivateMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun Message.requirePrivateMessageImpl(): PrivateMessageImpl<MessageContent> = this as PrivateMessageImpl<MessageContent>
|
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asChannelEventMessage(): ChannelEventMessage<ChannelEvent>? = this as? ChannelEventMessage<ChannelEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireChannelEventMessage(): ChannelEventMessage<ChannelEvent> = this as ChannelEventMessage<ChannelEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.asChannelMediaGroupMessage(): ChannelMediaGroupMessage<MediaGroupContent>? = this as? ChannelMediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.requireChannelMediaGroupMessage(): ChannelMediaGroupMessage<MediaGroupContent> = this as ChannelMediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asCommonGroupEventMessage(): CommonGroupEventMessage<GroupEvent>? = this as? CommonGroupEventMessage<GroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireCommonGroupEventMessage(): CommonGroupEventMessage<GroupEvent> = this as CommonGroupEventMessage<GroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.asCommonMediaGroupMessage(): CommonMediaGroupMessage<MediaGroupContent>? = this as? CommonMediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.requireCommonMediaGroupMessage(): CommonMediaGroupMessage<MediaGroupContent> = this as CommonMediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asCommonSupergroupEventMessage(): CommonSupergroupEventMessage<SupergroupEvent>? = this as? CommonSupergroupEventMessage<SupergroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireCommonSupergroupEventMessage(): CommonSupergroupEventMessage<SupergroupEvent> = this as CommonSupergroupEventMessage<SupergroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asAnonymousGroupMessage(): AnonymousGroupMessage<MessageContent>? = this as? AnonymousGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireAnonymousGroupMessage(): AnonymousGroupMessage<MessageContent> = this as AnonymousGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asChannelMessage(): ChannelMessage<MessageContent>? = this as? ChannelMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireChannelMessage(): ChannelMessage<MessageContent> = this as ChannelMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asChatEventMessage(): ChatEventMessage<ChatEvent>? = this as? ChatEventMessage<ChatEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireChatEventMessage(): ChatEventMessage<ChatEvent> = this as ChatEventMessage<ChatEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asCommonGroupMessage(): CommonGroupMessage<MessageContent>? = this as? CommonGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireCommonGroupMessage(): CommonGroupMessage<MessageContent> = this as CommonGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asCommonMessage(): CommonMessage<MessageContent>? = this as? CommonMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireCommonMessage(): CommonMessage<MessageContent> = this as CommonMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asContentMessage(): ContentMessage<MessageContent>? = this as? ContentMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireContentMessage(): ContentMessage<MessageContent> = this as ContentMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asFromChannelGroupMessage(): FromChannelGroupMessage<MessageContent>? = this as? FromChannelGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireFromChannelGroupMessage(): FromChannelGroupMessage<MessageContent> = this as FromChannelGroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asGroupEventMessage(): GroupEventMessage<GroupEvent>? = this as? GroupEventMessage<GroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireGroupEventMessage(): GroupEventMessage<GroupEvent> = this as GroupEventMessage<GroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asGroupMessage(): GroupMessage<MessageContent>? = this as? GroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireGroupMessage(): GroupMessage<MessageContent> = this as GroupMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.asMediaGroupMessage(): MediaGroupMessage<MediaGroupContent>? = this as? MediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-19 04:52:30 +00:00
|
|
|
inline fun Message.requireMediaGroupMessage(): MediaGroupMessage<MediaGroupContent> = this as MediaGroupMessage<MediaGroupContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Message.asPossiblyEditedMessage(): PossiblyEditedMessage? = this as? PossiblyEditedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePossiblyEditedMessage(): PossiblyEditedMessage = this as PossiblyEditedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Message.asPossiblyForwardedMessage(): PossiblyForwardedMessage? = this as? PossiblyForwardedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePossiblyForwardedMessage(): PossiblyForwardedMessage = this as PossiblyForwardedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Message.asPossiblyPaymentMessage(): PossiblyPaymentMessage? = this as? PossiblyPaymentMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePossiblyPaymentMessage(): PossiblyPaymentMessage = this as PossiblyPaymentMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asPrivateMessage(): PrivateMessage<MessageContent>? = this as? PrivateMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePrivateMessage(): PrivateMessage<MessageContent> = this as PrivateMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asPublicMessage(): PublicMessage<MessageContent>? = this as? PublicMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePublicMessage(): PublicMessage<MessageContent> = this as PublicMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Message.asSignedMessage(): SignedMessage? = this as? SignedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireSignedMessage(): SignedMessage = this as SignedMessage
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asSupergroupEventMessage(): SupergroupEventMessage<SupergroupEvent>? = this as? SupergroupEventMessage<SupergroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireSupergroupEventMessage(): SupergroupEventMessage<SupergroupEvent> = this as SupergroupEventMessage<SupergroupEvent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Message.asUnknownMessageType(): UnknownMessageType? = this as? UnknownMessageType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requireUnknownMessageType(): UnknownMessageType = this as UnknownMessageType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.asPossiblySentViaBotCommonMessage(): PossiblySentViaBotCommonMessage<MessageContent>? = this as? PossiblySentViaBotCommonMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Message.requirePossiblySentViaBotCommonMessage(): PossiblySentViaBotCommonMessage<MessageContent> = this as PossiblySentViaBotCommonMessage<MessageContent>
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asFindLocationAction(): FindLocationAction? = this as? FindLocationAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireFindLocationAction(): FindLocationAction = this as FindLocationAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asRecordAudioAction(): RecordAudioAction? = this as? RecordAudioAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireRecordAudioAction(): RecordAudioAction = this as RecordAudioAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asRecordVideoAction(): RecordVideoAction? = this as? RecordVideoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireRecordVideoAction(): RecordVideoAction = this as RecordVideoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asRecordVideoNoteAction(): RecordVideoNoteAction? = this as? RecordVideoNoteAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireRecordVideoNoteAction(): RecordVideoNoteAction = this as RecordVideoNoteAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asTypingAction(): TypingAction? = this as? TypingAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireTypingAction(): TypingAction = this as TypingAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asUploadAudioAction(): UploadAudioAction? = this as? UploadAudioAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireUploadAudioAction(): UploadAudioAction = this as UploadAudioAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asUploadDocumentAction(): UploadDocumentAction? = this as? UploadDocumentAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireUploadDocumentAction(): UploadDocumentAction = this as UploadDocumentAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asUploadPhotoAction(): UploadPhotoAction? = this as? UploadPhotoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireUploadPhotoAction(): UploadPhotoAction = this as UploadPhotoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asUploadVideoAction(): UploadVideoAction? = this as? UploadVideoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireUploadVideoAction(): UploadVideoAction = this as UploadVideoAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun BotAction.asUploadVideoNoteAction(): UploadVideoNoteAction? = this as? UploadVideoNoteAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun BotAction.requireUploadVideoNoteAction(): UploadVideoNoteAction = this as UploadVideoNoteAction
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQuery.asBaseInlineQuery(): BaseInlineQuery? = this as? BaseInlineQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQuery.requireBaseInlineQuery(): BaseInlineQuery = this as BaseInlineQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQuery.asLocationInlineQuery(): LocationInlineQuery? = this as? LocationInlineQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQuery.requireLocationInlineQuery(): LocationInlineQuery = this as LocationInlineQuery
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMessageContent.asInputContactMessageContent(): InputContactMessageContent? = this as? InputContactMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMessageContent.requireInputContactMessageContent(): InputContactMessageContent = this as InputContactMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMessageContent.asInputLocationMessageContent(): InputLocationMessageContent? = this as? InputLocationMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMessageContent.requireInputLocationMessageContent(): InputLocationMessageContent = this as InputLocationMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMessageContent.asInputTextMessageContent(): InputTextMessageContent? = this as? InputTextMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMessageContent.requireInputTextMessageContent(): InputTextMessageContent = this as InputTextMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMessageContent.asInputVenueMessageContent(): InputVenueMessageContent? = this as? InputVenueMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMessageContent.requireInputVenueMessageContent(): InputVenueMessageContent = this as InputVenueMessageContent
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultArticle(): InlineQueryResultArticle? = this as? InlineQueryResultArticle
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultArticle(): InlineQueryResultArticle = this as InlineQueryResultArticle
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultContact(): InlineQueryResultContact? = this as? InlineQueryResultContact
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultContact(): InlineQueryResultContact = this as InlineQueryResultContact
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultGame(): InlineQueryResultGame? = this as? InlineQueryResultGame
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultGame(): InlineQueryResultGame = this as InlineQueryResultGame
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultLocation(): InlineQueryResultLocation? = this as? InlineQueryResultLocation
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultLocation(): InlineQueryResultLocation = this as InlineQueryResultLocation
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultStickerCached(): InlineQueryResultStickerCached? = this as? InlineQueryResultStickerCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultStickerCached(): InlineQueryResultStickerCached = this as InlineQueryResultStickerCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVenue(): InlineQueryResultVenue? = this as? InlineQueryResultVenue
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVenue(): InlineQueryResultVenue = this as InlineQueryResultVenue
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asDescribedInlineQueryResult(): DescribedInlineQueryResult? = this as? DescribedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireDescribedInlineQueryResult(): DescribedInlineQueryResult = this as DescribedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asFileInlineQueryResult(): FileInlineQueryResult? = this as? FileInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireFileInlineQueryResult(): FileInlineQueryResult = this as FileInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asOptionallyTitledInlineQueryResult(): OptionallyTitledInlineQueryResult? = this as? OptionallyTitledInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireOptionallyTitledInlineQueryResult(): OptionallyTitledInlineQueryResult = this as OptionallyTitledInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asSizedInlineQueryResult(): SizedInlineQueryResult? = this as? SizedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireSizedInlineQueryResult(): SizedInlineQueryResult = this as SizedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asThumbSizedInlineQueryResult(): ThumbSizedInlineQueryResult? = this as? ThumbSizedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireThumbSizedInlineQueryResult(): ThumbSizedInlineQueryResult = this as ThumbSizedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asThumbedInlineQueryResult(): ThumbedInlineQueryResult? = this as? ThumbedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireThumbedInlineQueryResult(): ThumbedInlineQueryResult = this as ThumbedInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asThumbedWithMimeTypeInlineQueryResult(): ThumbedWithMimeTypeInlineQueryResult? = this as? ThumbedWithMimeTypeInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireThumbedWithMimeTypeInlineQueryResult(): ThumbedWithMimeTypeInlineQueryResult = this as ThumbedWithMimeTypeInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asTitledInlineQueryResult(): TitledInlineQueryResult? = this as? TitledInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireTitledInlineQueryResult(): TitledInlineQueryResult = this as TitledInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asUrlInlineQueryResult(): UrlInlineQueryResult? = this as? UrlInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireUrlInlineQueryResult(): UrlInlineQueryResult = this as UrlInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asWithInputMessageContentInlineQueryResult(): WithInputMessageContentInlineQueryResult? = this as? WithInputMessageContentInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireWithInputMessageContentInlineQueryResult(): WithInputMessageContentInlineQueryResult = this as WithInputMessageContentInlineQueryResult
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultAudio(): InlineQueryResultAudio? = this as? InlineQueryResultAudio
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultAudio(): InlineQueryResultAudio = this as InlineQueryResultAudio
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultAudioCached(): InlineQueryResultAudioCached? = this as? InlineQueryResultAudioCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultAudioCached(): InlineQueryResultAudioCached = this as InlineQueryResultAudioCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultAudioCommon(): InlineQueryResultAudioCommon? = this as? InlineQueryResultAudioCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultAudioCommon(): InlineQueryResultAudioCommon = this as InlineQueryResultAudioCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultDocument(): InlineQueryResultDocument? = this as? InlineQueryResultDocument
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultDocument(): InlineQueryResultDocument = this as InlineQueryResultDocument
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultDocumentCached(): InlineQueryResultDocumentCached? = this as? InlineQueryResultDocumentCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultDocumentCached(): InlineQueryResultDocumentCached = this as InlineQueryResultDocumentCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultDocumentCommon(): InlineQueryResultDocumentCommon? = this as? InlineQueryResultDocumentCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultDocumentCommon(): InlineQueryResultDocumentCommon = this as InlineQueryResultDocumentCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultGif(): InlineQueryResultGif? = this as? InlineQueryResultGif
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultGif(): InlineQueryResultGif = this as InlineQueryResultGif
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultGifCached(): InlineQueryResultGifCached? = this as? InlineQueryResultGifCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultGifCached(): InlineQueryResultGifCached = this as InlineQueryResultGifCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultGifCommon(): InlineQueryResultGifCommon? = this as? InlineQueryResultGifCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultGifCommon(): InlineQueryResultGifCommon = this as InlineQueryResultGifCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultMpeg4Gif(): InlineQueryResultMpeg4Gif? = this as? InlineQueryResultMpeg4Gif
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultMpeg4Gif(): InlineQueryResultMpeg4Gif = this as InlineQueryResultMpeg4Gif
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultMpeg4GifCached(): InlineQueryResultMpeg4GifCached? = this as? InlineQueryResultMpeg4GifCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultMpeg4GifCached(): InlineQueryResultMpeg4GifCached = this as InlineQueryResultMpeg4GifCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultMpeg4GifCommon(): InlineQueryResultMpeg4GifCommon? = this as? InlineQueryResultMpeg4GifCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultMpeg4GifCommon(): InlineQueryResultMpeg4GifCommon = this as InlineQueryResultMpeg4GifCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultPhoto(): InlineQueryResultPhoto? = this as? InlineQueryResultPhoto
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultPhoto(): InlineQueryResultPhoto = this as InlineQueryResultPhoto
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultPhotoCached(): InlineQueryResultPhotoCached? = this as? InlineQueryResultPhotoCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultPhotoCached(): InlineQueryResultPhotoCached = this as InlineQueryResultPhotoCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultPhotoCommon(): InlineQueryResultPhotoCommon? = this as? InlineQueryResultPhotoCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultPhotoCommon(): InlineQueryResultPhotoCommon = this as InlineQueryResultPhotoCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVideo(): InlineQueryResultVideo? = this as? InlineQueryResultVideo
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVideo(): InlineQueryResultVideo = this as InlineQueryResultVideo
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVideoCached(): InlineQueryResultVideoCached? = this as? InlineQueryResultVideoCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVideoCached(): InlineQueryResultVideoCached = this as InlineQueryResultVideoCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVideoCommon(): InlineQueryResultVideoCommon? = this as? InlineQueryResultVideoCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVideoCommon(): InlineQueryResultVideoCommon = this as InlineQueryResultVideoCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVoice(): InlineQueryResultVoice? = this as? InlineQueryResultVoice
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVoice(): InlineQueryResultVoice = this as InlineQueryResultVoice
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVoiceCached(): InlineQueryResultVoiceCached? = this as? InlineQueryResultVoiceCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVoiceCached(): InlineQueryResultVoiceCached = this as InlineQueryResultVoiceCached
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineQueryResult.asInlineQueryResultVoiceCommon(): InlineQueryResultVoiceCommon? = this as? InlineQueryResultVoiceCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineQueryResult.requireInlineQueryResultVoiceCommon(): InlineQueryResultVoiceCommon = this as InlineQueryResultVoiceCommon
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asCreatorChatMember(): CreatorChatMember? = this as? CreatorChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireCreatorChatMember(): CreatorChatMember = this as CreatorChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asKickedChatMember(): KickedChatMember? = this as? KickedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireKickedChatMember(): KickedChatMember = this as KickedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asLeftChatMember(): LeftChatMember? = this as? LeftChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireLeftChatMember(): LeftChatMember = this as LeftChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asMemberChatMember(): MemberChatMember? = this as? MemberChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireMemberChatMember(): MemberChatMember = this as MemberChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asRestrictedChatMember(): RestrictedChatMember? = this as? RestrictedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireRestrictedChatMember(): RestrictedChatMember = this as RestrictedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asAdministratorChatMember(): AdministratorChatMember? = this as? AdministratorChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireAdministratorChatMember(): AdministratorChatMember = this as AdministratorChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asBannedChatMember(): BannedChatMember? = this as? BannedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireBannedChatMember(): BannedChatMember = this as BannedChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun ChatMember.asSpecialRightsChatMember(): SpecialRightsChatMember? = this as? SpecialRightsChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun ChatMember.requireSpecialRightsChatMember(): SpecialRightsChatMember = this as SpecialRightsChatMember
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asAudioMediaGroupMemberInputMedia(): AudioMediaGroupMemberInputMedia? = this as? AudioMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireAudioMediaGroupMemberInputMedia(): AudioMediaGroupMemberInputMedia = this as AudioMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asDocumentMediaGroupMemberInputMedia(): DocumentMediaGroupMemberInputMedia? = this as? DocumentMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireDocumentMediaGroupMemberInputMedia(): DocumentMediaGroupMemberInputMedia = this as DocumentMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asDuratedInputMedia(): DuratedInputMedia? = this as? DuratedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireDuratedInputMedia(): DuratedInputMedia = this as DuratedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asInputMediaAnimation(): InputMediaAnimation? = this as? InputMediaAnimation
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireInputMediaAnimation(): InputMediaAnimation = this as InputMediaAnimation
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asInputMediaAudio(): InputMediaAudio? = this as? InputMediaAudio
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireInputMediaAudio(): InputMediaAudio = this as InputMediaAudio
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asInputMediaDocument(): InputMediaDocument? = this as? InputMediaDocument
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireInputMediaDocument(): InputMediaDocument = this as InputMediaDocument
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asInputMediaPhoto(): InputMediaPhoto? = this as? InputMediaPhoto
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireInputMediaPhoto(): InputMediaPhoto = this as InputMediaPhoto
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asInputMediaVideo(): InputMediaVideo? = this as? InputMediaVideo
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireInputMediaVideo(): InputMediaVideo = this as InputMediaVideo
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asMediaGroupMemberInputMedia(): MediaGroupMemberInputMedia? = this as? MediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireMediaGroupMemberInputMedia(): MediaGroupMemberInputMedia = this as MediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asSizedInputMedia(): SizedInputMedia? = this as? SizedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireSizedInputMedia(): SizedInputMedia = this as SizedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asThumbedInputMedia(): ThumbedInputMedia? = this as? ThumbedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireThumbedInputMedia(): ThumbedInputMedia = this as ThumbedInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asTitledInputMedia(): TitledInputMedia? = this as? TitledInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireTitledInputMedia(): TitledInputMedia = this as TitledInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InputMedia.asVisualMediaGroupMemberInputMedia(): VisualMediaGroupMemberInputMedia? = this as? VisualMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InputMedia.requireVisualMediaGroupMemberInputMedia(): VisualMediaGroupMemberInputMedia = this as VisualMediaGroupMemberInputMedia
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asCallbackQueryUpdate(): CallbackQueryUpdate? = this as? CallbackQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireCallbackQueryUpdate(): CallbackQueryUpdate = this as CallbackQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asChannelPostUpdate(): ChannelPostUpdate? = this as? ChannelPostUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireChannelPostUpdate(): ChannelPostUpdate = this as ChannelPostUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asChosenInlineResultUpdate(): ChosenInlineResultUpdate? = this as? ChosenInlineResultUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireChosenInlineResultUpdate(): ChosenInlineResultUpdate = this as ChosenInlineResultUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asEditChannelPostUpdate(): EditChannelPostUpdate? = this as? EditChannelPostUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireEditChannelPostUpdate(): EditChannelPostUpdate = this as EditChannelPostUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asEditMessageUpdate(): EditMessageUpdate? = this as? EditMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireEditMessageUpdate(): EditMessageUpdate = this as EditMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asInlineQueryUpdate(): InlineQueryUpdate? = this as? InlineQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireInlineQueryUpdate(): InlineQueryUpdate = this as InlineQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asChannelPostMediaGroupUpdate(): ChannelPostMediaGroupUpdate? = this as? ChannelPostMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireChannelPostMediaGroupUpdate(): ChannelPostMediaGroupUpdate = this as ChannelPostMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asEditChannelPostMediaGroupUpdate(): EditChannelPostMediaGroupUpdate? = this as? EditChannelPostMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireEditChannelPostMediaGroupUpdate(): EditChannelPostMediaGroupUpdate = this as EditChannelPostMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asEditMediaGroupUpdate(): EditMediaGroupUpdate? = this as? EditMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireEditMediaGroupUpdate(): EditMediaGroupUpdate = this as EditMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asEditMessageMediaGroupUpdate(): EditMessageMediaGroupUpdate? = this as? EditMessageMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireEditMessageMediaGroupUpdate(): EditMessageMediaGroupUpdate = this as EditMessageMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asMediaGroupUpdate(): MediaGroupUpdate? = this as? MediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireMediaGroupUpdate(): MediaGroupUpdate = this as MediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asMessageMediaGroupUpdate(): MessageMediaGroupUpdate? = this as? MessageMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireMessageMediaGroupUpdate(): MessageMediaGroupUpdate = this as MessageMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asSentMediaGroupUpdate(): SentMediaGroupUpdate? = this as? SentMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireSentMediaGroupUpdate(): SentMediaGroupUpdate = this as SentMediaGroupUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asMessageUpdate(): MessageUpdate? = this as? MessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireMessageUpdate(): MessageUpdate = this as MessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asPollAnswerUpdate(): PollAnswerUpdate? = this as? PollAnswerUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requirePollAnswerUpdate(): PollAnswerUpdate = this as PollAnswerUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asPollUpdate(): PollUpdate? = this as? PollUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requirePollUpdate(): PollUpdate = this as PollUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asPreCheckoutQueryUpdate(): PreCheckoutQueryUpdate? = this as? PreCheckoutQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requirePreCheckoutQueryUpdate(): PreCheckoutQueryUpdate = this as PreCheckoutQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asShippingQueryUpdate(): ShippingQueryUpdate? = this as? ShippingQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireShippingQueryUpdate(): ShippingQueryUpdate = this as ShippingQueryUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asBaseEditMessageUpdate(): BaseEditMessageUpdate? = this as? BaseEditMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireBaseEditMessageUpdate(): BaseEditMessageUpdate = this as BaseEditMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asBaseMessageUpdate(): BaseMessageUpdate? = this as? BaseMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireBaseMessageUpdate(): BaseMessageUpdate = this as BaseMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asBaseSentMessageUpdate(): BaseSentMessageUpdate? = this as? BaseSentMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireBaseSentMessageUpdate(): BaseSentMessageUpdate = this as BaseSentMessageUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Update.asUnknownUpdate(): UnknownUpdate? = this as? UnknownUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Update.requireUnknownUpdate(): UnknownUpdate = this as UnknownUpdate
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asAnimationFile(): AnimationFile? = this as? AnimationFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireAnimationFile(): AnimationFile = this as AnimationFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asAudioFile(): AudioFile? = this as? AudioFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireAudioFile(): AudioFile = this as AudioFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asDocumentFile(): DocumentFile? = this as? DocumentFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireDocumentFile(): DocumentFile = this as DocumentFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asFile(): File? = this as? File
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireFile(): File = this as File
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asPathedFile(): PathedFile? = this as? PathedFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requirePathedFile(): PathedFile = this as PathedFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asPhotoSize(): PhotoSize? = this as? PhotoSize
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requirePhotoSize(): PhotoSize = this as PhotoSize
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asSticker(): Sticker? = this as? Sticker
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireSticker(): Sticker = this as Sticker
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asVideoFile(): VideoFile? = this as? VideoFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireVideoFile(): VideoFile = this as VideoFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asVideoNoteFile(): VideoNoteFile? = this as? VideoNoteFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireVideoNoteFile(): VideoNoteFile = this as VideoNoteFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asVoiceFile(): VoiceFile? = this as? VoiceFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireVoiceFile(): VoiceFile = this as VoiceFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asMimedMediaFile(): MimedMediaFile? = this as? MimedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireMimedMediaFile(): MimedMediaFile = this as MimedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asPlayableMediaFile(): PlayableMediaFile? = this as? PlayableMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requirePlayableMediaFile(): PlayableMediaFile = this as PlayableMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asSizedMediaFile(): SizedMediaFile? = this as? SizedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireSizedMediaFile(): SizedMediaFile = this as SizedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun TelegramMediaFile.asThumbedMediaFile(): ThumbedMediaFile? = this as? ThumbedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun TelegramMediaFile.requireThumbedMediaFile(): ThumbedMediaFile = this as ThumbedMediaFile
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun KeyboardMarkup.asForceReply(): ForceReply? = this as? ForceReply
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun KeyboardMarkup.requireForceReply(): ForceReply = this as ForceReply
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun KeyboardMarkup.asInlineKeyboardMarkup(): InlineKeyboardMarkup? = this as? InlineKeyboardMarkup
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun KeyboardMarkup.requireInlineKeyboardMarkup(): InlineKeyboardMarkup = this as InlineKeyboardMarkup
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun KeyboardMarkup.asReplyKeyboardMarkup(): ReplyKeyboardMarkup? = this as? ReplyKeyboardMarkup
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun KeyboardMarkup.requireReplyKeyboardMarkup(): ReplyKeyboardMarkup = this as ReplyKeyboardMarkup
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun KeyboardMarkup.asReplyKeyboardRemove(): ReplyKeyboardRemove? = this as? ReplyKeyboardRemove
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun KeyboardMarkup.requireReplyKeyboardRemove(): ReplyKeyboardRemove = this as ReplyKeyboardRemove
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asCallbackDataInlineKeyboardButton(): CallbackDataInlineKeyboardButton? = this as? CallbackDataInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireCallbackDataInlineKeyboardButton(): CallbackDataInlineKeyboardButton = this as CallbackDataInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asCallbackGameInlineKeyboardButton(): CallbackGameInlineKeyboardButton? = this as? CallbackGameInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireCallbackGameInlineKeyboardButton(): CallbackGameInlineKeyboardButton = this as CallbackGameInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asLoginURLInlineKeyboardButton(): LoginURLInlineKeyboardButton? = this as? LoginURLInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireLoginURLInlineKeyboardButton(): LoginURLInlineKeyboardButton = this as LoginURLInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asPayInlineKeyboardButton(): PayInlineKeyboardButton? = this as? PayInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requirePayInlineKeyboardButton(): PayInlineKeyboardButton = this as PayInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asSwitchInlineQueryCurrentChatInlineKeyboardButton(): SwitchInlineQueryCurrentChatInlineKeyboardButton? = this as? SwitchInlineQueryCurrentChatInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireSwitchInlineQueryCurrentChatInlineKeyboardButton(): SwitchInlineQueryCurrentChatInlineKeyboardButton = this as SwitchInlineQueryCurrentChatInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asSwitchInlineQueryInlineKeyboardButton(): SwitchInlineQueryInlineKeyboardButton? = this as? SwitchInlineQueryInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireSwitchInlineQueryInlineKeyboardButton(): SwitchInlineQueryInlineKeyboardButton = this as SwitchInlineQueryInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asURLInlineKeyboardButton(): URLInlineKeyboardButton? = this as? URLInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireURLInlineKeyboardButton(): URLInlineKeyboardButton = this as URLInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun InlineKeyboardButton.asUnknownInlineKeyboardButton(): UnknownInlineKeyboardButton? = this as? UnknownInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun InlineKeyboardButton.requireUnknownInlineKeyboardButton(): UnknownInlineKeyboardButton = this as UnknownInlineKeyboardButton
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Poll.asMultipleAnswersPoll(): MultipleAnswersPoll? = this as? MultipleAnswersPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Poll.requireMultipleAnswersPoll(): MultipleAnswersPoll = this as MultipleAnswersPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Poll.asQuizPoll(): QuizPoll? = this as? QuizPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Poll.requireQuizPoll(): QuizPoll = this as QuizPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Poll.asRegularPoll(): RegularPoll? = this as? RegularPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Poll.requireRegularPoll(): RegularPoll = this as RegularPoll
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 05:54:02 +00:00
|
|
|
inline fun Poll.asUnknownPollType(): UnknownPollType? = this as? UnknownPollType
|
2021-01-05 17:02:00 +00:00
|
|
|
@PreviewFeature
|
2021-01-05 16:27:42 +00:00
|
|
|
inline fun Poll.requireUnknownPollType(): UnknownPollType = this as UnknownPollType
|
2021-01-06 13:05:48 +00:00
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asContactContent(): ContactContent? = this as? ContactContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireContactContent(): ContactContent = this as ContactContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asDiceContent(): DiceContent? = this as? DiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireDiceContent(): DiceContent = this as DiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asGameContent(): GameContent? = this as? GameContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireGameContent(): GameContent = this as GameContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asLocationContent(): LocationContent? = this as? LocationContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireLocationContent(): LocationContent = this as LocationContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asPollContent(): PollContent? = this as? PollContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requirePollContent(): PollContent = this as PollContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asTextContent(): TextContent? = this as? TextContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireTextContent(): TextContent = this as TextContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asVenueContent(): VenueContent? = this as? VenueContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireVenueContent(): VenueContent = this as VenueContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asAudioMediaGroupContent(): AudioMediaGroupContent? = this as? AudioMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireAudioMediaGroupContent(): AudioMediaGroupContent = this as AudioMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asDocumentMediaGroupContent(): DocumentMediaGroupContent? = this as? DocumentMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireDocumentMediaGroupContent(): DocumentMediaGroupContent = this as DocumentMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asMediaCollectionContent(): MediaCollectionContent<TelegramMediaFile>? = this as? MediaCollectionContent<TelegramMediaFile>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireMediaCollectionContent(): MediaCollectionContent<TelegramMediaFile> = this as MediaCollectionContent<TelegramMediaFile>
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asMediaContent(): MediaContent? = this as? MediaContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireMediaContent(): MediaContent = this as MediaContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asMediaGroupContent(): MediaGroupContent? = this as? MediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireMediaGroupContent(): MediaGroupContent = this as MediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asMessageContent(): MessageContent? = this as? MessageContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireMessageContent(): MessageContent = this as MessageContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asVisualMediaGroupContent(): VisualMediaGroupContent? = this as? VisualMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireVisualMediaGroupContent(): VisualMediaGroupContent = this as VisualMediaGroupContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asAnimationContent(): AnimationContent? = this as? AnimationContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireAnimationContent(): AnimationContent = this as AnimationContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asAudioContent(): AudioContent? = this as? AudioContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireAudioContent(): AudioContent = this as AudioContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asDocumentContent(): DocumentContent? = this as? DocumentContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireDocumentContent(): DocumentContent = this as DocumentContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asPhotoContent(): PhotoContent? = this as? PhotoContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requirePhotoContent(): PhotoContent = this as PhotoContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asStickerContent(): StickerContent? = this as? StickerContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireStickerContent(): StickerContent = this as StickerContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asVideoContent(): VideoContent? = this as? VideoContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireVideoContent(): VideoContent = this as VideoContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asVideoNoteContent(): VideoNoteContent? = this as? VideoNoteContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireVideoNoteContent(): VideoNoteContent = this as VideoNoteContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asVoiceContent(): VoiceContent? = this as? VoiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireVoiceContent(): VoiceContent = this as VoiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.asInvoiceContent(): InvoiceContent? = this as? InvoiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun ResendableContent.requireInvoiceContent(): InvoiceContent = this as InvoiceContent
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asMultilevelTextSource(): MultilevelTextSource? = this as? MultilevelTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireMultilevelTextSource(): MultilevelTextSource = this as MultilevelTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asBoldTextSource(): BoldTextSource? = this as? BoldTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireBoldTextSource(): BoldTextSource = this as BoldTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asBotCommandTextSource(): BotCommandTextSource? = this as? BotCommandTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireBotCommandTextSource(): BotCommandTextSource = this as BotCommandTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asCashTagTextSource(): CashTagTextSource? = this as? CashTagTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireCashTagTextSource(): CashTagTextSource = this as CashTagTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asCodeTextSource(): CodeTextSource? = this as? CodeTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireCodeTextSource(): CodeTextSource = this as CodeTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asEMailTextSource(): EMailTextSource? = this as? EMailTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireEMailTextSource(): EMailTextSource = this as EMailTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asHashTagTextSource(): HashTagTextSource? = this as? HashTagTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireHashTagTextSource(): HashTagTextSource = this as HashTagTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asItalicTextSource(): ItalicTextSource? = this as? ItalicTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireItalicTextSource(): ItalicTextSource = this as ItalicTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asMentionTextSource(): MentionTextSource? = this as? MentionTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireMentionTextSource(): MentionTextSource = this as MentionTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asPhoneNumberTextSource(): PhoneNumberTextSource? = this as? PhoneNumberTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requirePhoneNumberTextSource(): PhoneNumberTextSource = this as PhoneNumberTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asPreTextSource(): PreTextSource? = this as? PreTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requirePreTextSource(): PreTextSource = this as PreTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asRegularTextSource(): RegularTextSource? = this as? RegularTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireRegularTextSource(): RegularTextSource = this as RegularTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asStrikethroughTextSource(): StrikethroughTextSource? = this as? StrikethroughTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireStrikethroughTextSource(): StrikethroughTextSource = this as StrikethroughTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asTextLinkTextSource(): TextLinkTextSource? = this as? TextLinkTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireTextLinkTextSource(): TextLinkTextSource = this as TextLinkTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asTextMentionTextSource(): TextMentionTextSource? = this as? TextMentionTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireTextMentionTextSource(): TextMentionTextSource = this as TextMentionTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asURLTextSource(): URLTextSource? = this as? URLTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireURLTextSource(): URLTextSource = this as URLTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.asUnderlineTextSource(): UnderlineTextSource? = this as? UnderlineTextSource
|
|
|
|
@PreviewFeature
|
|
|
|
inline fun TextSource.requireUnderlineTextSource(): UnderlineTextSource = this as UnderlineTextSource
|