# File lib/core/message.rb, line 74
    def pre_encode
      # encode elements from the message
      Codec::Data.from_object(Cproton::pn_message_properties(@impl), !@properties.empty? && @properties)
      Codec::Data.from_object(Cproton::pn_message_instructions(@impl), !@instructions.empty? && @instructions)
      Codec::Data.from_object(Cproton::pn_message_annotations(@impl), !@annotations.empty? && @annotations)
      Codec::Data.from_object(Cproton::pn_message_body(@impl), @body)
    end