Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
ApiEventLoggerQueryParamsBuilder.hpp
Go to the documentation of this file.
1
2#ifndef IV_SRC_COMMS_APIS_EVENTLOGGER_APIEVENTLOGGERQUERYPARAMSBUILDER_HPP_
3#define IV_SRC_COMMS_APIS_EVENTLOGGER_APIEVENTLOGGERQUERYPARAMSBUILDER_HPP_
4
7
9{
11{
12public:
14
15 [[nodiscard]] std::optional<std::string> getChannelId() const override
16 {
17 return std::nullopt;
18 }
19
20 [[nodiscard]] std::unordered_map<std::string_view, std::string> build() const override;
21
22 ApiEventLoggerQueryParamsBuilder &setPaginationOffset(uint32_t paginationOffset);
24 ApiEventLoggerQueryParamsBuilder &setEventCategories(const std::set<std::string> &eventCategories);
25 ApiEventLoggerQueryParamsBuilder &setStationsSource(const std::set<std::string> &stationsSource);
26 ApiEventLoggerQueryParamsBuilder &setEventTypes(const std::set<std::string> &eventTypes);
27 ApiEventLoggerQueryParamsBuilder &setUserProfilesIn(const std::set<std::string> &userProfilesIn);
28 ApiEventLoggerQueryParamsBuilder &setUserProfilesOut(const std::set<std::string> &userProfilesOut);
29 ApiEventLoggerQueryParamsBuilder &setIpAddresses(const std::set<std::string> &ipAddresses);
30 ApiEventLoggerQueryParamsBuilder &setIpPorts(const std::set<std::string> &ipPorts);
31 ApiEventLoggerQueryParamsBuilder &setUnitIds(const std::set<iv::types::unitId> &unitIds);
32 ApiEventLoggerQueryParamsBuilder &setChannelIds(const std::set<iv::types::channelId> &channelIds);
33 ApiEventLoggerQueryParamsBuilder &setGroupIds(const std::set<iv::types::groupId> &groupIds);
34 ApiEventLoggerQueryParamsBuilder &setBackupNames(const std::set<std::string> &backupNames);
37
38private:
39 std::optional<uint32_t> m_paginationOffset;
40 std::optional<uint32_t> m_paginationLimit;
41 std::optional<std::set<std::string>> m_eventCategories;
42 std::optional<std::set<std::string>> m_stationsSource;
43 std::optional<std::set<std::string>> m_eventTypes;
44 std::optional<std::set<std::string>> m_userProfilesIn;
45 std::optional<std::set<std::string>> m_userProfilesOut;
46 std::optional<std::set<std::string>> m_ipAddresses;
47 std::optional<std::set<std::string>> m_ipPorts;
48 std::optional<std::set<iv::types::unitId>> m_unitIds;
49 std::optional<std::set<iv::types::channelId>> m_channelIds;
50 std::optional<std::set<iv::types::groupId>> m_groupIds;
51 std::optional<std::set<std::string>> m_backupNames;
52
53 std::optional<iv::types::timestamp> m_startDate;
54 std::optional<iv::types::timestamp> m_endDate;
55
56 struct Request
57 {
58 static constexpr std::string_view category {"category"};
59 static constexpr std::string_view source {"source"};
60 static constexpr std::string_view startTimestamp {"startTimestamp"};
61 static constexpr std::string_view endTimestamp {"endTimestamp"};
62 static constexpr std::string_view paginationLimit {"paginationLimit"};
63 static constexpr std::string_view paginationOffset {"paginationOffset"};
64 };
65};
66}// namespace iv::comms::apis::eventLogger
67
68#endif//IV_SRC_COMMS_APIS_EVENTLOGGER_APIEVENTLOGGERQUERYPARAMSBUILDER_HPP_
Definition IApiQueryParamsBuilder.hpp:13
Definition ApiEventLoggerQueryParamsBuilder.hpp:11
std::optional< std::string > getChannelId() const override
Definition ApiEventLoggerQueryParamsBuilder.hpp:15
ApiEventLoggerQueryParamsBuilder & setPaginationLimit(uint32_t paginationLimit)
Definition ApiEventLoggerQueryParamsBuilder.cpp:49
std::optional< std::set< std::string > > m_userProfilesIn
Definition ApiEventLoggerQueryParamsBuilder.hpp:44
ApiEventLoggerQueryParamsBuilder & setEndDate(iv::types::timestamp endDate)
Definition ApiEventLoggerQueryParamsBuilder.cpp:75
std::optional< iv::types::timestamp > m_startDate
Definition ApiEventLoggerQueryParamsBuilder.hpp:53
ApiEventLoggerQueryParamsBuilder & setUnitIds(const std::set< iv::types::unitId > &unitIds)
Definition ApiEventLoggerQueryParamsBuilder.cpp:96
std::optional< std::set< std::string > > m_eventTypes
Definition ApiEventLoggerQueryParamsBuilder.hpp:43
ApiEventLoggerQueryParamsBuilder & setGroupIds(const std::set< iv::types::groupId > &groupIds)
Definition ApiEventLoggerQueryParamsBuilder.cpp:110
std::optional< uint32_t > m_paginationLimit
Definition ApiEventLoggerQueryParamsBuilder.hpp:40
ApiEventLoggerQueryParamsBuilder & setUserProfilesIn(const std::set< std::string > &userProfilesIn)
Definition ApiEventLoggerQueryParamsBuilder.cpp:130
std::unordered_map< std::string_view, std::string > build() const override
Definition ApiEventLoggerQueryParamsBuilder.cpp:6
std::optional< iv::types::timestamp > m_endDate
Definition ApiEventLoggerQueryParamsBuilder.hpp:54
std::optional< std::set< iv::types::unitId > > m_unitIds
Definition ApiEventLoggerQueryParamsBuilder.hpp:48
ApiEventLoggerQueryParamsBuilder & setEventCategories(const std::set< std::string > &eventCategories)
Definition ApiEventLoggerQueryParamsBuilder.cpp:56
ApiEventLoggerQueryParamsBuilder & setChannelIds(const std::set< iv::types::channelId > &channelIds)
Definition ApiEventLoggerQueryParamsBuilder.cpp:103
std::optional< std::set< std::string > > m_userProfilesOut
Definition ApiEventLoggerQueryParamsBuilder.hpp:45
ApiEventLoggerQueryParamsBuilder & setUserProfilesOut(const std::set< std::string > &userProfilesOut)
Definition ApiEventLoggerQueryParamsBuilder.cpp:137
std::optional< std::set< std::string > > m_stationsSource
Definition ApiEventLoggerQueryParamsBuilder.hpp:42
std::optional< std::set< iv::types::groupId > > m_groupIds
Definition ApiEventLoggerQueryParamsBuilder.hpp:50
ApiEventLoggerQueryParamsBuilder & setStationsSource(const std::set< std::string > &stationsSource)
Definition ApiEventLoggerQueryParamsBuilder.cpp:63
ApiEventLoggerQueryParamsBuilder & setBackupNames(const std::set< std::string > &backupNames)
Definition ApiEventLoggerQueryParamsBuilder.cpp:82
std::optional< std::set< std::string > > m_backupNames
Definition ApiEventLoggerQueryParamsBuilder.hpp:51
std::optional< std::set< std::string > > m_eventCategories
Definition ApiEventLoggerQueryParamsBuilder.hpp:41
ApiEventLoggerQueryParamsBuilder & setPaginationOffset(uint32_t paginationOffset)
Definition ApiEventLoggerQueryParamsBuilder.cpp:43
ApiEventLoggerQueryParamsBuilder & setStartDate(iv::types::timestamp startDate)
Definition ApiEventLoggerQueryParamsBuilder.cpp:69
std::optional< std::set< iv::types::channelId > > m_channelIds
Definition ApiEventLoggerQueryParamsBuilder.hpp:49
std::optional< uint32_t > m_paginationOffset
Definition ApiEventLoggerQueryParamsBuilder.hpp:39
ApiEventLoggerQueryParamsBuilder & setIpAddresses(const std::set< std::string > &ipAddresses)
Definition ApiEventLoggerQueryParamsBuilder.cpp:117
ApiEventLoggerQueryParamsBuilder & setEventTypes(const std::set< std::string > &eventTypes)
Definition ApiEventLoggerQueryParamsBuilder.cpp:89
std::optional< std::set< std::string > > m_ipAddresses
Definition ApiEventLoggerQueryParamsBuilder.hpp:46
ApiEventLoggerQueryParamsBuilder & setIpPorts(const std::set< std::string > &ipPorts)
Definition ApiEventLoggerQueryParamsBuilder.cpp:123
std::optional< std::set< std::string > > m_ipPorts
Definition ApiEventLoggerQueryParamsBuilder.hpp:47
Definition ApiEventLoggerQueryParamsBuilder.cpp:4
uint64_t timestamp
Definition types.hpp:21
Definition ApiEventLoggerQueryParamsBuilder.hpp:57
static constexpr std::string_view category
Definition ApiEventLoggerQueryParamsBuilder.hpp:58
static constexpr std::string_view paginationLimit
Definition ApiEventLoggerQueryParamsBuilder.hpp:62
static constexpr std::string_view source
Definition ApiEventLoggerQueryParamsBuilder.hpp:59
static constexpr std::string_view startTimestamp
Definition ApiEventLoggerQueryParamsBuilder.hpp:60
static constexpr std::string_view paginationOffset
Definition ApiEventLoggerQueryParamsBuilder.hpp:63
static constexpr std::string_view endTimestamp
Definition ApiEventLoggerQueryParamsBuilder.hpp:61