/*********************************************************************************
** Copyright (c) 1992-2025 MAK Technologies, Inc.
** All rights reserved.
*********************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!This is an auto-generated file.  Any changes will be destroyed!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

#pragma once

#include "managedInterface/message.h"

#include <string>
#include <vector>


class MANAGEDINTERFACE_DLL ActionRequestMessage : public DtMessage
{
public:


   struct VariableData
   {
   int myDatumId;
   std::vector<unsigned char> myData;

        
      int size()
      {
         int size=0;
   size+=sizeof(int);
         size+=4; //for the count of the items in the list
   for(unsigned int i=0; i<myData.size(); i++)
   {
         size+=sizeof(unsigned char);
   }


         return size;
      }

      void serialize(DtStreamWriter& writer)
      {
   writer.writeInt32(myDatumId);
   writer.writeInt32(myData.size()); //for the count of the items in the list
   for(unsigned int i=0; i<myData.size(); i++)
   {
      writer.writeUInt8(myData[i]);
   }


      }
        
      void deserialize(DtStreamReader& reader)
      {
   myDatumId=reader.readInt32();
   unsigned int myData_count=reader.readInt32(); //for the count of the items in the list
   for(unsigned int i=0; i<myData_count; i++)
   {
      unsigned char abyte;
      abyte=reader.readUInt8();
      myData.push_back(abyte);
   }

      }
   };


   struct FixedData
   {
   int myDatumId;
   int myData;

        
      int size()
      {
         int size=0;
   size+=sizeof(int);
   size+=sizeof(int);

         return size;
      }

      void serialize(DtStreamWriter& writer)
      {
   writer.writeInt32(myDatumId);
   writer.writeInt32(myData);

      }
        
      void deserialize(DtStreamReader& reader)
      {
   myDatumId=reader.readInt32();
   myData=reader.readInt32();

      }
   };




  ActionRequestMessage();
  virtual ~ActionRequestMessage();

   virtual std::string getSenderId();
   virtual void setSenderId(std::string val);

   virtual std::string getReceiverId();
   virtual void setReceiverId(std::string val);

   virtual unsigned int getRequestId();
   virtual void setRequestId(unsigned int val);

   virtual unsigned int getActionId();
   virtual void setActionId(unsigned int val);

   virtual std::vector<FixedData> getFixedData();
   virtual void setFixedData(std::vector<FixedData> val);

   virtual std::vector<VariableData> getVariableData();
   virtual void setVariableData(std::vector<VariableData> val);



  virtual int messageSize();
  
   static DtMessage* decode(unsigned char* buffer, int length);
   static std::string theMessageName();

protected:
   static std::string theFullName;

   std::string mySenderId;
   std::string myReceiverId;
   unsigned int myRequestId;
   unsigned int myActionId;
   std::vector<FixedData> myFixedData;
   std::vector<VariableData> myVariableData;

   virtual void serialize(DtStreamWriter& writer);
   virtual void deserialize(DtStreamReader& reader);
};
