xref: /aosp_15_r20/external/grpc-grpc/src/core/ext/upb-gen/google/protobuf/empty.upb.h (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1 /* This file was generated by upb_generator from the input file:
2  *
3  *     google/protobuf/empty.proto
4  *
5  * Do not edit -- your changes will be discarded when the file is
6  * regenerated. */
7 
8 #ifndef GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_
9 #define GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_
10 
11 #include "upb/generated_code_support.h"
12 
13 #include "google/protobuf/empty.upb_minitable.h"
14 
15 // Must be last.
16 #include "upb/port/def.inc"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef struct google_protobuf_Empty { upb_Message UPB_PRIVATE(base); } google_protobuf_Empty;
23 
24 
25 
26 /* google.protobuf.Empty */
27 
google_protobuf_Empty_new(upb_Arena * arena)28 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_new(upb_Arena* arena) {
29   return (google_protobuf_Empty*)_upb_Message_New(&google__protobuf__Empty_msg_init, arena);
30 }
google_protobuf_Empty_parse(const char * buf,size_t size,upb_Arena * arena)31 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_parse(const char* buf, size_t size, upb_Arena* arena) {
32   google_protobuf_Empty* ret = google_protobuf_Empty_new(arena);
33   if (!ret) return NULL;
34   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Empty_msg_init, NULL, 0, arena) !=
35       kUpb_DecodeStatus_Ok) {
36     return NULL;
37   }
38   return ret;
39 }
google_protobuf_Empty_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)40 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_parse_ex(const char* buf, size_t size,
41                            const upb_ExtensionRegistry* extreg,
42                            int options, upb_Arena* arena) {
43   google_protobuf_Empty* ret = google_protobuf_Empty_new(arena);
44   if (!ret) return NULL;
45   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Empty_msg_init, extreg, options,
46                  arena) != kUpb_DecodeStatus_Ok) {
47     return NULL;
48   }
49   return ret;
50 }
google_protobuf_Empty_serialize(const google_protobuf_Empty * msg,upb_Arena * arena,size_t * len)51 UPB_INLINE char* google_protobuf_Empty_serialize(const google_protobuf_Empty* msg, upb_Arena* arena, size_t* len) {
52   char* ptr;
53   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Empty_msg_init, 0, arena, &ptr, len);
54   return ptr;
55 }
google_protobuf_Empty_serialize_ex(const google_protobuf_Empty * msg,int options,upb_Arena * arena,size_t * len)56 UPB_INLINE char* google_protobuf_Empty_serialize_ex(const google_protobuf_Empty* msg, int options,
57                                  upb_Arena* arena, size_t* len) {
58   char* ptr;
59   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Empty_msg_init, options, arena, &ptr, len);
60   return ptr;
61 }
62 
63 
64 #ifdef __cplusplus
65 }  /* extern "C" */
66 #endif
67 
68 #include "upb/port/undef.inc"
69 
70 #endif  /* GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_ */
71