| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* google/api/expr/v1alpha1/checked.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef GOOGLE_API_EXPR_V1ALPHA1_CHECKED_PROTO_UPB_H_ |
| 10 |
#define GOOGLE_API_EXPR_V1ALPHA1_CHECKED_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 google_api_expr_v1alpha1_CheckedExpr; |
| 24 |
struct google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry; |
| 25 |
struct google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry; |
| 26 |
struct google_api_expr_v1alpha1_Type; |
| 27 |
struct google_api_expr_v1alpha1_Type_ListType; |
| 28 |
struct google_api_expr_v1alpha1_Type_MapType; |
| 29 |
struct google_api_expr_v1alpha1_Type_FunctionType; |
| 30 |
struct google_api_expr_v1alpha1_Type_AbstractType; |
| 31 |
struct google_api_expr_v1alpha1_Decl; |
| 32 |
struct google_api_expr_v1alpha1_Decl_IdentDecl; |
| 33 |
struct google_api_expr_v1alpha1_Decl_FunctionDecl; |
| 34 |
struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload; |
| 35 |
struct google_api_expr_v1alpha1_Reference; |
| 36 |
typedef struct google_api_expr_v1alpha1_CheckedExpr google_api_expr_v1alpha1_CheckedExpr; |
| 37 |
typedef struct google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry; |
| 38 |
typedef struct google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry; |
| 39 |
typedef struct google_api_expr_v1alpha1_Type google_api_expr_v1alpha1_Type; |
| 40 |
typedef struct google_api_expr_v1alpha1_Type_ListType google_api_expr_v1alpha1_Type_ListType; |
| 41 |
typedef struct google_api_expr_v1alpha1_Type_MapType google_api_expr_v1alpha1_Type_MapType; |
| 42 |
typedef struct google_api_expr_v1alpha1_Type_FunctionType google_api_expr_v1alpha1_Type_FunctionType; |
| 43 |
typedef struct google_api_expr_v1alpha1_Type_AbstractType google_api_expr_v1alpha1_Type_AbstractType; |
| 44 |
typedef struct google_api_expr_v1alpha1_Decl google_api_expr_v1alpha1_Decl; |
| 45 |
typedef struct google_api_expr_v1alpha1_Decl_IdentDecl google_api_expr_v1alpha1_Decl_IdentDecl; |
| 46 |
typedef struct google_api_expr_v1alpha1_Decl_FunctionDecl google_api_expr_v1alpha1_Decl_FunctionDecl; |
| 47 |
typedef struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload google_api_expr_v1alpha1_Decl_FunctionDecl_Overload; |
| 48 |
typedef struct google_api_expr_v1alpha1_Reference google_api_expr_v1alpha1_Reference; |
| 49 |
extern const upb_MiniTable google_api_expr_v1alpha1_CheckedExpr_msginit; |
| 50 |
extern const upb_MiniTable google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_msginit; |
| 51 |
extern const upb_MiniTable google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_msginit; |
| 52 |
extern const upb_MiniTable google_api_expr_v1alpha1_Type_msginit; |
| 53 |
extern const upb_MiniTable google_api_expr_v1alpha1_Type_ListType_msginit; |
| 54 |
extern const upb_MiniTable google_api_expr_v1alpha1_Type_MapType_msginit; |
| 55 |
extern const upb_MiniTable google_api_expr_v1alpha1_Type_FunctionType_msginit; |
| 56 |
extern const upb_MiniTable google_api_expr_v1alpha1_Type_AbstractType_msginit; |
| 57 |
extern const upb_MiniTable google_api_expr_v1alpha1_Decl_msginit; |
| 58 |
extern const upb_MiniTable google_api_expr_v1alpha1_Decl_IdentDecl_msginit; |
| 59 |
extern const upb_MiniTable google_api_expr_v1alpha1_Decl_FunctionDecl_msginit; |
| 60 |
extern const upb_MiniTable google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit; |
| 61 |
extern const upb_MiniTable google_api_expr_v1alpha1_Reference_msginit; |
| 62 |
struct google_api_expr_v1alpha1_Constant; |
| 63 |
struct google_api_expr_v1alpha1_Expr; |
| 64 |
struct google_api_expr_v1alpha1_SourceInfo; |
| 65 |
struct google_protobuf_Empty; |
| 66 |
extern const upb_MiniTable google_api_expr_v1alpha1_Constant_msginit; |
| 67 |
extern const upb_MiniTable google_api_expr_v1alpha1_Expr_msginit; |
| 68 |
extern const upb_MiniTable google_api_expr_v1alpha1_SourceInfo_msginit; |
| 69 |
extern const upb_MiniTable google_protobuf_Empty_msginit; |
| 70 |
|
| 71 |
typedef enum { |
| 72 |
google_api_expr_v1alpha1_Type_PRIMITIVE_TYPE_UNSPECIFIED = 0, |
| 73 |
google_api_expr_v1alpha1_Type_BOOL = 1, |
| 74 |
google_api_expr_v1alpha1_Type_INT64 = 2, |
| 75 |
google_api_expr_v1alpha1_Type_UINT64 = 3, |
| 76 |
google_api_expr_v1alpha1_Type_DOUBLE = 4, |
| 77 |
google_api_expr_v1alpha1_Type_STRING = 5, |
| 78 |
google_api_expr_v1alpha1_Type_BYTES = 6 |
| 79 |
} google_api_expr_v1alpha1_Type_PrimitiveType; |
| 80 |
|
| 81 |
typedef enum { |
| 82 |
google_api_expr_v1alpha1_Type_WELL_KNOWN_TYPE_UNSPECIFIED = 0, |
| 83 |
google_api_expr_v1alpha1_Type_ANY = 1, |
| 84 |
google_api_expr_v1alpha1_Type_TIMESTAMP = 2, |
| 85 |
google_api_expr_v1alpha1_Type_DURATION = 3 |
| 86 |
} google_api_expr_v1alpha1_Type_WellKnownType; |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
/* google.api.expr.v1alpha1.CheckedExpr */ |
| 91 |
|
| 92 |
UPB_INLINE google_api_expr_v1alpha1_CheckedExpr* google_api_expr_v1alpha1_CheckedExpr_new(upb_Arena* arena) { |
| 93 |
return (google_api_expr_v1alpha1_CheckedExpr*)_upb_Message_New(&google_api_expr_v1alpha1_CheckedExpr_msginit, arena); |
| 94 |
} |
| 95 |
UPB_INLINE google_api_expr_v1alpha1_CheckedExpr* google_api_expr_v1alpha1_CheckedExpr_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 96 |
google_api_expr_v1alpha1_CheckedExpr* ret = google_api_expr_v1alpha1_CheckedExpr_new(arena); |
| 97 |
if (!ret) return NULL; |
| 98 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 99 |
return NULL; |
| 100 |
} |
| 101 |
return ret; |
| 102 |
} |
| 103 |
UPB_INLINE google_api_expr_v1alpha1_CheckedExpr* google_api_expr_v1alpha1_CheckedExpr_parse_ex(const char* buf, size_t size, |
| 104 |
const upb_ExtensionRegistry* extreg, |
| 105 |
int options, upb_Arena* arena) { |
| 106 |
google_api_expr_v1alpha1_CheckedExpr* ret = google_api_expr_v1alpha1_CheckedExpr_new(arena); |
| 107 |
if (!ret) return NULL; |
| 108 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, extreg, options, arena) != |
| 109 |
kUpb_DecodeStatus_Ok) { |
| 110 |
return NULL; |
| 111 |
} |
| 112 |
return ret; |
| 113 |
} |
| 114 |
UPB_INLINE char* google_api_expr_v1alpha1_CheckedExpr_serialize(const google_api_expr_v1alpha1_CheckedExpr* msg, upb_Arena* arena, size_t* len) { |
| 115 |
char* ptr; |
| 116 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_CheckedExpr_msginit, 0, arena, &ptr, len); |
| 117 |
return ptr; |
| 118 |
} |
| 119 |
UPB_INLINE char* google_api_expr_v1alpha1_CheckedExpr_serialize_ex(const google_api_expr_v1alpha1_CheckedExpr* msg, int options, |
| 120 |
upb_Arena* arena, size_t* len) { |
| 121 |
char* ptr; |
| 122 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_CheckedExpr_msginit, options, arena, &ptr, len); |
| 123 |
return ptr; |
| 124 |
} |
| 125 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_reference_map(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 126 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 127 |
} |
| 128 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_clear_reference_map(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 129 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 130 |
} |
| 131 |
UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_reference_map_size(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 132 |
return _upb_msg_map_size(msg, UPB_SIZE(4, 8)); |
| 133 |
} |
| 134 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_get(const google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key, google_api_expr_v1alpha1_Reference** val) { |
| 135 |
return _upb_msg_map_get(msg, UPB_SIZE(4, 8), &key, sizeof(key), val, sizeof(*val)); |
| 136 |
} |
| 137 |
UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_next(const google_api_expr_v1alpha1_CheckedExpr* msg, size_t* iter) { |
| 138 |
return (const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); |
| 139 |
} |
| 140 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_type_map(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 141 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 142 |
} |
| 143 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_clear_type_map(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 144 |
_upb_array_detach(msg, UPB_SIZE(8, 16)); |
| 145 |
} |
| 146 |
UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_type_map_size(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 147 |
return _upb_msg_map_size(msg, UPB_SIZE(8, 16)); |
| 148 |
} |
| 149 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_get(const google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key, google_api_expr_v1alpha1_Type** val) { |
| 150 |
return _upb_msg_map_get(msg, UPB_SIZE(8, 16), &key, sizeof(key), val, sizeof(*val)); |
| 151 |
} |
| 152 |
UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_next(const google_api_expr_v1alpha1_CheckedExpr* msg, size_t* iter) { |
| 153 |
return (const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 16), iter); |
| 154 |
} |
| 155 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_expr(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 156 |
return _upb_hasbit(msg, 1); |
| 157 |
} |
| 158 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_clear_expr(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 159 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; |
| 160 |
} |
| 161 |
UPB_INLINE const struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_expr(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 162 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_api_expr_v1alpha1_Expr*); |
| 163 |
} |
| 164 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_source_info(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 165 |
return _upb_hasbit(msg, 2); |
| 166 |
} |
| 167 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_clear_source_info(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 168 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 169 |
} |
| 170 |
UPB_INLINE const struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_source_info(const google_api_expr_v1alpha1_CheckedExpr* msg) { |
| 171 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_api_expr_v1alpha1_SourceInfo*); |
| 172 |
} |
| 173 |
|
| 174 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_reference_map_clear(google_api_expr_v1alpha1_CheckedExpr* msg) { _upb_msg_map_clear(msg, UPB_SIZE(4, 8)); } |
| 175 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_set(google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key, google_api_expr_v1alpha1_Reference* val, upb_Arena* a) { |
| 176 |
return _upb_msg_map_set(msg, UPB_SIZE(4, 8), &key, sizeof(key), &val, sizeof(val), a); |
| 177 |
} |
| 178 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_delete(google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key) { |
| 179 |
return _upb_msg_map_delete(msg, UPB_SIZE(4, 8), &key, sizeof(key)); |
| 180 |
} |
| 181 |
UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr* msg, size_t* iter) { |
| 182 |
return (google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); |
| 183 |
} |
| 184 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_type_map_clear(google_api_expr_v1alpha1_CheckedExpr* msg) { _upb_msg_map_clear(msg, UPB_SIZE(8, 16)); } |
| 185 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_set(google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key, google_api_expr_v1alpha1_Type* val, upb_Arena* a) { |
| 186 |
return _upb_msg_map_set(msg, UPB_SIZE(8, 16), &key, sizeof(key), &val, sizeof(val), a); |
| 187 |
} |
| 188 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_delete(google_api_expr_v1alpha1_CheckedExpr* msg, int64_t key) { |
| 189 |
return _upb_msg_map_delete(msg, UPB_SIZE(8, 16), &key, sizeof(key)); |
| 190 |
} |
| 191 |
UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr* msg, size_t* iter) { |
| 192 |
return (google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 16), iter); |
| 193 |
} |
| 194 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_expr(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_Expr* value) { |
| 195 |
_upb_sethas(msg, 1); |
| 196 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_api_expr_v1alpha1_Expr*) = value; |
| 197 |
} |
| 198 |
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_mutable_expr(google_api_expr_v1alpha1_CheckedExpr* msg, upb_Arena* arena) { |
| 199 |
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_CheckedExpr_expr(msg); |
| 200 |
if (sub == NULL) { |
| 201 |
sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena); |
| 202 |
if (!sub) return NULL; |
| 203 |
google_api_expr_v1alpha1_CheckedExpr_set_expr(msg, sub); |
| 204 |
} |
| 205 |
return sub; |
| 206 |
} |
| 207 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_source_info(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_SourceInfo* value) { |
| 208 |
_upb_sethas(msg, 2); |
| 209 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_api_expr_v1alpha1_SourceInfo*) = value; |
| 210 |
} |
| 211 |
UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_mutable_source_info(google_api_expr_v1alpha1_CheckedExpr* msg, upb_Arena* arena) { |
| 212 |
struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_CheckedExpr_source_info(msg); |
| 213 |
if (sub == NULL) { |
| 214 |
sub = (struct google_api_expr_v1alpha1_SourceInfo*)_upb_Message_New(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); |
| 215 |
if (!sub) return NULL; |
| 216 |
google_api_expr_v1alpha1_CheckedExpr_set_source_info(msg, sub); |
| 217 |
} |
| 218 |
return sub; |
| 219 |
} |
| 220 |
|
| 221 |
/* google.api.expr.v1alpha1.CheckedExpr.ReferenceMapEntry */ |
| 222 |
|
| 223 |
UPB_INLINE int64_t google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_key(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* msg) { |
| 224 |
int64_t ret; |
| 225 |
_upb_msg_map_key(msg, &ret, sizeof(ret)); |
| 226 |
return ret; |
| 227 |
} |
| 228 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_has_value(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* msg) { |
| 229 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 230 |
} |
| 231 |
UPB_INLINE const google_api_expr_v1alpha1_Reference* google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_value(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* msg) { |
| 232 |
google_api_expr_v1alpha1_Reference* ret; |
| 233 |
_upb_msg_map_value(msg, &ret, sizeof(ret)); |
| 234 |
return ret; |
| 235 |
} |
| 236 |
|
| 237 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_set_value(google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry *msg, google_api_expr_v1alpha1_Reference* value) { |
| 238 |
_upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Reference*)); |
| 239 |
} |
| 240 |
|
| 241 |
/* google.api.expr.v1alpha1.CheckedExpr.TypeMapEntry */ |
| 242 |
|
| 243 |
UPB_INLINE int64_t google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_key(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* msg) { |
| 244 |
int64_t ret; |
| 245 |
_upb_msg_map_key(msg, &ret, sizeof(ret)); |
| 246 |
return ret; |
| 247 |
} |
| 248 |
UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_has_value(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* msg) { |
| 249 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 250 |
} |
| 251 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_value(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* msg) { |
| 252 |
google_api_expr_v1alpha1_Type* ret; |
| 253 |
_upb_msg_map_value(msg, &ret, sizeof(ret)); |
| 254 |
return ret; |
| 255 |
} |
| 256 |
|
| 257 |
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_set_value(google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry *msg, google_api_expr_v1alpha1_Type* value) { |
| 258 |
_upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Type*)); |
| 259 |
} |
| 260 |
|
| 261 |
/* google.api.expr.v1alpha1.Type */ |
| 262 |
|
| 263 |
UPB_INLINE google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_new(upb_Arena* arena) { |
| 264 |
return (google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 265 |
} |
| 266 |
UPB_INLINE google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 267 |
google_api_expr_v1alpha1_Type* ret = google_api_expr_v1alpha1_Type_new(arena); |
| 268 |
if (!ret) return NULL; |
| 269 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 270 |
return NULL; |
| 271 |
} |
| 272 |
return ret; |
| 273 |
} |
| 274 |
UPB_INLINE google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_parse_ex(const char* buf, size_t size, |
| 275 |
const upb_ExtensionRegistry* extreg, |
| 276 |
int options, upb_Arena* arena) { |
| 277 |
google_api_expr_v1alpha1_Type* ret = google_api_expr_v1alpha1_Type_new(arena); |
| 278 |
if (!ret) return NULL; |
| 279 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, extreg, options, arena) != |
| 280 |
kUpb_DecodeStatus_Ok) { |
| 281 |
return NULL; |
| 282 |
} |
| 283 |
return ret; |
| 284 |
} |
| 285 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_serialize(const google_api_expr_v1alpha1_Type* msg, upb_Arena* arena, size_t* len) { |
| 286 |
char* ptr; |
| 287 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_msginit, 0, arena, &ptr, len); |
| 288 |
return ptr; |
| 289 |
} |
| 290 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_serialize_ex(const google_api_expr_v1alpha1_Type* msg, int options, |
| 291 |
upb_Arena* arena, size_t* len) { |
| 292 |
char* ptr; |
| 293 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_msginit, options, arena, &ptr, len); |
| 294 |
return ptr; |
| 295 |
} |
| 296 |
typedef enum { |
| 297 |
google_api_expr_v1alpha1_Type_type_kind_dyn = 1, |
| 298 |
google_api_expr_v1alpha1_Type_type_kind_null = 2, |
| 299 |
google_api_expr_v1alpha1_Type_type_kind_primitive = 3, |
| 300 |
google_api_expr_v1alpha1_Type_type_kind_wrapper = 4, |
| 301 |
google_api_expr_v1alpha1_Type_type_kind_well_known = 5, |
| 302 |
google_api_expr_v1alpha1_Type_type_kind_list_type = 6, |
| 303 |
google_api_expr_v1alpha1_Type_type_kind_map_type = 7, |
| 304 |
google_api_expr_v1alpha1_Type_type_kind_function = 8, |
| 305 |
google_api_expr_v1alpha1_Type_type_kind_message_type = 9, |
| 306 |
google_api_expr_v1alpha1_Type_type_kind_type_param = 10, |
| 307 |
google_api_expr_v1alpha1_Type_type_kind_type = 11, |
| 308 |
google_api_expr_v1alpha1_Type_type_kind_error = 12, |
| 309 |
google_api_expr_v1alpha1_Type_type_kind_abstract_type = 14, |
| 310 |
google_api_expr_v1alpha1_Type_type_kind_NOT_SET = 0 |
| 311 |
} google_api_expr_v1alpha1_Type_type_kind_oneofcases; |
| 312 |
UPB_INLINE google_api_expr_v1alpha1_Type_type_kind_oneofcases google_api_expr_v1alpha1_Type_type_kind_case(const google_api_expr_v1alpha1_Type* msg) { |
| 313 |
return (google_api_expr_v1alpha1_Type_type_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 314 |
} |
| 315 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_dyn(const google_api_expr_v1alpha1_Type* msg) { |
| 316 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1; |
| 317 |
} |
| 318 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_dyn(const google_api_expr_v1alpha1_Type* msg) { |
| 319 |
UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 320 |
} |
| 321 |
UPB_INLINE const struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_dyn(const google_api_expr_v1alpha1_Type* msg) { |
| 322 |
return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, NULL); |
| 323 |
} |
| 324 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_null(const google_api_expr_v1alpha1_Type* msg) { |
| 325 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2; |
| 326 |
} |
| 327 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_null(const google_api_expr_v1alpha1_Type* msg) { |
| 328 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 329 |
} |
| 330 |
UPB_INLINE int32_t google_api_expr_v1alpha1_Type_null(const google_api_expr_v1alpha1_Type* msg) { |
| 331 |
return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, 0); |
| 332 |
} |
| 333 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_primitive(const google_api_expr_v1alpha1_Type* msg) { |
| 334 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3; |
| 335 |
} |
| 336 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_primitive(const google_api_expr_v1alpha1_Type* msg) { |
| 337 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 338 |
} |
| 339 |
UPB_INLINE int32_t google_api_expr_v1alpha1_Type_primitive(const google_api_expr_v1alpha1_Type* msg) { |
| 340 |
return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, 0); |
| 341 |
} |
| 342 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_wrapper(const google_api_expr_v1alpha1_Type* msg) { |
| 343 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 4; |
| 344 |
} |
| 345 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_wrapper(const google_api_expr_v1alpha1_Type* msg) { |
| 346 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 347 |
} |
| 348 |
UPB_INLINE int32_t google_api_expr_v1alpha1_Type_wrapper(const google_api_expr_v1alpha1_Type* msg) { |
| 349 |
return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 4, 0); |
| 350 |
} |
| 351 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_well_known(const google_api_expr_v1alpha1_Type* msg) { |
| 352 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 5; |
| 353 |
} |
| 354 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_well_known(const google_api_expr_v1alpha1_Type* msg) { |
| 355 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 356 |
} |
| 357 |
UPB_INLINE int32_t google_api_expr_v1alpha1_Type_well_known(const google_api_expr_v1alpha1_Type* msg) { |
| 358 |
return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 5, 0); |
| 359 |
} |
| 360 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_list_type(const google_api_expr_v1alpha1_Type* msg) { |
| 361 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 6; |
| 362 |
} |
| 363 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_list_type(const google_api_expr_v1alpha1_Type* msg) { |
| 364 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_ListType*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 365 |
} |
| 366 |
UPB_INLINE const google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_list_type(const google_api_expr_v1alpha1_Type* msg) { |
| 367 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_ListType*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 6, NULL); |
| 368 |
} |
| 369 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_map_type(const google_api_expr_v1alpha1_Type* msg) { |
| 370 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 7; |
| 371 |
} |
| 372 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_map_type(const google_api_expr_v1alpha1_Type* msg) { |
| 373 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_MapType*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 374 |
} |
| 375 |
UPB_INLINE const google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_map_type(const google_api_expr_v1alpha1_Type* msg) { |
| 376 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_MapType*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 7, NULL); |
| 377 |
} |
| 378 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_function(const google_api_expr_v1alpha1_Type* msg) { |
| 379 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 8; |
| 380 |
} |
| 381 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_function(const google_api_expr_v1alpha1_Type* msg) { |
| 382 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_FunctionType*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 383 |
} |
| 384 |
UPB_INLINE const google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_function(const google_api_expr_v1alpha1_Type* msg) { |
| 385 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_FunctionType*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 8, NULL); |
| 386 |
} |
| 387 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_message_type(const google_api_expr_v1alpha1_Type* msg) { |
| 388 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 9; |
| 389 |
} |
| 390 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_message_type(const google_api_expr_v1alpha1_Type* msg) { |
| 391 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 392 |
} |
| 393 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Type_message_type(const google_api_expr_v1alpha1_Type* msg) { |
| 394 |
return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 9, upb_StringView_FromString("")); |
| 395 |
} |
| 396 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_type_param(const google_api_expr_v1alpha1_Type* msg) { |
| 397 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 10; |
| 398 |
} |
| 399 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_type_param(const google_api_expr_v1alpha1_Type* msg) { |
| 400 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 401 |
} |
| 402 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Type_type_param(const google_api_expr_v1alpha1_Type* msg) { |
| 403 |
return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 10, upb_StringView_FromString("")); |
| 404 |
} |
| 405 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_type(const google_api_expr_v1alpha1_Type* msg) { |
| 406 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 11; |
| 407 |
} |
| 408 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_type(const google_api_expr_v1alpha1_Type* msg) { |
| 409 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 410 |
} |
| 411 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_type(const google_api_expr_v1alpha1_Type* msg) { |
| 412 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 11, NULL); |
| 413 |
} |
| 414 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_error(const google_api_expr_v1alpha1_Type* msg) { |
| 415 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 12; |
| 416 |
} |
| 417 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_error(const google_api_expr_v1alpha1_Type* msg) { |
| 418 |
UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 419 |
} |
| 420 |
UPB_INLINE const struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_error(const google_api_expr_v1alpha1_Type* msg) { |
| 421 |
return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 12, NULL); |
| 422 |
} |
| 423 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_has_abstract_type(const google_api_expr_v1alpha1_Type* msg) { |
| 424 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 14; |
| 425 |
} |
| 426 |
UPB_INLINE void google_api_expr_v1alpha1_Type_clear_abstract_type(const google_api_expr_v1alpha1_Type* msg) { |
| 427 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_AbstractType*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type_type_kind_NOT_SET); |
| 428 |
} |
| 429 |
UPB_INLINE const google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_abstract_type(const google_api_expr_v1alpha1_Type* msg) { |
| 430 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_AbstractType*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 14, NULL); |
| 431 |
} |
| 432 |
|
| 433 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_dyn(google_api_expr_v1alpha1_Type *msg, struct google_protobuf_Empty* value) { |
| 434 |
UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1); |
| 435 |
} |
| 436 |
UPB_INLINE struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_mutable_dyn(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 437 |
struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)google_api_expr_v1alpha1_Type_dyn(msg); |
| 438 |
if (sub == NULL) { |
| 439 |
sub = (struct google_protobuf_Empty*)_upb_Message_New(&google_protobuf_Empty_msginit, arena); |
| 440 |
if (!sub) return NULL; |
| 441 |
google_api_expr_v1alpha1_Type_set_dyn(msg, sub); |
| 442 |
} |
| 443 |
return sub; |
| 444 |
} |
| 445 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_null(google_api_expr_v1alpha1_Type *msg, int32_t value) { |
| 446 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2); |
| 447 |
} |
| 448 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_primitive(google_api_expr_v1alpha1_Type *msg, int32_t value) { |
| 449 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3); |
| 450 |
} |
| 451 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_wrapper(google_api_expr_v1alpha1_Type *msg, int32_t value) { |
| 452 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 4); |
| 453 |
} |
| 454 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_well_known(google_api_expr_v1alpha1_Type *msg, int32_t value) { |
| 455 |
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 5); |
| 456 |
} |
| 457 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_list_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_ListType* value) { |
| 458 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_ListType*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 6); |
| 459 |
} |
| 460 |
UPB_INLINE struct google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_mutable_list_type(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 461 |
struct google_api_expr_v1alpha1_Type_ListType* sub = (struct google_api_expr_v1alpha1_Type_ListType*)google_api_expr_v1alpha1_Type_list_type(msg); |
| 462 |
if (sub == NULL) { |
| 463 |
sub = (struct google_api_expr_v1alpha1_Type_ListType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_ListType_msginit, arena); |
| 464 |
if (!sub) return NULL; |
| 465 |
google_api_expr_v1alpha1_Type_set_list_type(msg, sub); |
| 466 |
} |
| 467 |
return sub; |
| 468 |
} |
| 469 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_map_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_MapType* value) { |
| 470 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_MapType*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 7); |
| 471 |
} |
| 472 |
UPB_INLINE struct google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_mutable_map_type(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 473 |
struct google_api_expr_v1alpha1_Type_MapType* sub = (struct google_api_expr_v1alpha1_Type_MapType*)google_api_expr_v1alpha1_Type_map_type(msg); |
| 474 |
if (sub == NULL) { |
| 475 |
sub = (struct google_api_expr_v1alpha1_Type_MapType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_MapType_msginit, arena); |
| 476 |
if (!sub) return NULL; |
| 477 |
google_api_expr_v1alpha1_Type_set_map_type(msg, sub); |
| 478 |
} |
| 479 |
return sub; |
| 480 |
} |
| 481 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_function(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_FunctionType* value) { |
| 482 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_FunctionType*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 8); |
| 483 |
} |
| 484 |
UPB_INLINE struct google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_mutable_function(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 485 |
struct google_api_expr_v1alpha1_Type_FunctionType* sub = (struct google_api_expr_v1alpha1_Type_FunctionType*)google_api_expr_v1alpha1_Type_function(msg); |
| 486 |
if (sub == NULL) { |
| 487 |
sub = (struct google_api_expr_v1alpha1_Type_FunctionType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_FunctionType_msginit, arena); |
| 488 |
if (!sub) return NULL; |
| 489 |
google_api_expr_v1alpha1_Type_set_function(msg, sub); |
| 490 |
} |
| 491 |
return sub; |
| 492 |
} |
| 493 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_message_type(google_api_expr_v1alpha1_Type *msg, upb_StringView value) { |
| 494 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 9); |
| 495 |
} |
| 496 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_type_param(google_api_expr_v1alpha1_Type *msg, upb_StringView value) { |
| 497 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 10); |
| 498 |
} |
| 499 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type* value) { |
| 500 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 11); |
| 501 |
} |
| 502 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_mutable_type(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 503 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_type(msg); |
| 504 |
if (sub == NULL) { |
| 505 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 506 |
if (!sub) return NULL; |
| 507 |
google_api_expr_v1alpha1_Type_set_type(msg, sub); |
| 508 |
} |
| 509 |
return sub; |
| 510 |
} |
| 511 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_error(google_api_expr_v1alpha1_Type *msg, struct google_protobuf_Empty* value) { |
| 512 |
UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 12); |
| 513 |
} |
| 514 |
UPB_INLINE struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_mutable_error(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 515 |
struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)google_api_expr_v1alpha1_Type_error(msg); |
| 516 |
if (sub == NULL) { |
| 517 |
sub = (struct google_protobuf_Empty*)_upb_Message_New(&google_protobuf_Empty_msginit, arena); |
| 518 |
if (!sub) return NULL; |
| 519 |
google_api_expr_v1alpha1_Type_set_error(msg, sub); |
| 520 |
} |
| 521 |
return sub; |
| 522 |
} |
| 523 |
UPB_INLINE void google_api_expr_v1alpha1_Type_set_abstract_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_AbstractType* value) { |
| 524 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_AbstractType*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 14); |
| 525 |
} |
| 526 |
UPB_INLINE struct google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_mutable_abstract_type(google_api_expr_v1alpha1_Type* msg, upb_Arena* arena) { |
| 527 |
struct google_api_expr_v1alpha1_Type_AbstractType* sub = (struct google_api_expr_v1alpha1_Type_AbstractType*)google_api_expr_v1alpha1_Type_abstract_type(msg); |
| 528 |
if (sub == NULL) { |
| 529 |
sub = (struct google_api_expr_v1alpha1_Type_AbstractType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_AbstractType_msginit, arena); |
| 530 |
if (!sub) return NULL; |
| 531 |
google_api_expr_v1alpha1_Type_set_abstract_type(msg, sub); |
| 532 |
} |
| 533 |
return sub; |
| 534 |
} |
| 535 |
|
| 536 |
/* google.api.expr.v1alpha1.Type.ListType */ |
| 537 |
|
| 538 |
UPB_INLINE google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_ListType_new(upb_Arena* arena) { |
| 539 |
return (google_api_expr_v1alpha1_Type_ListType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_ListType_msginit, arena); |
| 540 |
} |
| 541 |
UPB_INLINE google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_ListType_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 542 |
google_api_expr_v1alpha1_Type_ListType* ret = google_api_expr_v1alpha1_Type_ListType_new(arena); |
| 543 |
if (!ret) return NULL; |
| 544 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 545 |
return NULL; |
| 546 |
} |
| 547 |
return ret; |
| 548 |
} |
| 549 |
UPB_INLINE google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_ListType_parse_ex(const char* buf, size_t size, |
| 550 |
const upb_ExtensionRegistry* extreg, |
| 551 |
int options, upb_Arena* arena) { |
| 552 |
google_api_expr_v1alpha1_Type_ListType* ret = google_api_expr_v1alpha1_Type_ListType_new(arena); |
| 553 |
if (!ret) return NULL; |
| 554 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, extreg, options, arena) != |
| 555 |
kUpb_DecodeStatus_Ok) { |
| 556 |
return NULL; |
| 557 |
} |
| 558 |
return ret; |
| 559 |
} |
| 560 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_ListType_serialize(const google_api_expr_v1alpha1_Type_ListType* msg, upb_Arena* arena, size_t* len) { |
| 561 |
char* ptr; |
| 562 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_ListType_msginit, 0, arena, &ptr, len); |
| 563 |
return ptr; |
| 564 |
} |
| 565 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_ListType_serialize_ex(const google_api_expr_v1alpha1_Type_ListType* msg, int options, |
| 566 |
upb_Arena* arena, size_t* len) { |
| 567 |
char* ptr; |
| 568 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_ListType_msginit, options, arena, &ptr, len); |
| 569 |
return ptr; |
| 570 |
} |
| 571 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_ListType_has_elem_type(const google_api_expr_v1alpha1_Type_ListType* msg) { |
| 572 |
return _upb_hasbit(msg, 1); |
| 573 |
} |
| 574 |
UPB_INLINE void google_api_expr_v1alpha1_Type_ListType_clear_elem_type(const google_api_expr_v1alpha1_Type_ListType* msg) { |
| 575 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 576 |
} |
| 577 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_elem_type(const google_api_expr_v1alpha1_Type_ListType* msg) { |
| 578 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); |
| 579 |
} |
| 580 |
|
| 581 |
UPB_INLINE void google_api_expr_v1alpha1_Type_ListType_set_elem_type(google_api_expr_v1alpha1_Type_ListType *msg, google_api_expr_v1alpha1_Type* value) { |
| 582 |
_upb_sethas(msg, 1); |
| 583 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value; |
| 584 |
} |
| 585 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_mutable_elem_type(google_api_expr_v1alpha1_Type_ListType* msg, upb_Arena* arena) { |
| 586 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_ListType_elem_type(msg); |
| 587 |
if (sub == NULL) { |
| 588 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 589 |
if (!sub) return NULL; |
| 590 |
google_api_expr_v1alpha1_Type_ListType_set_elem_type(msg, sub); |
| 591 |
} |
| 592 |
return sub; |
| 593 |
} |
| 594 |
|
| 595 |
/* google.api.expr.v1alpha1.Type.MapType */ |
| 596 |
|
| 597 |
UPB_INLINE google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_MapType_new(upb_Arena* arena) { |
| 598 |
return (google_api_expr_v1alpha1_Type_MapType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_MapType_msginit, arena); |
| 599 |
} |
| 600 |
UPB_INLINE google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_MapType_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 601 |
google_api_expr_v1alpha1_Type_MapType* ret = google_api_expr_v1alpha1_Type_MapType_new(arena); |
| 602 |
if (!ret) return NULL; |
| 603 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 604 |
return NULL; |
| 605 |
} |
| 606 |
return ret; |
| 607 |
} |
| 608 |
UPB_INLINE google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_MapType_parse_ex(const char* buf, size_t size, |
| 609 |
const upb_ExtensionRegistry* extreg, |
| 610 |
int options, upb_Arena* arena) { |
| 611 |
google_api_expr_v1alpha1_Type_MapType* ret = google_api_expr_v1alpha1_Type_MapType_new(arena); |
| 612 |
if (!ret) return NULL; |
| 613 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, extreg, options, arena) != |
| 614 |
kUpb_DecodeStatus_Ok) { |
| 615 |
return NULL; |
| 616 |
} |
| 617 |
return ret; |
| 618 |
} |
| 619 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_MapType_serialize(const google_api_expr_v1alpha1_Type_MapType* msg, upb_Arena* arena, size_t* len) { |
| 620 |
char* ptr; |
| 621 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_MapType_msginit, 0, arena, &ptr, len); |
| 622 |
return ptr; |
| 623 |
} |
| 624 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_MapType_serialize_ex(const google_api_expr_v1alpha1_Type_MapType* msg, int options, |
| 625 |
upb_Arena* arena, size_t* len) { |
| 626 |
char* ptr; |
| 627 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_MapType_msginit, options, arena, &ptr, len); |
| 628 |
return ptr; |
| 629 |
} |
| 630 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_key_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 631 |
return _upb_hasbit(msg, 1); |
| 632 |
} |
| 633 |
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_clear_key_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 634 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 635 |
} |
| 636 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_key_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 637 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); |
| 638 |
} |
| 639 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_value_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 640 |
return _upb_hasbit(msg, 2); |
| 641 |
} |
| 642 |
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_clear_value_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 643 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL; |
| 644 |
} |
| 645 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_value_type(const google_api_expr_v1alpha1_Type_MapType* msg) { |
| 646 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Type*); |
| 647 |
} |
| 648 |
|
| 649 |
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_key_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) { |
| 650 |
_upb_sethas(msg, 1); |
| 651 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value; |
| 652 |
} |
| 653 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_key_type(google_api_expr_v1alpha1_Type_MapType* msg, upb_Arena* arena) { |
| 654 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_key_type(msg); |
| 655 |
if (sub == NULL) { |
| 656 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 657 |
if (!sub) return NULL; |
| 658 |
google_api_expr_v1alpha1_Type_MapType_set_key_type(msg, sub); |
| 659 |
} |
| 660 |
return sub; |
| 661 |
} |
| 662 |
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_value_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) { |
| 663 |
_upb_sethas(msg, 2); |
| 664 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Type*) = value; |
| 665 |
} |
| 666 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_value_type(google_api_expr_v1alpha1_Type_MapType* msg, upb_Arena* arena) { |
| 667 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_value_type(msg); |
| 668 |
if (sub == NULL) { |
| 669 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 670 |
if (!sub) return NULL; |
| 671 |
google_api_expr_v1alpha1_Type_MapType_set_value_type(msg, sub); |
| 672 |
} |
| 673 |
return sub; |
| 674 |
} |
| 675 |
|
| 676 |
/* google.api.expr.v1alpha1.Type.FunctionType */ |
| 677 |
|
| 678 |
UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_FunctionType_new(upb_Arena* arena) { |
| 679 |
return (google_api_expr_v1alpha1_Type_FunctionType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_FunctionType_msginit, arena); |
| 680 |
} |
| 681 |
UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_FunctionType_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 682 |
google_api_expr_v1alpha1_Type_FunctionType* ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena); |
| 683 |
if (!ret) return NULL; |
| 684 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 685 |
return NULL; |
| 686 |
} |
| 687 |
return ret; |
| 688 |
} |
| 689 |
UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_FunctionType_parse_ex(const char* buf, size_t size, |
| 690 |
const upb_ExtensionRegistry* extreg, |
| 691 |
int options, upb_Arena* arena) { |
| 692 |
google_api_expr_v1alpha1_Type_FunctionType* ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena); |
| 693 |
if (!ret) return NULL; |
| 694 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, extreg, options, arena) != |
| 695 |
kUpb_DecodeStatus_Ok) { |
| 696 |
return NULL; |
| 697 |
} |
| 698 |
return ret; |
| 699 |
} |
| 700 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_FunctionType_serialize(const google_api_expr_v1alpha1_Type_FunctionType* msg, upb_Arena* arena, size_t* len) { |
| 701 |
char* ptr; |
| 702 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_FunctionType_msginit, 0, arena, &ptr, len); |
| 703 |
return ptr; |
| 704 |
} |
| 705 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_FunctionType_serialize_ex(const google_api_expr_v1alpha1_Type_FunctionType* msg, int options, |
| 706 |
upb_Arena* arena, size_t* len) { |
| 707 |
char* ptr; |
| 708 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_FunctionType_msginit, options, arena, &ptr, len); |
| 709 |
return ptr; |
| 710 |
} |
| 711 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_result_type(const google_api_expr_v1alpha1_Type_FunctionType* msg) { |
| 712 |
return _upb_hasbit(msg, 1); |
| 713 |
} |
| 714 |
UPB_INLINE void google_api_expr_v1alpha1_Type_FunctionType_clear_result_type(const google_api_expr_v1alpha1_Type_FunctionType* msg) { |
| 715 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 716 |
} |
| 717 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_result_type(const google_api_expr_v1alpha1_Type_FunctionType* msg) { |
| 718 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); |
| 719 |
} |
| 720 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_arg_types(const google_api_expr_v1alpha1_Type_FunctionType* msg) { |
| 721 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 722 |
} |
| 723 |
UPB_INLINE void google_api_expr_v1alpha1_Type_FunctionType_clear_arg_types(const google_api_expr_v1alpha1_Type_FunctionType* msg) { |
| 724 |
_upb_array_detach(msg, UPB_SIZE(8, 16)); |
| 725 |
} |
| 726 |
UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_FunctionType_arg_types(const google_api_expr_v1alpha1_Type_FunctionType* msg, size_t* len) { |
| 727 |
return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); |
| 728 |
} |
| 729 |
|
| 730 |
UPB_INLINE void google_api_expr_v1alpha1_Type_FunctionType_set_result_type(google_api_expr_v1alpha1_Type_FunctionType *msg, google_api_expr_v1alpha1_Type* value) { |
| 731 |
_upb_sethas(msg, 1); |
| 732 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value; |
| 733 |
} |
| 734 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_mutable_result_type(google_api_expr_v1alpha1_Type_FunctionType* msg, upb_Arena* arena) { |
| 735 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_FunctionType_result_type(msg); |
| 736 |
if (sub == NULL) { |
| 737 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 738 |
if (!sub) return NULL; |
| 739 |
google_api_expr_v1alpha1_Type_FunctionType_set_result_type(msg, sub); |
| 740 |
} |
| 741 |
return sub; |
| 742 |
} |
| 743 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_mutable_arg_types(google_api_expr_v1alpha1_Type_FunctionType* msg, size_t* len) { |
| 744 |
return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
| 745 |
} |
| 746 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_resize_arg_types(google_api_expr_v1alpha1_Type_FunctionType* msg, size_t len, upb_Arena* arena) { |
| 747 |
return (google_api_expr_v1alpha1_Type**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); |
| 748 |
} |
| 749 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_add_arg_types(google_api_expr_v1alpha1_Type_FunctionType* msg, upb_Arena* arena) { |
| 750 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 751 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); |
| 752 |
if (!ok) return NULL; |
| 753 |
return sub; |
| 754 |
} |
| 755 |
|
| 756 |
/* google.api.expr.v1alpha1.Type.AbstractType */ |
| 757 |
|
| 758 |
UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_AbstractType_new(upb_Arena* arena) { |
| 759 |
return (google_api_expr_v1alpha1_Type_AbstractType*)_upb_Message_New(&google_api_expr_v1alpha1_Type_AbstractType_msginit, arena); |
| 760 |
} |
| 761 |
UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_AbstractType_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 762 |
google_api_expr_v1alpha1_Type_AbstractType* ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena); |
| 763 |
if (!ret) return NULL; |
| 764 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 765 |
return NULL; |
| 766 |
} |
| 767 |
return ret; |
| 768 |
} |
| 769 |
UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_AbstractType_parse_ex(const char* buf, size_t size, |
| 770 |
const upb_ExtensionRegistry* extreg, |
| 771 |
int options, upb_Arena* arena) { |
| 772 |
google_api_expr_v1alpha1_Type_AbstractType* ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena); |
| 773 |
if (!ret) return NULL; |
| 774 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, extreg, options, arena) != |
| 775 |
kUpb_DecodeStatus_Ok) { |
| 776 |
return NULL; |
| 777 |
} |
| 778 |
return ret; |
| 779 |
} |
| 780 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_AbstractType_serialize(const google_api_expr_v1alpha1_Type_AbstractType* msg, upb_Arena* arena, size_t* len) { |
| 781 |
char* ptr; |
| 782 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_AbstractType_msginit, 0, arena, &ptr, len); |
| 783 |
return ptr; |
| 784 |
} |
| 785 |
UPB_INLINE char* google_api_expr_v1alpha1_Type_AbstractType_serialize_ex(const google_api_expr_v1alpha1_Type_AbstractType* msg, int options, |
| 786 |
upb_Arena* arena, size_t* len) { |
| 787 |
char* ptr; |
| 788 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Type_AbstractType_msginit, options, arena, &ptr, len); |
| 789 |
return ptr; |
| 790 |
} |
| 791 |
UPB_INLINE void google_api_expr_v1alpha1_Type_AbstractType_clear_name(const google_api_expr_v1alpha1_Type_AbstractType* msg) { |
| 792 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 793 |
} |
| 794 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Type_AbstractType_name(const google_api_expr_v1alpha1_Type_AbstractType* msg) { |
| 795 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); |
| 796 |
} |
| 797 |
UPB_INLINE bool google_api_expr_v1alpha1_Type_AbstractType_has_parameter_types(const google_api_expr_v1alpha1_Type_AbstractType* msg) { |
| 798 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 799 |
} |
| 800 |
UPB_INLINE void google_api_expr_v1alpha1_Type_AbstractType_clear_parameter_types(const google_api_expr_v1alpha1_Type_AbstractType* msg) { |
| 801 |
_upb_array_detach(msg, UPB_SIZE(8, 16)); |
| 802 |
} |
| 803 |
UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_AbstractType_parameter_types(const google_api_expr_v1alpha1_Type_AbstractType* msg, size_t* len) { |
| 804 |
return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); |
| 805 |
} |
| 806 |
|
| 807 |
UPB_INLINE void google_api_expr_v1alpha1_Type_AbstractType_set_name(google_api_expr_v1alpha1_Type_AbstractType *msg, upb_StringView value) { |
| 808 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; |
| 809 |
} |
| 810 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_AbstractType_mutable_parameter_types(google_api_expr_v1alpha1_Type_AbstractType* msg, size_t* len) { |
| 811 |
return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
| 812 |
} |
| 813 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_AbstractType_resize_parameter_types(google_api_expr_v1alpha1_Type_AbstractType* msg, size_t len, upb_Arena* arena) { |
| 814 |
return (google_api_expr_v1alpha1_Type**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); |
| 815 |
} |
| 816 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_AbstractType_add_parameter_types(google_api_expr_v1alpha1_Type_AbstractType* msg, upb_Arena* arena) { |
| 817 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 818 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); |
| 819 |
if (!ok) return NULL; |
| 820 |
return sub; |
| 821 |
} |
| 822 |
|
| 823 |
/* google.api.expr.v1alpha1.Decl */ |
| 824 |
|
| 825 |
UPB_INLINE google_api_expr_v1alpha1_Decl* google_api_expr_v1alpha1_Decl_new(upb_Arena* arena) { |
| 826 |
return (google_api_expr_v1alpha1_Decl*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_msginit, arena); |
| 827 |
} |
| 828 |
UPB_INLINE google_api_expr_v1alpha1_Decl* google_api_expr_v1alpha1_Decl_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 829 |
google_api_expr_v1alpha1_Decl* ret = google_api_expr_v1alpha1_Decl_new(arena); |
| 830 |
if (!ret) return NULL; |
| 831 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 832 |
return NULL; |
| 833 |
} |
| 834 |
return ret; |
| 835 |
} |
| 836 |
UPB_INLINE google_api_expr_v1alpha1_Decl* google_api_expr_v1alpha1_Decl_parse_ex(const char* buf, size_t size, |
| 837 |
const upb_ExtensionRegistry* extreg, |
| 838 |
int options, upb_Arena* arena) { |
| 839 |
google_api_expr_v1alpha1_Decl* ret = google_api_expr_v1alpha1_Decl_new(arena); |
| 840 |
if (!ret) return NULL; |
| 841 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, extreg, options, arena) != |
| 842 |
kUpb_DecodeStatus_Ok) { |
| 843 |
return NULL; |
| 844 |
} |
| 845 |
return ret; |
| 846 |
} |
| 847 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_serialize(const google_api_expr_v1alpha1_Decl* msg, upb_Arena* arena, size_t* len) { |
| 848 |
char* ptr; |
| 849 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_msginit, 0, arena, &ptr, len); |
| 850 |
return ptr; |
| 851 |
} |
| 852 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_serialize_ex(const google_api_expr_v1alpha1_Decl* msg, int options, |
| 853 |
upb_Arena* arena, size_t* len) { |
| 854 |
char* ptr; |
| 855 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_msginit, options, arena, &ptr, len); |
| 856 |
return ptr; |
| 857 |
} |
| 858 |
typedef enum { |
| 859 |
google_api_expr_v1alpha1_Decl_decl_kind_ident = 2, |
| 860 |
google_api_expr_v1alpha1_Decl_decl_kind_function = 3, |
| 861 |
google_api_expr_v1alpha1_Decl_decl_kind_NOT_SET = 0 |
| 862 |
} google_api_expr_v1alpha1_Decl_decl_kind_oneofcases; |
| 863 |
UPB_INLINE google_api_expr_v1alpha1_Decl_decl_kind_oneofcases google_api_expr_v1alpha1_Decl_decl_kind_case(const google_api_expr_v1alpha1_Decl* msg) { |
| 864 |
return (google_api_expr_v1alpha1_Decl_decl_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 865 |
} |
| 866 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_clear_name(const google_api_expr_v1alpha1_Decl* msg) { |
| 867 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 868 |
} |
| 869 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Decl_name(const google_api_expr_v1alpha1_Decl* msg) { |
| 870 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 871 |
} |
| 872 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_has_ident(const google_api_expr_v1alpha1_Decl* msg) { |
| 873 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2; |
| 874 |
} |
| 875 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_clear_ident(const google_api_expr_v1alpha1_Decl* msg) { |
| 876 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_IdentDecl*, UPB_SIZE(12, 24), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Decl_decl_kind_NOT_SET); |
| 877 |
} |
| 878 |
UPB_INLINE const google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_ident(const google_api_expr_v1alpha1_Decl* msg) { |
| 879 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Decl_IdentDecl*, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 2, NULL); |
| 880 |
} |
| 881 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_has_function(const google_api_expr_v1alpha1_Decl* msg) { |
| 882 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3; |
| 883 |
} |
| 884 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_clear_function(const google_api_expr_v1alpha1_Decl* msg) { |
| 885 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_FunctionDecl*, UPB_SIZE(12, 24), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Decl_decl_kind_NOT_SET); |
| 886 |
} |
| 887 |
UPB_INLINE const google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_function(const google_api_expr_v1alpha1_Decl* msg) { |
| 888 |
return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Decl_FunctionDecl*, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 3, NULL); |
| 889 |
} |
| 890 |
|
| 891 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_set_name(google_api_expr_v1alpha1_Decl *msg, upb_StringView value) { |
| 892 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 893 |
} |
| 894 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_set_ident(google_api_expr_v1alpha1_Decl *msg, google_api_expr_v1alpha1_Decl_IdentDecl* value) { |
| 895 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_IdentDecl*, UPB_SIZE(12, 24), value, UPB_SIZE(0, 0), 2); |
| 896 |
} |
| 897 |
UPB_INLINE struct google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_mutable_ident(google_api_expr_v1alpha1_Decl* msg, upb_Arena* arena) { |
| 898 |
struct google_api_expr_v1alpha1_Decl_IdentDecl* sub = (struct google_api_expr_v1alpha1_Decl_IdentDecl*)google_api_expr_v1alpha1_Decl_ident(msg); |
| 899 |
if (sub == NULL) { |
| 900 |
sub = (struct google_api_expr_v1alpha1_Decl_IdentDecl*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena); |
| 901 |
if (!sub) return NULL; |
| 902 |
google_api_expr_v1alpha1_Decl_set_ident(msg, sub); |
| 903 |
} |
| 904 |
return sub; |
| 905 |
} |
| 906 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_set_function(google_api_expr_v1alpha1_Decl *msg, google_api_expr_v1alpha1_Decl_FunctionDecl* value) { |
| 907 |
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_FunctionDecl*, UPB_SIZE(12, 24), value, UPB_SIZE(0, 0), 3); |
| 908 |
} |
| 909 |
UPB_INLINE struct google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_mutable_function(google_api_expr_v1alpha1_Decl* msg, upb_Arena* arena) { |
| 910 |
struct google_api_expr_v1alpha1_Decl_FunctionDecl* sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl*)google_api_expr_v1alpha1_Decl_function(msg); |
| 911 |
if (sub == NULL) { |
| 912 |
sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena); |
| 913 |
if (!sub) return NULL; |
| 914 |
google_api_expr_v1alpha1_Decl_set_function(msg, sub); |
| 915 |
} |
| 916 |
return sub; |
| 917 |
} |
| 918 |
|
| 919 |
/* google.api.expr.v1alpha1.Decl.IdentDecl */ |
| 920 |
|
| 921 |
UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_IdentDecl_new(upb_Arena* arena) { |
| 922 |
return (google_api_expr_v1alpha1_Decl_IdentDecl*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena); |
| 923 |
} |
| 924 |
UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_IdentDecl_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 925 |
google_api_expr_v1alpha1_Decl_IdentDecl* ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena); |
| 926 |
if (!ret) return NULL; |
| 927 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 928 |
return NULL; |
| 929 |
} |
| 930 |
return ret; |
| 931 |
} |
| 932 |
UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_IdentDecl_parse_ex(const char* buf, size_t size, |
| 933 |
const upb_ExtensionRegistry* extreg, |
| 934 |
int options, upb_Arena* arena) { |
| 935 |
google_api_expr_v1alpha1_Decl_IdentDecl* ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena); |
| 936 |
if (!ret) return NULL; |
| 937 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, extreg, options, arena) != |
| 938 |
kUpb_DecodeStatus_Ok) { |
| 939 |
return NULL; |
| 940 |
} |
| 941 |
return ret; |
| 942 |
} |
| 943 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_IdentDecl_serialize(const google_api_expr_v1alpha1_Decl_IdentDecl* msg, upb_Arena* arena, size_t* len) { |
| 944 |
char* ptr; |
| 945 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, 0, arena, &ptr, len); |
| 946 |
return ptr; |
| 947 |
} |
| 948 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_IdentDecl_serialize_ex(const google_api_expr_v1alpha1_Decl_IdentDecl* msg, int options, |
| 949 |
upb_Arena* arena, size_t* len) { |
| 950 |
char* ptr; |
| 951 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, options, arena, &ptr, len); |
| 952 |
return ptr; |
| 953 |
} |
| 954 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_type(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 955 |
return _upb_hasbit(msg, 1); |
| 956 |
} |
| 957 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_clear_type(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 958 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 959 |
} |
| 960 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_type(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 961 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); |
| 962 |
} |
| 963 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_value(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 964 |
return _upb_hasbit(msg, 2); |
| 965 |
} |
| 966 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_clear_value(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 967 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL; |
| 968 |
} |
| 969 |
UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_value(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 970 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_Constant*); |
| 971 |
} |
| 972 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_clear_doc(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 973 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 974 |
} |
| 975 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Decl_IdentDecl_doc(const google_api_expr_v1alpha1_Decl_IdentDecl* msg) { |
| 976 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); |
| 977 |
} |
| 978 |
|
| 979 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_type(google_api_expr_v1alpha1_Decl_IdentDecl *msg, google_api_expr_v1alpha1_Type* value) { |
| 980 |
_upb_sethas(msg, 1); |
| 981 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value; |
| 982 |
} |
| 983 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_type(google_api_expr_v1alpha1_Decl_IdentDecl* msg, upb_Arena* arena) { |
| 984 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Decl_IdentDecl_type(msg); |
| 985 |
if (sub == NULL) { |
| 986 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 987 |
if (!sub) return NULL; |
| 988 |
google_api_expr_v1alpha1_Decl_IdentDecl_set_type(msg, sub); |
| 989 |
} |
| 990 |
return sub; |
| 991 |
} |
| 992 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_value(google_api_expr_v1alpha1_Decl_IdentDecl *msg, struct google_api_expr_v1alpha1_Constant* value) { |
| 993 |
_upb_sethas(msg, 2); |
| 994 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_Constant*) = value; |
| 995 |
} |
| 996 |
UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_value(google_api_expr_v1alpha1_Decl_IdentDecl* msg, upb_Arena* arena) { |
| 997 |
struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Decl_IdentDecl_value(msg); |
| 998 |
if (sub == NULL) { |
| 999 |
sub = (struct google_api_expr_v1alpha1_Constant*)_upb_Message_New(&google_api_expr_v1alpha1_Constant_msginit, arena); |
| 1000 |
if (!sub) return NULL; |
| 1001 |
google_api_expr_v1alpha1_Decl_IdentDecl_set_value(msg, sub); |
| 1002 |
} |
| 1003 |
return sub; |
| 1004 |
} |
| 1005 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_doc(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_StringView value) { |
| 1006 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; |
| 1007 |
} |
| 1008 |
|
| 1009 |
/* google.api.expr.v1alpha1.Decl.FunctionDecl */ |
| 1010 |
|
| 1011 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_FunctionDecl_new(upb_Arena* arena) { |
| 1012 |
return (google_api_expr_v1alpha1_Decl_FunctionDecl*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena); |
| 1013 |
} |
| 1014 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_FunctionDecl_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1015 |
google_api_expr_v1alpha1_Decl_FunctionDecl* ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena); |
| 1016 |
if (!ret) return NULL; |
| 1017 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1018 |
return NULL; |
| 1019 |
} |
| 1020 |
return ret; |
| 1021 |
} |
| 1022 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_FunctionDecl_parse_ex(const char* buf, size_t size, |
| 1023 |
const upb_ExtensionRegistry* extreg, |
| 1024 |
int options, upb_Arena* arena) { |
| 1025 |
google_api_expr_v1alpha1_Decl_FunctionDecl* ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena); |
| 1026 |
if (!ret) return NULL; |
| 1027 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, extreg, options, arena) != |
| 1028 |
kUpb_DecodeStatus_Ok) { |
| 1029 |
return NULL; |
| 1030 |
} |
| 1031 |
return ret; |
| 1032 |
} |
| 1033 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_FunctionDecl_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl* msg, upb_Arena* arena, size_t* len) { |
| 1034 |
char* ptr; |
| 1035 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, 0, arena, &ptr, len); |
| 1036 |
return ptr; |
| 1037 |
} |
| 1038 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_FunctionDecl_serialize_ex(const google_api_expr_v1alpha1_Decl_FunctionDecl* msg, int options, |
| 1039 |
upb_Arena* arena, size_t* len) { |
| 1040 |
char* ptr; |
| 1041 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, options, arena, &ptr, len); |
| 1042 |
return ptr; |
| 1043 |
} |
| 1044 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_has_overloads(const google_api_expr_v1alpha1_Decl_FunctionDecl* msg) { |
| 1045 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 1046 |
} |
| 1047 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_clear_overloads(const google_api_expr_v1alpha1_Decl_FunctionDecl* msg) { |
| 1048 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 1049 |
} |
| 1050 |
UPB_INLINE const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* const* google_api_expr_v1alpha1_Decl_FunctionDecl_overloads(const google_api_expr_v1alpha1_Decl_FunctionDecl* msg, size_t* len) { |
| 1051 |
return (const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 1052 |
} |
| 1053 |
|
| 1054 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr_v1alpha1_Decl_FunctionDecl_mutable_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl* msg, size_t* len) { |
| 1055 |
return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 1056 |
} |
| 1057 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr_v1alpha1_Decl_FunctionDecl_resize_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl* msg, size_t len, upb_Arena* arena) { |
| 1058 |
return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 1059 |
} |
| 1060 |
UPB_INLINE struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_add_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl* msg, upb_Arena* arena) { |
| 1061 |
struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena); |
| 1062 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 1063 |
if (!ok) return NULL; |
| 1064 |
return sub; |
| 1065 |
} |
| 1066 |
|
| 1067 |
/* google.api.expr.v1alpha1.Decl.FunctionDecl.Overload */ |
| 1068 |
|
| 1069 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(upb_Arena* arena) { |
| 1070 |
return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload*)_upb_Message_New(&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena); |
| 1071 |
} |
| 1072 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1073 |
google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena); |
| 1074 |
if (!ret) return NULL; |
| 1075 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1076 |
return NULL; |
| 1077 |
} |
| 1078 |
return ret; |
| 1079 |
} |
| 1080 |
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_parse_ex(const char* buf, size_t size, |
| 1081 |
const upb_ExtensionRegistry* extreg, |
| 1082 |
int options, upb_Arena* arena) { |
| 1083 |
google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena); |
| 1084 |
if (!ret) return NULL; |
| 1085 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, extreg, options, arena) != |
| 1086 |
kUpb_DecodeStatus_Ok) { |
| 1087 |
return NULL; |
| 1088 |
} |
| 1089 |
return ret; |
| 1090 |
} |
| 1091 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, upb_Arena* arena, size_t* len) { |
| 1092 |
char* ptr; |
| 1093 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, 0, arena, &ptr, len); |
| 1094 |
return ptr; |
| 1095 |
} |
| 1096 |
UPB_INLINE char* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_serialize_ex(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, int options, |
| 1097 |
upb_Arena* arena, size_t* len) { |
| 1098 |
char* ptr; |
| 1099 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, options, arena, &ptr, len); |
| 1100 |
return ptr; |
| 1101 |
} |
| 1102 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_overload_id(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1103 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1104 |
} |
| 1105 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_overload_id(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1106 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1107 |
} |
| 1108 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1109 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); |
| 1110 |
} |
| 1111 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1112 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 1113 |
} |
| 1114 |
UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t* len) { |
| 1115 |
return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 1116 |
} |
| 1117 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_type_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1118 |
_upb_array_detach(msg, UPB_SIZE(16, 32)); |
| 1119 |
} |
| 1120 |
UPB_INLINE upb_StringView const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_type_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t* len) { |
| 1121 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); |
| 1122 |
} |
| 1123 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1124 |
return _upb_hasbit(msg, 1); |
| 1125 |
} |
| 1126 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1127 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), const upb_Message*) = NULL; |
| 1128 |
} |
| 1129 |
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1130 |
return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Type*); |
| 1131 |
} |
| 1132 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_is_instance_function(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1133 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 1134 |
} |
| 1135 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_is_instance_function(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1136 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 1137 |
} |
| 1138 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_clear_doc(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1139 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1140 |
} |
| 1141 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_doc(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg) { |
| 1142 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView); |
| 1143 |
} |
| 1144 |
|
| 1145 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_overload_id(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_StringView value) { |
| 1146 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1147 |
} |
| 1148 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t* len) { |
| 1149 |
return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 1150 |
} |
| 1151 |
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t len, upb_Arena* arena) { |
| 1152 |
return (google_api_expr_v1alpha1_Type**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
| 1153 |
} |
| 1154 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, upb_Arena* arena) { |
| 1155 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 1156 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
| 1157 |
if (!ok) return NULL; |
| 1158 |
return sub; |
| 1159 |
} |
| 1160 |
UPB_INLINE upb_StringView* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t* len) { |
| 1161 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); |
| 1162 |
} |
| 1163 |
UPB_INLINE upb_StringView* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, size_t len, upb_Arena* arena) { |
| 1164 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(3, 4), arena); |
| 1165 |
} |
| 1166 |
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, upb_StringView val, upb_Arena* arena) { |
| 1167 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(3, 4), &val, arena); |
| 1168 |
} |
| 1169 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, google_api_expr_v1alpha1_Type* value) { |
| 1170 |
_upb_sethas(msg, 1); |
| 1171 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Type*) = value; |
| 1172 |
} |
| 1173 |
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* msg, upb_Arena* arena) { |
| 1174 |
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_result_type(msg); |
| 1175 |
if (sub == NULL) { |
| 1176 |
sub = (struct google_api_expr_v1alpha1_Type*)_upb_Message_New(&google_api_expr_v1alpha1_Type_msginit, arena); |
| 1177 |
if (!sub) return NULL; |
| 1178 |
google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_result_type(msg, sub); |
| 1179 |
} |
| 1180 |
return sub; |
| 1181 |
} |
| 1182 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_is_instance_function(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, bool value) { |
| 1183 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 1184 |
} |
| 1185 |
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_doc(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_StringView value) { |
| 1186 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = value; |
| 1187 |
} |
| 1188 |
|
| 1189 |
/* google.api.expr.v1alpha1.Reference */ |
| 1190 |
|
| 1191 |
UPB_INLINE google_api_expr_v1alpha1_Reference* google_api_expr_v1alpha1_Reference_new(upb_Arena* arena) { |
| 1192 |
return (google_api_expr_v1alpha1_Reference*)_upb_Message_New(&google_api_expr_v1alpha1_Reference_msginit, arena); |
| 1193 |
} |
| 1194 |
UPB_INLINE google_api_expr_v1alpha1_Reference* google_api_expr_v1alpha1_Reference_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1195 |
google_api_expr_v1alpha1_Reference* ret = google_api_expr_v1alpha1_Reference_new(arena); |
| 1196 |
if (!ret) return NULL; |
| 1197 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1198 |
return NULL; |
| 1199 |
} |
| 1200 |
return ret; |
| 1201 |
} |
| 1202 |
UPB_INLINE google_api_expr_v1alpha1_Reference* google_api_expr_v1alpha1_Reference_parse_ex(const char* buf, size_t size, |
| 1203 |
const upb_ExtensionRegistry* extreg, |
| 1204 |
int options, upb_Arena* arena) { |
| 1205 |
google_api_expr_v1alpha1_Reference* ret = google_api_expr_v1alpha1_Reference_new(arena); |
| 1206 |
if (!ret) return NULL; |
| 1207 |
if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, extreg, options, arena) != |
| 1208 |
kUpb_DecodeStatus_Ok) { |
| 1209 |
return NULL; |
| 1210 |
} |
| 1211 |
return ret; |
| 1212 |
} |
| 1213 |
UPB_INLINE char* google_api_expr_v1alpha1_Reference_serialize(const google_api_expr_v1alpha1_Reference* msg, upb_Arena* arena, size_t* len) { |
| 1214 |
char* ptr; |
| 1215 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Reference_msginit, 0, arena, &ptr, len); |
| 1216 |
return ptr; |
| 1217 |
} |
| 1218 |
UPB_INLINE char* google_api_expr_v1alpha1_Reference_serialize_ex(const google_api_expr_v1alpha1_Reference* msg, int options, |
| 1219 |
upb_Arena* arena, size_t* len) { |
| 1220 |
char* ptr; |
| 1221 |
(void)upb_Encode(msg, &google_api_expr_v1alpha1_Reference_msginit, options, arena, &ptr, len); |
| 1222 |
return ptr; |
| 1223 |
} |
| 1224 |
UPB_INLINE void google_api_expr_v1alpha1_Reference_clear_name(const google_api_expr_v1alpha1_Reference* msg) { |
| 1225 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1226 |
} |
| 1227 |
UPB_INLINE upb_StringView google_api_expr_v1alpha1_Reference_name(const google_api_expr_v1alpha1_Reference* msg) { |
| 1228 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1229 |
} |
| 1230 |
UPB_INLINE void google_api_expr_v1alpha1_Reference_clear_overload_id(const google_api_expr_v1alpha1_Reference* msg) { |
| 1231 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 1232 |
} |
| 1233 |
UPB_INLINE upb_StringView const* google_api_expr_v1alpha1_Reference_overload_id(const google_api_expr_v1alpha1_Reference* msg, size_t* len) { |
| 1234 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 1235 |
} |
| 1236 |
UPB_INLINE bool google_api_expr_v1alpha1_Reference_has_value(const google_api_expr_v1alpha1_Reference* msg) { |
| 1237 |
return _upb_hasbit(msg, 1); |
| 1238 |
} |
| 1239 |
UPB_INLINE void google_api_expr_v1alpha1_Reference_clear_value(const google_api_expr_v1alpha1_Reference* msg) { |
| 1240 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 1241 |
} |
| 1242 |
UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_value(const google_api_expr_v1alpha1_Reference* msg) { |
| 1243 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_api_expr_v1alpha1_Constant*); |
| 1244 |
} |
| 1245 |
|
| 1246 |
UPB_INLINE void google_api_expr_v1alpha1_Reference_set_name(google_api_expr_v1alpha1_Reference *msg, upb_StringView value) { |
| 1247 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1248 |
} |
| 1249 |
UPB_INLINE upb_StringView* google_api_expr_v1alpha1_Reference_mutable_overload_id(google_api_expr_v1alpha1_Reference* msg, size_t* len) { |
| 1250 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 1251 |
} |
| 1252 |
UPB_INLINE upb_StringView* google_api_expr_v1alpha1_Reference_resize_overload_id(google_api_expr_v1alpha1_Reference* msg, size_t len, upb_Arena* arena) { |
| 1253 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena); |
| 1254 |
} |
| 1255 |
UPB_INLINE bool google_api_expr_v1alpha1_Reference_add_overload_id(google_api_expr_v1alpha1_Reference* msg, upb_StringView val, upb_Arena* arena) { |
| 1256 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val, arena); |
| 1257 |
} |
| 1258 |
UPB_INLINE void google_api_expr_v1alpha1_Reference_set_value(google_api_expr_v1alpha1_Reference *msg, struct google_api_expr_v1alpha1_Constant* value) { |
| 1259 |
_upb_sethas(msg, 1); |
| 1260 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_api_expr_v1alpha1_Constant*) = value; |
| 1261 |
} |
| 1262 |
UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_mutable_value(google_api_expr_v1alpha1_Reference* msg, upb_Arena* arena) { |
| 1263 |
struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Reference_value(msg); |
| 1264 |
if (sub == NULL) { |
| 1265 |
sub = (struct google_api_expr_v1alpha1_Constant*)_upb_Message_New(&google_api_expr_v1alpha1_Constant_msginit, arena); |
| 1266 |
if (!sub) return NULL; |
| 1267 |
google_api_expr_v1alpha1_Reference_set_value(msg, sub); |
| 1268 |
} |
| 1269 |
return sub; |
| 1270 |
} |
| 1271 |
|
| 1272 |
extern const upb_MiniTable_File google_api_expr_v1alpha1_checked_proto_upb_file_layout; |
| 1273 |
|
| 1274 |
#ifdef __cplusplus |
| 1275 |
} /* extern "C" */ |
| 1276 |
#endif |
| 1277 |
|
| 1278 |
#include "upb/port_undef.inc" |
| 1279 |
|
| 1280 |
#endif /* GOOGLE_API_EXPR_V1ALPHA1_CHECKED_PROTO_UPB_H_ */ |