#ifndef INCLUDE_DI_RPC_CLASS_PROJECT_H_ #define INCLUDE_DI_RPC_CLASS_PROJECT_H_ #include #include #include #include namespace Di { namespace Rpc { class Project : public Msg { public: struct Device { std::string deviceUid; std::string role; uint32_t groupId; std::shared_ptr option; }; struct User { uint32_t userId; uint64_t from; uint64_t to; }; struct Group { uint32_t groupId; std::string name; std::vector operators; }; struct RoleAction { std::string name; std::vector users; }; struct Role { std::string name; std::vector actions; }; std::string type; std::vector projectRoles; std::vector projectPlanningDevices; std::vector projectPlanningGroups; std::vector projectDesignDevices; uint8_t waSelection; std::vector projectDevices; std::vector projectGroups; explicit Project(std::shared_ptr msg); private: void __decodeRequest(const std::shared_ptr &message); void __decodeSetup(const std::shared_ptr &message); void __decodePlanning(const std::shared_ptr &message); void __decodeDesign(const std::shared_ptr &message); struct Role __decodeRole(std::string name, const std::shared_ptr &actions); struct RoleAction __decodeRoleAction(std::string name, const std::shared_ptr &users); struct Device __decodeDevice(const std::shared_ptr &message); struct Group __decodeGroup(const std::shared_ptr &message); struct User __decodeUser(const std::shared_ptr &message); }; } // namespace Rpc } // namespace Di #endif // INCLUDE_DI_RPC_CLASS_PROJECT_H_