3 #include <launchdarkly/data/evaluation_reason.hpp>
4 #include <launchdarkly/value.hpp>
9 #include <unordered_map>
12 namespace launchdarkly::server_side {
59 State(std::uint64_t version,
60 std::optional<std::int64_t> variation,
61 std::optional<EvaluationReason> reason,
64 std::optional<std::uint64_t> debug_events_until_date);
66 State(std::uint64_t version,
67 std::optional<std::int64_t> variation,
68 std::optional<EvaluationReason> reason,
71 std::optional<std::uint64_t> debug_events_until_date,
72 std::vector<std::string> prerequisites);
77 [[nodiscard]] std::uint64_t
Version()
const;
83 [[nodiscard]] std::optional<std::int64_t>
Variation()
const;
89 [[nodiscard]] std::optional<EvaluationReason>
const&
Reason()
const;
126 [[nodiscard]] std::vector<std::string>
const&
Prerequisites()
const;
131 std::uint64_t version_;
132 std::optional<std::int64_t> variation_;
133 std::optional<EvaluationReason> reason_;
136 std::optional<std::uint64_t> debug_events_until_date_;
138 std::vector<std::string> prerequisites_;
146 [[nodiscard]]
bool Valid()
const;
151 [[nodiscard]] std::unordered_map<std::string, State>
const&
States()
const;
156 [[nodiscard]] std::unordered_map<std::string, Value>
const&
Values()
const;
168 AllFlagsState(std::unordered_map<std::string, Value> evaluations,
169 std::unordered_map<std::string, class State> flags_state);
173 std::unordered_map<std::string, class State>
const flags_state_;
174 std::unordered_map<std::string, Value>
const evaluations_;
Definition: all_flags_state_builder.hpp:15
Definition: all_flags_state.hpp:57
std::optional< std::int64_t > Variation() const
Definition: all_flags_state.cpp:41
std::optional< std::uint64_t > const & DebugEventsUntilDate() const
Definition: all_flags_state.cpp:61
std::uint64_t Version() const
Definition: all_flags_state.cpp:37
std::optional< EvaluationReason > const & Reason() const
Definition: all_flags_state.cpp:45
bool OmitDetails() const
Definition: all_flags_state.cpp:66
bool TrackEvents() const
Definition: all_flags_state.cpp:49
bool TrackReason() const
Definition: all_flags_state.cpp:53
std::vector< std::string > const & Prerequisites() const
Definition: all_flags_state.cpp:57
Definition: all_flags_state.hpp:27
std::unordered_map< std::string, Value > const & Values() const
Definition: all_flags_state.cpp:88
AllFlagsState()
Definition: all_flags_state.cpp:70
std::unordered_map< std::string, State > const & States() const
Definition: all_flags_state.cpp:84
Options
Definition: all_flags_state.hpp:29
@ DetailsOnlyForTrackedFlags
bool Valid() const
Definition: all_flags_state.cpp:79