Debian Codegraph @

src/core/ext/upb-generated/udpa/annotations/security.upb.h

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * udpa/annotations/security.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_
11
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct udpa_annotations_FieldSecurityAnnotation;
24 typedef struct udpa_annotations_FieldSecurityAnnotation udpa_annotations_FieldSecurityAnnotation;
25 extern const upb_MiniTable udpa_annotations_FieldSecurityAnnotation_msginit;
26 extern const upb_MiniTable_Extension udpa_annotations_security_ext;
27 struct google_protobuf_FieldOptions;
28 extern const upb_MiniTable google_protobuf_FieldOptions_msginit;
29
30
31
32 /* udpa.annotations.FieldSecurityAnnotation */
33
34 UPB_INLINE udpa_annotations_FieldSecurityAnnotation* udpa_annotations_FieldSecurityAnnotation_new(upb_Arena* arena) {
35 return (udpa_annotations_FieldSecurityAnnotation*)_upb_Message_New(&udpa_annotations_FieldSecurityAnnotation_msginit, arena);
36 }
37 UPB_INLINE udpa_annotations_FieldSecurityAnnotation* udpa_annotations_FieldSecurityAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
38 udpa_annotations_FieldSecurityAnnotation* ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
39 if (!ret) return NULL;
40 if (upb_Decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
41 return NULL;
42 }
43 return ret;
44 }
45 UPB_INLINE udpa_annotations_FieldSecurityAnnotation* udpa_annotations_FieldSecurityAnnotation_parse_ex(const char* buf, size_t size,
46 const upb_ExtensionRegistry* extreg,
47 int options, upb_Arena* arena) {
48 udpa_annotations_FieldSecurityAnnotation* ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
49 if (!ret) return NULL;
50 if (upb_Decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, extreg, options, arena) !=
51 kUpb_DecodeStatus_Ok) {
52 return NULL;
53 }
54 return ret;
55 }
56 UPB_INLINE char* udpa_annotations_FieldSecurityAnnotation_serialize(const udpa_annotations_FieldSecurityAnnotation* msg, upb_Arena* arena, size_t* len) {
57 char* ptr;
58 (void)upb_Encode(msg, &udpa_annotations_FieldSecurityAnnotation_msginit, 0, arena, &ptr, len);
59 return ptr;
60 }
61 UPB_INLINE char* udpa_annotations_FieldSecurityAnnotation_serialize_ex(const udpa_annotations_FieldSecurityAnnotation* msg, int options,
62 upb_Arena* arena, size_t* len) {
63 char* ptr;
64 (void)upb_Encode(msg, &udpa_annotations_FieldSecurityAnnotation_msginit, options, arena, &ptr, len);
65 return ptr;
66 }
67 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_clear_configure_for_untrusted_downstream(const udpa_annotations_FieldSecurityAnnotation* msg) {
68 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0;
69 }
70 UPB_INLINE bool udpa_annotations_FieldSecurityAnnotation_configure_for_untrusted_downstream(const udpa_annotations_FieldSecurityAnnotation* msg) {
71 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool);
72 }
73 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_clear_configure_for_untrusted_upstream(const udpa_annotations_FieldSecurityAnnotation* msg) {
74 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0;
75 }
76 UPB_INLINE bool udpa_annotations_FieldSecurityAnnotation_configure_for_untrusted_upstream(const udpa_annotations_FieldSecurityAnnotation* msg) {
77 return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
78 }
79
80 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_set_configure_for_untrusted_downstream(udpa_annotations_FieldSecurityAnnotation *msg, bool value) {
81 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
82 }
83 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_set_configure_for_untrusted_upstream(udpa_annotations_FieldSecurityAnnotation *msg, bool value) {
84 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
85 }
86
87 UPB_INLINE bool udpa_annotations_has_security(const struct google_protobuf_FieldOptions* msg) {
88 return _upb_Message_Getext(msg, &udpa_annotations_security_ext) != NULL;
89 }
90 UPB_INLINE void udpa_annotations_clear_security(struct google_protobuf_FieldOptions* msg) {
91 _upb_Message_Clearext(msg, &udpa_annotations_security_ext);
92 }
93 UPB_INLINE const udpa_annotations_FieldSecurityAnnotation* udpa_annotations_security(const struct google_protobuf_FieldOptions* msg) {
94 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &udpa_annotations_security_ext);
95 UPB_ASSERT(ext);
96 return *UPB_PTR_AT(&ext->data, 0, const udpa_annotations_FieldSecurityAnnotation*);
97 }
98 UPB_INLINE void udpa_annotations_set_security(struct google_protobuf_FieldOptions* msg, const udpa_annotations_FieldSecurityAnnotation* ext, upb_Arena* arena) {
99 const upb_Message_Extension* msg_ext =
100 _upb_Message_GetOrCreateExtension(msg, &udpa_annotations_security_ext, arena);
101 UPB_ASSERT(msg_ext);
102 *UPB_PTR_AT(&msg_ext->data, 0, const udpa_annotations_FieldSecurityAnnotation*) = ext;
103 }
104 extern const upb_MiniTable_File udpa_annotations_security_proto_upb_file_layout;
105
106 #ifdef __cplusplus
107 } /* extern "C" */
108 #endif
109
110 #include "upb/port_undef.inc"
111
112 #endif /* UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_ */