1 /* This file was generated by upb_generator from the input file:
2 *
3 * xds/annotations/v3/sensitive.proto
4 *
5 * Do not edit -- your changes will be discarded when the file is
6 * regenerated. */
7
8 #ifndef XDS_ANNOTATIONS_V3_SENSITIVE_PROTO_UPB_H_
9 #define XDS_ANNOTATIONS_V3_SENSITIVE_PROTO_UPB_H_
10
11 #include "upb/generated_code_support.h"
12
13 #include "xds/annotations/v3/sensitive.upb_minitable.h"
14
15 #include "google/protobuf/descriptor.upb_minitable.h"
16
17 // Must be last.
18 #include "upb/port/def.inc"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 struct google_protobuf_FieldOptions;
25
26
xds_annotations_v3_has_sensitive(const struct google_protobuf_FieldOptions * msg)27 UPB_INLINE bool xds_annotations_v3_has_sensitive(const struct google_protobuf_FieldOptions* msg) {
28 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_sensitive_ext);
29 }
xds_annotations_v3_clear_sensitive(struct google_protobuf_FieldOptions * msg)30 UPB_INLINE void xds_annotations_v3_clear_sensitive(struct google_protobuf_FieldOptions* msg) {
31 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_sensitive_ext);
32 }
xds_annotations_v3_sensitive(const struct google_protobuf_FieldOptions * msg)33 UPB_INLINE bool xds_annotations_v3_sensitive(const struct google_protobuf_FieldOptions* msg) {
34 const upb_MiniTableExtension* ext = &xds_annotations_v3_sensitive_ext;
35 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
36 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
37 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
38 bool default_val = false;
39 bool ret;
40 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
41 return ret;
42 }
xds_annotations_v3_set_sensitive(struct google_protobuf_FieldOptions * msg,bool val,upb_Arena * arena)43 UPB_INLINE void xds_annotations_v3_set_sensitive(struct google_protobuf_FieldOptions* msg, bool val, upb_Arena* arena) {
44 const upb_MiniTableExtension* ext = &xds_annotations_v3_sensitive_ext;
45 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
46 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
47 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
48 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
49 UPB_ASSERT(ok);
50 }
51 #ifdef __cplusplus
52 } /* extern "C" */
53 #endif
54
55 #include "upb/port/undef.inc"
56
57 #endif /* XDS_ANNOTATIONS_V3_SENSITIVE_PROTO_UPB_H_ */
58