1 /* This file was generated by upb_generator from the input file:
2 *
3 * xds/annotations/v3/migrate.proto
4 *
5 * Do not edit -- your changes will be discarded when the file is
6 * regenerated. */
7
8 #ifndef XDS_ANNOTATIONS_V3_MIGRATE_PROTO_UPB_H_
9 #define XDS_ANNOTATIONS_V3_MIGRATE_PROTO_UPB_H_
10
11 #include "upb/generated_code_support.h"
12
13 #include "xds/annotations/v3/migrate.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 typedef struct xds_annotations_v3_MigrateAnnotation { upb_Message UPB_PRIVATE(base); } xds_annotations_v3_MigrateAnnotation;
25 typedef struct xds_annotations_v3_FieldMigrateAnnotation { upb_Message UPB_PRIVATE(base); } xds_annotations_v3_FieldMigrateAnnotation;
26 typedef struct xds_annotations_v3_FileMigrateAnnotation { upb_Message UPB_PRIVATE(base); } xds_annotations_v3_FileMigrateAnnotation;
27 struct google_protobuf_EnumOptions;
28 struct google_protobuf_EnumValueOptions;
29 struct google_protobuf_FieldOptions;
30 struct google_protobuf_FileOptions;
31 struct google_protobuf_MessageOptions;
32
33
34
35 /* xds.annotations.v3.MigrateAnnotation */
36
xds_annotations_v3_MigrateAnnotation_new(upb_Arena * arena)37 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_new(upb_Arena* arena) {
38 return (xds_annotations_v3_MigrateAnnotation*)_upb_Message_New(&xds__annotations__v3__MigrateAnnotation_msg_init, arena);
39 }
xds_annotations_v3_MigrateAnnotation_parse(const char * buf,size_t size,upb_Arena * arena)40 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
41 xds_annotations_v3_MigrateAnnotation* ret = xds_annotations_v3_MigrateAnnotation_new(arena);
42 if (!ret) return NULL;
43 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__MigrateAnnotation_msg_init, NULL, 0, arena) !=
44 kUpb_DecodeStatus_Ok) {
45 return NULL;
46 }
47 return ret;
48 }
xds_annotations_v3_MigrateAnnotation_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)49 UPB_INLINE xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_MigrateAnnotation_parse_ex(const char* buf, size_t size,
50 const upb_ExtensionRegistry* extreg,
51 int options, upb_Arena* arena) {
52 xds_annotations_v3_MigrateAnnotation* ret = xds_annotations_v3_MigrateAnnotation_new(arena);
53 if (!ret) return NULL;
54 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__MigrateAnnotation_msg_init, extreg, options,
55 arena) != kUpb_DecodeStatus_Ok) {
56 return NULL;
57 }
58 return ret;
59 }
xds_annotations_v3_MigrateAnnotation_serialize(const xds_annotations_v3_MigrateAnnotation * msg,upb_Arena * arena,size_t * len)60 UPB_INLINE char* xds_annotations_v3_MigrateAnnotation_serialize(const xds_annotations_v3_MigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
61 char* ptr;
62 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__MigrateAnnotation_msg_init, 0, arena, &ptr, len);
63 return ptr;
64 }
xds_annotations_v3_MigrateAnnotation_serialize_ex(const xds_annotations_v3_MigrateAnnotation * msg,int options,upb_Arena * arena,size_t * len)65 UPB_INLINE char* xds_annotations_v3_MigrateAnnotation_serialize_ex(const xds_annotations_v3_MigrateAnnotation* msg, int options,
66 upb_Arena* arena, size_t* len) {
67 char* ptr;
68 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__MigrateAnnotation_msg_init, options, arena, &ptr, len);
69 return ptr;
70 }
xds_annotations_v3_MigrateAnnotation_clear_rename(xds_annotations_v3_MigrateAnnotation * msg)71 UPB_INLINE void xds_annotations_v3_MigrateAnnotation_clear_rename(xds_annotations_v3_MigrateAnnotation* msg) {
72 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
73 upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
74 }
xds_annotations_v3_MigrateAnnotation_rename(const xds_annotations_v3_MigrateAnnotation * msg)75 UPB_INLINE upb_StringView xds_annotations_v3_MigrateAnnotation_rename(const xds_annotations_v3_MigrateAnnotation* msg) {
76 upb_StringView default_val = upb_StringView_FromString("");
77 upb_StringView ret;
78 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
79 _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
80 &default_val, &ret);
81 return ret;
82 }
83
xds_annotations_v3_MigrateAnnotation_set_rename(xds_annotations_v3_MigrateAnnotation * msg,upb_StringView value)84 UPB_INLINE void xds_annotations_v3_MigrateAnnotation_set_rename(xds_annotations_v3_MigrateAnnotation *msg, upb_StringView value) {
85 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
86 _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
87 }
88
89 /* xds.annotations.v3.FieldMigrateAnnotation */
90
xds_annotations_v3_FieldMigrateAnnotation_new(upb_Arena * arena)91 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_new(upb_Arena* arena) {
92 return (xds_annotations_v3_FieldMigrateAnnotation*)_upb_Message_New(&xds__annotations__v3__FieldMigrateAnnotation_msg_init, arena);
93 }
xds_annotations_v3_FieldMigrateAnnotation_parse(const char * buf,size_t size,upb_Arena * arena)94 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
95 xds_annotations_v3_FieldMigrateAnnotation* ret = xds_annotations_v3_FieldMigrateAnnotation_new(arena);
96 if (!ret) return NULL;
97 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__FieldMigrateAnnotation_msg_init, NULL, 0, arena) !=
98 kUpb_DecodeStatus_Ok) {
99 return NULL;
100 }
101 return ret;
102 }
xds_annotations_v3_FieldMigrateAnnotation_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)103 UPB_INLINE xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_FieldMigrateAnnotation_parse_ex(const char* buf, size_t size,
104 const upb_ExtensionRegistry* extreg,
105 int options, upb_Arena* arena) {
106 xds_annotations_v3_FieldMigrateAnnotation* ret = xds_annotations_v3_FieldMigrateAnnotation_new(arena);
107 if (!ret) return NULL;
108 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__FieldMigrateAnnotation_msg_init, extreg, options,
109 arena) != kUpb_DecodeStatus_Ok) {
110 return NULL;
111 }
112 return ret;
113 }
xds_annotations_v3_FieldMigrateAnnotation_serialize(const xds_annotations_v3_FieldMigrateAnnotation * msg,upb_Arena * arena,size_t * len)114 UPB_INLINE char* xds_annotations_v3_FieldMigrateAnnotation_serialize(const xds_annotations_v3_FieldMigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
115 char* ptr;
116 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__FieldMigrateAnnotation_msg_init, 0, arena, &ptr, len);
117 return ptr;
118 }
xds_annotations_v3_FieldMigrateAnnotation_serialize_ex(const xds_annotations_v3_FieldMigrateAnnotation * msg,int options,upb_Arena * arena,size_t * len)119 UPB_INLINE char* xds_annotations_v3_FieldMigrateAnnotation_serialize_ex(const xds_annotations_v3_FieldMigrateAnnotation* msg, int options,
120 upb_Arena* arena, size_t* len) {
121 char* ptr;
122 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__FieldMigrateAnnotation_msg_init, options, arena, &ptr, len);
123 return ptr;
124 }
xds_annotations_v3_FieldMigrateAnnotation_clear_rename(xds_annotations_v3_FieldMigrateAnnotation * msg)125 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_clear_rename(xds_annotations_v3_FieldMigrateAnnotation* msg) {
126 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
127 upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
128 }
xds_annotations_v3_FieldMigrateAnnotation_rename(const xds_annotations_v3_FieldMigrateAnnotation * msg)129 UPB_INLINE upb_StringView xds_annotations_v3_FieldMigrateAnnotation_rename(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
130 upb_StringView default_val = upb_StringView_FromString("");
131 upb_StringView ret;
132 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
133 _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
134 &default_val, &ret);
135 return ret;
136 }
xds_annotations_v3_FieldMigrateAnnotation_clear_oneof_promotion(xds_annotations_v3_FieldMigrateAnnotation * msg)137 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_clear_oneof_promotion(xds_annotations_v3_FieldMigrateAnnotation* msg) {
138 const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
139 upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
140 }
xds_annotations_v3_FieldMigrateAnnotation_oneof_promotion(const xds_annotations_v3_FieldMigrateAnnotation * msg)141 UPB_INLINE upb_StringView xds_annotations_v3_FieldMigrateAnnotation_oneof_promotion(const xds_annotations_v3_FieldMigrateAnnotation* msg) {
142 upb_StringView default_val = upb_StringView_FromString("");
143 upb_StringView ret;
144 const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
145 _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
146 &default_val, &ret);
147 return ret;
148 }
149
xds_annotations_v3_FieldMigrateAnnotation_set_rename(xds_annotations_v3_FieldMigrateAnnotation * msg,upb_StringView value)150 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_set_rename(xds_annotations_v3_FieldMigrateAnnotation *msg, upb_StringView value) {
151 const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
152 _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
153 }
xds_annotations_v3_FieldMigrateAnnotation_set_oneof_promotion(xds_annotations_v3_FieldMigrateAnnotation * msg,upb_StringView value)154 UPB_INLINE void xds_annotations_v3_FieldMigrateAnnotation_set_oneof_promotion(xds_annotations_v3_FieldMigrateAnnotation *msg, upb_StringView value) {
155 const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
156 _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
157 }
158
159 /* xds.annotations.v3.FileMigrateAnnotation */
160
xds_annotations_v3_FileMigrateAnnotation_new(upb_Arena * arena)161 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_new(upb_Arena* arena) {
162 return (xds_annotations_v3_FileMigrateAnnotation*)_upb_Message_New(&xds__annotations__v3__FileMigrateAnnotation_msg_init, arena);
163 }
xds_annotations_v3_FileMigrateAnnotation_parse(const char * buf,size_t size,upb_Arena * arena)164 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
165 xds_annotations_v3_FileMigrateAnnotation* ret = xds_annotations_v3_FileMigrateAnnotation_new(arena);
166 if (!ret) return NULL;
167 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__FileMigrateAnnotation_msg_init, NULL, 0, arena) !=
168 kUpb_DecodeStatus_Ok) {
169 return NULL;
170 }
171 return ret;
172 }
xds_annotations_v3_FileMigrateAnnotation_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)173 UPB_INLINE xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_FileMigrateAnnotation_parse_ex(const char* buf, size_t size,
174 const upb_ExtensionRegistry* extreg,
175 int options, upb_Arena* arena) {
176 xds_annotations_v3_FileMigrateAnnotation* ret = xds_annotations_v3_FileMigrateAnnotation_new(arena);
177 if (!ret) return NULL;
178 if (upb_Decode(buf, size, UPB_UPCAST(ret), &xds__annotations__v3__FileMigrateAnnotation_msg_init, extreg, options,
179 arena) != kUpb_DecodeStatus_Ok) {
180 return NULL;
181 }
182 return ret;
183 }
xds_annotations_v3_FileMigrateAnnotation_serialize(const xds_annotations_v3_FileMigrateAnnotation * msg,upb_Arena * arena,size_t * len)184 UPB_INLINE char* xds_annotations_v3_FileMigrateAnnotation_serialize(const xds_annotations_v3_FileMigrateAnnotation* msg, upb_Arena* arena, size_t* len) {
185 char* ptr;
186 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__FileMigrateAnnotation_msg_init, 0, arena, &ptr, len);
187 return ptr;
188 }
xds_annotations_v3_FileMigrateAnnotation_serialize_ex(const xds_annotations_v3_FileMigrateAnnotation * msg,int options,upb_Arena * arena,size_t * len)189 UPB_INLINE char* xds_annotations_v3_FileMigrateAnnotation_serialize_ex(const xds_annotations_v3_FileMigrateAnnotation* msg, int options,
190 upb_Arena* arena, size_t* len) {
191 char* ptr;
192 (void)upb_Encode(UPB_UPCAST(msg), &xds__annotations__v3__FileMigrateAnnotation_msg_init, options, arena, &ptr, len);
193 return ptr;
194 }
xds_annotations_v3_FileMigrateAnnotation_clear_move_to_package(xds_annotations_v3_FileMigrateAnnotation * msg)195 UPB_INLINE void xds_annotations_v3_FileMigrateAnnotation_clear_move_to_package(xds_annotations_v3_FileMigrateAnnotation* msg) {
196 const upb_MiniTableField field = {2, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
197 upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
198 }
xds_annotations_v3_FileMigrateAnnotation_move_to_package(const xds_annotations_v3_FileMigrateAnnotation * msg)199 UPB_INLINE upb_StringView xds_annotations_v3_FileMigrateAnnotation_move_to_package(const xds_annotations_v3_FileMigrateAnnotation* msg) {
200 upb_StringView default_val = upb_StringView_FromString("");
201 upb_StringView ret;
202 const upb_MiniTableField field = {2, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
203 _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
204 &default_val, &ret);
205 return ret;
206 }
207
xds_annotations_v3_FileMigrateAnnotation_set_move_to_package(xds_annotations_v3_FileMigrateAnnotation * msg,upb_StringView value)208 UPB_INLINE void xds_annotations_v3_FileMigrateAnnotation_set_move_to_package(xds_annotations_v3_FileMigrateAnnotation *msg, upb_StringView value) {
209 const upb_MiniTableField field = {2, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
210 _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
211 }
212
xds_annotations_v3_has_message_migrate(const struct google_protobuf_MessageOptions * msg)213 UPB_INLINE bool xds_annotations_v3_has_message_migrate(const struct google_protobuf_MessageOptions* msg) {
214 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_message_migrate_ext);
215 }
xds_annotations_v3_clear_message_migrate(struct google_protobuf_MessageOptions * msg)216 UPB_INLINE void xds_annotations_v3_clear_message_migrate(struct google_protobuf_MessageOptions* msg) {
217 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_message_migrate_ext);
218 }
xds_annotations_v3_message_migrate(const struct google_protobuf_MessageOptions * msg)219 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_message_migrate(const struct google_protobuf_MessageOptions* msg) {
220 const upb_MiniTableExtension* ext = &xds_annotations_v3_message_migrate_ext;
221 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
222 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
223 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
224 const xds_annotations_v3_MigrateAnnotation* default_val = NULL;
225 const xds_annotations_v3_MigrateAnnotation* ret;
226 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
227 return ret;
228 }
xds_annotations_v3_set_message_migrate(struct google_protobuf_MessageOptions * msg,const xds_annotations_v3_MigrateAnnotation * val,upb_Arena * arena)229 UPB_INLINE void xds_annotations_v3_set_message_migrate(struct google_protobuf_MessageOptions* msg, const xds_annotations_v3_MigrateAnnotation* val, upb_Arena* arena) {
230 const upb_MiniTableExtension* ext = &xds_annotations_v3_message_migrate_ext;
231 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
232 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
233 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
234 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
235 UPB_ASSERT(ok);
236 }
xds_annotations_v3_has_field_migrate(const struct google_protobuf_FieldOptions * msg)237 UPB_INLINE bool xds_annotations_v3_has_field_migrate(const struct google_protobuf_FieldOptions* msg) {
238 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_field_migrate_ext);
239 }
xds_annotations_v3_clear_field_migrate(struct google_protobuf_FieldOptions * msg)240 UPB_INLINE void xds_annotations_v3_clear_field_migrate(struct google_protobuf_FieldOptions* msg) {
241 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_field_migrate_ext);
242 }
xds_annotations_v3_field_migrate(const struct google_protobuf_FieldOptions * msg)243 UPB_INLINE const xds_annotations_v3_FieldMigrateAnnotation* xds_annotations_v3_field_migrate(const struct google_protobuf_FieldOptions* msg) {
244 const upb_MiniTableExtension* ext = &xds_annotations_v3_field_migrate_ext;
245 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
246 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
247 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
248 const xds_annotations_v3_FieldMigrateAnnotation* default_val = NULL;
249 const xds_annotations_v3_FieldMigrateAnnotation* ret;
250 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
251 return ret;
252 }
xds_annotations_v3_set_field_migrate(struct google_protobuf_FieldOptions * msg,const xds_annotations_v3_FieldMigrateAnnotation * val,upb_Arena * arena)253 UPB_INLINE void xds_annotations_v3_set_field_migrate(struct google_protobuf_FieldOptions* msg, const xds_annotations_v3_FieldMigrateAnnotation* val, upb_Arena* arena) {
254 const upb_MiniTableExtension* ext = &xds_annotations_v3_field_migrate_ext;
255 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
256 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
257 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
258 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
259 UPB_ASSERT(ok);
260 }
xds_annotations_v3_has_enum_migrate(const struct google_protobuf_EnumOptions * msg)261 UPB_INLINE bool xds_annotations_v3_has_enum_migrate(const struct google_protobuf_EnumOptions* msg) {
262 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_enum_migrate_ext);
263 }
xds_annotations_v3_clear_enum_migrate(struct google_protobuf_EnumOptions * msg)264 UPB_INLINE void xds_annotations_v3_clear_enum_migrate(struct google_protobuf_EnumOptions* msg) {
265 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_enum_migrate_ext);
266 }
xds_annotations_v3_enum_migrate(const struct google_protobuf_EnumOptions * msg)267 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_enum_migrate(const struct google_protobuf_EnumOptions* msg) {
268 const upb_MiniTableExtension* ext = &xds_annotations_v3_enum_migrate_ext;
269 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
270 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
271 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
272 const xds_annotations_v3_MigrateAnnotation* default_val = NULL;
273 const xds_annotations_v3_MigrateAnnotation* ret;
274 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
275 return ret;
276 }
xds_annotations_v3_set_enum_migrate(struct google_protobuf_EnumOptions * msg,const xds_annotations_v3_MigrateAnnotation * val,upb_Arena * arena)277 UPB_INLINE void xds_annotations_v3_set_enum_migrate(struct google_protobuf_EnumOptions* msg, const xds_annotations_v3_MigrateAnnotation* val, upb_Arena* arena) {
278 const upb_MiniTableExtension* ext = &xds_annotations_v3_enum_migrate_ext;
279 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
280 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
281 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
282 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
283 UPB_ASSERT(ok);
284 }
xds_annotations_v3_has_enum_value_migrate(const struct google_protobuf_EnumValueOptions * msg)285 UPB_INLINE bool xds_annotations_v3_has_enum_value_migrate(const struct google_protobuf_EnumValueOptions* msg) {
286 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_enum_value_migrate_ext);
287 }
xds_annotations_v3_clear_enum_value_migrate(struct google_protobuf_EnumValueOptions * msg)288 UPB_INLINE void xds_annotations_v3_clear_enum_value_migrate(struct google_protobuf_EnumValueOptions* msg) {
289 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_enum_value_migrate_ext);
290 }
xds_annotations_v3_enum_value_migrate(const struct google_protobuf_EnumValueOptions * msg)291 UPB_INLINE const xds_annotations_v3_MigrateAnnotation* xds_annotations_v3_enum_value_migrate(const struct google_protobuf_EnumValueOptions* msg) {
292 const upb_MiniTableExtension* ext = &xds_annotations_v3_enum_value_migrate_ext;
293 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
294 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
295 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
296 const xds_annotations_v3_MigrateAnnotation* default_val = NULL;
297 const xds_annotations_v3_MigrateAnnotation* ret;
298 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
299 return ret;
300 }
xds_annotations_v3_set_enum_value_migrate(struct google_protobuf_EnumValueOptions * msg,const xds_annotations_v3_MigrateAnnotation * val,upb_Arena * arena)301 UPB_INLINE void xds_annotations_v3_set_enum_value_migrate(struct google_protobuf_EnumValueOptions* msg, const xds_annotations_v3_MigrateAnnotation* val, upb_Arena* arena) {
302 const upb_MiniTableExtension* ext = &xds_annotations_v3_enum_value_migrate_ext;
303 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
304 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
305 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
306 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
307 UPB_ASSERT(ok);
308 }
xds_annotations_v3_has_file_migrate(const struct google_protobuf_FileOptions * msg)309 UPB_INLINE bool xds_annotations_v3_has_file_migrate(const struct google_protobuf_FileOptions* msg) {
310 return upb_Message_HasExtension((upb_Message*)msg, &xds_annotations_v3_file_migrate_ext);
311 }
xds_annotations_v3_clear_file_migrate(struct google_protobuf_FileOptions * msg)312 UPB_INLINE void xds_annotations_v3_clear_file_migrate(struct google_protobuf_FileOptions* msg) {
313 upb_Message_ClearExtension((upb_Message*)msg, &xds_annotations_v3_file_migrate_ext);
314 }
xds_annotations_v3_file_migrate(const struct google_protobuf_FileOptions * msg)315 UPB_INLINE const xds_annotations_v3_FileMigrateAnnotation* xds_annotations_v3_file_migrate(const struct google_protobuf_FileOptions* msg) {
316 const upb_MiniTableExtension* ext = &xds_annotations_v3_file_migrate_ext;
317 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
318 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
319 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
320 const xds_annotations_v3_FileMigrateAnnotation* default_val = NULL;
321 const xds_annotations_v3_FileMigrateAnnotation* ret;
322 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
323 return ret;
324 }
xds_annotations_v3_set_file_migrate(struct google_protobuf_FileOptions * msg,const xds_annotations_v3_FileMigrateAnnotation * val,upb_Arena * arena)325 UPB_INLINE void xds_annotations_v3_set_file_migrate(struct google_protobuf_FileOptions* msg, const xds_annotations_v3_FileMigrateAnnotation* val, upb_Arena* arena) {
326 const upb_MiniTableExtension* ext = &xds_annotations_v3_file_migrate_ext;
327 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
328 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
329 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
330 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
331 UPB_ASSERT(ok);
332 }
333 #ifdef __cplusplus
334 } /* extern "C" */
335 #endif
336
337 #include "upb/port/undef.inc"
338
339 #endif /* XDS_ANNOTATIONS_V3_MIGRATE_PROTO_UPB_H_ */
340