1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     udpa/annotations/sensitive.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPB_H_
11 
12 #include "upb/collections/array_internal.h"
13 #include "upb/collections/map_gencode_util.h"
14 #include "upb/message/accessors.h"
15 #include "upb/message/internal.h"
16 #include "upb/mini_table/enum_internal.h"
17 #include "upb/wire/decode.h"
18 #include "upb/wire/decode_fast.h"
19 #include "upb/wire/encode.h"
20 
21 // Must be last.
22 #include "upb/port/def.inc"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 extern const upb_MiniTableExtension udpa_annotations_sensitive_ext;
29 struct google_protobuf_FieldOptions;
30 extern const upb_MiniTable google_protobuf_FieldOptions_msg_init;
31 
32 
udpa_annotations_has_sensitive(const struct google_protobuf_FieldOptions * msg)33 UPB_INLINE bool udpa_annotations_has_sensitive(const struct google_protobuf_FieldOptions* msg) {
34   return _upb_Message_HasExtensionField(msg, &udpa_annotations_sensitive_ext);
35 }
udpa_annotations_clear_sensitive(struct google_protobuf_FieldOptions * msg)36 UPB_INLINE void udpa_annotations_clear_sensitive(struct google_protobuf_FieldOptions* msg) {
37   _upb_Message_ClearExtensionField(msg, &udpa_annotations_sensitive_ext);
38 }
udpa_annotations_sensitive(const struct google_protobuf_FieldOptions * msg)39 UPB_INLINE bool udpa_annotations_sensitive(const struct google_protobuf_FieldOptions* msg) {
40   const upb_MiniTableExtension* ext = &udpa_annotations_sensitive_ext;
41   UPB_ASSUME(!upb_IsRepeatedOrMap(&ext->field));
42   UPB_ASSUME(_upb_MiniTableField_GetRep(&ext->field) == kUpb_FieldRep_1Byte);
43   bool default_val = false;
44   bool ret;
45   _upb_Message_GetExtensionField(msg, ext, &default_val, &ret);
46   return ret;
47 }
udpa_annotations_set_sensitive(struct google_protobuf_FieldOptions * msg,bool val,upb_Arena * arena)48 UPB_INLINE void udpa_annotations_set_sensitive(struct google_protobuf_FieldOptions* msg, bool val, upb_Arena* arena) {
49   const upb_MiniTableExtension* ext = &udpa_annotations_sensitive_ext;
50   UPB_ASSUME(!upb_IsRepeatedOrMap(&ext->field));
51   UPB_ASSUME(_upb_MiniTableField_GetRep(&ext->field) == kUpb_FieldRep_1Byte);
52   bool ok = _upb_Message_SetExtensionField(msg, ext, &val, arena);
53   UPB_ASSERT(ok);
54 }
55 extern const upb_MiniTableFile udpa_annotations_sensitive_proto_upb_file_layout;
56 
57 #ifdef __cplusplus
58 }  /* extern "C" */
59 #endif
60 
61 #include "upb/port/undef.inc"
62 
63 #endif  /* UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPB_H_ */
64