mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
one more optional remove commit
This commit is contained in:
parent
68712b49e2
commit
7d7fb4efbc
@ -8,18 +8,18 @@ import kotlinx.serialization.*
|
|||||||
data class RawChat(
|
data class RawChat(
|
||||||
override val id: ChatId,
|
override val id: ChatId,
|
||||||
private val type: String,
|
private val type: String,
|
||||||
@Optional private val title: String? = null,
|
private val title: String? = null,
|
||||||
@Optional private val username: Username? = null,
|
private val username: Username? = null,
|
||||||
@Optional private val first_name: String? = null,
|
private val first_name: String? = null,
|
||||||
@Optional private val last_name: String? = null,
|
private val last_name: String? = null,
|
||||||
@Optional private val all_members_are_administrators: Boolean? = null,
|
private val all_members_are_administrators: Boolean? = null,
|
||||||
@Optional private val description: String? = null,
|
private val description: String? = null,
|
||||||
@Optional private val invite_link: String? = null,
|
private val invite_link: String? = null,
|
||||||
@Optional private val pinned_message: RawMessage? = null,
|
private val pinned_message: RawMessage? = null,
|
||||||
@Optional private val sticker_set_name: String? = null,
|
private val sticker_set_name: String? = null,
|
||||||
@Optional private val can_set_sticker_set: Boolean? = null,
|
private val can_set_sticker_set: Boolean? = null,
|
||||||
@SerialName("photo")
|
@SerialName("photo")
|
||||||
@Optional override val chatPhoto: ChatPhoto? = null
|
override val chatPhoto: ChatPhoto? = null
|
||||||
) : Chat {
|
) : Chat {
|
||||||
fun extractChat(): Chat {
|
fun extractChat(): Chat {
|
||||||
return when (type) {
|
return when (type) {
|
||||||
|
@ -31,54 +31,54 @@ data class RawMessage(
|
|||||||
private val chat: RawChat,
|
private val chat: RawChat,
|
||||||
@SerialName(fromField)
|
@SerialName(fromField)
|
||||||
private val from: User? = null,
|
private val from: User? = null,
|
||||||
@Optional private val forward_from: User? = null,
|
private val forward_from: User? = null,
|
||||||
@Optional private val forward_from_chat: RawChat? = null,
|
private val forward_from_chat: RawChat? = null,
|
||||||
@Optional private val forward_from_message_id: MessageIdentifier? = null,
|
private val forward_from_message_id: MessageIdentifier? = null,
|
||||||
@Optional private val forward_signature: ForwardSignature? = null,
|
private val forward_signature: ForwardSignature? = null,
|
||||||
@Optional private val forward_date: TelegramDate? = null,
|
private val forward_date: TelegramDate? = null,
|
||||||
@Optional private val reply_to_message: RawMessage? = null,
|
private val reply_to_message: RawMessage? = null,
|
||||||
@Optional private val edit_date: TelegramDate? = null,
|
private val edit_date: TelegramDate? = null,
|
||||||
@Optional private val media_group_id: MediaGroupIdentifier? = null,
|
private val media_group_id: MediaGroupIdentifier? = null,
|
||||||
@Optional private val author_signature: AuthorSignature? = null,
|
private val author_signature: AuthorSignature? = null,
|
||||||
@Optional private val text: String? = null,
|
private val text: String? = null,
|
||||||
@Serializable(RawMessageEntitiesSerializer::class)
|
@Serializable(RawMessageEntitiesSerializer::class)
|
||||||
@Optional private val entities: RawMessageEntities? = null,
|
private val entities: RawMessageEntities? = null,
|
||||||
@Optional private val caption: String? = null,
|
private val caption: String? = null,
|
||||||
@Serializable(RawMessageEntitiesSerializer::class)
|
@Serializable(RawMessageEntitiesSerializer::class)
|
||||||
@Optional private val caption_entities: RawMessageEntities? = null,
|
private val caption_entities: RawMessageEntities? = null,
|
||||||
@Optional private val audio: AudioFile? = null,
|
private val audio: AudioFile? = null,
|
||||||
@Optional private val document: DocumentFile? = null,
|
private val document: DocumentFile? = null,
|
||||||
@Optional private val animation: AnimationFile? = null,
|
private val animation: AnimationFile? = null,
|
||||||
@Optional private val game: Game? = null,
|
private val game: Game? = null,
|
||||||
@Serializable(PhotoSerializer::class)
|
@Serializable(PhotoSerializer::class)
|
||||||
@Optional private val photo: Photo? = null,
|
private val photo: Photo? = null,
|
||||||
@Optional private val sticker: Sticker? = null,
|
private val sticker: Sticker? = null,
|
||||||
@Optional private val video: VideoFile? = null,
|
private val video: VideoFile? = null,
|
||||||
@Optional private val voice: VoiceFile? = null,
|
private val voice: VoiceFile? = null,
|
||||||
@Optional private val video_note: VideoNoteFile? = null,
|
private val video_note: VideoNoteFile? = null,
|
||||||
@Optional private val contact: Contact? = null,
|
private val contact: Contact? = null,
|
||||||
@Optional private val location: Location? = null,
|
private val location: Location? = null,
|
||||||
@Optional private val venue: Venue? = null,
|
private val venue: Venue? = null,
|
||||||
@Optional private val new_chat_members: Array<User>? = null,
|
private val new_chat_members: Array<User>? = null,
|
||||||
@Optional private val left_chat_member: User? = null,
|
private val left_chat_member: User? = null,
|
||||||
@Optional private val new_chat_title: String? = null,
|
private val new_chat_title: String? = null,
|
||||||
@Serializable(PhotoSerializer::class)
|
@Serializable(PhotoSerializer::class)
|
||||||
@Optional private val new_chat_photo: Photo? = null,
|
private val new_chat_photo: Photo? = null,
|
||||||
@Optional private val delete_chat_photo: Boolean = false,
|
private val delete_chat_photo: Boolean = false,
|
||||||
@Optional private val group_chat_created: Boolean = false,
|
private val group_chat_created: Boolean = false,
|
||||||
@Optional private val supergroup_chat_created: Boolean = false,
|
private val supergroup_chat_created: Boolean = false,
|
||||||
@Optional private val channel_chat_created: Boolean = false,
|
private val channel_chat_created: Boolean = false,
|
||||||
@Optional private val migrate_to_chat_id: ChatIdentifier? = null,
|
private val migrate_to_chat_id: ChatIdentifier? = null,
|
||||||
@Optional private val migrate_from_chat_id: ChatIdentifier? = null,
|
private val migrate_from_chat_id: ChatIdentifier? = null,
|
||||||
@Optional private val pinned_message: RawMessage? = null,
|
private val pinned_message: RawMessage? = null,
|
||||||
@Optional private val invoice: Invoice? = null,
|
private val invoice: Invoice? = null,
|
||||||
@Optional private val successful_payment: SuccessfulPayment? = null,
|
private val successful_payment: SuccessfulPayment? = null,
|
||||||
|
|
||||||
// login property
|
// login property
|
||||||
@Optional private val connected_website: String? = null,
|
private val connected_website: String? = null,
|
||||||
|
|
||||||
// passport property
|
// passport property
|
||||||
@Optional private val passport_data: Unit? = null
|
private val passport_data: Unit? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
private val content: MessageContent? by lazy {
|
private val content: MessageContent? by lazy {
|
||||||
|
@ -17,15 +17,15 @@ import kotlinx.serialization.*
|
|||||||
data class RawUpdate constructor(
|
data class RawUpdate constructor(
|
||||||
@SerialName(updateIdField)
|
@SerialName(updateIdField)
|
||||||
val updateId: UpdateIdentifier,
|
val updateId: UpdateIdentifier,
|
||||||
@Optional private val message: RawMessage? = null,
|
private val message: RawMessage? = null,
|
||||||
@Optional private val edited_message: RawMessage? = null,
|
private val edited_message: RawMessage? = null,
|
||||||
@Optional private val channel_post: RawMessage? = null,
|
private val channel_post: RawMessage? = null,
|
||||||
@Optional private val edited_channel_post: RawMessage? = null,
|
private val edited_channel_post: RawMessage? = null,
|
||||||
@Optional private val inline_query: RawInlineQuery? = null,
|
private val inline_query: RawInlineQuery? = null,
|
||||||
@Optional private val chosen_inline_result: RawChosenInlineResult? = null,
|
private val chosen_inline_result: RawChosenInlineResult? = null,
|
||||||
@Optional private val callback_query: RawCallbackQuery? = null,
|
private val callback_query: RawCallbackQuery? = null,
|
||||||
@Optional private val shipping_query: ShippingQuery? = null,
|
private val shipping_query: ShippingQuery? = null,
|
||||||
@Optional private val pre_checkout_query: PreCheckoutQuery? = null
|
private val pre_checkout_query: PreCheckoutQuery? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
val asUpdate: Update by lazy {
|
val asUpdate: Update by lazy {
|
||||||
|
Loading…
Reference in New Issue
Block a user