// Obtain the value of a wrapped field (e.g. google.protobuf.UInt32Value) if set. Otherwise, return
// Obtain the value of a wrapped field (e.g. google.protobuf.UInt32Value) if set. Otherwise, return
// Obtain the value of a wrapped field (e.g. google.protobuf.UInt32Value) if set. Otherwise, throw
// Obtain the milliseconds value of a google.protobuf.Duration field if set. Otherwise, return the
((message).has_##field_name() ? DurationUtil::durationToMilliseconds((message).field_name()) \
bool evaluateFractionalPercent(envoy::type::v3::FractionalPercent percent, uint64_t random_value);
convertToConstMessagePtrContainer(const Protobuf::RepeatedPtrField<ProtoType>& repeated_field) {
std::transform(repeated_field.begin(), repeated_field.end(), std::back_inserter(ret_container),
template <class MessageType> static inline MessageType anyConvert(const Protobuf::Any& message) {
static inline void anyConvertAndValidate(const Protobuf::Any& message, MessageType& typed_message,
* `sensitive` will be replaced with the string "[redacted]", bytes-typed fields will be replaced
* with the bytes `5B72656461637465645D` (the ASCII / UTF-8 encoding of the string "[redacted]"),
* LIMITATION: This works properly for strongly-typed messages, as well as for messages packed in
* structs are missing the "sensitive" annotations that this function expects. Similarly, it fails
HashedValue(const Protobuf::Value& value) : value_(value), hash_(ValueUtil::hash(value)) {};
static absl::StatusOr<uint64_t> durationToMillisecondsNoThrow(const Protobuf::Duration& duration);