You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: message.rs
    path of file: ./repos/telexide/src/model
    
    the code of the file until where you have to start completion: use chrono::{DateTime, Utc};
use serde::{Deserialize, Deserializer, Serialize, Serializer};

use super::{
    message_contents::*,
    message_entity::*,
    raw::*,
    Game,
    InlineKeyboardMarkup,
    Invoice,
    PassportData,
    Sticker,
    SuccessfulPayment,
    User,
};

/// This object represents a message.
#[derive(Debug, Clone, PartialEq)]
pub struct Message {
    /// Unique message identifier inside this chat
    pub message_id: i64,
    /// Unique identifier of a message thread to which the message belongs; for
    /// supergroups only
    pub message_thread_id: Option<i64>,
    /// Sender, empty for messages sent to channels
    pub from: Option<super::User>,
    /// Sender of the message, sent on behalf of a chat. The channel itself for
    /// channel messages. The supergroup itself for messages from anonymous
    /// group administrators. The linked channel for messages automatically
    /// forwarded to the discussion group
    pub sender_chat: Option<super::Chat>,
    /// Date the message was sent
    pub date: DateTime<Utc>,
    /// Conversation the message belongs to
    pub chat: super::Chat,

    /// Data about what message it was forwarded from
    pub forward_data: Option<ForwardData>,

    /// True, if the message is sent to a forum topic
    pub is_topic_message: bool,
    /// For replies, the original message.
    /// Note that the Message object 
    
    fn from(raw: RawMessage) -> Message {
        let message_id = raw.message_id;
        let message_thread_id = raw.message_thread_id;
        let from = raw.from;
        let sender_chat = raw.sender_chat.map(Into::into);
        let date = raw.date;
        let chat = raw.chat.into();
        let reply_to_message = raw.reply_to_message.map(|r| Box::new((*r).into()));
        let via_bot = raw.via_bot;
        let edit_date = raw.edit_date;
        let author_signature = raw.author_signature;
        let connected_website = raw.connected_website;
        let passport_data = raw.passport_data;
        let reply_markup = raw.reply_markup;
        let has_protected_content = raw.has_protected_content;
        let is_topic_message = raw.is_topic_message;

        let forward_data = if let Some(d) = raw.forward_date {
            Some(ForwardData {
                from: raw.forward_from,
                from_chat: raw.forward_from_chat.map(Into::into),
                from_message_id: raw.forward_from_message_id,
                signature: raw.forward_signature,
                sender_name: raw.forward_sender_name,
                date: d,
                is_automatic_forward: raw.is_automatic_forward,
            })
        } else {
            None
        };

        let fill_in_content = |content: MessageContent| Self {
            message_id,
            message_thread_id,
            from,
            sender_chat,
            date,
            chat,
            forward_data,
            is_topic_message,
            reply_to_message,
            via_bot,
            edit_date,
            author_signature,
            has_protected_content,
            content,
            connected_website,
            passport_data,
            reply_markup,
        };

        if let Some(c) = raw.text {
            return fill_in_content(MessageContent::Text {
                content: c,
                entities: raw.entities.unwrap_or_default(),
            });
        } else if let Some(c) = raw.video {
            return fill_in_content(MessageContent::Video {
                content: c,
                caption: raw.caption,
                caption_entities: raw.caption_entities,
                media_group_id: raw.media_group_id,
                has_spoiler: raw.has_media_spoiler,
            });
        } else if let Some(c) = raw.animation {
            return fill_in_content(MessageContent::Animation {
                content: c,
                caption: raw.caption,
                caption_entities: raw.caption_entities,
                has_spoiler: raw.has_media_spoiler,
            });
        } else if let Some(c) = raw.photo {
            return fill_in_content(MessageContent::Photo {
                content: c,
                caption: raw.caption,
                caption_entities: raw.caption_entities,
                media_group_id: raw.media_group_id,
                has_spoiler: raw.has_media_spoiler,
            });
        } else if let Some(c) = raw.pinned_message {
            return fill_in_content(MessageContent::PinnedMessage {
                content: Box::new((*c).into()),
            });
        }

        macro_rules! content_with_captions {
            ($data:expr, $kind:ident) => {
                if let Some(c) = $data {
                    return fill_in_content(MessageContent::$kind {
                        content: c,
                        caption: raw.caption,
                        caption_entities: raw.caption_entities,
                    });
                }
            };
        }

        macro_rules! content {
            ($data:expr, $kind:ident) => {
                if let Some(c) = $data {
                    return fill_in_content(MessageContent::$kind {
                        content: c,
                    });
                }
            };
        }

        macro_rules! bool_content {
            ($data:expr, $kind:ident) => {
                if $data {
                    return fill_in_content(MessageContent::$kind);
                }
            };
        }

        macro_rules! content_is_some {
            ($data:expr, $kind:ident) => {
                if let Some(_) = $data {
                    return fill_in_content(MessageContent::$kind);
                }
            };
        }

        content_with_captions!(raw.audio, Audio);
        content_with_captions!(raw.document, Document);
        content_with_captions!(raw.voice, Voice);

        content!(raw.game, Game);
        content!(raw.sticker, Sticker);
        content!(raw.video_note, VideoNote);
        content!(raw.contact, Contact);
        content!(raw.location, Location);
        content!(raw.venue, Venue);
        content!(raw.poll, Poll);
        content!(raw.dice, Dice);
        content!(raw.new_chat_members, NewChatMembers);
        content!(raw.left_chat_member, LeftChatMember);
        content!(raw.new_chat_title, NewChatTitle);
        content!(raw.new_chat_photo, NewChatPhoto);
        content!(
            raw.message_auto_delete_timer_changed,
            MessageAutoDeleteTimerChanged
        );
        content!(raw.migrate_to_chat_id, MigrateToChatID);
        content!(raw.migrate_from_chat_id, MigrateFromChatID);
        content!(raw.invoice, Invoice);
        content!(raw.successful_payment, SuccessfulPayment);
        content!(raw.user_shared, UserShared);
        content!(raw.chat_shared, ChatShared);
        content!(raw.proximity_alert_triggered, ProximityAlertTriggered);
        content!(raw.voice_chat_scheduled, VideoChatScheduled);
        content!(raw.voice_chat_started, VideoChatStarted);
        content!(raw.voice_chat_ended, VideoChatEnded);
        content!(
            raw.voice_chat_participants_invited,
            VideoChatParticipantsInvited
        );
        content!(raw.web_app_data, WebAppData);
        content!(raw.forum_topic_created, ForumTopicCreated);
        content!(raw.forum_topic_edited, ForumTopicEdited);
        content!(raw.write_access_allowed, WriteAccessAllowed);
        content!(raw.story, Story);

        bool_content!(raw.delete_chat_photo, DeleteChatPhoto);
        bool_content!(raw.group_chat_created, GroupChatCreated);
        bool_content!(raw.supergroup_chat_created, SupergroupChatCreated);
        bool_content!(raw.channel_chat_created, ChannelChatCreated);

        content_is_some!(raw.forum_topic_closed, ForumTopicClosed);
        content_is_some!(raw.forum_topic_reopened, ForumTopicReopened);
        content_is_some!(raw.general_forum_topic_hidden, GeneralForumTopicHidden);
        content_is_some!(raw.general_forum_topic_unhidden, GeneralForumTopicUnhidden);

        fill_in_content(MessageContent::Unknown)
    }