Debian Codegraph @

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

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * xds/annotations/v3/migrate.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef XDS_ANNOTATIONS_V3_MIGRATE_PROTO_UPB_H_
10 #define XDS_ANNOTATIONS_V3_MIGRATE_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_MigrateAnnotation;
24 struct xds_annotations_v3_FieldMigrateAnnotation;
25 struct xds_annotations_v3_FileMigrateAnnotation;
26 typedef struct xds_annotations_v3_MigrateAnnotation xds_annotations_v3_MigrateAnnotation;
27 typedef struct xds_annotations_v3_FieldMigrateAnnotation xds_annotations_v3_FieldMigrateAnnotation;
28 typedef struct xds_annotations_v3_FileMigrateAnnotation xds_annotations_v3_FileMigrateAnnotation;
29 extern const upb_MiniTable xds_annotations_v3_MigrateAnnotation_msginit;
30 extern const upb_MiniTable xds_annotations_v3_FieldMigrateAnnotation_msginit;
31 extern const upb_MiniTable xds_annotations_v3_FileMigrateAnnotation_msginit;
32 extern const upb_MiniTable_Extension xds_annotations_v3_message_migrate_ext;
33 extern const upb_MiniTable_Extension xds_annotations_v3_field_migrate_ext;
34 extern const upb_MiniTable_Extension xds_annotations_v3_enum_migrate_ext;
35 extern const upb_MiniTable_Extension xds_annotations_v3_enum_value_migrate_ext;
36 extern const upb_MiniTable_Extension xds_annotations_v3_file_migrate_ext;
37 struct google_protobuf_EnumOptions;
38 struct google_protobuf_EnumValueOptions;
39 struct google_protobuf_FieldOptions;
40 struct google_protobuf_FileOptions;
41 struct google_protobuf_MessageOptions;
42 extern const upb_MiniTable google_protobuf_EnumOptions_msginit;
43 extern const upb_MiniTable google_protobuf_EnumValueOptions_msginit;
44 extern const upb_MiniTable google_protobuf_FieldOptions_msginit;
45 extern const upb_MiniTable google_protobuf_FileOptions_msginit;
46 extern const upb_MiniTable google_protobuf_MessageOptions_msginit;
47
48
49
50 /* xds.annotations.v3.MigrateAnnotation */
51
52 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_new(upb_Arena* arena) {
53 return (xds_annotations_v3_MigrateAnnotation*)_upb_Message_New(&xds_annotations_v3_MigrateAnnotation_msginit, arena);
54 }
55 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
56 xds_annotations_v3_MigrateAnnotation* ret = xds_annotations_v3_MigrateAnnotation_new(arena);
57 if (!ret) return NULL;
58 if (upb_Decode(buf, size, ret, &xds_annotations_v3_MigrateAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
59 return NULL;
60 }
61 return ret;
62 }
63 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_parse_ex(const char* buf, size_t size,
64 const upb_ExtensionRegistry* extreg,
65 int options, upb_Arena* arena) {
66 xds_annotations_v3_MigrateAnnotation* ret = xds_annotations_v3_MigrateAnnotation_new(arena);
67 if (!ret) return NULL;
68 if (upb_Decode(buf, size, ret, &xds_annotations_v3_MigrateAnnotation_msginit, extreg, options, arena) !=
69 kUpb_DecodeStatus_Ok) {
70 return NULL;
71 }
72 return ret;
73 }
74 UPB_INLINE char* xds_annotations_v3_MigrateAnnotation_serialize(const xds_annotations_v3_MigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
75 char* ptr;
76 (void)upb_Encode(msg, &xds_annotations_v3_MigrateAnnotation_msginit, 0, arena, &ptr, len);
77 return ptr;
78 }
79 UPB_INLINE char* xds_annotations_v3_MigrateAnnotation_serialize_ex(const xds_annotations_v3_MigrateAnnotation* msg, int options,
80 upb_Arena* arena, size_t* len) {
81 char* ptr;
82 (void)upb_Encode(msg, &xds_annotations_v3_MigrateAnnotation_msginit, options, arena, &ptr, len);
83 return ptr;
84 }
85 UPB_INLINE void xds_annotations_v3_MigrateAnnotation_clear_rename(const xds_annotations_v3_MigrateAnnotation* msg) {
86 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
87 }
88 UPB_INLINE upb_StringView xds_annotations_v3_MigrateAnnotation_rename(const xds_annotations_v3_MigrateAnnotation* msg) {
89 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
90 }
91
92 UPB_INLINE void xds_annotations_v3_MigrateAnnotation_set_rename(xds_annotations_v3_MigrateAnnotation *msg, upb_StringView value) {
93 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
94 }
95
96 /* xds.annotations.v3.FieldMigrateAnnotation */
97
98 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_new(upb_Arena* arena) {
99 return (xds_annotations_v3_FieldMigrateAnnotation*)_upb_Message_New(&xds_annotations_v3_FieldMigrateAnnotation_msginit, arena);
100 }
101 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
102 xds_annotations_v3_FieldMigrateAnnotation* ret = xds_annotations_v3_FieldMigrateAnnotation_new(arena);
103 if (!ret) return NULL;
104 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FieldMigrateAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
105 return NULL;
106 }
107 return ret;
108 }
109 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_parse_ex(const char* buf, size_t size,
110 const upb_ExtensionRegistry* extreg,
111 int options, upb_Arena* arena) {
112 xds_annotations_v3_FieldMigrateAnnotation* ret = xds_annotations_v3_FieldMigrateAnnotation_new(arena);
113 if (!ret) return NULL;
114 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FieldMigrateAnnotation_msginit, extreg, options, arena) !=
115 kUpb_DecodeStatus_Ok) {
116 return NULL;
117 }
118 return ret;
119 }
120 UPB_INLINE char* xds_annotations_v3_FieldMigrateAnnotation_serialize(const xds_annotations_v3_FieldMigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
121 char* ptr;
122 (void)upb_Encode(msg, &xds_annotations_v3_FieldMigrateAnnotation_msginit, 0, arena, &ptr, len);
123 return ptr;
124 }
125 UPB_INLINE char* xds_annotations_v3_FieldMigrateAnnotation_serialize_ex(const xds_annotations_v3_FieldMigrateAnnotation* msg, int options,
126 upb_Arena* arena, size_t* len) {
127 char* ptr;
128 (void)upb_Encode(msg, &xds_annotations_v3_FieldMigrateAnnotation_msginit, options, arena, &ptr, len);
129 return ptr;
130 }
131 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_clear_rename(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
132 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
133 }
134 UPB_INLINE upb_StringView xds_annotations_v3_FieldMigrateAnnotation_rename(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
135 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
136 }
137 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_clear_oneof_promotion(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
138 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
139 }
140 UPB_INLINE upb_StringView xds_annotations_v3_FieldMigrateAnnotation_oneof_promotion(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
141 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
142 }
143
144 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_set_rename(xds_annotations_v3_FieldMigrateAnnotation *msg, upb_StringView value) {
145 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
146 }
147 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_set_oneof_promotion(xds_annotations_v3_FieldMigrateAnnotation *msg, upb_StringView value) {
148 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
149 }
150
151 /* xds.annotations.v3.FileMigrateAnnotation */
152
153 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_new(upb_Arena* arena) {
154 return (xds_annotations_v3_FileMigrateAnnotation*)_upb_Message_New(&xds_annotations_v3_FileMigrateAnnotation_msginit, arena);
155 }
156 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
157 xds_annotations_v3_FileMigrateAnnotation* ret = xds_annotations_v3_FileMigrateAnnotation_new(arena);
158 if (!ret) return NULL;
159 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FileMigrateAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
160 return NULL;
161 }
162 return ret;
163 }
164 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_parse_ex(const char* buf, size_t size,
165 const upb_ExtensionRegistry* extreg,
166 int options, upb_Arena* arena) {
167 xds_annotations_v3_FileMigrateAnnotation* ret = xds_annotations_v3_FileMigrateAnnotation_new(arena);
168 if (!ret) return NULL;
169 if (upb_Decode(buf, size, ret, &xds_annotations_v3_FileMigrateAnnotation_msginit, extreg, options, arena) !=
170 kUpb_DecodeStatus_Ok) {
171 return NULL;
172 }
173 return ret;
174 }
175 UPB_INLINE char* xds_annotations_v3_FileMigrateAnnotation_serialize(const xds_annotations_v3_FileMigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
176 char* ptr;
177 (void)upb_Encode(msg, &xds_annotations_v3_FileMigrateAnnotation_msginit, 0, arena, &ptr, len);
178 return ptr;
179 }
180 UPB_INLINE char* xds_annotations_v3_FileMigrateAnnotation_serialize_ex(const xds_annotations_v3_FileMigrateAnnotation* msg, int options,
181 upb_Arena* arena, size_t* len) {
182 char* ptr;
183 (void)upb_Encode(msg, &xds_annotations_v3_FileMigrateAnnotation_msginit, options, arena, &ptr, len);
184 return ptr;
185 }
186 UPB_INLINE void xds_annotations_v3_FileMigrateAnnotation_clear_move_to_package(const xds_annotations_v3_FileMigrateAnnotation* msg) {
187 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
188 }
189 UPB_INLINE upb_StringView xds_annotations_v3_FileMigrateAnnotation_move_to_package(const xds_annotations_v3_FileMigrateAnnotation* msg) {
190 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
191 }
192
193 UPB_INLINE void xds_annotations_v3_FileMigrateAnnotation_set_move_to_package(xds_annotations_v3_FileMigrateAnnotation *msg, upb_StringView value) {
194 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
195 }
196
197 UPB_INLINE bool xds_annotations_v3_has_message_migrate(const struct google_protobuf_MessageOptions* msg) {
198 return _upb_Message_Getext(msg, &xds_annotations_v3_message_migrate_ext) != NULL;
199 }
200 UPB_INLINE void xds_annotations_v3_clear_message_migrate(struct google_protobuf_MessageOptions* msg) {
201 _upb_Message_Clearext(msg, &xds_annotations_v3_message_migrate_ext);
202 }
203 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_message_migrate(const struct google_protobuf_MessageOptions* msg) {
204 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_message_migrate_ext);
205 UPB_ASSERT(ext);
206 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_MigrateAnnotation*);
207 }
208 UPB_INLINE void xds_annotations_v3_set_message_migrate(struct google_protobuf_MessageOptions* msg, const xds_annotations_v3_MigrateAnnotation* ext, upb_Arena* arena) {
209 const upb_Message_Extension* msg_ext =
210 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_message_migrate_ext, arena);
211 UPB_ASSERT(msg_ext);
212 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_MigrateAnnotation*) = ext;
213 }
214 UPB_INLINE bool xds_annotations_v3_has_field_migrate(const struct google_protobuf_FieldOptions* msg) {
215 return _upb_Message_Getext(msg, &xds_annotations_v3_field_migrate_ext) != NULL;
216 }
217 UPB_INLINE void xds_annotations_v3_clear_field_migrate(struct google_protobuf_FieldOptions* msg) {
218 _upb_Message_Clearext(msg, &xds_annotations_v3_field_migrate_ext);
219 }
220 UPB_INLINE const xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_field_migrate(const struct google_protobuf_FieldOptions* msg) {
221 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_field_migrate_ext);
222 UPB_ASSERT(ext);
223 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_FieldMigrateAnnotation*);
224 }
225 UPB_INLINE void xds_annotations_v3_set_field_migrate(struct google_protobuf_FieldOptions* msg, const xds_annotations_v3_FieldMigrateAnnotation* ext, upb_Arena* arena) {
226 const upb_Message_Extension* msg_ext =
227 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_field_migrate_ext, arena);
228 UPB_ASSERT(msg_ext);
229 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_FieldMigrateAnnotation*) = ext;
230 }
231 UPB_INLINE bool xds_annotations_v3_has_enum_migrate(const struct google_protobuf_EnumOptions* msg) {
232 return _upb_Message_Getext(msg, &xds_annotations_v3_enum_migrate_ext) != NULL;
233 }
234 UPB_INLINE void xds_annotations_v3_clear_enum_migrate(struct google_protobuf_EnumOptions* msg) {
235 _upb_Message_Clearext(msg, &xds_annotations_v3_enum_migrate_ext);
236 }
237 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_enum_migrate(const struct google_protobuf_EnumOptions* msg) {
238 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_enum_migrate_ext);
239 UPB_ASSERT(ext);
240 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_MigrateAnnotation*);
241 }
242 UPB_INLINE void xds_annotations_v3_set_enum_migrate(struct google_protobuf_EnumOptions* msg, const xds_annotations_v3_MigrateAnnotation* ext, upb_Arena* arena) {
243 const upb_Message_Extension* msg_ext =
244 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_enum_migrate_ext, arena);
245 UPB_ASSERT(msg_ext);
246 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_MigrateAnnotation*) = ext;
247 }
248 UPB_INLINE bool xds_annotations_v3_has_enum_value_migrate(const struct google_protobuf_EnumValueOptions* msg) {
249 return _upb_Message_Getext(msg, &xds_annotations_v3_enum_value_migrate_ext) != NULL;
250 }
251 UPB_INLINE void xds_annotations_v3_clear_enum_value_migrate(struct google_protobuf_EnumValueOptions* msg) {
252 _upb_Message_Clearext(msg, &xds_annotations_v3_enum_value_migrate_ext);
253 }
254 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_enum_value_migrate(const struct google_protobuf_EnumValueOptions* msg) {
255 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_enum_value_migrate_ext);
256 UPB_ASSERT(ext);
257 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_MigrateAnnotation*);
258 }
259 UPB_INLINE void xds_annotations_v3_set_enum_value_migrate(struct google_protobuf_EnumValueOptions* msg, const xds_annotations_v3_MigrateAnnotation* ext, upb_Arena* arena) {
260 const upb_Message_Extension* msg_ext =
261 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_enum_value_migrate_ext, arena);
262 UPB_ASSERT(msg_ext);
263 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_MigrateAnnotation*) = ext;
264 }
265 UPB_INLINE bool xds_annotations_v3_has_file_migrate(const struct google_protobuf_FileOptions* msg) {
266 return _upb_Message_Getext(msg, &xds_annotations_v3_file_migrate_ext) != NULL;
267 }
268 UPB_INLINE void xds_annotations_v3_clear_file_migrate(struct google_protobuf_FileOptions* msg) {
269 _upb_Message_Clearext(msg, &xds_annotations_v3_file_migrate_ext);
270 }
271 UPB_INLINE const xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_file_migrate(const struct google_protobuf_FileOptions* msg) {
272 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &xds_annotations_v3_file_migrate_ext);
273 UPB_ASSERT(ext);
274 return *UPB_PTR_AT(&ext->data, 0, const xds_annotations_v3_FileMigrateAnnotation*);
275 }
276 UPB_INLINE void xds_annotations_v3_set_file_migrate(struct google_protobuf_FileOptions* msg, const xds_annotations_v3_FileMigrateAnnotation* ext, upb_Arena* arena) {
277 const upb_Message_Extension* msg_ext =
278 _upb_Message_GetOrCreateExtension(msg, &xds_annotations_v3_file_migrate_ext, arena);
279 UPB_ASSERT(msg_ext);
280 *UPB_PTR_AT(&msg_ext->data, 0, const xds_annotations_v3_FileMigrateAnnotation*) = ext;
281 }
282 extern const upb_MiniTable_File xds_annotations_v3_migrate_proto_upb_file_layout;
283
284 #ifdef __cplusplus
285 } /* extern "C" */
286 #endif
287
288 #include "upb/port_undef.inc"
289
290 #endif /* XDS_ANNOTATIONS_V3_MIGRATE_PROTO_UPB_H_ */