def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_str_value("appClass", self.app_class)
        writer.write_collection_of_object_values("attachments", self.attachments)
        writer.write_object_value("body", self.body)
        writer.write_collection_of_object_values("contexts", self.contexts)
        writer.write_str_value("conversationType", self.conversation_type)
        writer.write_datetime_value("createdDateTime", self.created_date_time)
        writer.write_str_value("etag", self.etag)
        writer.write_object_value("from", self.from_)
        writer.write_enum_value("interactionType", self.interaction_type)
        writer.write_collection_of_object_values("links", self.links)
        writer.write_str_value("locale", self.locale)
        writer.write_collection_of_object_values("mentions", self.mentions)
        writer.write_str_value("requestId", self.request_id)
        writer.write_str_value("sessionId", self.session_id)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/ai_interaction.py