1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

remove redundant ClassCastsExcluded

This commit is contained in:
InsanusMokrassar 2023-06-19 22:14:03 +06:00
parent 14a583e154
commit cf46139bef
7 changed files with 1 additions and 21 deletions

View File

@ -4,14 +4,12 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.JsonObject
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ExtendedChannelChat due") @RiskFeature("This class is a subject of changes. It is better to use ExtendedChannelChat due")
@ClassCastsExcluded
data class ExtendedChannelChatImpl( data class ExtendedChannelChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,
@ -38,7 +36,6 @@ data class ExtendedChannelChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ExtendedGroupChat due") @RiskFeature("This class is a subject of changes. It is better to use ExtendedGroupChat due")
@ClassCastsExcluded
data class ExtendedGroupChatImpl( data class ExtendedGroupChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,
@ -61,7 +58,6 @@ data class ExtendedGroupChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ExtendedPrivateChat due") @RiskFeature("This class is a subject of changes. It is better to use ExtendedPrivateChat due")
@ClassCastsExcluded
data class ExtendedPrivateChatImpl( data class ExtendedPrivateChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: UserId, override val id: UserId,
@ -89,7 +85,6 @@ typealias ExtendedUser = ExtendedPrivateChatImpl
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ExtendedSupergroupChat due") @RiskFeature("This class is a subject of changes. It is better to use ExtendedSupergroupChat due")
@ClassCastsExcluded
data class ExtendedSupergroupChatImpl( data class ExtendedSupergroupChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,
@ -132,7 +127,6 @@ data class ExtendedSupergroupChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ExtendedForumChat due") @RiskFeature("This class is a subject of changes. It is better to use ExtendedForumChat due")
@ClassCastsExcluded
data class ExtendedForumChatImpl( data class ExtendedForumChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: IdChatIdentifier, override val id: IdChatIdentifier,

View File

@ -5,13 +5,11 @@ import dev.inmo.micro_utils.language_codes.IetfLanguageCodeSerializer
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use GroupChat due") @RiskFeature("This class is a subject of changes. It is better to use GroupChat due")
@ClassCastsExcluded
data class GroupChatImpl( data class GroupChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,
@ -21,7 +19,6 @@ data class GroupChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use PrivateChat due") @RiskFeature("This class is a subject of changes. It is better to use PrivateChat due")
@ClassCastsExcluded
data class PrivateChatImpl( data class PrivateChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: UserId, override val id: UserId,
@ -35,7 +32,6 @@ data class PrivateChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use SupergroupChat due") @RiskFeature("This class is a subject of changes. It is better to use SupergroupChat due")
@ClassCastsExcluded
data class SupergroupChatImpl( data class SupergroupChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,
@ -47,7 +43,6 @@ data class SupergroupChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ForumChat due") @RiskFeature("This class is a subject of changes. It is better to use ForumChat due")
@ClassCastsExcluded
data class ForumChatImpl( data class ForumChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: IdChatIdentifier, override val id: IdChatIdentifier,
@ -59,7 +54,6 @@ data class ForumChatImpl(
@Serializable @Serializable
@RiskFeature("This class is a subject of changes. It is better to use ChannelChat due") @RiskFeature("This class is a subject of changes. It is better to use ChannelChat due")
@ClassCastsExcluded
data class ChannelChatImpl( data class ChannelChatImpl(
@SerialName(idField) @SerialName(idField)
override val id: ChatId, override val id: ChatId,

View File

@ -2,11 +2,9 @@ package dev.inmo.tgbotapi.types.chat.member
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.* import kotlinx.serialization.*
@Serializable @Serializable
@ClassCastsExcluded
data class AdministratorChatMemberImpl( data class AdministratorChatMemberImpl(
@SerialName(userField) @SerialName(userField)
override val user: User, override val user: User,

View File

@ -1,12 +1,10 @@
package dev.inmo.tgbotapi.types.chat.member package dev.inmo.tgbotapi.types.chat.member
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
@ClassCastsExcluded
data class ChatAdministratorRightsImpl( data class ChatAdministratorRightsImpl(
@SerialName(canChangeInfoField) @SerialName(canChangeInfoField)
override val canChangeInfo: Boolean = false, override val canChangeInfo: Boolean = false,

View File

@ -2,11 +2,9 @@ package dev.inmo.tgbotapi.types.chat.member
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.* import kotlinx.serialization.*
@Serializable @Serializable
@ClassCastsExcluded
data class LeftChatMemberImpl(@SerialName(userField) override val user: User) : LeftChatMember { data class LeftChatMemberImpl(@SerialName(userField) override val user: User) : LeftChatMember {
@SerialName(statusField) @SerialName(statusField)
@Required @Required

View File

@ -2,11 +2,9 @@ package dev.inmo.tgbotapi.types.chat.member
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded
import kotlinx.serialization.* import kotlinx.serialization.*
@Serializable @Serializable
@ClassCastsExcluded
data class MemberChatMemberImpl(@SerialName(userField) override val user: User) : MemberChatMember { data class MemberChatMemberImpl(@SerialName(userField) override val user: User) : MemberChatMember {
@SerialName(statusField) @SerialName(statusField)
@Required @Required

View File

@ -10,4 +10,4 @@ annotation class ClassCastsIncluded(val typesRegex: String = "", val excludeRege
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE) @Retention(AnnotationRetention.SOURCE)
@RiskFeature("It is internal API in tgbotapi.core and should not be used outside") @RiskFeature("It is internal API in tgbotapi.core and should not be used outside")
annotation class ClassCastsExcluded() annotation class ClassCastsExcluded