Debian Codegraph @

src/core/ext/upb-generated/xds/annotations/v3/status.upb.h

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * xds/annotations/v3/status.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef XDS_ANNOTATIONS_V3_STATUS_PROTO_UPB_H_
10 #define XDS_ANNOTATIONS_V3_STATUS_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 xds_annotations_v3_FileStatusAnnotation;
24 struct xds_annotations_v3_MessageStatusAnnotation;
25 struct xds_annotations_v3_FieldStatusAnnotation;
26 struct xds_annotations_v3_StatusAnnotation;
27 typedef struct xds_annotations_v3_FileStatusAnnotation xds_annotations_v3_FileStatusAnnotation;
28 typedef struct xds_annotations_v3_MessageStatusAnnotation xds_annotations_v3_MessageStatusAnnotation;
29 typedef struct xds_annotations_v3_FieldStatusAnnotation xds_annotations_v3_FieldStatusAnnotation;
30 typedef struct xds_annotations_v3_StatusAnnotation xds_annotations_v3_StatusAnnotation;
31 extern const upb_MiniTable xds_annotations_v3_FileStatusAnnotation_msginit;
32 extern const upb_MiniTable xds_annotations_v3_MessageStatusAnnotation_msginit;
33 extern const upb_MiniTable xds_annotations_v3_FieldStatusAnnotation_msginit;
34 extern const upb_MiniTable xds_annotations_v3_StatusAnnotation_msginit;
35 extern const upb_MiniTable_Extension xds_annotations_v3_file_status_ext;
36 extern const upb_MiniTable_Extension xds_annotations_v3_message_status_ext;
37 extern const upb_MiniTable_Extension xds_annotations_v3_field_status_ext;
38 struct google_protobuf_FieldOptions;
39 struct google_protobuf_FileOptions;
40 struct google_protobuf_MessageOptions;
41 extern const upb_MiniTable google_protobuf_FieldOptions_msginit;
42 extern const upb_MiniTable google_protobuf_FileOptions_msginit;
43 extern const upb_MiniTable google_protobuf_MessageOptions_msginit;
44
45 typedef enum {
46 xds_annotations_v3_UNKNOWN = 0,
47 xds_annotations_v3_FROZEN = 1,
48 xds_annotations_v3_ACTIVE = 2,
49 xds_annotations_v3_NEXT_MAJOR_VERSION_CANDIDATE = 3
50 } xds_annotations_v3_PackageVersionStatus;
51
52
53
54 /* xds.annotations.v3.FileStatusAnnotation */
55
56 UPB_INLINE xds_annotations_v3_FileStatusAnnotation* xds_annotations_v3_FileStatusAnnotation_new(upb_Arena* arena) {
57 return (xds_annotations_v3_FileStatusAnnotation*)_upb_Message_New(&xds_annotations_v3_FileStatusAnnotation_msginit, arena);
58 }
59 UPB_INLINE xds_annotations_v3_FileStatusAnnotation* xds_annotations_v3_FileStatusAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
60 xds_annotations_v3_FileStatusAnnotation* ret = xds_annotations_v3_FileStatusAnnotation_new(arena);
61 if (!ret) return NULL;
62 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FileStatusAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
63 return NULL;
64 }
65 return ret;
66 }
67 UPB_INLINE xds_annotations_v3_FileStatusAnnotation* xds_annotations_v3_FileStatusAnnotation_parse_ex(const char* buf, size_t size,
68 const upb_ExtensionRegistry* extreg,
69 int options, upb_Arena* arena) {
70 xds_annotations_v3_FileStatusAnnotation* ret = xds_annotations_v3_FileStatusAnnotation_new(arena);
71 if (!ret) return NULL;
72 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FileStatusAnnotation_msginit, extreg, options, arena) !=
73 kUpb_DecodeStatus_Ok) {
74 return NULL;
75 }
76 return ret;
77 }
78 UPB_INLINE char* xds_annotations_v3_FileStatusAnnotation_serialize(const xds_annotations_v3_FileStatusAnnotation* msg, upb_Arena* arena, size_t* len) {
79 char* ptr;
80 (void)upb_Encode(msg, &xds_annotations_v3_FileStatusAnnotation_msginit, 0, arena, &ptr, len);
81 return ptr;
82 }
83 UPB_INLINE char* xds_annotations_v3_FileStatusAnnotation_serialize_ex(const xds_annotations_v3_FileStatusAnnotation* msg, int options,
84 upb_Arena* arena, size_t* len) {
85 char* ptr;
86 (void)upb_Encode(msg, &xds_annotations_v3_FileStatusAnnotation_msginit, options, arena, &ptr, len);
87 return ptr;
88 }
89 UPB_INLINE void xds_annotations_v3_FileStatusAnnotation_clear_work_in_progress(const xds_annotations_v3_FileStatusAnnotation* msg) {
90 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0;
91 }
92 UPB_INLINE bool xds_annotations_v3_FileStatusAnnotation_work_in_progress(const xds_annotations_v3_FileStatusAnnotation* msg) {
93 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool);
94 }
95
96 UPB_INLINE void xds_annotations_v3_FileStatusAnnotation_set_work_in_progress(xds_annotations_v3_FileStatusAnnotation *msg, bool value) {
97 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
98 }
99
100 /* xds.annotations.v3.MessageStatusAnnotation */
101
102 UPB_INLINE xds_annotations_v3_MessageStatusAnnotation* xds_annotations_v3_MessageStatusAnnotation_new(upb_Arena* arena) {
103 return (xds_annotations_v3_MessageStatusAnnotation*)_upb_Message_New(&xds_annotations_v3_MessageStatusAnnotation_msginit, arena);
104 }
105 UPB_INLINE xds_annotations_v3_MessageStatusAnnotation* xds_annotations_v3_MessageStatusAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
106 xds_annotations_v3_MessageStatusAnnotation* ret = xds_annotations_v3_MessageStatusAnnotation_new(arena);
107 if (!ret) return NULL;
108 if (upb_Decode(buf, size, ret, &xds_annotations_v3_MessageStatusAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
109 return NULL;
110 }
111 return ret;
112 }
113 UPB_INLINE xds_annotations_v3_MessageStatusAnnotation* xds_annotations_v3_MessageStatusAnnotation_parse_ex(const char* buf, size_t size,
114 const upb_ExtensionRegistry* extreg,
115 int options, upb_Arena* arena) {
116 xds_annotations_v3_MessageStatusAnnotation* ret = xds_annotations_v3_MessageStatusAnnotation_new(arena);
117 if (!ret) return NULL;
118 if (upb_Decode(buf, size, ret, &xds_annotations_v3_MessageStatusAnnotation_msginit, extreg, options, arena) !=
119 kUpb_DecodeStatus_Ok) {
120 return NULL;
121 }
122 return ret;
123 }
124 UPB_INLINE char* xds_annotations_v3_MessageStatusAnnotation_serialize(const xds_annotations_v3_MessageStatusAnnotation* msg, upb_Arena* arena, size_t* len) {
125 char* ptr;
126 (void)upb_Encode(msg, &xds_annotations_v3_MessageStatusAnnotation_msginit, 0, arena, &ptr, len);
127 return ptr;
128 }
129 UPB_INLINE char* xds_annotations_v3_MessageStatusAnnotation_serialize_ex(const xds_annotations_v3_MessageStatusAnnotation* msg, int options,
130 upb_Arena* arena, size_t* len) {
131 char* ptr;
132 (void)upb_Encode(msg, &xds_annotations_v3_MessageStatusAnnotation_msginit, options, arena, &ptr, len);
133 return ptr;
134 }
135 UPB_INLINE void xds_annotations_v3_MessageStatusAnnotation_clear_work_in_progress(const xds_annotations_v3_MessageStatusAnnotation* msg) {
136 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0;
137 }
138 UPB_INLINE bool xds_annotations_v3_MessageStatusAnnotation_work_in_progress(const xds_annotations_v3_MessageStatusAnnotation* msg) {
139 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool);
140 }
141
142 UPB_INLINE void xds_annotations_v3_MessageStatusAnnotation_set_work_in_progress(xds_annotations_v3_MessageStatusAnnotation *msg, bool value) {
143 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
144 }
145
146 /* xds.annotations.v3.FieldStatusAnnotation */
147
148 UPB_INLINE xds_annotations_v3_FieldStatusAnnotation* xds_annotations_v3_FieldStatusAnnotation_new(upb_Arena* arena) {
149 return (xds_annotations_v3_FieldStatusAnnotation*)_upb_Message_New(&xds_annotations_v3_FieldStatusAnnotation_msginit, arena);
150 }
151 UPB_INLINE xds_annotations_v3_FieldStatusAnnotation* xds_annotations_v3_FieldStatusAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
152 xds_annotations_v3_FieldStatusAnnotation* ret = xds_annotations_v3_FieldStatusAnnotation_new(arena);
153 if (!ret) return NULL;
154 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FieldStatusAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
155 return NULL;
156 }
157 return ret;
158 }
159 UPB_INLINE xds_annotations_v3_FieldStatusAnnotation* xds_annotations_v3_FieldStatusAnnotation_parse_ex(const char* buf, size_t size,
160 const upb_ExtensionRegistry* extreg,
161 int options, upb_Arena* arena) {
162 xds_annotations_v3_FieldStatusAnnotation* ret = xds_annotations_v3_FieldStatusAnnotation_new(arena);
163 if (!ret) return NULL;
164 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FieldStatusAnnotation_msginit, extreg, options, arena) !=
165 kUpb_DecodeStatus_Ok) {
166 return NULL;
167 }
168 return ret;
169 }
170 UPB_INLINE char* xds_annotations_v3_FieldStatusAnnotation_serialize(const xds_annotations_v3_FieldStatusAnnotation* msg, upb_Arena* arena, size_t* len) {
171 char* ptr;
172 (void)upb_Encode(msg, &xds_annotations_v3_FieldStatusAnnotation_msginit, 0, arena, &ptr, len);
173 return ptr;
174 }
175 UPB_INLINE char* xds_annotations_v3_FieldStatusAnnotation_serialize_ex(const xds_annotations_v3_FieldStatusAnnotation* msg, int options,
176 upb_Arena* arena, size_t* len) {
177 char* ptr;
178 (void)upb_Encode(msg, &xds_annotations_v3_FieldStatusAnnotation_msginit, options, arena, &ptr, len);
179 return ptr;
180 }
181 UPB_INLINE void xds_annotations_v3_FieldStatusAnnotation_clear_work_in_progress(const xds_annotations_v3_FieldStatusAnnotation* msg) {
182 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0;
183 }
184 UPB_INLINE bool xds_annotations_v3_FieldStatusAnnotation_work_in_progress(const xds_annotations_v3_FieldStatusAnnotation* msg) {
185 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool);
186 }
187
188 UPB_INLINE void xds_annotations_v3_FieldStatusAnnotation_set_work_in_progress(xds_annotations_v3_FieldStatusAnnotation *msg, bool value) {
189 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
190 }
191
192 /* xds.annotations.v3.StatusAnnotation */
193
194 UPB_INLINE xds_annotations_v3_StatusAnnotation* xds_annotations_v3_StatusAnnotation_new(upb_Arena* arena) {
195 return (xds_annotations_v3_StatusAnnotation*)_upb_Message_New(&xds_annotations_v3_StatusAnnotation_msginit, arena);
196 }
197 UPB_INLINE xds_annotations_v3_StatusAnnotation* xds_annotations_v3_StatusAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
198 xds_annotations_v3_StatusAnnotation* ret = xds_annotations_v3_StatusAnnotation_new(arena);
199 if (!ret) return NULL;
200 if (upb_Decode(buf, size, ret, &xds_annotations_v3_StatusAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
201 return NULL;
202 }
203 return ret;
204 }
205 UPB_INLINE xds_annotations_v3_StatusAnnotation* xds_annotations_v3_StatusAnnotation_parse_ex(const char* buf, size_t size,
206 const upb_ExtensionRegistry* extreg,
207 int options, upb_Arena* arena) {
208 xds_annotations_v3_StatusAnnotation* ret = xds_annotations_v3_StatusAnnotation_new(arena);
209 if (!ret) return NULL;
210 if (upb_Decode(buf, size, ret, &xds_annotations_v3_StatusAnnotation_msginit, extreg, options, arena) !=
211 kUpb_DecodeStatus_Ok) {
212 return NULL;
213 }
214 return ret;
215 }
216 UPB_INLINE char* xds_annotations_v3_StatusAnnotation_serialize(const xds_annotations_v3_StatusAnnotation* msg, upb_Arena* arena, size_t* len) {
217 char* ptr;
218 (void)upb_Encode(msg, &xds_annotations_v3_StatusAnnotation_msginit, 0, arena, &ptr, len);
219 return ptr;
220 }
221 UPB_INLINE char* xds_annotations_v3_StatusAnnotation_serialize_ex(const xds_annotations_v3_StatusAnnotation* msg, int options,
222 upb_Arena* arena, size_t* len) {
223 char* ptr;
224 (void)upb_Encode(msg, &xds_annotations_v3_StatusAnnotation_msginit, options, arena, &ptr, len);
225 return ptr;
226 }
227 UPB_INLINE void xds_annotations_v3_StatusAnnotation_clear_work_in_progress(const xds_annotations_v3_StatusAnnotation* msg) {
228 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0;
229 }
230 UPB_INLINE bool xds_annotations_v3_StatusAnnotation_work_in_progress(const xds_annotations_v3_StatusAnnotation* msg) {
231 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool);
232 }
233 UPB_INLINE void xds_annotations_v3_StatusAnnotation_clear_package_version_status(const xds_annotations_v3_StatusAnnotation* msg) {
234 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0;
235 }
236 UPB_INLINE int32_t xds_annotations_v3_StatusAnnotation_package_version_status(const xds_annotations_v3_StatusAnnotation* msg) {
237 return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
238 }
239
240 UPB_INLINE void xds_annotations_v3_StatusAnnotation_set_work_in_progress(xds_annotations_v3_StatusAnnotation *msg, bool value) {
241 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
242 }
243 UPB_INLINE void xds_annotations_v3_StatusAnnotation_set_package_version_status(xds_annotations_v3_StatusAnnotation *msg, int32_t value) {
244 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
245 }
246
247 UPB_INLINE bool xds_annotations_v3_has_file_status(const struct google_protobuf_FileOptions* msg) {
248 return _upb_Message_Getext(msg, &xds_annotations_v3_file_status_ext) != NULL;
249 }
250 UPB_INLINE void xds_annotations_v3_clear_file_status(struct google_protobuf_FileOptions* msg) {
251 _upb_Message_Clearext(msg, &xds_annotations_v3_file_status_ext);
252 }
253 UPB_INLINE const xds_annotations_v3_FileStatusAnnotation* xds_annotations_v3_file_status(const struct google_protobuf_FileOptions* msg) {
254 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_file_status_ext);
255 UPB_ASSERT(ext);
256 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_FileStatusAnnotation*);
257 }
258 UPB_INLINE void xds_annotations_v3_set_file_status(struct google_protobuf_FileOptions* msg, const xds_annotations_v3_FileStatusAnnotation* ext, upb_Arena* arena) {
259 const upb_Message_Extension* msg_ext =
260 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_file_status_ext, arena);
261 UPB_ASSERT(msg_ext);
262 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_FileStatusAnnotation*) = ext;
263 }
264 UPB_INLINE bool xds_annotations_v3_has_message_status(const struct google_protobuf_MessageOptions* msg) {
265 return _upb_Message_Getext(msg, &xds_annotations_v3_message_status_ext) != NULL;
266 }
267 UPB_INLINE void xds_annotations_v3_clear_message_status(struct google_protobuf_MessageOptions* msg) {
268 _upb_Message_Clearext(msg, &xds_annotations_v3_message_status_ext);
269 }
270 UPB_INLINE const xds_annotations_v3_MessageStatusAnnotation* xds_annotations_v3_message_status(const struct google_protobuf_MessageOptions* msg) {
271 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_message_status_ext);
272 UPB_ASSERT(ext);
273 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_MessageStatusAnnotation*);
274 }
275 UPB_INLINE void xds_annotations_v3_set_message_status(struct google_protobuf_MessageOptions* msg, const xds_annotations_v3_MessageStatusAnnotation* ext, upb_Arena* arena) {
276 const upb_Message_Extension* msg_ext =
277 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_message_status_ext, arena);
278 UPB_ASSERT(msg_ext);
279 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_MessageStatusAnnotation*) = ext;
280 }
281 UPB_INLINE bool xds_annotations_v3_has_field_status(const struct google_protobuf_FieldOptions* msg) {
282 return _upb_Message_Getext(msg, &xds_annotations_v3_field_status_ext) != NULL;
283 }
284 UPB_INLINE void xds_annotations_v3_clear_field_status(struct google_protobuf_FieldOptions* msg) {
285 _upb_Message_Clearext(msg, &xds_annotations_v3_field_status_ext);
286 }
287 UPB_INLINE const xds_annotations_v3_FieldStatusAnnotation* xds_annotations_v3_field_status(const struct google_protobuf_FieldOptions* msg) {
288 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_field_status_ext);
289 UPB_ASSERT(ext);
290 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_FieldStatusAnnotation*);
291 }
292 UPB_INLINE void xds_annotations_v3_set_field_status(struct google_protobuf_FieldOptions* msg, const xds_annotations_v3_FieldStatusAnnotation* ext, upb_Arena* arena) {
293 const upb_Message_Extension* msg_ext =
294 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_field_status_ext, arena);
295 UPB_ASSERT(msg_ext);
296 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_FieldStatusAnnotation*) = ext;
297 }
298 extern const upb_MiniTable_File xds_annotations_v3_status_proto_upb_file_layout;
299
300 #ifdef __cplusplus
301 } /* extern "C" */
302 #endif
303
304 #include "upb/port_undef.inc"
305
306 #endif /* XDS_ANNOTATIONS_V3_STATUS_PROTO_UPB_H_ */