/*********************************************************************************
** 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 <vector>


class MANAGEDINTERFACE_DLL AttributeChangeRequestMessage : public DtMessage
{
public:


   struct AttributePair
   {
   std::string myName;
   std::vector<unsigned char> myValue;

        
      int size()
      {
         int size=0;
   size+=myName.size() < 128 ? 1 : 2;
   size+=myName.size();
   
         size+=4; //for the count of the items in the list
   for(unsigned int i=0; i<myValue.size(); i++)
   {
         size+=sizeof(unsigned char);
   }


         return size;
      }

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


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

      }
   };




  AttributeChangeRequestMessage();
  virtual ~AttributeChangeRequestMessage();

   virtual std::vector<std::string> getObjectIdentifiers();
   virtual void setObjectIdentifiers(std::vector<std::string> val);

   virtual std::vector<AttributePair> getAttributes();
   virtual void setAttributes(std::vector<AttributePair> val);



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

protected:
   static std::string theFullName;

   std::vector<std::string> myObjectIdentifiers;
   std::vector<AttributePair> myAttributes;

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