33 #ifndef GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
34 #define GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
39 #include <google/protobuf/field_mask.pb.h>
40 #include <google/protobuf/descriptor.h>
41 #include <google/protobuf/stubs/strutil.h>
44 #include <google/protobuf/port_def.inc>
50 class PROTOBUF_EXPORT FieldMaskUtil {
64 for (
const auto field_number : field_numbers) {
68 <<
"Invalid field number for " <<
T::descriptor()->full_name() <<
": "
85 static bool GetFieldDescriptors(
87 std::vector<const FieldDescriptor*>* field_descriptors);
107 template <
typename T>
115 template <
typename T>
121 template <
typename T>
122 PROTOBUF_DEPRECATED_MSG(
"Use *out = GetFieldMaskForAllFields() instead")
147 template <
typename T>
214 class PROTOBUF_EXPORT FieldMaskUtil::MergeOptions {
217 : replace_message_fields_(
false), replace_repeated_fields_(
false) {}
225 replace_message_fields_ =
value;
233 replace_repeated_fields_ =
value;
238 bool replace_message_fields_;
239 bool replace_repeated_fields_;
242 class PROTOBUF_EXPORT FieldMaskUtil::TrimOptions {
253 bool keep_required_fields_;
260 #include <google/protobuf/port_undef.inc>
262 #endif // GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__