1*76833cb5SWludzik, Jozef #pragma once 2*76833cb5SWludzik, Jozef 3*76833cb5SWludzik, Jozef #include "interfaces/trigger_types.hpp" 4*76833cb5SWludzik, Jozef 5*76833cb5SWludzik, Jozef #include <utility> 6*76833cb5SWludzik, Jozef 7*76833cb5SWludzik, Jozef class TriggerParams 8*76833cb5SWludzik, Jozef { 9*76833cb5SWludzik, Jozef public: 10*76833cb5SWludzik, Jozef TriggerParams& name(std::string val) 11*76833cb5SWludzik, Jozef { 12*76833cb5SWludzik, Jozef nameProperty = std::move(val); 13*76833cb5SWludzik, Jozef return *this; 14*76833cb5SWludzik, Jozef } 15*76833cb5SWludzik, Jozef 16*76833cb5SWludzik, Jozef const std::string& name() const 17*76833cb5SWludzik, Jozef { 18*76833cb5SWludzik, Jozef return nameProperty; 19*76833cb5SWludzik, Jozef } 20*76833cb5SWludzik, Jozef 21*76833cb5SWludzik, Jozef bool isDiscrete() const 22*76833cb5SWludzik, Jozef { 23*76833cb5SWludzik, Jozef return discreteProperty; 24*76833cb5SWludzik, Jozef } 25*76833cb5SWludzik, Jozef 26*76833cb5SWludzik, Jozef bool logToJournal() const 27*76833cb5SWludzik, Jozef { 28*76833cb5SWludzik, Jozef return logToJournalProperty; 29*76833cb5SWludzik, Jozef } 30*76833cb5SWludzik, Jozef 31*76833cb5SWludzik, Jozef bool logToRedfish() const 32*76833cb5SWludzik, Jozef { 33*76833cb5SWludzik, Jozef return logToRedfishProperty; 34*76833cb5SWludzik, Jozef } 35*76833cb5SWludzik, Jozef 36*76833cb5SWludzik, Jozef bool updateReport() const 37*76833cb5SWludzik, Jozef { 38*76833cb5SWludzik, Jozef return updateReportProperty; 39*76833cb5SWludzik, Jozef } 40*76833cb5SWludzik, Jozef 41*76833cb5SWludzik, Jozef const std::vector<std::pair<sdbusplus::message::object_path, std::string>>& 42*76833cb5SWludzik, Jozef sensors() const 43*76833cb5SWludzik, Jozef { 44*76833cb5SWludzik, Jozef return sensorsProperty; 45*76833cb5SWludzik, Jozef } 46*76833cb5SWludzik, Jozef 47*76833cb5SWludzik, Jozef const std::vector<std::string>& reportNames() const 48*76833cb5SWludzik, Jozef { 49*76833cb5SWludzik, Jozef return reportNamesProperty; 50*76833cb5SWludzik, Jozef } 51*76833cb5SWludzik, Jozef 52*76833cb5SWludzik, Jozef const TriggerThresholdParams& thresholds() const 53*76833cb5SWludzik, Jozef { 54*76833cb5SWludzik, Jozef return thresholdsProperty; 55*76833cb5SWludzik, Jozef } 56*76833cb5SWludzik, Jozef 57*76833cb5SWludzik, Jozef private: 58*76833cb5SWludzik, Jozef std::string nameProperty = "Trigger1"; 59*76833cb5SWludzik, Jozef bool discreteProperty = false; 60*76833cb5SWludzik, Jozef bool logToJournalProperty = false; 61*76833cb5SWludzik, Jozef bool logToRedfishProperty = false; 62*76833cb5SWludzik, Jozef bool updateReportProperty = false; 63*76833cb5SWludzik, Jozef std::vector<std::pair<sdbusplus::message::object_path, std::string>> 64*76833cb5SWludzik, Jozef sensorsProperty = {}; 65*76833cb5SWludzik, Jozef std::vector<std::string> reportNamesProperty = {}; 66*76833cb5SWludzik, Jozef TriggerThresholdParams thresholdsProperty = {}; 67*76833cb5SWludzik, Jozef }; 68